aboutsummaryrefslogtreecommitdiff
path: root/quantum/audio
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-25 00:59:47 -0400
committerJack Humbert <jack.humb@gmail.com>2016-04-25 00:59:47 -0400
commite7b6bb641c0636c01e3781fe51865fdb20014eeb (patch)
tree770890b8c71adc31b15e23acb9a1a9edd0a5c31b /quantum/audio
parent170d9b7d15c8483cee8ff976936aad0da21e4c92 (diff)
downloadqmk_firmware-e7b6bb641c0636c01e3781fe51865fdb20014eeb.tar.gz
qmk_firmware-e7b6bb641c0636c01e3781fe51865fdb20014eeb.zip
updates default voice, prunes voices
Diffstat (limited to 'quantum/audio')
-rw-r--r--quantum/audio/voices.c50
-rw-r--r--quantum/audio/voices.h8
2 files changed, 29 insertions, 29 deletions
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c
index 0b4b463c4..de9f8ae54 100644
--- a/quantum/audio/voices.c
+++ b/quantum/audio/voices.c
@@ -6,7 +6,7 @@ extern uint16_t envelope_index;
6extern float note_timbre; 6extern float note_timbre;
7extern float polyphony_rate; 7extern float polyphony_rate;
8 8
9voice_type voice = duty_osc; 9voice_type voice = default_voice;
10 10
11void set_voice(voice_type v) { 11void set_voice(voice_type v) {
12 voice = v; 12 voice = v;
@@ -99,30 +99,30 @@ float voice_envelope(float frequency) {
99 if ((envelope_index % 8) == 0) 99 if ((envelope_index % 8) == 0)
100 note_timbre = 0; 100 note_timbre = 0;
101 break; 101 break;
102 case duty_fifth_down: 102 // case duty_fifth_down:
103 note_timbre = 0.5; 103 // note_timbre = 0.5;
104 if ((envelope_index % 3) == 0) 104 // if ((envelope_index % 3) == 0)
105 note_timbre = 0.75; 105 // note_timbre = 0.75;
106 break; 106 // break;
107 case duty_fourth_down: 107 // case duty_fourth_down:
108 note_timbre = 0.0; 108 // note_timbre = 0.0;
109 if ((envelope_index % 12) == 0) 109 // if ((envelope_index % 12) == 0)
110 note_timbre = 0.75; 110 // note_timbre = 0.75;
111 if (((envelope_index % 12) % 4) != 1) 111 // if (((envelope_index % 12) % 4) != 1)
112 note_timbre = 0.75; 112 // note_timbre = 0.75;
113 break; 113 // break;
114 case duty_third_down: 114 // case duty_third_down:
115 note_timbre = 0.5; 115 // note_timbre = 0.5;
116 if ((envelope_index % 5) == 0) 116 // if ((envelope_index % 5) == 0)
117 note_timbre = 0.75; 117 // note_timbre = 0.75;
118 break; 118 // break;
119 case duty_fifth_third_down: 119 // case duty_fifth_third_down:
120 note_timbre = 0.5; 120 // note_timbre = 0.5;
121 if ((envelope_index % 5) == 0) 121 // if ((envelope_index % 5) == 0)
122 note_timbre = 0.75; 122 // note_timbre = 0.75;
123 if ((envelope_index % 3) == 0) 123 // if ((envelope_index % 3) == 0)
124 note_timbre = 0.25; 124 // note_timbre = 0.25;
125 break; 125 // break;
126 126
127 default: 127 default:
128 break; 128 break;
diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h
index 66184c3a2..4b894f28d 100644
--- a/quantum/audio/voices.h
+++ b/quantum/audio/voices.h
@@ -16,10 +16,10 @@ typedef enum {
16 octave_crunch, 16 octave_crunch,
17 duty_osc, 17 duty_osc,
18 duty_octave_down, 18 duty_octave_down,
19 duty_fifth_down, 19 // duty_fifth_down,
20 duty_fourth_down, 20 // duty_fourth_down,
21 duty_third_down, 21 // duty_third_down,
22 duty_fifth_third_down, 22 // duty_fifth_third_down,
23 number_of_voices // important that this is last 23 number_of_voices // important that this is last
24} voice_type; 24} voice_type;
25 25