From 897f5b2f9d430b780149b46ba113a3fc61483b54 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 23 May 2016 23:44:36 -0400 Subject: updates midi in play_note to better octave --- tmk_core/protocol/lufa/lufa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tmk_core/protocol') 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; } } -- cgit v1.2.3