X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=DanUtil.pde;h=c7c8e706d82c49dc1aac97c34d5a6ae0dea245d4;hb=1c44211b1a15965afee7056a2f1d43a1306df61b;hp=d340ed1f54dd2cad2c11aa0a12f17bc5980fefb2;hpb=d6b5635a112a63746046ae8664ca38419bd233ff;p=SugarCubes.git diff --git a/DanUtil.pde b/DanUtil.pde index d340ed1..c7c8e70 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -155,6 +155,16 @@ public class DPat extends SCPattern //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;