diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-12-14 22:56:44 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-12-14 22:56:44 +0000 |
commit | bf7e792e3e499b665c20fc196e53cf05bb99e0c7 (patch) | |
tree | 625a115862898cbc6654093693f72e10ea60660c /libs/ardour/ardour/midi_patch_manager.h | |
parent | 18d6284438bb69655670a7b1e931cd73f35d00d8 (diff) |
* some refactoring of patch name stuff in preparation for altering program changes events
git-svn-id: svn://localhost/ardour2/branches/3.0@4323 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_patch_manager.h')
-rw-r--r-- | libs/ardour/ardour/midi_patch_manager.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 9a99571f79..1642b1a22b 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -63,6 +63,23 @@ public: boost::shared_ptr<MasterDeviceNames> master_device_by_model(std::string model_name) { return _master_devices_by_model[model_name]; } + boost::shared_ptr<Patch> find_patch( + string model, + string custom_device_mode, + uint8_t channel, + PatchPrimaryKey patch_key) { + + boost::shared_ptr<MIDI::Name::MasterDeviceNames> master_device = master_device_by_model(model); + + if (master_device != 0 && custom_device_mode != "") { + return master_device-> + channel_name_set_by_device_mode_and_channel(custom_device_mode, channel)-> + find_patch(patch_key); + } else { + return boost::shared_ptr<Patch>(); + } + } + std::list<string> custom_device_mode_names_by_model(std::string model_name) { if (model_name != "") { return master_device_by_model(model_name)->custom_device_mode_names(); |