]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Update existing keymaps
authorGabriel Young <gabeplaysdrums@live.com>
Sun, 26 Feb 2017 04:41:13 +0000 (20:41 -0800)
committerGabriel Young <gabeplaysdrums@live.com>
Sun, 26 Feb 2017 04:41:13 +0000 (20:41 -0800)
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)

23 files changed:
keyboards/planck/keymaps/dbroqua/config.h [new file with mode: 0644]
keyboards/planck/keymaps/default/config.h [new file with mode: 0644]
keyboards/planck/keymaps/experimental/config.h
keyboards/planck/keymaps/impossible/config.h [new file with mode: 0644]
keyboards/planck/keymaps/jeebak/config.h [new file with mode: 0644]
keyboards/planck/keymaps/jhenahan/config.h
keyboards/planck/keymaps/premek/config.h [new file with mode: 0644]
keyboards/planck/keymaps/sgoodwin/config.h [new file with mode: 0644]
keyboards/planck/keymaps/smt/config.h [new file with mode: 0644]
keyboards/planck/keymaps/thermal_printer/config.h
keyboards/planck/keymaps/unicode/config.h [new file with mode: 0644]
keyboards/planck/keymaps/xyverz/config.h [new file with mode: 0644]
keyboards/preonic/keymaps/CMD-Preonic/config.h [new file with mode: 0644]
keyboards/preonic/keymaps/default/config.h [new file with mode: 0644]
keyboards/preonic/keymaps/smt/config.h [new file with mode: 0644]
keyboards/satan/keymaps/midi/config.h
keyboards/subatomic/keymaps/default/config.h [new file with mode: 0644]
quantum/process_keycode/process_audio.c
quantum/process_keycode/process_music.c
quantum/process_keycode/process_music.h
quantum/quantum.c
quantum/quantum_keycodes.h
quantum/template/config.h

diff --git a/keyboards/planck/keymaps/dbroqua/config.h b/keyboards/planck/keymaps/dbroqua/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
index cc093bee493cce874ea526978c57ff116ec20b08..492490ca1c894a02cbb9412de98aee05fc19417f 100644 (file)
 #define RGBLIGHT_HUE_STEP 10
 #define RGBLIGHT_SAT_STEP 17
 
+/*
+ * 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
+*/
+#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
+
 #endif
diff --git a/keyboards/planck/keymaps/impossible/config.h b/keyboards/planck/keymaps/impossible/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/jeebak/config.h b/keyboards/planck/keymaps/jeebak/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
index cd3adc41ccdb234f53da7d6ef2fc26885552183d..1e42b92b9c3eec53ea28b33faed5d97b8c47c1f0 100644 (file)
@@ -6,4 +6,27 @@
 #define FORCE_NKRO
 #define WORKMAN_SOUND COLEMAK_SOUND
 
+/*
+ * 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
+*/
+#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
+
 #endif
diff --git a/keyboards/planck/keymaps/premek/config.h b/keyboards/planck/keymaps/premek/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/sgoodwin/config.h b/keyboards/planck/keymaps/sgoodwin/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/smt/config.h b/keyboards/planck/keymaps/smt/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
index 430b6493cfc4099a773df7e5a4a6d68d5e90f792..bcd09893066cc0e0722aaba172d21432078c6f95 100644 (file)
             sei(); \
         } while(0)
 
+/*
+ * 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
+*/
+#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
+
  #endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/unicode/config.h b/keyboards/planck/keymaps/unicode/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/planck/keymaps/xyverz/config.h b/keyboards/planck/keymaps/xyverz/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/preonic/keymaps/CMD-Preonic/config.h b/keyboards/preonic/keymaps/CMD-Preonic/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
diff --git a/keyboards/preonic/keymaps/smt/config.h b/keyboards/preonic/keymaps/smt/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
index 59250b49e24585bf898afeca7dae9066140c86f3..8e10b04ec28c674b69b4eac8eac40ad261a94d95 100644 (file)
@@ -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
 */
diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h
new file mode 100644 (file)
index 0000000..4c61581
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/*
+ * 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
+*/
+#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
+
+#endif
\ No newline at end of file
index d45242c9e0fcf5322a5395c41ad0f670c2492294..71c0297ee2e7082492f17d5b51f08888ee7f043d 100644 (file)
@@ -1,5 +1,5 @@
-#include "process_audio.h"
 #include "audio.h"
+#include "process_audio.h"
 
 static float compute_freq_for_midi_note(uint8_t note)
 {
@@ -43,7 +43,7 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) {
         return false;
     }
 
-    return true
+    return true;
 }
 
 void process_audio_noteon(uint8_t note) {
index 43bcf973e971560064b12a52a18a9ece78c577cd..4b86b91f00556b0a2f02af0b0384cce7feeb3514 100644 (file)
@@ -42,7 +42,7 @@ static void music_noteoff(uint8_t note) {
     #endif
 }
 
-static void music_all_notes_off(void) {
+void music_all_notes_off(void) {
     #ifdef AUDIO_ENABLE
     process_audio_stop_all_notes();
     #endif
index 69913b2761c329c338e5e845384496e319d44ae4..a36514a44fecb3beb0b39fb96efd526ec353f848 100644 (file)
@@ -14,6 +14,7 @@ void music_off(void);
 
 void music_on_user(void);
 void music_scale_user(void);
+void music_all_notes_off(void);
 
 void matrix_scan_music(void);
 
index 7a27a568ac147da97c503a96fa2241193f4b6574..a4a12061b37eeed5b9b69d3677bfb2f2c3735138 100644 (file)
@@ -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);
index 3b82b7208cf462510f5aafa14448336a8aee106b..56228f2767112697128c0c6a8ea8e7bd89c73d94 100644 (file)
@@ -1,8 +1,11 @@
-
 #ifndef QUANTUM_KEYCODES_H
 #define QUANTUM_KEYCODES_H
 
-#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
+#ifndef MIDI_ENABLE_STRICT
+#define MIDI_ENABLE_STRICT 0
+#endif
+
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
 #ifndef MIDI_TONE_KEYCODE_OCTAVES
 #define MIDI_TONE_KEYCODE_OCTAVES 3
 #endif
@@ -113,18 +116,16 @@ enum quantum_keycodes {
     MUV_IN,
     MUV_DE,
 
-#ifdef MIDI_ENABLE
     // Midi
-
-#ifdef MIDI_BASIC
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
     MI_ON,  // send midi notes when music mode is enabled
     MI_OFF, // don't send midi notes when music mode is enabled
 #endif
 
-#ifdef MIDI_ADVANCED
+#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
     MIDI_TONE_MIN,
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 0
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0
     MI_C = MIDI_TONE_MIN,
     MI_Cs,
     MI_Db = MI_Cs,
@@ -144,7 +145,7 @@ enum quantum_keycodes {
     MI_B,
 #endif
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 1
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1
     MI_C_1,
     MI_Cs_1,
     MI_Db_1 = MI_Cs_1,
@@ -164,7 +165,7 @@ enum quantum_keycodes {
     MI_B_1,
 #endif
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 2
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2
     MI_C_2,
     MI_Cs_2,
     MI_Db_2 = MI_Cs_2,
@@ -184,7 +185,7 @@ enum quantum_keycodes {
     MI_B_2,
 #endif
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 3
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3
     MI_C_3,
     MI_Cs_3,
     MI_Db_3 = MI_Cs_3,
@@ -204,7 +205,7 @@ enum quantum_keycodes {
     MI_B_3,
 #endif
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 4
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4
     MI_C_4,
     MI_Cs_4,
     MI_Db_4 = MI_Cs_4,
@@ -224,7 +225,7 @@ enum quantum_keycodes {
     MI_B_4,
 #endif
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 5
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
     MI_C_5,
     MI_Cs_5,
     MI_Db_5 = MI_Cs_5,
@@ -244,7 +245,7 @@ enum quantum_keycodes {
     MI_B_5,
 #endif
 
-#if MIDI_TONE_KEYCODE_OCTAVES > 5
+#if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
     MIDI_TONE_MAX = MI_B_5,
 #elif MIDI_TONE_KEYCODE_OCTAVES > 4
     MIDI_TONE_MAX = MI_B_4,
@@ -339,7 +340,6 @@ enum quantum_keycodes {
     MI_MODSD, // decrease modulation speed
     MI_MODSU, // increase modulation speed
 #endif // MIDI_ADVANCED
-#endif // MIDI_ENABLE
 
     // Backlight functionality
     BL_0,
index 54db4f242f084b079a9f40e11a8a4ac06ba82c14..7393097e1e597c7f6ca0a9f0f86e2d4abc441968 100644 (file)
@@ -163,6 +163,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * 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
 */