Skip to content

Commit

Permalink
Fix consistency between pitchbend and mod wheel guards
Browse files Browse the repository at this point in the history
  • Loading branch information
jmamma committed Sep 27, 2021
1 parent e742af4 commit 83761f3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions avr/cores/megacommand/MCL/SeqPtcPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,13 @@ void SeqPtcMidiEvents::onControlChangeCallback_Midi2(uint8_t *msg) {
uint8_t track;
uint8_t track_param;

if (param < 2 || mcl_cfg.uart_cc_loopback) {
bool send_uart2 = true;

//CC_FWD
//
if (mcl_cfg.uart_cc_loopback) {
MidiUart2.sendCC(channel, param, value);
send_uart2 = false;
}

if (is_md_midi(channel)) {
Expand All @@ -769,11 +774,16 @@ void SeqPtcMidiEvents::onControlChangeCallback_Midi2(uint8_t *msg) {
return;
}

uint8_t n = mcl_seq.find_ext_track(channel);
uint8_t n = mcl_seq.find_ext_track(channel);
if (n == 255) {
return;
}

//Send mod wheel CC#1 or bank select CC#0
if (send_uart2 && param < 2) {
mcl_seq.ext_tracks[n].send_cc(param, value);
}

if (GUI.currentPage() == &seq_extstep_page && SeqPage::pianoroll_mode > 0) {
if (mcl_seq.ext_tracks[n].locks_params[SeqPage::pianoroll_mode - 1] - 1 ==
PARAM_LEARN) {
Expand Down

0 comments on commit 83761f3

Please sign in to comment.