- UpdateLights();
- }
-
- void UpdateLights() {
- if (!isFocused() || APCOut == null) return;
- for (int i=53;i< 58; i++) for (int j=0; j<NumApcCols; j++) SetNoteOn(i, j, 0);
- for (int i=0; i<picks .size(); i++) SetNoteOn (picks.get(i).CurRow, picks.get(i).CurCol, 3);
- for (int i=0; i<bools .size(); i++) if (bools.get(i).b) SetNoteOn (bools.get(i).row, bools.get(i).col, 1);
- else SetNoteOff (bools.get(i).row, bools.get(i).col, 0);
- }
-
- void SetText() { if (!isFocused()) return;
- String Text1="", Text2="";
- for (int i=0; i<bools.size(); i++) if (bools.get(i).b) Text1 += " " + bools.get(i).tag + " ";
- for (int i=0; i<picks.size(); i++) Text1 += picks.get(i).tag + ": " + picks.get(i).CurDesc() + " ";
- uiDebugText.setText(Text1, Text2);
- }
-
- ArrayList<Pick> picks = new ArrayList<Pick> ();
- ArrayList<DBool> bools = new ArrayList<DBool> ();
- ArrayList<DParam> params = new ArrayList<DParam>();
-
- int nMaxRow = 53;
- float LastQuant = -1, LastJog = -1;
- float[] xWaveNz, yWaveNz;
- int nPoint , nPoints;
- xyz xyzJog = new xyz(), vT1 = new xyz(), vT2 = new xyz();
- xyz modmin;
-
- float NoiseMove = random(10000);
- DParam pSpark, pWave, pRotX, pRotY, pRotZ, pSpin, pTransX, pTransY;
-
- DBool pXsym, pYsym, pRsym, pXdup, pXtrip, pJog, pGrey;
- float lxh () { return lx.getBaseHuef(); }
- float Dist (xyz a, xyz b) { return dist(a.x,a.y,a.z,b.x,b.y,b.z); }
- int c1c (float a) { return round(100*constrain(a,0,1)); }
- float interpWv(float i, float[] vals) { return interp(i-floor(i), vals[floor(i)], vals[ceil(i)]); }
-
- float CalcCone (xyz v1, xyz v2, xyz c) { vT1.set(v1); vT2.set(v2); vT1.subtract(c); vT2.subtract(c);
- return degrees( acos ( vT1.dot(vT2) / (sqrt(vT1.dot(vT1)) * sqrt(vT2.dot(vT2)) ) )); }
-
- void StartPattern() { }
- void StartRun(double deltaMs) { }
- color CalcPoint(xyz p) { return lx.hsb(0,0,0); }
- color blend3(color c1, color c2, color c3){ return blendColor(c1,blendColor(c2,c3,ADD),ADD); }
-
- DParam addParam(String label, double value) {
- DParam P = new DParam(label, value);
- super.addParameter(P);
- params.add(P); return P;
- }
-
- Pick addPick(String name, int def, int _max, String[] desc) {
- Pick P = new Pick(name, def, _max+1, nMaxRow, desc);
- nMaxRow = P.EndRow + 1;
- picks.add(P);
- return P;