From 525be99ee938aa6e48448d7dd6ea6e6fe50bb36d Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 15:02:43 -0800 Subject: Split MIDI functionality into MIDI_BASIC and MIDI_ADVANCED MIDI_ENABLE = no text data bss dec hex filename 0 17080 0 17080 42b8 satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined MIDI_ADVANCED undefined text data bss dec hex filename 0 19494 0 19494 4c26 satan_midi.hex MIDI_ENABLE = yes #define MIDI_BASIC MIDI_ADVANCED undefined text data bss dec hex filename 0 19788 0 19788 4d4c satan_midi.hex MIDI_ENABLE = yes MIDI_BASIC undefined #define MIDI_ADVANCED text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex MIDI_ENABLE = yes #define MIDI_BASIC #define MIDI_ADVANCED text data bss dec hex filename 0 21140 0 21140 5294 satan_midi.hex --- quantum/quantum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 4a6d0355f..83fa87708 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -150,10 +150,10 @@ bool process_record_quantum(keyrecord_t *record) { if (!( process_record_kb(keycode, record) && - #ifdef MIDI_ENABLE + #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif - #ifdef AUDIO_ENABLE + #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) process_music(keycode, record) && #endif #ifdef TAP_DANCE_ENABLE -- cgit v1.2.3-24-g4f1b From 1000799d1ef594bf9f48076986ec300ef9e536db Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 19:25:33 -0800 Subject: Factor basic note processing into respective processors --- quantum/quantum.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 83fa87708..7a27a568a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -153,6 +153,9 @@ bool process_record_quantum(keyrecord_t *record) { #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif + #ifdef AUDIO_ENABLE + process_audio(keycode, record) && + #endif #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) process_music(keycode, record) && #endif -- cgit v1.2.3-24-g4f1b From a64ae1066250d3aafb6e9670bf617237ec4338e7 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 20:41:13 -0800 Subject: Update existing keymaps Update existing keymaps to enable MIDI_BASIC functionality. Also added an option MIDI_ENABLE_STRICT to be strict about keycode use (which also reduces memory footprint at runtime) --- quantum/quantum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index 7a27a568a..a4a12061b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -95,8 +95,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void reset_keyboard(void) { clear_keyboard(); -#ifdef AUDIO_ENABLE - stop_all_notes(); +#if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_ENABLE_BASIC)) + music_all_notes_off(); shutdown_user(); #endif wait_ms(250); -- cgit v1.2.3-24-g4f1b