summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-05-23 23:44:36 -0400
committerJack Humbert <jack.humb@gmail.com>2016-05-23 23:44:36 -0400
commit897f5b2f9d430b780149b46ba113a3fc61483b54 (patch)
tree267e120ac3b2493b89744a66c8de569258716345 /tmk_core
parentaaa758f1d3f97dda39879f2b055ad2da9680adfe (diff)
updates midi in play_note to better octave
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/protocol/lufa/lufa.c4
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;
}
}