* //\\ //\\ //\\ //\\
* ///\\\ ///\\\ ///\\\ ///\\\
* \\\/// \\\/// \\\/// \\\///
- * \\// \\// \\// \\//
+ * \\// \\// \\// \\//H
*
* EXPERTS ONLY!! EXPERTS ONLY!!
*
// Core engine variables
GLucose glucose;
-HeronLX lx;
+LX lx;
LXPattern[] patterns;
Effects effects;
MappingTool mappingTool;
boolean debugMode = false;
DebugUI debugUI;
boolean uiOn = true;
+boolean simulationOn = true;
LXPattern restoreToPattern = null;
PImage logo;
float[] hsb = new float[3];
UIMidi uiMidi;
UIMapping uiMapping;
UIDebugText uiDebugText;
+UISpeed uiSpeed;
// Camera variables
float eyeR, eyeA, eyeX, eyeY, eyeZ, midX, midY, midZ;
new UIBlendMode(4, 332, 140, 86),
new UIEffects(4, 422, 140, 144),
new UITempo(4, 570, 140, 50),
- new UISpeed(4, 624, 140, 50),
+ uiSpeed = new UISpeed(4, 624, 140, 50),
new UIPatternDeck(lx.engine.getDeck(GLucose.RIGHT_DECK), "PATTERN B", width-144, 4, 140, 324),
uiMidi = new UIMidi(midiEngine, width-144, 332, 140, 158),
simulationColors = sendColors = glucose.getColors();
String displayMode = uiCrossfader.getDisplayMode();
if (displayMode == "A") {
- simulationColors = lx.engine.getDeck(0).getColors();
+ simulationColors = lx.engine.getDeck(GLucose.LEFT_DECK).getColors();
} else if (displayMode == "B") {
- simulationColors = lx.engine.getDeck(1).getColors();
+ simulationColors = lx.engine.getDeck(GLucose.RIGHT_DECK).getColors();
}
if (debugMode) {
debugUI.maskColors(simulationColors);
debugUI.maskColors(sendColors);
}
- camera(
+ if (simulationOn) {
+ drawSimulation(simulationColors);
+ }
+
+ // 2D Overlay UI
+ drawUI();
+
+ // Gamma correction here. Apply a cubic to the brightness
+ // for better representation of dynamic range
+ for (int i = 0; i < sendColors.length; ++i) {
+ lx.RGBtoHSB(sendColors[i], hsb);
+ float b = hsb[2];
+ sendColors[i] = lx.hsb(360.*hsb[0], 100.*hsb[1], 100.*(b*b*b));
+ }
+
+ // TODO(mcslee): move into GLucose engine
+ for (PandaDriver p : pandaBoards) {
+ p.send(sendColors);
+ }
+}
+
+void drawSimulation(color[] simulationColors) {
+ camera(
eyeX, eyeY, eyeZ,
midX, midY, midZ,
0, -1, 0
vertex(p.x, p.y, p.z);
}
endShape();
-
- // 2D Overlay UI
- drawUI();
-
- // Gamma correction here. Apply a cubic to the brightness
- // for better representation of dynamic range
- for (int i = 0; i < sendColors.length; ++i) {
- lx.RGBtoHSB(sendColors[i], hsb);
- float b = hsb[2];
- sendColors[i] = lx.hsb(360.*hsb[0], 100.*hsb[1], 100.*(b*b*b));
- }
-
- // TODO(mcslee): move into GLucose engine
- for (PandaDriver p : pandaBoards) {
- p.send(sendColors);
- }
}
void drawBassBox(BassBox b, boolean hasSub) {
p.toggle();
}
break;
+ case 's':
+ if (!midiEngine.isQwertyEnabled()) {
+ simulationOn = !simulationOn;
+ }
+ break;
case 'u':
if (!midiEngine.isQwertyEnabled()) {
uiOn = !uiOn;