diff options
| author | IBNobody <ibnobody@gmail.com> | 2016-04-16 20:37:44 -0500 |
|---|---|---|
| committer | IBNobody <ibnobody@gmail.com> | 2016-04-16 20:37:44 -0500 |
| commit | 12a9b2b9aeb59a16602374dab202df2bbe256be4 (patch) | |
| tree | 5f78fc2d6f030025142cb06e0d211c762b301a83 /keyboard | |
| parent | a87522033d6385ecd2422f26f5bb6bdad9d44676 (diff) | |
| parent | 41cc35425ab32c9a9492006da8b667d01d32dfa6 (diff) | |
| download | qmk_firmware-12a9b2b9aeb59a16602374dab202df2bbe256be4.tar.gz qmk_firmware-12a9b2b9aeb59a16602374dab202df2bbe256be4.zip | |
Merge remote-tracking branch 'remotes/jackhumbert/master' into personal_atomic_planck
Diffstat (limited to 'keyboard')
| -rw-r--r-- | keyboard/planck/keymaps/default/keymap.c | 10 | ||||
| -rw-r--r-- | keyboard/preonic/keymaps/default/keymap.c | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c index ede08ad7f..a6edefefd 100644 --- a/keyboard/planck/keymaps/default/keymap.c +++ b/keyboard/planck/keymaps/default/keymap.c | |||
| @@ -194,7 +194,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 194 | case _QW: | 194 | case _QW: |
| 195 | if (record->event.pressed) { | 195 | if (record->event.pressed) { |
| 196 | #ifdef AUDIO_ENABLE | 196 | #ifdef AUDIO_ENABLE |
| 197 | play_notes(&tone_qw, 4, false); | 197 | play_notes(&tone_qw, 4, false, 0); |
| 198 | #endif | 198 | #endif |
| 199 | default_layer_set(1UL<<_QW); | 199 | default_layer_set(1UL<<_QW); |
| 200 | } | 200 | } |
| @@ -202,7 +202,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 202 | case _CM: | 202 | case _CM: |
| 203 | if (record->event.pressed) { | 203 | if (record->event.pressed) { |
| 204 | #ifdef AUDIO_ENABLE | 204 | #ifdef AUDIO_ENABLE |
| 205 | play_notes(&tone_cm, 6, false); | 205 | play_notes(&tone_cm, 6, false, 0); |
| 206 | #endif | 206 | #endif |
| 207 | default_layer_set(1UL<<_CM); | 207 | default_layer_set(1UL<<_CM); |
| 208 | } | 208 | } |
| @@ -210,7 +210,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 210 | case _DV: | 210 | case _DV: |
| 211 | if (record->event.pressed) { | 211 | if (record->event.pressed) { |
| 212 | #ifdef AUDIO_ENABLE | 212 | #ifdef AUDIO_ENABLE |
| 213 | play_notes(&tone_dv, 8, false); | 213 | play_notes(&tone_dv, 8, false, 0); |
| 214 | #endif | 214 | #endif |
| 215 | default_layer_set(1UL<<_DV); | 215 | default_layer_set(1UL<<_DV); |
| 216 | } | 216 | } |
| @@ -254,7 +254,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 254 | if (record->event.pressed) { | 254 | if (record->event.pressed) { |
| 255 | #ifdef AUDIO_ENABLE | 255 | #ifdef AUDIO_ENABLE |
| 256 | audio_on(); | 256 | audio_on(); |
| 257 | play_notes(&start_up, 5, false); | 257 | play_notes(&start_up, 5, false, 0); |
| 258 | #endif | 258 | #endif |
| 259 | } | 259 | } |
| 260 | break; | 260 | break; |
| @@ -265,6 +265,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 265 | void matrix_init_user(void) { | 265 | void matrix_init_user(void) { |
| 266 | #ifdef AUDIO_ENABLE | 266 | #ifdef AUDIO_ENABLE |
| 267 | init_notes(); | 267 | init_notes(); |
| 268 | play_notes(&start_up, 5, false); | 268 | play_notes(&start_up, 5, false, 0); |
| 269 | #endif | 269 | #endif |
| 270 | } | 270 | } |
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 | } |
