diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-04-22 11:58:29 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-22 11:58:29 -0400 |
| commit | a718c53fe77f0b3b4361c850531eee5f23e3e13d (patch) | |
| tree | 2fba1b882c8e3c8cb5653578b59108ad269949ab /quantum/audio/voices.c | |
| parent | a8086126fecbdce1c192036cf1011329d406949d (diff) | |
| download | qmk_firmware-a718c53fe77f0b3b4361c850531eee5f23e3e13d.tar.gz qmk_firmware-a718c53fe77f0b3b4361c850531eee5f23e3e13d.zip | |
adds more voice harmonics
Diffstat (limited to 'quantum/audio/voices.c')
| -rw-r--r-- | quantum/audio/voices.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 886101187..0b4b463c4 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c | |||
| @@ -101,14 +101,27 @@ float voice_envelope(float frequency) { | |||
| 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 % 5) == 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 | if ((envelope_index % 12) == 0) | 109 | if ((envelope_index % 12) == 0) |
| 110 | note_timbre = 0.75; | ||
| 111 | if (((envelope_index % 12) % 4) != 1) | ||
| 112 | note_timbre = 0.75; | ||
| 113 | break; | ||
| 114 | case duty_third_down: | ||
| 115 | note_timbre = 0.5; | ||
| 116 | if ((envelope_index % 5) == 0) | ||
| 117 | note_timbre = 0.75; | ||
| 118 | break; | ||
| 119 | case duty_fifth_third_down: | ||
| 120 | note_timbre = 0.5; | ||
| 121 | if ((envelope_index % 5) == 0) | ||
| 122 | note_timbre = 0.75; | ||
| 123 | if ((envelope_index % 3) == 0) | ||
| 109 | note_timbre = 0.25; | 124 | note_timbre = 0.25; |
| 110 | else | ||
| 111 | note_timbre = 0.5; | ||
| 112 | break; | 125 | break; |
| 113 | 126 | ||
| 114 | default: | 127 | default: |
