diff options
Diffstat (limited to 'keyboard/preonic/keymaps/default/keymap.c')
| -rw-r--r-- | keyboard/preonic/keymaps/default/keymap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 6b6262318..1223793cf 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c | |||
| @@ -242,7 +242,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 242 | case _QWERTY: | 242 | case _QWERTY: |
| 243 | if (record->event.pressed) { | 243 | if (record->event.pressed) { |
| 244 | #ifdef AUDIO_ENABLE | 244 | #ifdef AUDIO_ENABLE |
| 245 | play_notes(&tone_qwerty, 4, false); | 245 | play_notes(&tone_qwerty, 4, false, 0); |
| 246 | #endif | 246 | #endif |
| 247 | persistant_default_layer_set(1UL<<_QWERTY); | 247 | persistant_default_layer_set(1UL<<_QWERTY); |
| 248 | } | 248 | } |
| @@ -250,7 +250,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 250 | case _COLEMAK: | 250 | case _COLEMAK: |
| 251 | if (record->event.pressed) { | 251 | if (record->event.pressed) { |
| 252 | #ifdef AUDIO_ENABLE | 252 | #ifdef AUDIO_ENABLE |
| 253 | play_notes(&tone_colemak, 6, false); | 253 | play_notes(&tone_colemak, 6, false, 1); |
| 254 | #endif | 254 | #endif |
| 255 | persistant_default_layer_set(1UL<<_COLEMAK); | 255 | persistant_default_layer_set(1UL<<_COLEMAK); |
| 256 | } | 256 | } |
| @@ -258,7 +258,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 258 | case _DVORAK: | 258 | case _DVORAK: |
| 259 | if (record->event.pressed) { | 259 | if (record->event.pressed) { |
| 260 | #ifdef AUDIO_ENABLE | 260 | #ifdef AUDIO_ENABLE |
| 261 | play_notes(&tone_dvorak, 8, false); | 261 | play_notes(&tone_dvorak, 8, false, 10); |
| 262 | #endif | 262 | #endif |
| 263 | persistant_default_layer_set(1UL<<_DVORAK); | 263 | persistant_default_layer_set(1UL<<_DVORAK); |
| 264 | } | 264 | } |
| @@ -302,7 +302,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 302 | if (record->event.pressed) { | 302 | if (record->event.pressed) { |
| 303 | #ifdef AUDIO_ENABLE | 303 | #ifdef AUDIO_ENABLE |
| 304 | audio_on(); | 304 | audio_on(); |
| 305 | play_notes(&start_up, 4, false); | 305 | play_notes(&start_up, 4, false, 0); |
| 306 | #endif | 306 | #endif |
| 307 | } | 307 | } |
| 308 | break; | 308 | break; |
| @@ -317,7 +317,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 317 | case 9: | 317 | case 9: |
| 318 | if (record->event.pressed) { | 318 | if (record->event.pressed) { |
| 319 | #ifdef AUDIO_ENABLE | 319 | #ifdef AUDIO_ENABLE |
| 320 | play_notes(&tone_music, 8, false); | 320 | play_notes(&tone_music, 8, false, 0); |
| 321 | layer_on(_MUSIC); | 321 | layer_on(_MUSIC); |
| 322 | #endif | 322 | #endif |
| 323 | } | 323 | } |
| @@ -333,9 +333,9 @@ void process_action_user(keyrecord_t *record) { | |||
| 333 | 333 | ||
| 334 | if (IS_LAYER_ON(_MUSIC)) { | 334 | if (IS_LAYER_ON(_MUSIC)) { |
| 335 | if (record->event.pressed) { | 335 | if (record->event.pressed) { |
| 336 | play_note(((double)261.626)*pow(2.0, -3.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); | 336 | play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); |
| 337 | } else { | 337 | } else { |
| 338 | stop_note(((double)261.626)*pow(2.0, -3.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); | 338 | stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); |
| 339 | } | 339 | } |
| 340 | } | 340 | } |
| 341 | 341 | ||
| @@ -344,6 +344,6 @@ void process_action_user(keyrecord_t *record) { | |||
| 344 | void matrix_init_user(void) { | 344 | void matrix_init_user(void) { |
| 345 | #ifdef AUDIO_ENABLE | 345 | #ifdef AUDIO_ENABLE |
| 346 | init_notes(); | 346 | init_notes(); |
| 347 | play_notes(&start_up, 4, false); | 347 | play_notes(&start_up, 4, false, 0); |
| 348 | #endif | 348 | #endif |
| 349 | } | 349 | } |
