From ce463ef424c5bd26b84ead7de5f31eab366f98eb Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sun, 17 Apr 2016 18:14:42 -0400 Subject: audio fixes --- keyboard/preonic/keymaps/default/keymap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 48bc72dab7..2591af9f02 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -224,6 +224,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); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -312,7 +313,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 9: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_music, false, 0); + init_notes(); + set_tempo(150); + PLAY_NOTE_ARRAY(ode_to_joy, false, .25); layer_on(_MUSIC); #endif } @@ -339,6 +342,6 @@ void process_action_user(keyrecord_t *record) { void matrix_init_user(void) { #ifdef AUDIO_ENABLE init_notes(); - play_notes(&start_up, false, 0); + PLAY_NOTE_ARRAY(start_up, false, 0); #endif } -- cgit v1.2.3 From e49712b5593b887c8af18aeb7196513f1c7b7bcf Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 18 Apr 2016 21:01:48 -0400 Subject: note sliding - on right now --- keyboard/preonic/keymaps/default/keymap.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 2591af9f02..2546d8f6c5 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -14,8 +14,9 @@ #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _ADJUST 5 -#define _MUSIC 6 +#define _ADJUST 6 +#define _MUSIC 7 +#define _STOPPER 5 // Macro name shortcuts #define QWERTY M(_QWERTY) @@ -172,7 +173,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* 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} } + }; const uint16_t PROGMEM fn_actions[] = { @@ -225,6 +238,7 @@ float tone_music[][2] = { {440.0*pow(2.0,(24)/12.0), 8} }; float ode_to_joy[][2] = SONG(ODE_TO_JOY); +float goodbye[][2] = SONG(GOODBYE_SOUND); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -306,6 +320,7 @@ 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 } @@ -317,6 +332,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) set_tempo(150); PLAY_NOTE_ARRAY(ode_to_joy, false, .25); layer_on(_MUSIC); + layer_on(_STOPPER); #endif } break; @@ -345,3 +361,9 @@ void matrix_init_user(void) { PLAY_NOTE_ARRAY(start_up, false, 0); #endif } + +void play_goodbye_tone() +{ + PLAY_NOTE_ARRAY(goodbye, false, 0); + _delay_ms(2000); +} \ No newline at end of file -- cgit v1.2.3 From a2f31c886ff13c5e7adeccccfe672698c1c7efb9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 19 Apr 2016 12:58:13 -0400 Subject: getting ready for getters and setters --- keyboard/preonic/keymaps/default/keymap.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 2546d8f6c5..144e9c3086 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -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) @@ -159,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -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); } \ No newline at end of file -- cgit v1.2.3 From 462601f5e8de3476963c6fef44a88653e19fc3fd Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 19 Apr 2016 21:25:48 -0400 Subject: breaking changes - restructuring audio.c a little --- keyboard/preonic/keymaps/default/keymap.c | 37 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 144e9c3086..ecf3400f8d 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -15,7 +15,7 @@ #define _LOWER 3 #define _RAISE 4 #define _MUSIC 5 -#define _ADJUST 6 +#define _ADJUST 16 // Macro name shortcuts #define QWERTY M(_QWERTY) @@ -142,6 +142,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, +/* Music (reserved for process_action_user) + * + */ +[_MUSIC] = { + {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, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -161,19 +172,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, - -/* Music (reserved for process_action_user) - * - */ -[_MUSIC] = { - {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, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} } + }; const uint16_t PROGMEM fn_actions[] = { @@ -315,7 +316,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 9: if (record->event.pressed) { #ifdef AUDIO_ENABLE - init_notes(); PLAY_NOTE_ARRAY(music_scale, false, 0); layer_on(_MUSIC); #endif @@ -341,11 +341,12 @@ 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 + play_startup_tone(); +} + +void play_startup_tone() +{ + PLAY_NOTE_ARRAY(start_up, false, 0); } void play_goodbye_tone() -- cgit v1.2.3 From de4690593cec908b19f97509f45c78534fd5440f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 20 Apr 2016 01:08:17 -0400 Subject: fixed startup audio with a 500ms delay --- keyboard/preonic/keymaps/default/keymap.c | 43 +++++-------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) (limited to 'keyboard/preonic/keymaps') 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() -- cgit v1.2.3 From b0635e58eb33b0ed4f6b4a3846660feae15681ad Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 20 Apr 2016 18:39:36 -0400 Subject: delay isn't the problem here --- keyboard/preonic/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 9ee803b063..16f8a8bf18 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -315,7 +315,7 @@ void matrix_init_user(void) { void play_startup_tone() { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_NOTE_ARRAY(start_up, false, 0); } void play_goodbye_tone() -- cgit v1.2.3 From 157ddccc2c0b865582fb488ea5346e2996b05468 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 20 Apr 2016 20:11:05 -0400 Subject: start-up sound working, removes tick with some devices --- keyboard/preonic/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 16f8a8bf18..267bfab3d7 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -309,7 +309,7 @@ void process_action_user(keyrecord_t *record) { } void matrix_init_user(void) { - // audio_init(); + _delay_ms(10); // gets rid of tick play_startup_tone(); } -- cgit v1.2.3 From 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 21 Apr 2016 18:14:25 -0400 Subject: adds multiple voices and the ability to iterate/deiterate between them --- keyboard/preonic/keymaps/default/keymap.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 267bfab3d7..f0d5ed6030 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -3,7 +3,6 @@ #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. @@ -31,6 +30,8 @@ #endif #define MUS_OFF M(8) #define MUS_ON M(9) +#define VC_IN M(10) +#define VC_DE M(11) // Fillers to make layering more clear #define _______ KC_TRNS @@ -171,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, {_______, _______, _______, AUD_ON, AUD_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, _______, _______, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, + {_______, VC_DE, VC_IN, MUS_ON, MUS_OFF, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -289,6 +290,22 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #endif } break; + case 10: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + voice_iterate(); + PLAY_NOTE_ARRAY(music_scale, false, 0); + #endif + } + break; + case 11: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + voice_deiterate(); + PLAY_NOTE_ARRAY(music_scale, false, 0); + #endif + } + break; } return MACRO_NONE; }; -- cgit v1.2.3 From 620ac4b260fa663d12b11a0b15ac50379523c125 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Thu, 21 Apr 2016 19:35:18 -0700 Subject: Update functions used to write to EEPROM --- keyboard/preonic/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index f0d5ed6030..3a6dfa31a7 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -200,7 +200,7 @@ float goodbye[][2] = SONG(GOODBYE_SOUND); #endif void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_write_default_layer(default_layer); + eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); } -- cgit v1.2.3 From 9fb1e5441fd59496a55d1d171dc7dba5f2ea1c22 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 25 Apr 2016 00:22:35 -0400 Subject: updates preonic default keymap --- keyboard/preonic/keymaps/default/keymap.c | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 3a6dfa31a7..95b9718762 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -24,10 +24,8 @@ #define LOWER M(_LOWER) #define RAISE M(_RAISE) #define M_BL 5 -#ifdef AUDIO_ENABLE - #define AUD_OFF M(6) - #define AUD_ON M(7) -#endif +#define AUD_OFF M(6) +#define AUD_ON M(7) #define MUS_OFF M(8) #define MUS_ON M(9) #define VC_IN M(10) @@ -163,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | |Musoff|Mus on| | | | | | | | + * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -310,6 +308,16 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(start_up, false, 0); + #endif +} + +#ifdef AUDIO_ENABLE + uint8_t starting_note = 0x0C; int offset = 7; @@ -325,18 +333,10 @@ void process_action_user(keyrecord_t *record) { } -void matrix_init_user(void) { - _delay_ms(10); // gets rid of tick - play_startup_tone(); -} - -void play_startup_tone() -{ - PLAY_NOTE_ARRAY(start_up, false, 0); -} - void play_goodbye_tone() { PLAY_NOTE_ARRAY(goodbye, false, 0); _delay_ms(150); -} \ No newline at end of file +} + +#endif \ No newline at end of file -- cgit v1.2.3 From 66e0323881a5a3da65e14daeec41a1e9cfbda431 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 29 Apr 2016 12:42:55 -0400 Subject: removes extra voices, updates .hex files --- keyboard/preonic/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboard/preonic/keymaps') diff --git a/keyboard/preonic/keymaps/default/keymap.c b/keyboard/preonic/keymaps/default/keymap.c index 95b9718762..b3aa14dcbe 100644 --- a/keyboard/preonic/keymaps/default/keymap.c +++ b/keyboard/preonic/keymaps/default/keymap.c @@ -319,7 +319,7 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE uint8_t starting_note = 0x0C; -int offset = 7; +int offset = 0; void process_action_user(keyrecord_t *record) { -- cgit v1.2.3