From c539129588fc6cf8edd9ca9da85cd685f0e3b996 Mon Sep 17 00:00:00 2001 From: bb3dan Date: Sat, 19 Oct 2013 13:20:34 -0700 Subject: [PATCH] updated dpat --- DanHorwitz.pde | 8 ++++++-- DanUtil.pde | 18 ++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) 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