diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-05-23 23:44:36 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-05-23 23:44:36 -0400 |
commit | 897f5b2f9d430b780149b46ba113a3fc61483b54 (patch) | |
tree | 267e120ac3b2493b89744a66c8de569258716345 | |
parent | aaa758f1d3f97dda39879f2b055ad2da9680adfe (diff) | |
download | qmk_firmware-897f5b2f9d430b780149b46ba113a3fc61483b54.tar.gz qmk_firmware-897f5b2f9d430b780149b46ba113a3fc61483b54.zip |
updates midi in play_note to better octave
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index aba94cd597..b70b52bf4d 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -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; } } |