From a718c53fe77f0b3b4361c850531eee5f23e3e13d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 22 Apr 2016 11:58:29 -0400 Subject: [PATCH] adds more voice harmonics --- quantum/audio/voices.c | 19 ++++++++++++++++--- quantum/audio/voices.h | 2 ++ 2 files changed, 18 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: diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h index cdd14798b..66184c3a2 100644 --- a/quantum/audio/voices.h +++ b/quantum/audio/voices.h @@ -18,6 +18,8 @@ typedef enum { duty_octave_down, duty_fifth_down, duty_fourth_down, + duty_third_down, + duty_fifth_third_down, number_of_voices // important that this is last } voice_type;