repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0106b29
)
Make blinders much more interesting by splitting into groups
author
Mark Slee
<mcslee@Mark-Slees-MacBook-Pro.local>
Mon, 27 May 2013 06:33:47 +0000
(23:33 -0700)
committer
Mark Slee
<mcslee@Mark-Slees-MacBook-Pro.local>
Mon, 27 May 2013 06:33:47 +0000
(23:33 -0700)
MarkSlee.pde
patch
|
blob
|
blame
|
history
diff --git
a/MarkSlee.pde
b/MarkSlee.pde
index 0ed7e3700cc13ec7df3bfab2bb5bedfe0b1dda97..ed1fc5a4edd662bb7e35a9485b4e61d21885a745 100644
(file)
--- a/
MarkSlee.pde
+++ b/
MarkSlee.pde
@@
-424,32
+424,38
@@
class CrossSections extends SCPattern {
class Blinders extends SCPattern {
class Blinders extends SCPattern {
- final SinLFO m;
+ final SinLFO
[]
m;
final TriangleLFO r;
final SinLFO s;
final TriangleLFO hs;
public Blinders(GLucose glucose) {
super(glucose);
final TriangleLFO r;
final SinLFO s;
final TriangleLFO hs;
public Blinders(GLucose glucose) {
super(glucose);
- addModulator(m = new SinLFO(0.5, 80, 9000)).trigger();
- addModulator(r = new TriangleLFO(3000, 9000, 21000)).trigger();
- addModulator(s = new SinLFO(-20, 275, 4000)).trigger();
+ m = new SinLFO[12];
+ for (int i = 0; i < m.length; ++i) {
+ addModulator(m[i] = new SinLFO(0.5, 120, (120000. / (3+i)))).trigger();
+ }
+ addModulator(r = new TriangleLFO(9000, 15000, 29000)).trigger();
+ addModulator(s = new SinLFO(-20, 275, 11000)).trigger();
addModulator(hs = new TriangleLFO(0.1, 0.5, 15000)).trigger();
addModulator(hs = new TriangleLFO(0.1, 0.5, 15000)).trigger();
-
m
.modulateDurationBy(r);
+
s
.modulateDurationBy(r);
}
public void run(int deltaMs) {
float hv = lx.getBaseHuef();
}
public void run(int deltaMs) {
float hv = lx.getBaseHuef();
+ int si = 0;
for (Strip strip : Strip.list) {
int i = 0;
for (Strip strip : Strip.list) {
int i = 0;
+ float mv = m[si % m.length].getValuef();
for (Point p : strip.points) {
colors[p.index] = color(
(hv + p.fx + p.fz*hs.getValuef()) % 360,
min(100, abs(p.fy - s.getValuef())/2.),
for (Point p : strip.points) {
colors[p.index] = color(
(hv + p.fx + p.fz*hs.getValuef()) % 360,
min(100, abs(p.fy - s.getValuef())/2.),
- max(0, 100 - m
.getValuef()
* abs(i - 7.5))
+ max(0, 100 - m
v
* abs(i - 7.5))
);
++i;
}
);
++i;
}
+ ++si;
}
}
}
}
}
}