summaryrefslogtreecommitdiffstats
path: root/quantum/audio/voices.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-22 17:58:29 +0200
committerJack Humbert <jack.humb@gmail.com>2016-04-22 17:58:29 +0200
commita718c53fe77f0b3b4361c850531eee5f23e3e13d (patch)
tree2fba1b882c8e3c8cb5653578b59108ad269949ab /quantum/audio/voices.c
parenta8086126fecbdce1c192036cf1011329d406949d (diff)
downloadqmk_firmware-a718c53fe77f0b3b4361c850531eee5f23e3e13d.tar.gz
qmk_firmware-a718c53fe77f0b3b4361c850531eee5f23e3e13d.tar.xz
adds more voice harmonics
Diffstat (limited to 'quantum/audio/voices.c')
-rw-r--r--quantum/audio/voices.c19
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) {
break;
case duty_fifth_down:
note_timbre = 0.5;
- if ((envelope_index % 5) == 0)
+ if ((envelope_index % 3) == 0)
note_timbre = 0.75;
break;
case duty_fourth_down:
+ note_timbre = 0.0;
if ((envelope_index % 12) == 0)
+ note_timbre = 0.75;
+ if (((envelope_index % 12) % 4) != 1)
+ note_timbre = 0.75;
+ break;
+ case duty_third_down:
+ note_timbre = 0.5;
+ if ((envelope_index % 5) == 0)
+ note_timbre = 0.75;
+ break;
+ case duty_fifth_third_down:
+ note_timbre = 0.5;
+ if ((envelope_index % 5) == 0)
+ note_timbre = 0.75;
+ if ((envelope_index % 3) == 0)
note_timbre = 0.25;
- else
- note_timbre = 0.5;
break;
default: