summaryrefslogtreecommitdiffstats
path: root/quantum/audio/voices.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-22 07:02:50 +0200
committerJack Humbert <jack.humb@gmail.com>2016-04-22 07:02:50 +0200
commitb1900c8dde2a68e87aaabd84280a99bf6658ea9f (patch)
tree02c052d0a01370d9e71ee7943c08329d1885be96 /quantum/audio/voices.c
parent7b3f212500210ae85063b043952b5b3ef6988ad6 (diff)
downloadqmk_firmware-b1900c8dde2a68e87aaabd84280a99bf6658ea9f.tar.gz
qmk_firmware-b1900c8dde2a68e87aaabd84280a99bf6658ea9f.tar.xz
adds fifth and fourth down voices
Diffstat (limited to 'quantum/audio/voices.c')
-rw-r--r--quantum/audio/voices.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c
index 98631f0cb..8b3978f3d 100644
--- a/quantum/audio/voices.c
+++ b/quantum/audio/voices.c
@@ -84,6 +84,21 @@ float voice_envelope(float frequency) {
case duty_octave_down:
polyphony_rate = 0;
note_timbre = (envelope_index % 2) * .125 + .375 * 2;
+ if ((envelope_index % 4) == 0)
+ note_timbre = 0.5;
+ if ((envelope_index % 8) == 0)
+ note_timbre = 0;
+ break;
+ case duty_fifth_down:
+ note_timbre = 0.5;
+ if ((envelope_index % 5) == 0)
+ note_timbre = 0.75;
+ break;
+ case duty_fourth_down:
+ if ((envelope_index % 12) == 0)
+ note_timbre = 0.25;
+ else
+ note_timbre = 0.5;
break;
}