Update DriveableCrossSections to show knob values live
[SugarCubes.git] / _Internals.pde
index e2c343a243521e1c7c9096cf0c0b11c6a6e03cd7..1b32abd1b17c647202ddc631a4e7df04b3de9813 100644 (file)
@@ -75,7 +75,7 @@ void setup() {
   logTime("Created viewport");
 
   // Create the GLucose engine to run the cubes
-  glucose = new GLucose(this, new SCMapping());
+  glucose = new GLucose(this, buildModel());
   lx = glucose.lx;
   lx.enableKeyboardTempo();
   logTime("Built GLucose engine");
@@ -89,19 +89,19 @@ void setup() {
   logTime("Built transitions");
     
   // Build output driver
-  int[][] frontChannels = glucose.mapping.buildFrontChannelList();
-  int[][] rearChannels = glucose.mapping.buildRearChannelList();
-  mappingTool = new MappingTool(glucose, frontChannels, rearChannels);
-  pandaBoards = new PandaDriver[] {
-    new PandaDriver("10.200.1.28", glucose.model, frontChannels),
-    new PandaDriver("10.200.1.29", glucose.model, rearChannels),
-  };
-  logTime("Build PandaDriver");
+  PandaMapping[] pandaMappings = buildPandaList();
+  pandaBoards = new PandaDriver[pandaMappings.length];
+  int pbi = 0;
+  for (PandaMapping pm : pandaMappings) {
+    pandaBoards[pbi++] = new PandaDriver(pm.ip, glucose.model, pm);
+  }
+  mappingTool = new MappingTool(glucose, pandaMappings);
+  logTime("Built PandaDriver");
   
   // Build overlay UI
   ui = controlUI = new ControlUI();
   mappingUI = new MappingUI(mappingTool);
-  debugUI = new DebugUI(frontChannels, rearChannels);
+  debugUI = new DebugUI(pandaMappings);
   logTime("Built overlay UI");
     
   // MIDI devices
@@ -181,7 +181,7 @@ void draw() {
   endShape();
   
   noStroke();
-  fill(#292929);
+  fill(#393939);
   drawBox(BASS_X, 0, BASS_Z, 0, 0, 0, BASS_WIDTH, BASS_HEIGHT, BASS_DEPTH, Cube.CHANNEL_WIDTH);
   for (Cube c : glucose.model.cubes) {
     drawCube(c);