From c940e87235c9fe26f5c7451464af54a493270a68 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 17 Apr 2016 10:41:07 -0500 Subject: fixed single note play copy/paste bug --- quantum/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum') diff --git a/quantum/audio.c b/quantum/audio.c index 9b9589f133..58b9ab76bf 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -257,7 +257,7 @@ ISR(TIMER3_COMPA_vect) { place = 0.0; } ICR3 = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)); // Set max to the period - OCR3A = (int)((((double)F_CPU) / (note_frequency * CPU_PRESCALER)) * note_timbre); // Set compare to half the period + OCR3A = (int)((((double)F_CPU) /(frequencies[voice_place] * CPU_PRESCALER)) * note_timbre); // Set compare to half the period //OCR3A = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) >> 1 * duty_place; // Set compare to half the period place++; // if (duty_counter > (frequencies[voice_place] / 500)) { -- cgit v1.2.1 From d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 17 Apr 2016 12:54:32 -0500 Subject: Fixed many compiler warnings related to print being disabled --- quantum/keymap_common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'quantum') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 61a51aedb4..ce1d007f3a 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -26,6 +26,7 @@ along with this program. If not, see . #include "backlight.h" #include "keymap_midi.h" #include "bootloader.h" +#include "eeconfig.h" extern keymap_config_t keymap_config; -- cgit v1.2.1 From 23231fa577f7c6c585124226a83f21a7668e62dd Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 17 Apr 2016 14:16:03 -0500 Subject: Converted goodbye to notes, fixed eighth dotted note macro --- quantum/audio.h | 1 + quantum/keymap_common.c | 14 ++++++-------- quantum/musical_notes.h | 2 +- quantum/song_list.h | 7 ++++++- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'quantum') diff --git a/quantum/audio.h b/quantum/audio.h index 3aba8370ac..05d314c940 100644 --- a/quantum/audio.h +++ b/quantum/audio.h @@ -3,6 +3,7 @@ #include #include #include "musical_notes.h" +#include "song_list.h" #ifndef AUDIO_H #define AUDIO_H diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index c705b7a730..2001438b90 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -34,15 +34,13 @@ extern keymap_config_t keymap_config; #include #ifdef AUDIO_ENABLE #include "audio.h" + #ifndef TONE_GOODBYE - #define TONE_GOODBYE { \ - {440.0*pow(2.0,(31)/12.0), 8}, \ - {440.0*pow(2.0,(24)/12.0), 8}, \ - {440.0*pow(2.0,(19)/12.0), 12}, \ - } - #endif - float tone_goodbye[][2] = TONE_GOODBYE; -#endif + #define TONE_GOODBYE OLKB_GOODBYE + #endif /*! TONE_GOODBYE */ + + float tone_goodbye[][2] = SONG(TONE_GOODBYE); +#endif /* AUDIO_ENABLE */ static action_t keycode_to_action(uint16_t keycode); diff --git a/quantum/musical_notes.h b/quantum/musical_notes.h index 2170f3f18b..ccdc34f270 100644 --- a/quantum/musical_notes.h +++ b/quantum/musical_notes.h @@ -32,7 +32,7 @@ #define WD_NOTE(n) WHOLE_DOT_NOTE(n) #define HD_NOTE(n) HALF_DOT_NOTE(n) #define QD_NOTE(n) QUARTER_DOT_NOTE(n) -#define ED_NOTE(n) EIGTH_DOT_NOTE(n) +#define ED_NOTE(n) EIGHTH_DOT_NOTE(n) #define SD_NOTE(n) SIXTEENTH_DOT_NOTE(n) // Note Styles diff --git a/quantum/song_list.h b/quantum/song_list.h index ef36a1cddf..b626c3fa6b 100644 --- a/quantum/song_list.h +++ b/quantum/song_list.h @@ -15,4 +15,9 @@ QD_NOTE(_B4), E__NOTE(_D5), Q__NOTE(_G5), \ H__NOTE(_FS5), -#endif \ No newline at end of file +#define OLKB_GOODBYE \ + E__NOTE(_E7), \ + E__NOTE(_A6), \ + ED_NOTE(_E6), + +#endif -- cgit v1.2.1