summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-29 19:02:33 +0200
committerRobin Gareus <robin@gareus.org>2016-10-29 19:57:43 +0200
commitf8167ebe20ea5d6e4e8d376dfae1b211887977e9 (patch)
treedd7cb125ba4476cee2ef535e9d4990b3dd6a7bd5
parent0332c127cd54b9386bb59eb0ec18c49917c0cf57 (diff)
Prepare for the day when MTAV does no longer force-override InstrumentInfo
-rw-r--r--libs/ardour/ardour/instrument_info.h1
-rw-r--r--libs/ardour/instrument_info.cc11
2 files changed, 11 insertions, 1 deletions
diff --git a/libs/ardour/ardour/instrument_info.h b/libs/ardour/ardour/instrument_info.h
index 8e08c8b4b7..07946333d9 100644
--- a/libs/ardour/ardour/instrument_info.h
+++ b/libs/ardour/ardour/instrument_info.h
@@ -70,6 +70,7 @@ class LIBARDOUR_API InstrumentInfo {
boost::shared_ptr<MIDI::Name::ChannelNameSet> plugin_programs_to_channel_name_set (boost::shared_ptr<Processor> p);
std::string get_plugin_patch_name (boost::shared_ptr<ARDOUR::Processor>, uint16_t bank, uint8_t program, uint8_t channel) const;
+ std::string get_plugin_controller_name (boost::shared_ptr<ARDOUR::Processor>, Evoral::Parameter) const;
std::string get_patch_name (uint16_t bank, uint8_t program, uint8_t channel, bool with_extra) const;
static MIDI::Name::PatchNameList _gm_patches;
diff --git a/libs/ardour/instrument_info.cc b/libs/ardour/instrument_info.cc
index b8c026bd02..2f77d980ba 100644
--- a/libs/ardour/instrument_info.cc
+++ b/libs/ardour/instrument_info.cc
@@ -124,9 +124,12 @@ string
InstrumentInfo::get_controller_name (Evoral::Parameter param) const
{
boost::shared_ptr<Processor> p = internal_instrument.lock();
- if (p || param.type() != MidiCCAutomation) {
+ if (param.type() != MidiCCAutomation) {
return "";
}
+ if (p) {
+ return get_plugin_controller_name (p, param);
+ }
boost::shared_ptr<MIDI::Name::MasterDeviceNames> dev_names(
MIDI::Name::MidiPatchManager::instance().master_device_by_model(
@@ -229,6 +232,12 @@ InstrumentInfo::general_midi_patches()
}
string
+InstrumentInfo::get_plugin_controller_name (boost::shared_ptr<ARDOUR::Processor>, Evoral::Parameter param) const
+{
+ return "";
+}
+
+string
InstrumentInfo::get_plugin_patch_name (boost::shared_ptr<Processor> p, uint16_t bank, uint8_t program, uint8_t /*channel*/) const
{
boost::shared_ptr<PluginInsert> insert = boost::dynamic_pointer_cast<PluginInsert> (p);