X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=_Internals.pde;h=82feb2d2b2e9509d78074e2d910523aacc133ac5;hb=45f43cc2debb7f90b01e7a5c7d355218ab9cdeed;hp=e2c343a243521e1c7c9096cf0c0b11c6a6e03cd7;hpb=79ae8245d084fe7901933b22a44b404f9d68b925;p=SugarCubes.git diff --git a/_Internals.pde b/_Internals.pde index e2c343a..82feb2d 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -47,6 +47,7 @@ final float BASS_Z = (TRAILER_DEPTH - BASS_DEPTH) / 2.; int targetFramerate = 60; int startMillis, lastMillis; +SCMapping mapping; GLucose glucose; HeronLX lx; MappingTool mappingTool; @@ -75,7 +76,8 @@ void setup() { logTime("Created viewport"); // Create the GLucose engine to run the cubes - glucose = new GLucose(this, new SCMapping()); + mapping = new SCMapping(); + glucose = new GLucose(this, mapping); lx = glucose.lx; lx.enableKeyboardTempo(); logTime("Built GLucose engine"); @@ -89,19 +91,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 = mapping.buildPandaList(); + pandaBoards = new PandaDriver[pandaMappings.length]; + int pbi = 0; + for (PandaMapping pm : pandaMappings) { + pandaBoards[pbi++] = new PandaDriver(pm.ip, glucose.model, pm.channelList); + } + 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