Commit 56bcd524 authored by Jacob Vosmaer's avatar Jacob Vosmaer

More messing around with mono mode

parent dc35122f
......@@ -385,12 +385,17 @@ void mono_note_off(uint8_t n) {
return;
}
// Note n is currently playing.
l_delete(&mono.held_notes, n);
mono_set_pitch();
if (l_empty(&mono.held_notes)) {
for_each_voice (v) { gate_off(v); }
return;
}
void (*f)(uint8_t) = l_empty(&mono.held_notes) ? gate_off : gate_on;
for (uint8_t v = 0; v < NUM_VOICES; v++) {
f(v);
// Some other key is still held; play that one now.
mono_set_pitch();
for (uint8_t v = mono.disabled_voices; v < NUM_VOICES; v++) {
gate_on(v);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment