summaryrefslogtreecommitdiffstats
path: root/keyboard/preonic/keymaps/default
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-20 01:08:17 -0400
committerJack Humbert <jack.humb@gmail.com>2016-04-20 01:08:17 -0400
commitde4690593cec908b19f97509f45c78534fd5440f (patch)
tree8e4bced95fa571e824526e6f23b6fee010f4de88 /keyboard/preonic/keymaps/default
parent462601f5e8de3476963c6fef44a88653e19fc3fd (diff)
fixed startup audio with a 500ms delay
Diffstat (limited to 'keyboard/preonic/keymaps/default')
-rw-r--r--keyboard/preonic/keymaps/default/keymap.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c
index ecf3400f8d..9ee803b063 100644
--- a/keyboard/preonic/keymaps/default/keymap.c
+++ b/keyboard/preonic/keymaps/default/keymap.c
@@ -3,6 +3,7 @@
#include "eeconfig.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
+ #include "song_list.h"
#endif
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@@ -189,43 +190,10 @@ float start_up[][2] = {
{440.0*pow(2.0,(26)/12.0), 8}
};
-float tone_qwerty[][2] = {
- {440.0*pow(2.0,(23)/12.0), 8},
- {440.0*pow(2.0,(24)/12.0), 8},
- {0, 4},
- {440.0*pow(2.0,(31)/12.0), 16}
-};
-
-float tone_colemak[][2] = {
- {440.0*pow(2.0,(23)/12.0), 8},
- {440.0*pow(2.0,(24)/12.0), 8},
- {0, 4},
- {440.0*pow(2.0,(31)/12.0), 12},
- {0, 4},
- {440.0*pow(2.0,(35)/12.0), 12}
-};
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float tone_dvorak[][2] = SONG(DVORAK_SOUND);
+float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-float tone_dvorak[][2] = {
- {440.0*pow(2.0,(23)/12.0), 8},
- {440.0*pow(2.0,(24)/12.0), 8},
- {0, 4},
- {440.0*pow(2.0,(31)/12.0), 8},
- {0, 4},
- {440.0*pow(2.0,(33)/12.0), 8},
- {0, 4},
- {440.0*pow(2.0,(31)/12.0), 8}
-};
-
-float tone_music[][2] = {
- {440.0*pow(2.0,(12)/12.0), 8},
- {440.0*pow(2.0,(14)/12.0), 8},
- {440.0*pow(2.0,(16)/12.0), 8},
- {440.0*pow(2.0,(17)/12.0), 8},
- {440.0*pow(2.0,(19)/12.0), 8},
- {440.0*pow(2.0,(21)/12.0), 8},
- {440.0*pow(2.0,(23)/12.0), 8},
- {440.0*pow(2.0,(24)/12.0), 8}
-};
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
@@ -341,12 +309,13 @@ void process_action_user(keyrecord_t *record) {
}
void matrix_init_user(void) {
+ // audio_init();
play_startup_tone();
}
void play_startup_tone()
{
- PLAY_NOTE_ARRAY(start_up, false, 0);
+ PLAY_NOTE_ARRAY(music_scale, false, 0);
}
void play_goodbye_tone()