summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2008-12-08 09:50:19 +0000
committerHans Baier <hansfbaier@googlemail.com>2008-12-08 09:50:19 +0000
commita9bb336fc44ab4937978f5a0308e440ed632ea50 (patch)
tree174529b93d0c48e87e5dc12499221152fbc68f36 /libs
parent6974dbdcd273368fc3b51e45807d65e7d89eebed (diff)
* first primitive implementation of MidiPatchManager
* some cosmetic changes * added midi_patch_path() to libs/ardour/ardour/session_directory.h git-svn-id: svn://localhost/ardour2/branches/3.0@4299 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/session_directory.h7
-rw-r--r--libs/ardour/directory_names.cc1
-rw-r--r--libs/ardour/plugin_manager.cc2
-rw-r--r--libs/ardour/session_directory.cc6
-rw-r--r--libs/midi++2/midi++/midnam_patch.h28
-rw-r--r--libs/midi++2/midnam_patch.cc20
6 files changed, 59 insertions, 5 deletions
diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h
index a4fb7d07c5..5c976374e3 100644
--- a/libs/ardour/ardour/session_directory.h
+++ b/libs/ardour/ardour/session_directory.h
@@ -61,6 +61,13 @@ public:
* root_path()/interchange/session_name/midifiles
*/
const path midi_path () const;
+
+ /**
+ * @return the absolute path to the directory in which
+ * the session stores MIDNAM patch files, ie
+ * root_path()/interchange/session_name/patchfiles
+ */
+ const path midi_patch_path () const;
/**
* @return The absolute path to the directory in which all
diff --git a/libs/ardour/directory_names.cc b/libs/ardour/directory_names.cc
index 2b6dfcbb39..0480ddc8ba 100644
--- a/libs/ardour/directory_names.cc
+++ b/libs/ardour/directory_names.cc
@@ -7,6 +7,7 @@ namespace ARDOUR {
const char* const old_sound_dir_name = X_("sounds");
const char* const sound_dir_name = X_("audiofiles");
const char* const midi_dir_name = X_("midifiles");
+const char* const midi_patch_dir_name = X_("patchfiles");
const char* const peak_dir_name = X_("peaks");
const char* const dead_sound_dir_name = X_("dead_sounds");
const char* const dead_midi_dir_name = X_("dead_midi");
diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc
index e7c2aecd2d..d4e995f0bf 100644
--- a/libs/ardour/plugin_manager.cc
+++ b/libs/ardour/plugin_manager.cc
@@ -478,7 +478,7 @@ PluginManager::vst_discover (string path)
PluginInfoPtr info(new VSTPluginInfo);
- /* what a goddam joke freeware VST is */
+ /* what a joke freeware VST is */
if (!strcasecmp ("The Unnamed plugin", finfo->name)) {
info->name = PBD::basename_nosuffix (path);
diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc
index d5f2ddc1ba..50e213a4c2 100644
--- a/libs/ardour/session_directory.cc
+++ b/libs/ardour/session_directory.cc
@@ -107,6 +107,12 @@ SessionDirectory::midi_path () const
}
const path
+SessionDirectory::midi_patch_path () const
+{
+ return sources_root() / midi_patch_path();
+}
+
+const path
SessionDirectory::peak_path () const
{
return m_root_path / peak_dir_name;
diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h
index 3abb6c6c54..2561d905eb 100644
--- a/libs/midi++2/midi++/midnam_patch.h
+++ b/libs/midi++2/midi++/midnam_patch.h
@@ -1,14 +1,34 @@
+/*
+ Copyright (C) 2008 Hans Baier
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
#ifndef MIDNAM_PATCH_H_
#define MIDNAM_PATCH_H_
-#include "pbd/stateful.h"
-#include "midi++/event.h"
-#include "pbd/xml++.h"
-
#include <string>
#include <list>
#include <set>
+#include "pbd/stateful.h"
+#include "midi++/event.h"
+#include "pbd/xml++.h"
+
namespace MIDI
{
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc
index 758667d909..56b36b5919 100644
--- a/libs/midi++2/midnam_patch.cc
+++ b/libs/midi++2/midnam_patch.cc
@@ -1,3 +1,23 @@
+/*
+ Copyright (C) 2008 Hans Baier
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
#include "midi++/midnam_patch.h"
#include <algorithm>