Changes to make DPat able to run multiple instances
[SugarCubes.git] / _Internals.pde
index 60a5f3296e11abc121aec4607abd44edb95832a8..eba174ca9cbcc1156a363f02e4842f2bd04bf786 100644 (file)
@@ -102,6 +102,10 @@ void setup() {
   lx.enableKeyboardTempo();
   logTime("Built GLucose engine");
   
+  // MIDI devices
+  midiEngine = new MidiEngine();
+  logTime("Setup MIDI devices");
+
   // Set the patterns
   Engine engine = lx.engine;
   engine.setPatterns(patterns = _patterns(glucose));
@@ -122,10 +126,6 @@ void setup() {
   mappingTool = new MappingTool(glucose, pandaMappings);
   logTime("Built PandaDriver");
 
-  // MIDI devices
-  midiEngine = new MidiEngine();
-  logTime("Setup MIDI devices");
-
   // Build overlay UI
   debugUI = new DebugUI(pandaMappings);
   overlays = new UIContext[] {