Make DanUtil have a spin() function so close-to-center knob doesn't spin
[SugarCubes.git] / DanHorwitz.pde
index 841a2ff9a0980faa7d5b9f588d77fe2e2d0f510e..6c958e1f04e41d47afbed30100b1919a564a1515 100644 (file)
@@ -71,7 +71,7 @@ public class Noise extends DPat
 
        void StartRun(double deltaMs) {
                zTime   += deltaMs*(val(pSpeed)-.5)*.002        ;
-               zTheta  += deltaMs*(val(pSpin )-.5)*.01 ;
+               zTheta  += deltaMs*(spin()-.5)*.01      ;
                rtime   += deltaMs;
                iSymm    = pSymm.Cur();
                zSin    = sin(zTheta);
@@ -467,6 +467,7 @@ class Worms extends SCPattern {
        }
 
        void onParameterChanged(LXParameter parameter) {
+               super.onParameterChanged(parameter);
                nConfusion = 1-pConfusion.getValuef();
                for (int i=0; i<numCursors; i++) {
                        if (parameter==pSpawn) reset(cur.get(i));