repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eb0d516
)
Add size parameter to pulley
author
Mark Slee
<mcslee@Mark-Slees-MacBook-Pro.local>
Sat, 12 Oct 2013 01:58:38 +0000
(18:58 -0700)
committer
Mark Slee
<mcslee@Mark-Slees-MacBook-Pro.local>
Sat, 12 Oct 2013 01:58:38 +0000
(18:58 -0700)
MarkSlee.pde
patch
|
blob
|
blame
|
history
diff --git
a/MarkSlee.pde
b/MarkSlee.pde
index ccaeeb6ba45fb389014ebd2aceb8d3266be6830a..71e8660fe2e3a99d41868a667c41a08436750ea9 100644
(file)
--- a/
MarkSlee.pde
+++ b/
MarkSlee.pde
@@
-7,6
+7,7
@@
class Pulley extends SCPattern {
private final Click reset = new Click(9000);
private boolean isRising = false;
private final Click reset = new Click(9000);
private boolean isRising = false;
+ private BasicParameter sz = new BasicParameter("SIZE", 0.5);
private BasicParameter beatAmount = new BasicParameter("BEAT", 0.1);
Pulley(GLucose glucose) {
private BasicParameter beatAmount = new BasicParameter("BEAT", 0.1);
Pulley(GLucose glucose) {
@@
-16,6
+17,7
@@
class Pulley extends SCPattern {
addModulator(delays[i] = new Click(0));
}
addModulator(reset).start();
addModulator(delays[i] = new Click(0));
}
addModulator(reset).start();
+ addParameter(sz);
addParameter(beatAmount);
trigger();
}
addParameter(beatAmount);
trigger();
}
@@
-70,7
+72,7
@@
class Pulley extends SCPattern {
if (fPos < .2) {
fPos = .2 + 4 * (.2 - fPos);
}
if (fPos < .2) {
fPos = .2 + 4 * (.2 - fPos);
}
- float falloff = 100. / (
12
+ fPos * beatAmount.getValuef()*48);
+ float falloff = 100. / (
3 + sz.getValuef() * 36
+ fPos * beatAmount.getValuef()*48);
for (Point p : model.points) {
int i = (int) constrain((p.x - model.xMin) * NUM_DIVISIONS / (model.xMax - model.xMin), 0, NUM_DIVISIONS-1);
colors[p.index] = color(
for (Point p : model.points) {
int i = (int) constrain((p.x - model.xMin) * NUM_DIVISIONS / (model.xMax - model.xMin), 0, NUM_DIVISIONS-1);
colors[p.index] = color(