shithub: leaf

Download patch

ref: 42af6890fc3c8e454a7599b92bfdf26f81d5ab90
parent: 8acb64c973bb8793d51f2af5fb3d79b3a4518940
author: Jeffrey Snyder <jeffsnyder@jeffreys-mbp.mynetworksettings.com>
date: Fri Aug 26 11:03:14 EDT 2022

oscillator fix"
;

--- a/leaf/Src/leaf-oscillators.c
+++ b/leaf/Src/leaf-oscillators.c
@@ -972,6 +972,7 @@
     
     sync = c->sync;
 
+
     p = c->_p;  /* phase [0, 1) */
     w = c->_w;  /* phase increment */
     b = c->_b;  /* duty cycle (0, 1) */
@@ -1177,6 +1178,7 @@
 {
     _tMBPulse* c = *osc;
     c->waveform = w;
+    c->_b = 0.5f * (1.0f + c->waveform);
 }
 
 float tMBPulse_sync(tMBPulse* const osc, float value)