Skip to content

Commit

Permalink
Add MIDI layer
Browse files Browse the repository at this point in the history
  • Loading branch information
henrebotha committed Mar 11, 2022
1 parent 5732b75 commit bb62a40
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/keymaps/henrebotha/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
#undef DRIVER_2_LED_TOTAL
#undef DRIVER_LED_TOTAL
#undef RGB_MATRIX_SKIP_FRAMES

#define MIDI_ADVANCED
28 changes: 27 additions & 1 deletion src/keymaps/henrebotha/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#define RSFT_MI RSFT_T(KC_MINUS)
#define LSFT_TA LSFT_T(KC_TAB)

#define MI_DIE MI_ALLOFF
#define MI_TD MI_TRNSD
#define MI_TU MI_TRNSU

enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
Expand All @@ -30,6 +34,7 @@ enum layers {
LAYER_GAMING,
LAYER_FUNCTION,
LAYER_TMUX,
LAYER_MIDI,
LAYER_GS_GGX2,
LAYER_GS_SCB,
LAYER_GS_TAL
Expand All @@ -42,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ╭───────┬───────┬───────┬───────┬───────┬───────┬───────╮ ╭───────┬───────┬───────┬───────┬───────┬───────┬───────╮
KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,TG(1) , RESET ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX, XXXXXXX,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS,
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TG(5) , XXXXXXX,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤
CTL_ESC,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT,
// ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤
Expand Down Expand Up @@ -142,6 +147,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ╰───────┴───────┴───────╯ ╰───────┴───────┴───────╯
),

// midi layer
[LAYER_MIDI] = LAYOUT_ergodox_pretty(
// ╭───────┬───────┬───────┬───────┬───────┬───────┬───────╮ ╭───────┬───────┬───────┬───────┬───────┬───────┬───────╮
MI_Ds_1,MI_E_1, MI_F_1 ,MI_Fs_1,MI_G_1 ,MI_Gs_1,_______, XXXXXXX,MI_A_1 ,MI_As_1,MI_B_1 ,MI_C_2 ,MI_Cs_2,MI_D_2 ,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤
MI_As ,MI_B ,MI_C_1 ,MI_Cs_1,MI_D_1 ,MI_Ds_1,MI_TD , MI_TU ,MI_E_1 ,MI_F_1 ,MI_Fs_1,MI_G_1 ,MI_Gs_1,MI_A_1 ,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤ ├───────┼───────┼───────┼───────┼───────┼───────┼───────┤
MI_F ,MI_Fs ,MI_G ,MI_Gs ,MI_A ,MI_As , MI_B ,MI_C_1 ,MI_Cs_1,MI_D_1 ,MI_Ds_1,MI_E_1 ,
// ├───────┼───────┼───────┼───────┼───────┼───────┤ │ │ ├───────┼───────┼───────┼───────┼───────┼───────┤
MI_C ,MI_Cs ,MI_D ,MI_Ds ,MI_E ,MI_F ,MI_OCTD, MI_OCTU,MI_Fs ,MI_G ,MI_Gs ,MI_A ,MI_As ,MI_B ,
// ├───────┼───────┼───────┼───────┼───────┼───────┴───────╯ ╰───────┴───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,TO(0) ,_______, _______,TO(0) ,_______,_______,MI_DIE ,
// ╰───────┴───────┴───────┴───────┴───────╯ ╭───────┬───────╮ ╭───────┬───────╮ ╰───────┴───────┴───────┴───────┴───────╯
_______,_______, _______,_______,
// ╭───────┼───────┼───────┤ ├───────┼───────┼───────╮
_______, _______,
// │ │ ├───────┤ ├───────┤ │ │
MI_SUS ,MI_CHD ,MI_CHU , _______,MI_VELD,MI_VELU
// ╰───────┴───────┴───────╯ ╰───────┴───────┴───────╯
),

// game-specific layer
[LAYER_GS_GGX2] = LAYOUT_ergodox_pretty(
// ╭───────┬───────┬───────┬───────┬───────┬───────┬───────╮ ╭───────┬───────┬───────┬───────┬───────┬───────┬───────╮
Expand Down
1 change: 1 addition & 0 deletions src/keymaps/henrebotha/rules.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
RGBLIGHT_ENABLE = no
UNICODE_ENABLE = no
LEADER_ENABLE = yes
MIDI_ENABLE = yes

0 comments on commit bb62a40

Please sign in to comment.