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 = _leftPatterns(glucose));
logTime("Built transitions");
glucose.lx.addEffects(effects(glucose));
logTime("Built effects");
-
+
+ // MIDI devices
+ midiEngine = new MidiEngine();
+ logTime("Setup MIDI devices");
+
// Build output driver
PandaMapping[] pandaMappings = buildPandaList();
pandaBoards = new PandaDriver[pandaMappings.length];
beginShape(POINTS);
for (Point p : glucose.model.points) {
stroke(colors[p.index]);
- vertex(p.fx, p.fy, p.fz);
+ vertex(p.x, p.y, p.z);
}
endShape();
// Send output colors
color[] sendColors = glucose.getColors();
if (debugMode) {
- debugUI.maskColors(colors);
+ debugUI.maskColors(sendColors);
}
// Gamma correction here. Apply a cubic to the brightness
// for better representation of dynamic range
- for (int i = 0; i < colors.length; ++i) {
- float b = brightness(colors[i]) / 100.f;
- colors[i] = color(
- hue(colors[i]),
- saturation(colors[i]),
+ for (int i = 0; i < sendColors.length; ++i) {
+ float b = brightness(sendColors[i]) / 100.f;
+ sendColors[i] = color(
+ hue(sendColors[i]),
+ saturation(sendColors[i]),
(b*b*b) * 100.
);
}
// TODO(mcslee): move into GLucose engine
for (PandaDriver p : pandaBoards) {
- p.send(colors);
+ p.send(sendColors);
}
}
}
}
-void mouseWheel(int delta) {delta*=20;
+void mouseWheel(int delta) {
boolean wheeled = false;
for (UIContext context : overlays) {
wheeled |= context.mouseWheel(mouseX, mouseY, delta);