diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-12-15 11:05:41 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-12-15 11:05:41 +0000 |
commit | 5e7ae490c1616696a733287b62c08416726653ae (patch) | |
tree | 9d9d933e7c4afacbb8608cce17e7de779be0b0fe /libs/ardour/ardour/midi_patch_manager.h | |
parent | bf7e792e3e499b665c20fc196e53cf05bb99e0c7 (diff) |
* first working prototype of changing program changes by scroll wheel (still some automation points issues)
git-svn-id: svn://localhost/ardour2/branches/3.0@4324 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 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 1642b1a22b..f617d82998 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -80,6 +80,40 @@ public: } } + boost::shared_ptr<Patch> previous_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)-> + previous_patch(patch_key); + } else { + return boost::shared_ptr<Patch>(); + } + } + + boost::shared_ptr<Patch> next_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)-> + next_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(); |