forked from forks/qmk_firmware
updates midi in play_note to better octave
This commit is contained in:
parent
aaa758f1d3
commit
897f5b2f9d
|
@ -947,10 +947,10 @@ void fallthrough_callback(MidiDevice * device,
|
|||
if (cnt == 3) {
|
||||
switch (byte0 & 0xF0) {
|
||||
case MIDI_NOTEON:
|
||||
play_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(byte1 & 0x7F)/12.0), (byte2 & 0x7F) / 8);
|
||||
play_note(((double)261.6)*pow(2.0, -4.0)*pow(2.0,(byte1 & 0x7F)/12.0), (byte2 & 0x7F) / 8);
|
||||
break;
|
||||
case MIDI_NOTEOFF:
|
||||
stop_note(((double)261.6)*pow(2.0, -1.0)*pow(2.0,(byte1 & 0x7F)/12.0));
|
||||
stop_note(((double)261.6)*pow(2.0, -4.0)*pow(2.0,(byte1 & 0x7F)/12.0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue