diff options
Diffstat (limited to 'quantum/audio/voices.h')
| -rw-r--r-- | quantum/audio/voices.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h index abafa2b40..578350d33 100644 --- a/quantum/audio/voices.h +++ b/quantum/audio/voices.h | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | /* Copyright 2016 Jack Humbert | 1 | /* Copyright 2016 Jack Humbert |
| 2 | * Copyright 2020 JohSchneider | ||
| 2 | * | 3 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
| @@ -13,7 +14,6 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 16 | */ |
| 16 | |||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include <stdint.h> | 19 | #include <stdint.h> |
| @@ -29,6 +29,7 @@ float voice_envelope(float frequency); | |||
| 29 | typedef enum { | 29 | typedef enum { |
| 30 | default_voice, | 30 | default_voice, |
| 31 | #ifdef AUDIO_VOICES | 31 | #ifdef AUDIO_VOICES |
| 32 | vibrating, | ||
| 32 | something, | 33 | something, |
| 33 | drums, | 34 | drums, |
| 34 | butts_fader, | 35 | butts_fader, |
| @@ -48,3 +49,21 @@ typedef enum { | |||
| 48 | void set_voice(voice_type v); | 49 | void set_voice(voice_type v); |
| 49 | void voice_iterate(void); | 50 | void voice_iterate(void); |
| 50 | void voice_deiterate(void); | 51 | void voice_deiterate(void); |
| 52 | |||
| 53 | // Vibrato functions | ||
| 54 | void voice_set_vibrato_rate(float rate); | ||
| 55 | void voice_increase_vibrato_rate(float change); | ||
| 56 | void voice_decrease_vibrato_rate(float change); | ||
| 57 | void voice_set_vibrato_strength(float strength); | ||
| 58 | void voice_increase_vibrato_strength(float change); | ||
| 59 | void voice_decrease_vibrato_strength(float change); | ||
| 60 | |||
| 61 | // Timbre functions | ||
| 62 | /** | ||
| 63 | * @brief set the global timbre for tones to be played | ||
| 64 | * @note: only applies to pwm implementations - where it adjusts the duty-cycle | ||
| 65 | * @note: using any instrument from voices.[ch] other than 'default' may override the set value | ||
| 66 | * @param[in]: timbre: valid range is (0,100) | ||
| 67 | */ | ||
| 68 | void voice_set_timbre(uint8_t timbre); | ||
| 69 | uint8_t voice_get_timbre(void); | ||
