summaryrefslogtreecommitdiff
path: root/keyboard/preonic/keymaps
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-21 18:14:25 -0400
committerJack Humbert <jack.humb@gmail.com>2016-04-21 18:14:25 -0400
commit9828aba2a12f03fccbc1095bc8e4918ae58fa31b (patch)
tree9990820fa4f42650599b40527c94fe3e6c3f6a2d /keyboard/preonic/keymaps
parenta8fd65d86f1bb43a845555ee2ac4b588798684ad (diff)
adds multiple voices and the ability to iterate/deiterate between them
Diffstat (limited to 'keyboard/preonic/keymaps')
-rw-r--r--keyboard/preonic/keymaps/default/keymap.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c
index 267bfab3d7..f0d5ed6030 100644
--- a/keyboard/preonic/keymaps/default/keymap.c
+++ b/keyboard/preonic/keymaps/default/keymap.c
@@ -3,7 +3,6 @@
#include "eeconfig.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
- #include "song_list.h"
#endif
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@@ -31,6 +30,8 @@
#endif
#define MUS_OFF M(8)
#define MUS_ON M(9)
+#define VC_IN M(10)
+#define VC_DE M(11)
// Fillers to make layering more clear
#define _______ KC_TRNS
@@ -171,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
{_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
- {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______},
+ {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
@@ -289,6 +290,22 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
#endif
}
break;
+ case 10:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ voice_iterate();
+ PLAY_NOTE_ARRAY(music_scale, false, 0);
+ #endif
+ }
+ break;
+ case 11:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ voice_deiterate();
+ PLAY_NOTE_ARRAY(music_scale, false, 0);
+ #endif
+ }
+ break;
}
return MACRO_NONE;
};