X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=DanUtil.pde;fp=DanUtil.pde;h=e9cabb15cff9601311d02bd0e171fd9cd6a63b89;hb=1b65b8ce3a3557c110e79a2166d8454c9c2d2d67;hp=84bcdb51b88038b794c5bad4a30dc5d13f535885;hpb=a1396b9e932bdf842b1817b0b313a34831889a5b;p=SugarCubes.git diff --git a/DanUtil.pde b/DanUtil.pde index 84bcdb5..e9cabb1 100644 --- a/DanUtil.pde +++ b/DanUtil.pde @@ -202,13 +202,17 @@ public class DPat extends SCPattern //println (model.xMin + " " + model.yMin + " " + model.zMin); //println (model.xMax + " " + model.yMax + " " + model.zMax); - for (MidiOutputDevice o: RWMidi.getOutputDevices()) { if (o.toString().contains("APC")) { APCOut = o.createOutput(); break;}} + //for (MidiOutputDevice o: RWMidi.getOutputDevices()) { if (o.toString().contains("APC")) { APCOut = o.createOutput(); break;}} + } + + void setAPCOutput(MidiOutput output) { + APCOut = output; } void updateLights() { if (APCOut == null) return; for (int i = 0; i < NumApcRows; ++i) - for (int j = 0; j < 8; ++j) midiEngine.grid.setState(i, j, 0); - for (int i=0; i