shithub: leaf

Download patch

ref: 8908d00ecbf9b10450869dffb5dc06b10c896d34
parent: 3ada2d4f41e83ac618dfb102955a5dee643f0b8e
author: Matthew Wang <Matthew@nat-oitwireless-inside-vapornet100-10-9-61-0.princeton.edu>
date: Thu Feb 7 13:26:02 EST 2019

changed range of crusher set operation to 0.0 to 1.0

--- a/LEAF/Inc/leaf-crusher.h
+++ b/LEAF/Inc/leaf-crusher.h
@@ -42,7 +42,7 @@
 float   tCrusher_tick    (tCrusher* const, float input);
     
 // 0-7
-void    tCrusher_setOperation (tCrusher* const, uint32_t op);
+void    tCrusher_setOperation (tCrusher* const, float op);
  
 // 0.0 - 1.0
 void    tCrusher_setQuality (tCrusher* const, float val);
--- a/LEAF/Src/leaf-crusher.c
+++ b/LEAF/Src/leaf-crusher.c
@@ -57,9 +57,9 @@
     
 }
 
-void    tCrusher_setOperation (tCrusher* const c, uint32_t op)
-{
-    c->op = op % 8;
+void    tCrusher_setOperation (tCrusher* const c, float op)
+{
+	c->op = (int) (op * 8.0f);
 }
 
 // 0.0 - 1.0