aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/feature_audio.md26
-rw-r--r--quantum/audio/audio.c3
-rw-r--r--quantum/quantum.c2
3 files changed, 30 insertions, 1 deletions
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index 9ffbc2cba..5b84dc774 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -167,6 +167,32 @@ The available keycodes for audio are:
167 167
168!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely. 168!> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely.
169 169
170## Audio Config
171
172| Settings | Default | Description |
173|---------------------------------|----------------------|-------------------------------------------------------------------------------|
174|`AUDIO_PIN` | *Not defined* |Configures the pin that the speaker is connected to. |
175|`AUDIO_PIN_ALT` | *Not defined* |Configures the pin for a second speaker or second pin connected to one speaker.|
176|`AUDIO_PIN_ALT_AS_NEGATIVE` | *Not defined* |Enables support for one speaker connected to two pins. |
177|`AUDIO_INIT_DELAY` | *Not defined* |Enables delay during startup song to accomidate for USB startup issues. |
178|`AUDIO_ENABLE_TONE_MULTIPLEXING` | *Not defined* |Enables time splicing/multiplexing to create multiple tones simutaneously. |
179|`STARTUP_SONG` | `STARTUP_SOUND` |Plays when the keyboard starts up (audio.c) |
180|`GOODBYE_SONG` | `GOODBYE_SOUND` |Plays when you press the RESET key (quantum.c) |
181|`AG_NORM_SONG` | `AG_NORM_SOUND` |Plays when you press AG_NORM (process_magic.c) |
182|`AG_SWAP_SONG` | `AG_SWAP_SOUND` |Plays when you press AG_SWAP (process_magic.c) |
183|`CG_NORM_SONG` | `AG_NORM_SOUND` |Plays when you press CG_NORM (process_magic.c) |
184|`CG_SWAP_SONG` | `AG_SWAP_SOUND` |Plays when you press CG_SWAP (process_magic.c) |
185|`MUSIC_ON_SONG` | `MUSIC_ON_SOUND` |Plays when music mode is activated (process_music.c) |
186|`MUSIC_OFF_SONG` | `MUSIC_OFF_SOUND` |Plays when music mode is deactivated (process_music.c) |
187|`MIDI_ON_SONG` | `MUSIC_ON_SOUND` |Plays when midi mode is activated (process_music.c) |
188|`MIDI_OFF_SONG` | `MUSIC_OFF_SOUND` |Plays when midi mode is deactivated (process_music.c) |
189|`CHROMATIC_SONG` | `CHROMATIC_SOUND` |Plays when the chromatic music mode is selected (process_music.c) |
190|`GUITAR_SONG` | `GUITAR_SOUND` |Plays when the guitar music mode is selected (process_music.c) |
191|`VIOLIN_SONG` | `VIOLIN_SOUND` |Plays when the violin music mode is selected (process_music.c) |
192|`MAJOR_SONG` | `MAJOR_SOUND` |Plays when the major music mode is selected (process_music.c) |
193|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)(quantum.c) |
194|`SENDSTRING_BELL` | *Not defined* |Plays chime when the "enter" ("\a") character is sent (send_string.c) |
195
170## Tempo 196## Tempo
171the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lengths are defined relative to that. 197the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lengths are defined relative to that.
172The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`. 198The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`.
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index 46277dd70..49bb309e8 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -139,6 +139,9 @@ void audio_init() {
139 audio_initialized = true; 139 audio_initialized = true;
140 } 140 }
141 stop_all_notes(); 141 stop_all_notes();
142#ifndef AUDIO_INIT_DELAY
143 audio_startup();
144#endif
142} 145}
143 146
144void audio_startup(void) { 147void audio_startup(void) {
diff --git a/quantum/quantum.c b/quantum/quantum.c
index d17338871..e60378afe 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -398,7 +398,7 @@ void matrix_init_quantum() {
398} 398}
399 399
400void matrix_scan_quantum() { 400void matrix_scan_quantum() {
401#if defined(AUDIO_ENABLE) 401#if defined(AUDIO_ENABLE) && defined(AUDIO_INIT_DELAY)
402 // There are some tasks that need to be run a little bit 402 // There are some tasks that need to be run a little bit
403 // after keyboard startup, or else they will not work correctly 403 // after keyboard startup, or else they will not work correctly
404 // because of interaction with the USB device state, which 404 // because of interaction with the USB device state, which