summaryrefslogtreecommitdiff
path: root/quantum/audio
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2018-01-13 20:38:25 -0800
committerJack Humbert <jack.humb@gmail.com>2018-01-13 23:38:25 -0500
commit5836d1a06a7265781fa37acf13e3ba9df7224247 (patch)
treefe4161c2cb1dc28b5eab39c5d97caedc92b7efc8 /quantum/audio
parentfd359e23e8b46826f480d1bcf21261c3f777e2f4 (diff)
Fix up the ARM audio support (#2136)
* Get audio working on clueboard/60 * add keys for music mode * Change doubles to floats * add keys for all the songs * revert to the default startup sound * Remove music mode until we can figure out why it crashes
Diffstat (limited to 'quantum/audio')
-rw-r--r--quantum/audio/audio_arm.c1
-rw-r--r--quantum/audio/musical_notes.h226
-rw-r--r--quantum/audio/song_list.h18
3 files changed, 131 insertions, 114 deletions
diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c
index 5ad0c86ecc..43c8d67c48 100644
--- a/quantum/audio/audio_arm.c
+++ b/quantum/audio/audio_arm.c
@@ -18,7 +18,6 @@
#include "ch.h"
#include "hal.h"
-#include <stdio.h>
#include <string.h>
#include "print.h"
#include "keymap.h"
diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h
index 647b695640..065608ccce 100644
--- a/quantum/audio/musical_notes.h
+++ b/quantum/audio/musical_notes.h
@@ -53,127 +53,127 @@
// Note Timbre
// Changes how the notes sound
-#define TIMBRE_12 0.125
-#define TIMBRE_25 0.250
-#define TIMBRE_50 0.500
-#define TIMBRE_75 0.750
+#define TIMBRE_12 0.125f
+#define TIMBRE_25 0.250f
+#define TIMBRE_50 0.500f
+#define TIMBRE_75 0.750f
#define TIMBRE_DEFAULT TIMBRE_50
// Notes - # = Octave
-#define NOTE_REST 0.00
+#define NOTE_REST 0.00f
/* These notes are currently bugged
-#define NOTE_C0 16.35
-#define NOTE_CS0 17.32
-#define NOTE_D0 18.35
-#define NOTE_DS0 19.45
-#define NOTE_E0 20.60
-#define NOTE_F0 21.83
-#define NOTE_FS0 23.12
-#define NOTE_G0 24.50
-#define NOTE_GS0 25.96
-#define NOTE_A0 27.50
-#define NOTE_AS0 29.14
-#define NOTE_B0 30.87
-#define NOTE_C1 32.70
-#define NOTE_CS1 34.65
-#define NOTE_D1 36.71
-#define NOTE_DS1 38.89
-#define NOTE_E1 41.20
-#define NOTE_F1 43.65
-#define NOTE_FS1 46.25
-#define NOTE_G1 49.00
-#define NOTE_GS1 51.91
-#define NOTE_A1 55.00
-#define NOTE_AS1 58.27
+#define NOTE_C0 16.35f
+#define NOTE_CS0 17.32f
+#define NOTE_D0 18.35f
+#define NOTE_DS0 19.45f
+#define NOTE_E0 20.60f
+#define NOTE_F0 21.83f
+#define NOTE_FS0 23.12f
+#define NOTE_G0 24.50f
+#define NOTE_GS0 25.96f
+#define NOTE_A0 27.50f
+#define NOTE_AS0 29.14f
+#define NOTE_B0 30.87f
+#define NOTE_C1 32.70f
+#define NOTE_CS1 34.65f
+#define NOTE_D1 36.71f
+#define NOTE_DS1 38.89f
+#define NOTE_E1 41.20f
+#define NOTE_F1 43.65f
+#define NOTE_FS1 46.25f
+#define NOTE_G1 49.00f
+#define NOTE_GS1 51.91f
+#define NOTE_A1 55.00f
+#define NOTE_AS1 58.27f
*/
-#define NOTE_B1 61.74
-#define NOTE_C2 65.41
-#define NOTE_CS2 69.30
-#define NOTE_D2 73.42
-#define NOTE_DS2 77.78
-#define NOTE_E2 82.41
-#define NOTE_F2 87.31
-#define NOTE_FS2 92.50
-#define NOTE_G2 98.00
-#define NOTE_GS2 103.83
-#define NOTE_A2 110.00
-#define NOTE_AS2 116.54
-#define NOTE_B2 123.47
-#define NOTE_C3 130.81
-#define NOTE_CS3 138.59
-#define NOTE_D3 146.83
-#define NOTE_DS3 155.56
-#define NOTE_E3 164.81
-#define NOTE_F3 174.61
-#define NOTE_FS3 185.00
-#define NOTE_G3 196.00
-#define NOTE_GS3 207.65
-#define NOTE_A3 220.00
-#define NOTE_AS3 233.08
-#define NOTE_B3 246.94
-#define NOTE_C4 261.63
-#define NOTE_CS4 277.18
-#define NOTE_D4 293.66
-#define NOTE_DS4 311.13
-#define NOTE_E4 329.63
-#define NOTE_F4 349.23
-#define NOTE_FS4 369.99
-#define NOTE_G4 392.00
-#define NOTE_GS4 415.30
-#define NOTE_A4 440.00
-#define NOTE_AS4 466.16
-#define NOTE_B4 493.88
-#define NOTE_C5 523.25
-#define NOTE_CS5 554.37
-#define NOTE_D5 587.33
-#define NOTE_DS5 622.25
-#define NOTE_E5 659.26
-#define NOTE_F5 698.46
-#define NOTE_FS5 739.99
-#define NOTE_G5 783.99
-#define NOTE_GS5 830.61
-#define NOTE_A5 880.00
-#define NOTE_AS5 932.33
-#define NOTE_B5 987.77
-#define NOTE_C6 1046.50
-#define NOTE_CS6 1108.73
-#define NOTE_D6 1174.66
-#define NOTE_DS6 1244.51
-#define NOTE_E6 1318.51
-#define NOTE_F6 1396.91
-#define NOTE_FS6 1479.98
-#define NOTE_G6 1567.98
-#define NOTE_GS6 1661.22
-#define NOTE_A6 1760.00
-#define NOTE_AS6 1864.66
-#define NOTE_B6 1975.53
-#define NOTE_C7 2093.00
-#define NOTE_CS7 2217.46
-#define NOTE_D7 2349.32
-#define NOTE_DS7 2489.02
-#define NOTE_E7 2637.02
-#define NOTE_F7 2793.83
-#define NOTE_FS7 2959.96
-#define NOTE_G7 3135.96
-#define NOTE_GS7 3322.44
-#define NOTE_A7 3520.00
-#define NOTE_AS7 3729.31
-#define NOTE_B7 3951.07
-#define NOTE_C8 4186.01
-#define NOTE_CS8 4434.92
-#define NOTE_D8 4698.64
-#define NOTE_DS8 4978.03
-#define NOTE_E8 5274.04
-#define NOTE_F8 5587.65
-#define NOTE_FS8 5919.91
-#define NOTE_G8 6271.93
-#define NOTE_GS8 6644.88
-#define NOTE_A8 7040.00
-#define NOTE_AS8 7458.62
-#define NOTE_B8 7902.13
+#define NOTE_B1 61.74f
+#define NOTE_C2 65.41f
+#define NOTE_CS2 69.30f
+#define NOTE_D2 73.42f
+#define NOTE_DS2 77.78f
+#define NOTE_E2 82.41f
+#define NOTE_F2 87.31f
+#define NOTE_FS2 92.50f
+#define NOTE_G2 98.00f
+#define NOTE_GS2 103.83f
+#define NOTE_A2 110.00f
+#define NOTE_AS2 116.54f
+#define NOTE_B2 123.47f
+#define NOTE_C3 130.81f
+#define NOTE_CS3 138.59f
+#define NOTE_D3 146.83f
+#define NOTE_DS3 155.56f
+#define NOTE_E3 164.81f
+#define NOTE_F3 174.61f
+#define NOTE_FS3 185.00f
+#define NOTE_G3 196.00f
+#define NOTE_GS3 207.65f
+#define NOTE_A3 220.00f
+#define NOTE_AS3 233.08f
+#define NOTE_B3 246.94f
+#define NOTE_C4 261.63f
+#define NOTE_CS4 277.18f
+#define NOTE_D4 293.66f
+#define NOTE_DS4 311.13f
+#define NOTE_E4 329.63f
+#define NOTE_F4 349.23f
+#define NOTE_FS4 369.99f
+#define NOTE_G4 392.00f
+#define NOTE_GS4 415.30f
+#define NOTE_A4 440.00f
+#define NOTE_AS4 466.16f
+#define NOTE_B4 493.88f
+#define NOTE_C5 523.25f
+#define NOTE_CS5 554.37f
+#define NOTE_D5 587.33f
+#define NOTE_DS5 622.25f
+#define NOTE_E5 659.26f
+#define NOTE_F5 698.46f
+#define NOTE_FS5 739.99f
+#define NOTE_G5 783.99f
+#define NOTE_GS5 830.61f
+#define NOTE_A5 880.00f
+#define NOTE_AS5 932.33f
+#define NOTE_B5 987.77f
+#define NOTE_C6 1046.50f
+#define NOTE_CS6 1108.73f
+#define NOTE_D6 1174.66f
+#define NOTE_DS6 1244.51f
+#define NOTE_E6 1318.51f
+#define NOTE_F6 1396.91f
+#define NOTE_FS6 1479.98f
+#define NOTE_G6 1567.98f
+#define NOTE_GS6 1661.22f
+#define NOTE_A6 1760.00f
+#define NOTE_AS6 1864.66f
+#define NOTE_B6 1975.53f
+#define NOTE_C7 2093.00f
+#define NOTE_CS7 2217.46f
+#define NOTE_D7 2349.32f
+#define NOTE_DS7 2489.02f
+#define NOTE_E7 2637.02f
+#define NOTE_F7 2793.83f
+#define NOTE_FS7 2959.96f
+#define NOTE_G7 3135.96f
+#define NOTE_GS7 3322.44f
+#define NOTE_A7 3520.00f
+#define NOTE_AS7 3729.31f
+#define NOTE_B7 3951.07f
+#define NOTE_C8 4186.01f
+#define NOTE_CS8 4434.92f
+#define NOTE_D8 4698.64f
+#define NOTE_DS8 4978.03f
+#define NOTE_E8 5274.04f
+#define NOTE_F8 5587.65f
+#define NOTE_FS8 5919.91f
+#define NOTE_G8 6271.93f
+#define NOTE_GS8 6644.88f
+#define NOTE_A8 7040.00f
+#define NOTE_AS8 7458.62f
+#define NOTE_B8 7902.13f
// Flat Aliases
#define NOTE_DF0 NOTE_CS0
diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h
index 091f59e7ac..4018f817c2 100644
--- a/quantum/audio/song_list.h
+++ b/quantum/audio/song_list.h
@@ -53,6 +53,24 @@
E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \
E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4),
+#define CLUEBOARD_SOUND \
+ HD_NOTE(_C3), HD_NOTE(_D3), HD_NOTE(_E3), HD_NOTE(_F3), HD_NOTE(_G3), HD_NOTE(_A4), HD_NOTE(_B4), HD_NOTE(_C4)
+/*
+ HD_NOTE(_G3), HD_NOTE(_E3), HD_NOTE(_C3), \
+ Q__NOTE(_E3), Q__NOTE(_C3), Q__NOTE(_G3), \
+ Q__NOTE(_E3)
+*/
+/*
+ HD_NOTE(_C3), HD_NOTE(_G3), HD_NOTE(_E3), \
+ Q__NOTE(_G3), Q__NOTE(_E3), Q__NOTE(_G3), \
+ Q__NOTE(_F3)
+*/
+
+#define BASKET_CASE \
+ QD_NOTE(_G3), E__NOTE(_F3), E__NOTE(_E3), Q__NOTE(_F3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \
+ Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \
+ Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), E__NOTE(_A4), E__NOTE(_C4), QD_NOTE(_B4), HD_NOTE(_B4)
+
#define STARTUP_SOUND \
E__NOTE(_E6), \
E__NOTE(_A6), \