From: bb3dan Date: Sat, 19 Oct 2013 20:20:34 +0000 (-0700) Subject: updated dpat X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c539129588fc6cf8edd9ca9da85cd685f0e3b996;p=SugarCubes.git updated dpat --- diff --git a/DanHorwitz.pde b/DanHorwitz.pde index 76dd0d3..acf8594 100644 --- a/DanHorwitz.pde +++ b/DanHorwitz.pde @@ -67,7 +67,8 @@ public class Noise extends DPat for (int i=0; i<_ND; i++) N[i] = new NDat(); } - void StartPattern() { zTime = random(500); zTheta=0; rtime = 0; ttime = 0; transAdd=0; } + void onActive() { zTime = random(500); zTheta=0; rtime = 0; ttime = 0; transAdd=0; } + void StartRun(double deltaMs) { zTime += deltaMs*(pSpeed.Val()-.5)*.002 ; zTheta += deltaMs*(pSpin .Val()-.5)*.01 ; @@ -209,7 +210,10 @@ public class Play extends DPat } } - void StartPattern() { zTheta=0; } + void onActive() { + zTheta=0; + while (lx.tempo.bpm() > 40) lx.tempo.setBpm(lx.tempo.bpm()/2); + } int KeyPressed = -1; boolean noteOn(Note note) { diff --git a/DanUtil.pde b/DanUtil.pde index d41716a..b769b78 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -114,7 +114,7 @@ public class DPat extends SCPattern boolean noteOff(Note note) { if (!isFocused()) return false; int row = note.getPitch(), col = note.getChannel(); for (int i=0; i 40) lx.tempo.setBpm(lx.tempo.bpm()/2); + void onTransitionEnd() { updateLights(); } + void onReset() { for (int i=0; i