prvR = dstR; dstR = random(mCtr.y); }
}
- int nBeats = 0;
BasicParameter pAmp, pRadius, pBounce;
+ Pick pTimePattern, pTempoMult, pShape;
- float t,amp,rad,bnc;
- float zTheta=0;
ArrayList<rWave> waves = new ArrayList<rWave>(10);
+ int nBeats = 0;
+ float t,amp,rad,bnc,zTheta=0;
+
rAngle a1 = new rAngle(), a2 = new rAngle(),
a3 = new rAngle(), a4 = new rAngle();
PVector cPrev = new PVector(), cRand = new PVector(),
Pn = new PVector();
float LastBeat=3, LastMeasure=3;
int curRandTempo = 1, curRandTPat = 1;
- Pick pTimePattern, pTempoMult, pShape;
Play(GLucose glucose) {
super(glucose);
}
}
+ void onReset() { zTheta=0; super.onReset(); }
void onActive() {
zTheta=0;
while (lx.tempo.bpm() > 40) lx.tempo.setBpm(lx.tempo.bpm()/2);
}
}
//----------------------------------------------------------------------------------------------------------------------------------
-// 0 - TLB, L (b), BLB, B (l) // Fwd , Down, Back, Up
-// 4 - TLF, F (l), BLF, L (f) // Fwd , Down, Back, Up
-// 8 - TRF, R (f), BRF, F (r) // Back, Down, Fwd , Up
-// 12- TRB, B (r), BRB, R (b) // Back, Down, Fwd , Up
-// 1->7, 15->9
-
-int randDir() { return round(random(1))*2-1; }
-//----------------------------------------------------------------------------------------------------------------------------------
-boolean dDebug = true;
+boolean dDebug = false;
class dCursor {
dVertex vCur, vNext, vDest;
float destSpeed;
void rotateX (PVector p, PVector o, float nSin, float nCos) { p.set(p.x,nCos*(p.y-o.y) - nSin*(p.z-o.z) + o.y , nSin*(p.y-o.y) + nCos*(p.z-o.z) + o.z ); }
void rotateY (PVector p, PVector o, float nSin, float nCos) { p.set( nSin*(p.z-o.z) + nCos*(p.x-o.x) + o.x,p.y, nCos*(p.z-o.z) - nSin*(p.x-o.x) + o.z ); }
- BasicParameter addParam(String label, double value) { BasicParameter p = new BasicParameter(label, value); addParameter(p); return p; }
+ BasicParameter addParam(String label, double value) { BasicParameter p = new BasicParameter(label, value); addParameter(p); return p; }
PVector vT1 = new PVector(), vT2 = new PVector();
- float calcCone (PVector v1, PVector v2, PVector c) { // use vec.angleBetween() for this
- vT1.set(v1); vT2.set(v2); vT1.sub(c); vT2.sub(c);
- return degrees(PVector.angleBetween(vT1,vT2)); }
+ float calcCone (PVector v1, PVector v2, PVector c) { vT1.set(v1); vT2.set(v2); vT1.sub(c); vT2.sub(c);
+ return degrees(PVector.angleBetween(vT1,vT2)); }
Pick addPick(String name, int def, int _max, String[] desc) {
Pick P = new Pick(name, def, _max+1, nMaxRow, desc);