History

changed range of crusher set operation to 0.0 to 1.0

Matthew Wang committed 7 years ago

Commit 8908d001 parent 3ada2d42 files · +4 −4Browse files

Unified · Split

2 files
  1. LEAF/Inc/leaf-crusher.h +1 −1
  2. LEAF/Src/leaf-crusher.c +3 −3
LEAF/Inc/leaf-crusher.h+1−1
@@ -42,7 +42,7 @@ void tCrusher_free (tCrusher* const); · 41 unmodified lines
4242 float tCrusher_tick (tCrusher* const, float input);
4343
4444 // 0-7
45−void tCrusher_setOperation (tCrusher* const, uint32_t op);
45+void tCrusher_setOperation (tCrusher* const, float op);
4646
4747 // 0.0 - 1.0
4848 void tCrusher_setQuality (tCrusher* const, float val);
LEAF/Src/leaf-crusher.c+3−3
@@ -57,9 +57,9 @@ float tCrusher_tick (tCrusher* const c, float input) · 56 unmodified lines
5757
5858 }
5959
60−void tCrusher_setOperation (tCrusher* const c, uint32_t op)
61−{
62− c->op = op % 8;
60+void tCrusher_setOperation (tCrusher* const c, float op)
61+{
62+ c->op = (int) (op * 8.0f);
6363 }
6464
6565 // 0.0 - 1.0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t