From f8167ebe20ea5d6e4e8d376dfae1b211887977e9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 29 Oct 2016 19:02:33 +0200 Subject: Prepare for the day when MTAV does no longer force-override InstrumentInfo --- libs/ardour/ardour/instrument_info.h | 1 + libs/ardour/instrument_info.cc | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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 plugin_programs_to_channel_name_set (boost::shared_ptr p); std::string get_plugin_patch_name (boost::shared_ptr, uint16_t bank, uint8_t program, uint8_t channel) const; + std::string get_plugin_controller_name (boost::shared_ptr, 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 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 dev_names( MIDI::Name::MidiPatchManager::instance().master_device_by_model( @@ -228,6 +231,12 @@ InstrumentInfo::general_midi_patches() return _gm_patches; } +string +InstrumentInfo::get_plugin_controller_name (boost::shared_ptr, Evoral::Parameter param) const +{ + return ""; +} + string InstrumentInfo::get_plugin_patch_name (boost::shared_ptr p, uint16_t bank, uint8_t program, uint8_t /*channel*/) const { -- cgit v1.2.3