]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/audio/voices.h
9403a6b5e72d0a3bbc81b50af6437bf0b6c76302
[qmk_firmware.git] / quantum / audio / voices.h
1 /* Copyright 2016 Jack Humbert
2  *
3  * 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  * the Free Software Foundation, either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * 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  */
16 #include <stdint.h>
17 #include <stdbool.h>
18 #include <avr/io.h>
19 #include <util/delay.h>
20 #include "luts.h"
21
22 #ifndef VOICES_H
23 #define VOICES_H
24
25 float voice_envelope(float frequency);
26
27 typedef enum {
28     default_voice,
29     #ifdef AUDIO_VOICES
30     something,
31     drums,
32     butts_fader,
33     octave_crunch,
34     duty_osc,
35     duty_octave_down,
36     delayed_vibrato,
37     // delayed_vibrato_octave,
38     // duty_fifth_down,
39     // duty_fourth_down,
40     // duty_third_down,
41     // duty_fifth_third_down,
42     #endif
43     number_of_voices // important that this is last
44 } voice_type;
45
46 void set_voice(voice_type v);
47 void voice_iterate(void);
48 void voice_deiterate(void);
49
50 #endif