diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-04-19 12:58:13 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-19 12:58:13 -0400 |
commit | a2f31c886ff13c5e7adeccccfe672698c1c7efb9 (patch) | |
tree | 1895e4ec947e81ad185bd9f8ff5623fabfeb9f68 /keyboard/preonic/keymaps | |
parent | 78b3a88154914591d2c3433b123d4b80e70f511d (diff) | |
download | qmk_firmware-a2f31c886ff13c5e7adeccccfe672698c1c7efb9.tar.gz qmk_firmware-a2f31c886ff13c5e7adeccccfe672698c1c7efb9.zip |
getting ready for getters and setters
Diffstat (limited to 'keyboard/preonic/keymaps')
-rw-r--r-- | keyboard/preonic/keymaps/default/keymap.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 2546d8f6c5..144e9c3086 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -14,9 +14,8 @@ #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 +#define _MUSIC 5 #define _ADJUST 6 -#define _MUSIC 7 -#define _STOPPER 5 // Macro name shortcuts #define QWERTY M(_QWERTY) @@ -159,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = { {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, _______, _______}, + {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -168,22 +167,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ [_MUSIC] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, - -/* Stopper - * - */ -[_STOPPER] = { {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} + {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} } }; @@ -237,7 +225,7 @@ float tone_music[][2] = { {440.0*pow(2.0,(23)/12.0), 8}, {440.0*pow(2.0,(24)/12.0), 8} }; -float ode_to_joy[][2] = SONG(ODE_TO_JOY); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float goodbye[][2] = SONG(GOODBYE_SOUND); #endif @@ -320,7 +308,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE layer_off(_MUSIC); - layer_off(_STOPPER); stop_all_notes(); #endif } @@ -329,10 +316,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE init_notes(); - set_tempo(150); - PLAY_NOTE_ARRAY(ode_to_joy, false, .25); + PLAY_NOTE_ARRAY(music_scale, false, 0); layer_on(_MUSIC); - layer_on(_STOPPER); #endif } break; @@ -358,6 +343,7 @@ void process_action_user(keyrecord_t *record) { void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); + _delay_ms(10); PLAY_NOTE_ARRAY(start_up, false, 0); #endif } @@ -365,5 +351,5 @@ void matrix_init_user(void) { void play_goodbye_tone() { PLAY_NOTE_ARRAY(goodbye, false, 0); - _delay_ms(2000); + _delay_ms(150); }
\ No newline at end of file |