mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
commit
8bbfe26581
@ -108,10 +108,10 @@ static void fallthrough_callback(MidiDevice* device, uint16_t cnt, uint8_t byte0
|
|||||||
if (cnt == 3) {
|
if (cnt == 3) {
|
||||||
switch (byte0 & 0xF0) {
|
switch (byte0 & 0xF0) {
|
||||||
case MIDI_NOTEON:
|
case MIDI_NOTEON:
|
||||||
play_note(((double)261.6) * pow(2.0, -4.0) * pow(2.0, (byte1 & 0x7F) / 12.0), (byte2 & 0x7F) / 8);
|
play_note(440.0f * powf(2.0f, ((byte1 & 0x7F) - 57) / 12.0f), (byte2 & 0x7F) / 8);
|
||||||
break;
|
break;
|
||||||
case MIDI_NOTEOFF:
|
case MIDI_NOTEOFF:
|
||||||
stop_note(((double)261.6) * pow(2.0, -4.0) * pow(2.0, (byte1 & 0x7F) / 12.0));
|
stop_note(440.0f * powf(2.0f, ((byte1 & 0x7F) - 57) / 12.0f));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user