//----------------------------------------------------------------------------------------------------------------------------------
public class Pong extends DPat {
- SinLFO x,y,z,dx,dy,dz;
+ SinLFO x,y,z,dx,dy,dz;
float cRad; DParam pSize;
Pick pChoose;
xyz v = new xyz(), vMir = new xyz();
v.z=0;p.z=0;// ignore z dimension
switch(pChoose.Cur()) {
case 0: vMir.set(mMax); vMir.subtract(p);
- return color(0,0,c1c(1 - min(v.distance(p), v.distance(vMir))*.5/cRad)); // balls
- case 1: return color(0,0,c1c(1 - v.distance(p)*.5/cRad)); // ball
+ return lx.hsb(lxh(),100,c1c(1 - min(v.distance(p), v.distance(vMir))*.5/cRad)); // balls
+ case 1: return lx.hsb(lxh(),100,c1c(1 - v.distance(p)*.5/cRad)); // ball
case 2: vMir.set(mMax.x/2,0,mMax.z/2);
- return color(0,0,c1c(1 - CalcCone(p,v,vMir) * max(.02,.45-pSize.Val()))); // spot
+ return lx.hsb(lxh(),100,c1c(1 - CalcCone(p,v,vMir) * max(.02,.45-pSize.Val()))); // spot
}
- return color(0,0,0);
+ return lx.hsb(0,0,0);
}
}
//----------------------------------------------------------------------------------------------------------------------------------
public class NDat {
- float xz, yz, zz, hue, sat, speed, angle, den;
+ float xz, yz, zz, hue, speed, angle, den;
float xoff,yoff,zoff;
float sinAngle, cosAngle;
boolean isActive;
NDat () { isActive=false; }
boolean Active() { return isActive; }
- void set (float _hue, float _sat, float _xz, float _yz, float _zz, float _den, float _speed, float _angle) {
+ void set (float _hue, float _xz, float _yz, float _zz, float _den, float _speed, float _angle) {
isActive = true;
- hue=_hue; sat=_sat; xz=_xz; yz=_yz; zz =_zz; den=_den; speed=_speed; angle=_angle;
+ hue=_hue; xz=_xz; yz=_yz; zz =_zz; den=_den; speed=_speed; angle=_angle;
xoff = random(100e3); yoff = random(100e3); zoff = random(100e3);
}
}
int CurAnim, iSymm;
int XSym=1,YSym=2,RadSym=3;
float zTime , zTheta=0, zSin, zCos, rtime, ttime, transAdd;
- DParam pSpeed , pDensity;
+ DParam pSpeed , pDensity, pSharp;
Pick pChoose, pSymm;
int _ND = 4;
NDat N[] = new NDat[_ND];
super(glucose);
pSpeed = addParam("Fast" , .55);
pDensity = addParam("Dens" , .5);
+ pSharp = addParam("Shrp" , 0);
pSymm = addPick("Symmetry" , 0, 3, new String[] {"None", "X", "Y", "Radial"} );
pChoose = addPick("Animation", 6, 7, new String[] {"Drip", "Cloud", "Rain", "Fire", "Machine", "Spark","VWave", "Wave"} );
for (int i=0; i<_ND; i++) N[i] = new NDat();
for (int i=0; i<_ND; i++) { N[i].isActive = false; }
switch(CurAnim) {
- // hue sat xz yz zz den mph angle
- case 0: N[0].set(0 ,0 ,75 ,75 ,150,45 ,3 ,0 ); pSharp.set(1 ); break; // drip
- case 1: N[0].set(0 ,0 ,100,100,200,45 ,3 ,180); pSharp.set(0 ); break; // clouds
- case 2: N[0].set(0 ,0 ,2 ,400,2 ,20 ,3 ,0 ); pSharp.set(.5); break; // rain
- case 3: N[0].set(40 ,1 ,100,100,200,10 ,1 ,180);
- N[1].set(0 ,1 ,100,100,200,10 ,5 ,180); pSharp.set(0 ); break; // fire 1
- case 4: N[0].set(0 ,1 ,40 ,40 ,40 ,15 ,2.5,180);
- N[1].set(20 ,1 ,40 ,40 ,40 ,15 ,4 ,0 );
- N[2].set(40 ,1 ,40 ,40 ,40 ,15 ,2 ,90 );
- N[3].set(60 ,1 ,40 ,40 ,40 ,15 ,3 ,-90); pSharp.set(.5); break; // machine
- case 5: N[0].set(0 ,1 ,400,100,2 ,15 ,3 ,90 );
- N[1].set(20 ,1 ,400,100,2 ,15 ,2.5,0 );
- N[2].set(40 ,1 ,100,100,2 ,15 ,2 ,180);
- N[3].set(60 ,1 ,100,100,2 ,15 ,1.5,270); pSharp.set(.5); break; // spark
+ // hue xz yz zz den mph angle
+ case 0: N[0].set(0 ,75 ,75 ,150,45 ,3 ,0 ); pSharp.set(1 ); break; // drip
+ case 1: N[0].set(0 ,100,100,200,45 ,3 ,180); pSharp.set(0 ); break; // clouds
+ case 2: N[0].set(0 ,2 ,400,2 ,20 ,3 ,0 ); pSharp.set(.5); break; // rain
+ case 3: N[0].set(40 ,100,100,200,10 ,1 ,180);
+ N[1].set(0 ,100,100,200,10 ,5 ,180); pSharp.set(0 ); break; // fire 1
+ case 4: N[0].set(0 ,40 ,40 ,40 ,15 ,2.5,180);
+ N[1].set(20 ,40 ,40 ,40 ,15 ,4 ,0 );
+ N[2].set(40 ,40 ,40 ,40 ,15 ,2 ,90 );
+ N[3].set(60 ,40 ,40 ,40 ,15 ,3 ,-90); pSharp.set(.5); break; // machine
+ case 5: N[0].set(0 ,400,100,2 ,15 ,3 ,90 );
+ N[1].set(20 ,400,100,2 ,15 ,2.5,0 );
+ N[2].set(40 ,100,100,2 ,15 ,2 ,180);
+ N[3].set(60 ,100,100,2 ,15 ,1.5,270); pSharp.set(.5); break; // spark
}
-
- DG.UpdateLights();
}
for (int i=0; i<_ND; i++) if (N[i].Active()) {
color CalcPoint(xyz P) {
color c = 0;
P.RotateZ(mCtr, zSin, zCos);
-
+
if (CurAnim == 6 || CurAnim == 7) {
P.setNorm();
- return color(0,0, 100 * (
+ return lx.hsb(lxh(),100, 100 * (
constrain(1-50*(1-pDensity.Val())*abs(P.y-sin(zTime*10 + P.x*(300))*.5 - .5),0,1) +
(CurAnim == 7 ? constrain(1-50*(1-pDensity.Val())*abs(P.x-sin(zTime*10 + P.y*(300))*.5 - .5),0,1) : 0))
);
}
-
+
if (iSymm == XSym && P.x > mMax.x/2) P.x = mMax.x-P.x;
if (iSymm == YSym && P.y > mMax.y/2) P.y = mMax.y-P.y;
NDat n = N[i];
float zx = zTime * n.speed * n.sinAngle,
zy = zTime * n.speed * n.cosAngle;
-
+
float b = (iSymm==RadSym ? noise(zTime*n.speed+n.xoff-Dist(P,mCtr)/n.xz)
: noise(P.x/n.xz+zx+n.xoff,P.y/n.yz+zy+n.yoff,P.z/n.zz+n.zoff))
*1.8;
b += n.den/100 -.4 + pDensity.Val() -1;
b += transAdd;
- c = blendColor(c,color(n.hue,100*n.sat,c1c(b)),ADD);
+ c = blendColor(c,lx.hsb(lxh()+n.hue,100,c1c(b)),ADD);
}
return c;
}
float zTheta=0;
ArrayList<rWave> waves = new ArrayList<rWave>(10);
- rAngle a1 = new rAngle(), a2 = new rAngle(),
- a3 = new rAngle(), a4 = new rAngle();
- xyz cPrev = new xyz(), cRand = new xyz(),
- cMid = new xyz(), V = new xyz(),
- Theta = new xyz(), TSin = new xyz(),
- TCos = new xyz(), cMidNorm = new xyz(),
+ rAngle a1 = new rAngle(), a2 = new rAngle(),
+ a3 = new rAngle(), a4 = new rAngle();
+ xyz cPrev = new xyz(), cRand = new xyz(),
+ cMid = new xyz(), V = new xyz(),
+ Theta = new xyz(), TSin = new xyz(),
+ TCos = new xyz(), cMidNorm = new xyz(),
Pn = new xyz();
float LastBeat=3, LastMeasure=3;
int CurRandTempo = 1, CurRandTPat = 1;
pRadius = addParam("Rad" , .1 );
pBounce = addParam("Bnc" , .2 );
pAmp = addParam("Amp" , .2 );
- pTempoMult = addPick ("TMult" , 0 , 5 , new String[] {"1x", "2x", "4x", "8x", "16x", "Rand" } );
- pTimePattern= addPick ("TPat" , 6 , 7 , new String[] {"Bounce", "Sin", "Roll", "Quant", "Accel", "Deccel", "Slide", "Rand"} );
- pShape = addPick ("Shape" , 3 , 15 , new String[] {"Line", "Tap", "V", "RandV",
+ pTempoMult = addPick ("TMult" , 5 , 5 , new String[] {"1x", "2x", "4x", "8x", "16x", "Rand" } );
+ pTimePattern= addPick ("TPat" , 7 , 7 , new String[] {"Bounce", "Sin", "Roll", "Quant", "Accel", "Deccel", "Slide", "Rand"} );
+ pShape = addPick ("Shape" , 7 , 15 , new String[] {"Line", "Tap", "V", "RandV",
"Pyramid", "Wings", "W2", "Clock",
"Triangle", "Quad", "Sphere", "Cone",
"Noise", "Wave", "?", "?"} );
}
void StartPattern() { zTheta=0; }
+
+ int KeyPressed = -1;
+ boolean noteOn(Note note) {
+ int row = note.getPitch(), col = note.getChannel();
+ if (row == 57) {KeyPressed = col; return true; }
+ return super.noteOn(note);
+ }
+
void StartRun(double deltaMs) {
t = lx.tempo.rampf();
amp = pAmp.Val();
w.move(deltaMs); if (w.bDone) waves.remove(i); else i++;
}
- if ((t<LastBeat && !pKey.b) || DG.KeyPressed>-1) {
+ if ((t<LastBeat && pShape.Cur()!=14) || KeyPressed>-1) {
waves.add(new rWave(
- pKey.b ? map(DG.KeyPressed,0,7,0,1) : random(1), // location
+ KeyPressed>-1 ? map(KeyPressed,0,7,0,1) : random(1), // location
bnc*10, // bounciness
7, // velocity
2*(1-amp))); // dampiness
- DG.KeyPressed=-1;
+ KeyPressed=-1;
if (waves.size() > 5) waves.remove(0);
}
distToSeg(Px.x, Px.y, a1.getX(70),a1.getY(70), mCtr.x, mCtr.y),
distToSeg(Px.x, Px.y, a2.getX(40),a2.getY(40), mCtr.x, mCtr.y));
d = constrain(30*(rad*40-d),0,100);
- return color(0,max(0,150-d), d); // clock
+ return lx.hsb(lxh(),100, d); // clock
case 8: r = amp*200 * map(bnc,0,1,1,sin(PI*t));
d = min(
distToSeg(Px.x, Px.y, a3.getX(r),a3.getY(r), a1.getX(r),a1.getY(r)) // triangle
);
d = constrain(30*(rad*40-d),0,100);
- return color(0,max(0,150-d), d); // clock
+ return lx.hsb(lxh(),100, d); // clock
case 9: r = amp*200 * map(bnc,0,1,1,sin(PI*t));
d = min(
distToSeg(Px.x, Px.y, a4.getX(r),a4.getY(r), a1.getX(r),a1.getY(r)) // quad
);
d = constrain(30*(rad*40-d),0,100);
- return color(0,max(0,150-d), d); // clock
+ return lx.hsb(lxh(),100, d); // clock
case 10:
r = map(bnc,0,1,a1.r,amp*200*sin(PI*t));
- return color(0,0,c1c(.9+2*rad - dist(Px.x,Px.y,a1.getX(r),a1.getY(r))*.03) ); // sphere
+ return lx.hsb(lxh(),100,c1c(.9+2*rad - dist(Px.x,Px.y,a1.getX(r),a1.getY(r))*.03) ); // sphere
case 11:
Px.z=mCtr.z; cMid.z=mCtr.z;
- return color(0,0,c1c(1 - CalcCone(Px,cMid,mCtr) * 0.02 > .5?1:0)); // cone
+ return lx.hsb(lxh(),100,c1c(1 - CalcCone(Px,cMid,mCtr) * 0.02 > .5?1:0)); // cone
- case 12: return color(100 + noise(Pn.x,Pn.y,Pn.z + (NoiseMove+50000)/1000.)*200,
+ case 12: return lx.hsb(lxh() + noise(Pn.x,Pn.y,Pn.z + (NoiseMove+50000)/1000.)*200,
85,c1c(Pn.y < noise(Pn.x + NoiseMove/2000.,Pn.z)*(1+amp)-amp/2.-.1 ? 1 : 0)); // noise
- case 13: float y=0; for (rWave w : waves) y += .5*w.val(Pn.x);
+ case 13:
+ case 14: float y=0; for (rWave w : waves) y += .5*w.val(Pn.x); // wave
V.set(Pn.x, .7+y, Pn.z);
break;
- default: return color(0,0,0);
+ default: return lx.hsb(0,0,0);
}
- return color(0,
- 150-c1c(1 - V.distance(Pn)/rad),
- c1c(1 - V.distance(Pn)/rad));
+ return lx.hsb(lxh(), 100, c1c(1 - V.distance(Pn)/rad));
}
}
//----------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------
boolean dDebug = true;
class dCursor {
- dVertex v, vNext;
- int pos,posNext; // 0 - 65535
- int stop; // 0-15
+ dVertex vCur, vNext, vDest;
+ float destSpeed;
+ int posStop, pos,posNext; // 0 - 65535
color clr;
- dCursor(color _c) { clr=_c;}
-
- boolean isDone() { return pos==stop<<12; }
- void set(dVertex _v, int _pos) { pos = _pos; v = _v; vNext = null; stop=16; }
+ dCursor() {}
+
+ boolean isDone () { return pos==posStop; }
+ boolean atDest () { return vCur.s==vDest.s ||
+ pointDist(vCur.getPoint(0), vDest.getPoint(0)) < 12 ||
+ pointDist(vCur.getPoint(0), vDest.getPoint(15))< 12;}
+ void setCur (dVertex _v, int _p) { p2=null; vCur=_v; pos=_p; pickNext(); }
+ void setCur (dPixel _p) { setCur(_p.v, _p.pos); }
+ void setNext (dVertex _v, int _p, int _s) { vNext = _v; posNext = _p<<12; posStop = _s<<12; }
+ void setDest (dVertex _v, float _speed) { vDest = _v; destSpeed = _speed; }
+ void onDone () { setCur(vNext, posNext); pickNext(); }
+
+ float minDist;
+ int nTurns;
+ boolean bRandEval;
+
+ void evaluate(dVertex v, int p, int s) {
+ if (v == null) return; ++nTurns;
+ if (bRandEval) {
+ if (random(nTurns) < 1) setNext(v,p,s); return; }
+ else {
+ float d = pointDist(v.getPoint(15), vDest.getPoint(0));
+ if (d < minDist) { minDist=d; setNext(v,p,s); }
+ if (d == minDist && random(2)<1) { minDist=d; setNext(v,p,s); }
+ }
+ }
- boolean Turn(dTurn t) {
- if (t.pos0<<12 < pos) return false;
- vNext = t.v;
- stop = t.pos0;
- posNext = t.pos1<<12;
- if (randDir()<0) { vNext = t.v.opp; posNext = (16<<12)-posNext; }
- return true;
+ void evalTurn(dTurn t) {
+ if (t == null || t.pos0<<12 <= pos) return;
+ evaluate(t.v , t.pos1, t.pos0);
+ evaluate(t.v.opp, 16-t.pos1, t.pos0);
}
- void PickNext() {
- if (vNext != null) { set(vNext, posNext); }
- else { set(random(2) < 1 ? v.c0 : v.c1, 0); }
- // plan to turn the corner
- float r = random(3);
- if (r<1 && v.t0 != null && Turn(v.t0)) return;
- if (r<2 && v.t1 != null && Turn(v.t1)) return;
+ void pickNext() {
+ bRandEval = random(.05+destSpeed) < .05; minDist=500; nTurns=0;
+ evaluate(vCur.c0, 0, 16); evaluate(vCur.c1, 0, 16);
+ evalTurn(vCur.t0); evalTurn(vCur.t1);
}
- Point p1, p2; int i2;
+
+ Point p1, p2; int i2;
+
+ int draw(int nAmount, SCPattern pat) {
+ int nFrom = (pos ) >> 12;
+ int nMv = min(nAmount, posStop-pos);
+ int nTo = min(15,(pos+nMv) >> 12);
+ dVertex v = vCur;
+
+ if (dDebug) { p1 = v.getPoint(nFrom); float d = (p2 == null ? 0 : pointDist(p1,p2)); if (d>5) { println("too wide! quitting: " + d); exit(); }}
+ for (int i = nFrom; i <= nTo; i++) { pat.getColors()[v.ci + v.dir*i ] = clr; }
+ if (v.same != null) for (int i = nFrom; i <= nTo; i++) { pat.getColors()[v.same.ci + v.same.dir*i] = clr; }
+
+ if (dDebug) { p2 = v.getPoint(nTo); i2 = nTo; }
+
+ pos += nMv; return nAmount - nMv;
+ }
}
//----------------------------------------------------------------------------------------------------------------------------------
class Worms extends SCPattern {
float StripsPerSec = 10;
- float TrailTime = 1000;
- int Cursors = 25;
- dCursor cur[] = new dCursor[Cursors];
+ float TrailTime = 3000;
+ int numCursors = 50;
+ ArrayList<dCursor> cur = new ArrayList<dCursor>(30);
+
+ private GraphicEQ eq = null;
+
+ private BasicParameter pBeat = new BasicParameter("BEAT", 0);
+ private BasicParameter pSpeed = new BasicParameter("FAST", .2);
+ private BasicParameter pBlur = new BasicParameter("BLUR", .3);
+ private BasicParameter pWorms = new BasicParameter("WRMS", .3);
+ private BasicParameter pConfusion = new BasicParameter("CONF", .1);
+ private BasicParameter pEQ = new BasicParameter("EQ" , 0);
+ private BasicParameter pSpawn = new BasicParameter("DIR" , 0);
+ private BasicParameter pColor = new BasicParameter("CLR" , .1);
+
+ int zMidLat = 82;
+ float nConfusion;
+ private final Click moveChase = new Click(1000);
+
+ xyz middle;
+ int AnimNum() { return floor(pSpawn.getValuef()*(4-.01)); }
+ float randX() { return random(model.xMax-model.xMin)+model.xMin; }
+ float randY() { return random(model.yMax-model.yMin)+model.yMin; }
+ xyz randEdge() {
+ return random(2) < 1 ? new xyz(random(2)<1 ? model.xMin:model.xMax, randY(), zMidLat) :
+ new xyz(randX(), random(2)<1 ? model.yMin:model.yMax, zMidLat) ;
+ }
+
+ Worms(GLucose glucose) {
+ super(glucose);
+ addModulator(moveChase).start();
+ addParameter(pBeat); addParameter(pSpeed);
+ addParameter(pBlur); addParameter(pWorms);
+ addParameter(pEQ); addParameter(pConfusion);
+ addParameter(pSpawn); addParameter(pColor);
+
+ middle = new xyz(model.cx, model.cy, 71);
+ if (lattice == null) lattice = new dLattice();
+ for (int i=0; i<numCursors; i++) { dCursor c = new dCursor(); reset(c); cur.add(c); }
+ onParameterChanged(pEQ); setNewDest();
+ }
+
+ void onParameterChanged(LXParameter parameter) {
+ nConfusion = 1-pConfusion.getValuef();
+ for (int i=0; i<numCursors; i++) {
+ if (parameter==pSpawn) reset(cur.get(i));
+ cur.get(i).destSpeed = nConfusion;
+ }
+ }
- int draw(dCursor c, int nAmount) {
- int nFrom = (c.pos ) >> 12;
- int nMv = min(nAmount, (c.stop<<12)-c.pos);
- int nTo = min(15,(c.pos+nMv) >> 12);
+ float getClr() { return lx.getBaseHuef() + random(pColor.getValuef()*300); }
+ void reset(dCursor c) {
+ switch(AnimNum()) {
+ case 0: c.clr = lx.hsb(getClr(),100,100); // middle to edges
+ c.setDest(lattice.getClosest(randEdge()).v, nConfusion);
+ c.setCur (lattice.getClosest(middle));
+ break;
+
+ case 1: c.clr = lx.hsb(getClr(),100,100); // top to bottom
+ float xLin = randX();
+ c.setDest(lattice.getClosest(new xyz(xLin, 0 , zMidLat)).v, nConfusion);
+ c.setCur (lattice.getClosest(new xyz(xLin, model.yMax, zMidLat)));
+ break;
- if (dDebug) { c.p1 = c.v.getPoint(nFrom); float d = (c.p2 == null ? 0 : PointDist(c.p1,c.p2)); if (d>5) { println("too wide! quitting: " + d); exit(); }}
- for (int i = nFrom; i <= nTo; i++) { colors[c.v.ci + c.v.dir*i ] = c.clr; }
- if (c.v.same != null) for (int i = nFrom; i <= nTo; i++) { colors[c.v.same.ci + c.v.same.dir*i] = c.clr; }
- if (dDebug) { c.p2 = c.v.getPoint(nTo); c.i2 = nTo; }
+ case 2: c.clr = lx.hsb(getClr(),100,100); break; // chase a point around
- c.pos += nMv; return nAmount - nMv;
+ case 3: boolean bLeft = random(2)<1;
+ c.clr = lx.hsb(getClr()+random(120),100,100); // sideways
+ float yLin = randX();
+ c.setDest(lattice.getClosest(new xyz(bLeft ? 0 : model.xMax,yLin,zMidLat)).v, nConfusion);
+ c.setCur (lattice.getClosest(new xyz(bLeft ? model.xMax : 0,yLin,zMidLat)));
+ break;
+ }
+ if (pBlur.getValuef() == 1 && random(2)<1) c.clr = lx.hsb(0,0,0);
}
- Worms(GLucose glucose) {
- super(glucose);
- if (DL_ == null) DL_ = new dLattice();
- for (int i=0; i<Cursors; i++) { cur[i] = new dCursor(color(135,100,100)); DL_.setRand(cur[i]); }
+ void setNewDest() {
+ if (AnimNum() != 2) return;
+ xyz dest = new xyz(randX(), randY(), zMidLat);
+ for (int i=0; i<numCursors; i++) {
+ cur.get(i).setDest(lattice.getClosest(dest).v, nConfusion);
+ cur.get(i).clr = lx.hsb(getClr()+75,100,100); // chase a point around
+ }
}
- void run(double deltaMs) {
- for (int i=0,s=model.points.size(); i<s; i++) {
- float b = brightness(colors[i]);
- color c = colors[i];
- if (b>0) colors[i] = color(hue(c), saturation(c), (float)(b-100*deltaMs/TrailTime));
+ void run(double deltaMs) {
+ if (deltaMs > 100) return;
+ if (moveChase.click()) setNewDest();
+
+ float fBass=0, fTreble=0;
+ if (pEQ.getValuef()>0) { // EQ
+ eq.run(deltaMs);
+ fBass = eq.getAverageLevel(0, 4);
+ fTreble = eq.getAverageLevel(eq.numBands-7, 7);
+ }
+
+ if (pBlur.getValuef() < 1) { // trails
+ for (int i=0,s=model.points.size(); i<s; i++) {
+ color c = colors[i]; float b = lx.b(c);
+ if (b>0) colors[i] = lx.hsb(lx.h(c), lx.s(c), constrain((float)(b-100*deltaMs/(pBlur.getValuef()*TrailTime)),0,100));
+ }
}
- for (int i=0; i<Cursors; i++) {
- int nLeft = floor((float)deltaMs*.001*StripsPerSec * 65536);
- while(nLeft > 0) { nLeft = draw(cur[i], nLeft); if (cur[i].isDone()) cur[i].PickNext(); }
+ int nWorms = floor(pWorms.getValuef() * numCursors *
+ map(pEQ.getValuef(),0,1,1,constrain(2*fTreble,0,1)));
+
+ for (int i=0; i<nWorms; i++) {
+ dCursor c = cur.get(i);
+ int nLeft = floor((float)deltaMs*.001*StripsPerSec * 65536 * (5*pSpeed.getValuef()));
+ nLeft *= (1 - lx.tempo.rampf()*pBeat.getValuef());
+ while(nLeft > 0) {
+ nLeft = c.draw(nLeft,this); if (!c.isDone()) continue;
+ c.onDone(); if (c.atDest()) reset(c);
+ }
}
}
+
+
+ public void onActive() { if (eq == null) {
+ eq = new GraphicEQ(lx, 16); eq.slope.setValue(0.6);
+ eq.level.setValue(0.65); eq.range.setValue(0.35);
+ eq.release.setValue(0.4);
+ }}
}
//----------------------------------------------------------------------------------------------------------------------------------