diff options
Diffstat (limited to 'keyboard/preonic/keymaps/default/keymap.c')
-rw-r--r-- | keyboard/preonic/keymaps/default/keymap.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 1223793cf..48bc72dab 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c | |||
@@ -3,11 +3,6 @@ | |||
3 | #include "eeconfig.h" | 3 | #include "eeconfig.h" |
4 | #ifdef AUDIO_ENABLE | 4 | #ifdef AUDIO_ENABLE |
5 | #include "audio.h" | 5 | #include "audio.h" |
6 | #define SCALE (int []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \ | ||
7 | 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \ | ||
8 | 0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \ | ||
9 | 0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \ | ||
10 | 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), } | ||
11 | #endif | 6 | #endif |
12 | 7 | ||
13 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 8 | // Each layer gets a name for readability, which is then used in the keymap matrix below. |
@@ -242,7 +237,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
242 | case _QWERTY: | 237 | case _QWERTY: |
243 | if (record->event.pressed) { | 238 | if (record->event.pressed) { |
244 | #ifdef AUDIO_ENABLE | 239 | #ifdef AUDIO_ENABLE |
245 | play_notes(&tone_qwerty, 4, false, 0); | 240 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); |
246 | #endif | 241 | #endif |
247 | persistant_default_layer_set(1UL<<_QWERTY); | 242 | persistant_default_layer_set(1UL<<_QWERTY); |
248 | } | 243 | } |
@@ -250,7 +245,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
250 | case _COLEMAK: | 245 | case _COLEMAK: |
251 | if (record->event.pressed) { | 246 | if (record->event.pressed) { |
252 | #ifdef AUDIO_ENABLE | 247 | #ifdef AUDIO_ENABLE |
253 | play_notes(&tone_colemak, 6, false, 1); | 248 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); |
254 | #endif | 249 | #endif |
255 | persistant_default_layer_set(1UL<<_COLEMAK); | 250 | persistant_default_layer_set(1UL<<_COLEMAK); |
256 | } | 251 | } |
@@ -258,7 +253,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
258 | case _DVORAK: | 253 | case _DVORAK: |
259 | if (record->event.pressed) { | 254 | if (record->event.pressed) { |
260 | #ifdef AUDIO_ENABLE | 255 | #ifdef AUDIO_ENABLE |
261 | play_notes(&tone_dvorak, 8, false, 10); | 256 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); |
262 | #endif | 257 | #endif |
263 | persistant_default_layer_set(1UL<<_DVORAK); | 258 | persistant_default_layer_set(1UL<<_DVORAK); |
264 | } | 259 | } |
@@ -302,7 +297,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
302 | if (record->event.pressed) { | 297 | if (record->event.pressed) { |
303 | #ifdef AUDIO_ENABLE | 298 | #ifdef AUDIO_ENABLE |
304 | audio_on(); | 299 | audio_on(); |
305 | play_notes(&start_up, 4, false, 0); | 300 | PLAY_NOTE_ARRAY(start_up, false, 0); |
306 | #endif | 301 | #endif |
307 | } | 302 | } |
308 | break; | 303 | break; |
@@ -317,7 +312,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
317 | case 9: | 312 | case 9: |
318 | if (record->event.pressed) { | 313 | if (record->event.pressed) { |
319 | #ifdef AUDIO_ENABLE | 314 | #ifdef AUDIO_ENABLE |
320 | play_notes(&tone_music, 8, false, 0); | 315 | PLAY_NOTE_ARRAY(tone_music, false, 0); |
321 | layer_on(_MUSIC); | 316 | layer_on(_MUSIC); |
322 | #endif | 317 | #endif |
323 | } | 318 | } |
@@ -344,6 +339,6 @@ void process_action_user(keyrecord_t *record) { | |||
344 | void matrix_init_user(void) { | 339 | void matrix_init_user(void) { |
345 | #ifdef AUDIO_ENABLE | 340 | #ifdef AUDIO_ENABLE |
346 | init_notes(); | 341 | init_notes(); |
347 | play_notes(&start_up, 4, false, 0); | 342 | play_notes(&start_up, false, 0); |
348 | #endif | 343 | #endif |
349 | } | 344 | } |