Prepare for the day when MTAV does no longer force-override InstrumentInfo
[ardour.git] / libs / ardour / instrument_info.cc
index b8c026bd029e2ee0e79f565ea4e1cc361eba164a..2f77d980ba3a369489a5c1957eccc776091047e7 100644 (file)
@@ -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(
@@ -228,6 +231,12 @@ InstrumentInfo::general_midi_patches()
        return _gm_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
 {