From fde477a927edc6b4207a6968d44aeed021e8b300 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 15 May 2016 00:51:06 -0400 Subject: updates midi functionality (#331) * implements leader key for planck experimental * allows override of leader timeout * adds ability to use the leader key in seq * fixes leader keycode * adds chording prototype * fixes keycode detection * moves music mode to quantum.c * disables chording by default * adds music sequencer functionality * implements audio/music functions in quantum.c * splits up process_action to allow independent processing of actions * moves midi stuff to quantum.c * adds additional scales for midi --- tmk_core/protocol/lufa/lufa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/protocol') diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index f03f9a9b92..aba94cd597 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -883,7 +883,7 @@ int main(void) midi_register_cc_callback(&midi_device, cc_callback); midi_register_sysex_callback(&midi_device, sysex_callback); - init_notes(); + // init_notes(); // midi_send_cc(&midi_device, 0, 1, 2); // midi_send_cc(&midi_device, 15, 1, 0); // midi_send_noteon(&midi_device, 0, 64, 127); -- cgit v1.2.3 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