}
}
- void run(int deltaMs) {
+ void run(double deltaMs) {
angle += deltaMs * 0.0007;
float sVal1 = model.strips.size() * (0.5 + 0.5*sin(angle));
float sVal2 = model.strips.size() * (0.5 + 0.5*cos(angle));
}
}
- void run(int deltaMs) {
+ void run(double deltaMs) {
float s = 0;
for (Strip strip : model.strips ) {
int i = 0;
colors[p.index] = color(
(lx.getBaseHuef() + 0.3 * abs(p.fx - hOffX.getValuef())) % 360,
constrain(80 + 40 * fV, 0, 100),
- constrain(100 - (30 - fV * falloff.getValuef()) * modDist(i + (s*63)%61, (int) (offset.getValuef() * strip.metrics.numPoints), strip.metrics.numPoints), 0, 100)
+ constrain(100 - (30 - fV * falloff.getValuef()) * modDist(i + (s*63)%61, offset.getValuef() * strip.metrics.numPoints, strip.metrics.numPoints), 0, 100)
);
++i;
}
}
}
+abstract class BlendTransition extends SCTransition {
+
+ final int blendType;
+
+ BlendTransition(GLucose glucose, int blendType) {
+ super(glucose);
+ this.blendType = blendType;
+ }
+
+ void computeBlend(int[] c1, int[] c2, double progress) {
+ if (progress < 0.5) {
+ for (int i = 0; i < c1.length; ++i) {
+ colors[i] = lerpColor(
+ c1[i],
+ blendColor(c1[i], c2[i], blendType),
+ (float) (2.*progress),
+ RGB);
+ }
+ } else {
+ for (int i = 0; i < c1.length; ++i) {
+ colors[i] = lerpColor(
+ c2[i],
+ blendColor(c1[i], c2[i], blendType),
+ (float) (2.*(1. - progress)),
+ RGB);
+ }
+ }
+ }
+}
+
+class MultiplyTransition extends BlendTransition {
+ MultiplyTransition(GLucose glucose) {
+ super(glucose, MULTIPLY);
+ }
+}
+
+class ScreenTransition extends BlendTransition {
+ ScreenTransition(GLucose glucose) {
+ super(glucose, SCREEN);
+ }
+}
+
+class BurnTransition extends BlendTransition {
+ BurnTransition(GLucose glucose) {
+ super(glucose, BURN);
+ }
+}
+
+class DodgeTransition extends BlendTransition {
+ DodgeTransition(GLucose glucose) {
+ super(glucose, DODGE);
+ }
+}
+
+class OverlayTransition extends BlendTransition {
+ OverlayTransition(GLucose glucose) {
+ super(glucose, OVERLAY);
+ }
+}
+
+class AddTransition extends BlendTransition {
+ AddTransition(GLucose glucose) {
+ super(glucose, ADD);
+ }
+}
+
+class SubtractTransition extends BlendTransition {
+ SubtractTransition(GLucose glucose) {
+ super(glucose, SUBTRACT);
+ }
+}
+
+class SoftLightTransition extends BlendTransition {
+ SoftLightTransition(GLucose glucose) {
+ super(glucose, SOFT_LIGHT);
+ }
+}
+
class BassPod extends SCPattern {
private GraphicEQ eq = null;
}
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
eq.run(deltaMs);
float bassLevel = eq.getAverageLevel(0, 5);
}
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
eq.run(deltaMs);
float edgeConst = 2 + 30*edge.getValuef();
getEnvelope(note.getPitch()).setEndVal(0, getReleaseTime()).start();
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
int i = 0;
float huef = lx.getBaseHuef();
float levelf = level.getValuef();
zv = z.getValuef();
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
updateXYZVals();
float xlv = 100*xl.getValuef();
s.modulateDurationBy(r);
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
float hv = lx.getBaseHuef();
int si = 0;
for (Strip strip : model.strips) {
addModulator(c).trigger();
}
- void run(int deltaMs) {
+ void run(double deltaMs) {
float huev = h.getValuef();
float cv = c.getValuef();
float sv = s.getValuef();
addModulator(c = new SinLFO(-50, 50, 4000 + 1000*i * ((i % 2 == 0) ? 1 : -1))).trigger();
}
- void run(int deltaMs) {
+ void run(double deltaMs) {
av = a.getValuef();
bv = b.getValuef();
cv = c.getValuef();
}
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
float huev = lx.getBaseHuef();
// This is super fucking bizarre. But if this is a for loop, the framerate
addModulator(d).trigger();
}
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
float hv = lx.getBaseHuef();
float av = a.getValuef();
float bv = b.getValuef();
int counter = 0;
- public void run(int deltaMs) {
+ public void run(double deltaMs) {
eq.run(deltaMs);
int stepThresh = (int) (40 - 39*speed.getValuef());
}
public void doApply(int[] colors) {
+ if (!enabled) {
+ return;
+ }
float bMod = bright.getValuef();
float sMod = sat.getValuef();
float hMod = hueShift.getValuef();