summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/midi_patch_manager.h34
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();