|
|
|
@ -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)
|
|
|
|
@ -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);
|
|
|
|
|
}
|