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 --- keyboards/satan/keymaps/midi/config.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 keyboards/satan/keymaps/midi/config.h (limited to 'keyboards/satan/keymaps/midi/config.h') diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h new file mode 100644 index 000000000..e345d40c9 --- /dev/null +++ b/keyboards/satan/keymaps/midi/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +/* override number of MIDI tone keycodes (each octave adds 12 bytes) */ +#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file -- cgit v1.2.3-24-g4f1b 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 --- keyboards/satan/keymaps/midi/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/satan/keymaps/midi/config.h') diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index e345d40c9..0dbdb5cbc 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -5,7 +5,7 @@ // place overrides here -/* 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 2 #endif \ No newline at end of file -- cgit v1.2.3-24-g4f1b 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 --- keyboards/satan/keymaps/midi/config.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'keyboards/satan/keymaps/midi/config.h') diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index 0dbdb5cbc..59250b49e 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -3,7 +3,22 @@ #include "../../config.h" -// place overrides here +/* + * 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 2 -- 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) --- keyboards/satan/keymaps/midi/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards/satan/keymaps/midi/config.h') diff --git a/keyboards/satan/keymaps/midi/config.h b/keyboards/satan/keymaps/midi/config.h index 59250b49e..8e10b04ec 100644 --- a/keyboards/satan/keymaps/midi/config.h +++ b/keyboards/satan/keymaps/midi/config.h @@ -7,6 +7,9 @@ * 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-24-g4f1b