]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
adds more voice harmonics
authorJack Humbert <jack.humb@gmail.com>
Fri, 22 Apr 2016 15:58:29 +0000 (11:58 -0400)
committerJack Humbert <jack.humb@gmail.com>
Fri, 22 Apr 2016 15:58:29 +0000 (11:58 -0400)
quantum/audio/voices.c
quantum/audio/voices.h

index 886101187156c75fd53c70f08f100ec0ac84a702..0b4b463c47b5ce4c1faf1e5f1f5c750bef1393ba 100644 (file)
@@ -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:
index cdd14798b1cf36bcd6fcabc9ef45171df162feba..66184c3a27780225f6b41086c871b9eb81e16380 100644 (file)
@@ -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;