Add options to create and locate to scene markers

This commit is contained in:
Robin Gareus 2024-05-31 18:20:49 +02:00
parent a3d92fe5a7
commit 4a99a40afd
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 15 additions and 6 deletions

View file

@ -231,6 +231,9 @@ CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
CONFIG_VARIABLE (RippleMode, ripple_mode, "ripple-mode", RippleSelected)
CONFIG_VARIABLE (Temporal::TimeDomain, default_automation_time_domain, "default-automation-time-domain", Temporal::BeatTime)
CONFIG_VARIABLE (bool, mark_at_pgm_change, "mark-at-pgm-change", true)
CONFIG_VARIABLE (bool, locate_to_pgm_change, "locate-to-pgm-change", true)
/* plugin related */
CONFIG_VARIABLE (bool, new_plugins_active, "new-plugins-active", true)

View file

@ -283,16 +283,22 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
last_program_message_time = time;
if (!recording()) {
if (!recording ()) {
if (Config->get_locate_to_pgm_change ()) {
MIDIInputActivity (); /* EMIT SIGNAL */
MIDIInputActivity (); /* EMIT SIGNAL */
int bank = -1;
if (have_seen_bank_changes) {
bank = std::dynamic_pointer_cast<AsyncMIDIPort>(input_port)->channel (channel)->bank();
}
int bank = -1;
if (have_seen_bank_changes) {
bank = std::dynamic_pointer_cast<AsyncMIDIPort>(input_port)->channel (channel)->bank();
jump_to (bank, program);
return;
}
}
jump_to (bank, program);
/* we are recording, do we need to create a marker */
if (!Config->get_mark_at_pgm_change ()) {
return;
}