13
0

Prepare for the day when MTAV does no longer force-override InstrumentInfo

This commit is contained in:
Robin Gareus 2016-10-29 19:02:33 +02:00
parent 0332c127cd
commit f8167ebe20
2 changed files with 11 additions and 1 deletions

View File

@ -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;

View 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
{