X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=DanUtil.pde;h=9bc52185541638b619efa11955527ccd8f34eb4c;hb=af83f61c0f331ebf802fa6b01fa37af834fb684f;hp=9ae6f1994e01cfdc4298ad8c2ca8b0d872d77ff9;hpb=d5ce8c1c3c9b6146a5e5b10e90beec7a4539584a;p=SugarCubes.git diff --git a/DanUtil.pde b/DanUtil.pde index 9ae6f19..9bc5218 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -113,10 +113,11 @@ public class DGlobals { MidiOutput APCOut = null; MidiInput APCIn = null, OxygenIn = null; DPat CurPat = null; + int KeyPressed = -1; float Sliders[] = new float [] {1,0,0,0,0,0,0,0}; - String SliderText[] = new String[] {"Level", "SpinHue", "Spark", "Xwave", "Ywave", "Trails", "??", "??", "??"}; + String SliderText[] = new String[] {"Level", "SpinHue", "Spark", "Xwave", "Ywave", "Trails", "Quant", "??", "??"}; void SetNoteOn (int row, int col, int clr){ if (APCOut != null) APCOut.sendNoteOn (col, row, clr); } void SetNoteOff (int row, int col, int clr){ if (APCOut != null) APCOut.sendNoteOff (col, row, clr); } @@ -126,12 +127,13 @@ public class DGlobals { Pick GetPick (int i) { return (Pick) CurPat.picks .get(i); } DParam GetParam(int i) { return (DParam) CurPat.params.get(i); } - float _Dim () { return Sliders[0]; } + float _Level () { return Sliders[0]; } float _SpinHue () { return Sliders[1]; } float _Spark () { return Sliders[2]; } float _XWave () { return Sliders[3]; } float _YWave () { return Sliders[4]; } float _Trails () { return Sliders[5]; } + float _Quantize () { return Sliders[6]; } void Init () { if (bInit) return; bInit=true; @@ -185,7 +187,8 @@ public class DGlobals { int row = note.getPitch(), col = note.getChannel(); for (int i=0; i 0) { float tRamp = (lx.tempo.rampf() % (1./pow(2,floor((1-fQuant) * 4)))); float f = LastQuant; LastQuant = tRamp; if (tRamp > f) return; @@ -293,6 +307,7 @@ public class DPat extends SCPattern for (Point p : model.points) { nPoint++; P.set(p); P.subtract(modmin); + P.subtract(pTrans); if (sprk > 0) { P.y += sprk*randctr(50); P.x += sprk*randctr(50); P.z += sprk*randctr(50); } if (yWv > 0) P.y += interpWv(p.x-modmin.x, yWaveNz); if (xWv > 0) P.x += interpWv(p.y-modmin.y, xWaveNz); @@ -313,7 +328,7 @@ public class DPat extends SCPattern colors[p.index] = color( (hue(cNew) + zSpinHue) % 360, saturation(cNew) + 100*(fSaturate*2-1), - 100 * b * DG._Dim() + 100 * b * DG._Level() ); // colors[p.index] = color(0,0, p.fx >= modmin.x && p.fy >= modmin.y && p.fz >= modmin.z &&