diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-04-19 03:01:48 +0200 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-19 03:01:48 +0200 |
commit | e49712b5593b887c8af18aeb7196513f1c7b7bcf (patch) | |
tree | 0de0a22806600a9512b93cf05128a4b68fbb7f7d /keyboard/preonic | |
parent | 89a78f4a11a8f04777b3407c958dc989b4d7d884 (diff) | |
download | qmk_firmware-e49712b5593b887c8af18aeb7196513f1c7b7bcf.tar.gz qmk_firmware-e49712b5593b887c8af18aeb7196513f1c7b7bcf.tar.xz |
note sliding - on right now
Diffstat (limited to 'keyboard/preonic')
-rw-r--r-- | keyboard/preonic/keymaps/default/keymap.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 2591af9f0..2546d8f6c 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -14,8 +14,9 @@ #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _ADJUST 5 -#define _MUSIC 6 +#define _ADJUST 6 +#define _MUSIC 7 +#define _STOPPER 5 // Macro name shortcuts #define QWERTY M(_QWERTY) @@ -172,7 +173,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* 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} } + }; const uint16_t PROGMEM fn_actions[] = { @@ -225,6 +238,7 @@ float tone_music[][2] = { {440.0*pow(2.0,(24)/12.0), 8} }; float ode_to_joy[][2] = SONG(ODE_TO_JOY); +float goodbye[][2] = SONG(GOODBYE_SOUND); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -306,6 +320,7 @@ 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 } @@ -317,6 +332,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) set_tempo(150); PLAY_NOTE_ARRAY(ode_to_joy, false, .25); layer_on(_MUSIC); + layer_on(_STOPPER); #endif } break; @@ -345,3 +361,9 @@ void matrix_init_user(void) { PLAY_NOTE_ARRAY(start_up, false, 0); #endif } + +void play_goodbye_tone() +{ + PLAY_NOTE_ARRAY(goodbye, false, 0); + _delay_ms(2000); +}
\ No newline at end of file |