X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=DanUtil.pde;h=7eca742f3933413336926f3aa12418b1e07dcb25;hb=ba190564c9813abcffa6a6225796e720398a182f;hp=9ae6f1994e01cfdc4298ad8c2ca8b0d872d77ff9;hpb=d5ce8c1c3c9b6146a5e5b10e90beec7a4539584a;p=SugarCubes.git diff --git a/DanUtil.pde b/DanUtil.pde index 9ae6f19..7eca742 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -67,10 +67,10 @@ public class DParam extends BasicParameter { //---------------------------------------------------------------------------------------------------------------------------------- public class xyz { float x,y,z; xyz() {x=y=z=0;} - xyz(Point p ) {x=p.fx ; y=p.fy; z=p.fz;} + xyz(Point p ) {x=p.x ; y=p.y; z=p.z;} xyz(xyz p ) {set(p); } xyz(float _x,float _y,float _z) {x=_x ; y=_y ; z=_z ;} - void set(Point p ) {x=p.fx ; y=p.fy; z=p.fz;} + void set(Point p ) {x=p.x ; y=p.y; z=p.z;} void set(xyz p ) {x=p.x ; y=p.y ; z=p.z ;} void set(float _x,float _y,float _z) {x=_x ; y=_y ; z=_z ;} @@ -113,10 +113,12 @@ public class DGlobals { MidiOutput APCOut = null; MidiInput APCIn = null, OxygenIn = null; DPat CurPat = null; + int KeyPressed = -1; + boolean bSustain = false; 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 +128,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; @@ -142,6 +145,7 @@ public class DGlobals { boolean isFocused () { return CurPat != null && CurPat == midiEngine.getFocusedDeck().getActivePattern(); } void Deactivate (DPat p) { if (p != CurPat) return; uiDebugText.setText(""); CurPat = null; } void Activate (DPat p) { + bSustain = false; CurPat = p; while (lx.tempo.bpm() > 40) lx.tempo.setBpm(lx.tempo.bpm()/2); for (int i=0; i