void StartRun(double deltaMs) {
zTime += deltaMs*(val(pSpeed)-.5)*.002 ;
- zTheta += deltaMs*(val(pSpin )-.5)*.01 ;
+ zTheta += deltaMs*(spin()-.5)*.01 ;
rtime += deltaMs;
iSymm = pSymm.Cur();
zSin = sin(zTheta);
}
void onParameterChanged(LXParameter parameter) {
+ super.onParameterChanged(parameter);
nConfusion = 1-pConfusion.getValuef();
for (int i=0; i<numCursors; i++) {
if (parameter==pSpawn) reset(cur.get(i));
//println (model.xMax + " " + model.yMax + " " + model.zMax);
//for (MidiOutputDevice o: RWMidi.getOutputDevices()) { if (o.toString().contains("APC")) { APCOut = o.createOutput(); break;}}
}
+
+ float spin() {
+ float raw = val(pSpin);
+ if (raw <= 0.45) {
+ return raw + 0.05;
+ } else if (raw >= 0.55) {
+ return raw - 0.05;
+ }
+ return 0.5;
+ }
void setAPCOutput(MidiOutput output) {
APCOut = output;