From d1fe24ad9f85768774ae50465c71f3757a33cc00 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Feb 2017 17:18:05 -0800 Subject: Allow customization of the number of tone keycodes and add example keymap --- quantum/template/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quantum/template') diff --git a/quantum/template/config.h b/quantum/template/config.h index c61c4a6181..d0bee0d89a 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -159,4 +159,7 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + #endif -- cgit v1.2.3 From ed15973a3ffff6e18e62f81654632b97961f18d2 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sun, 19 Feb 2017 17:45:08 -0800 Subject: Document size added by MIDI_ENABLE (~3800 bytes according to my experiments) satan/keymaps/midi MIDI_ENABLE = no text data bss dec hex filename 0 17080 0 17080 42b8 satan_midi.hex MIDI_ENABLE = yes #define MIDI_TONE_KEYCODE_OCTAVES 3 // default text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex MIDI_ENABLE = yes #define MIDI_TONE_KEYCODE_OCTAVES 2 // fewer octaves text data bss dec hex filename 0 20846 0 20846 516e satan_midi.hex --- quantum/template/config.h | 2 +- quantum/template/keymaps/default/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/template') diff --git a/quantum/template/config.h b/quantum/template/config.h index d0bee0d89a..cd6dfa2c6a 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -159,7 +159,7 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 #endif diff --git a/quantum/template/keymaps/default/Makefile b/quantum/template/keymaps/default/Makefile index f4671a9d11..24442db37d 100644 --- a/quantum/template/keymaps/default/Makefile +++ b/quantum/template/keymaps/default/Makefile @@ -9,7 +9,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls +MIDI_ENABLE = no # MIDI support (+3800) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3 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/template/config.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'quantum/template') diff --git a/quantum/template/config.h b/quantum/template/config.h index cd6dfa2c6a..54db4f242f 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -159,6 +159,23 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -- cgit v1.2.3 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/template/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'quantum/template') diff --git a/quantum/template/config.h b/quantum/template/config.h index 54db4f242f..7393097e1e 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h @@ -163,6 +163,9 @@ along with this program. If not, see . * MIDI options */ +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ -- cgit v1.2.3 From 976c856966841cd0be6e514c6365c73164f5b96d Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Sat, 25 Feb 2017 21:38:35 -0800 Subject: Update size estimates in the Makefile 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 +2414 bytes (vs. MIDI_ENABLE = no) MIDI_ENABLE = yes 0 20846 0 20846 516e satan_midi.hex +1352 bytes (vs. MIDI_ENABLE = yes, MIDI_BASIC off, MIDI_ADVANCED off) MIDI_ENABLE = yes #define MIDI_BASIC #define MIDI_ADVANCED text data bss dec hex filename 0 21292 0 21292 532c satan_midi.hex +1798 bytes (vs. MIDI_ENABLE = yes, MIDI_BASIC off, MIDI_ADVANCED off) Conclusion: +2400 to 4200, depending on config --- quantum/template/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/template') diff --git a/quantum/template/rules.mk b/quantum/template/rules.mk index bad3387bf4..a1f9377d87 100644 --- a/quantum/template/rules.mk +++ b/quantum/template/rules.mk @@ -61,7 +61,7 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE ?= no # USB Nkey Rollover BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls +MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE ?= no # Audio output on port C6 -- cgit v1.2.3 From d11962aeb27c73b87f8154d7f2cee747c8858d09 Mon Sep 17 00:00:00 2001 From: Gabriel Young Date: Thu, 2 Mar 2017 11:40:06 -0800 Subject: fix 'stop_all_notes' naming to be more consistent --- quantum/template/keymaps/default/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/template') diff --git a/quantum/template/keymaps/default/Makefile b/quantum/template/keymaps/default/Makefile index 24442db37d..29f11bbc77 100644 --- a/quantum/template/keymaps/default/Makefile +++ b/quantum/template/keymaps/default/Makefile @@ -9,7 +9,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+3800) +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -- cgit v1.2.3