repositories
/
SugarCubes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sinesphere working with notes
[SugarCubes.git]
/
MarkSlee.pde
diff --git
a/MarkSlee.pde
b/MarkSlee.pde
index 56c06536e5aa8d33bb787fa76af6331ac3934c5a..d3237e1e64fb2204e0ee6a41950ad80855e3d9cd 100644
(file)
--- a/
MarkSlee.pde
+++ b/
MarkSlee.pde
@@
-57,10
+57,10
@@
class Cathedrals extends SCPattern {
if (abs(p.x - cx) < arm) {
d = min(abs(p.x - cx), abs(p.y - middle));
}
if (abs(p.x - cx) < arm) {
d = min(abs(p.x - cx), abs(p.y - middle));
}
- colors[p.index] =
color
(
+ colors[p.index] =
lx.hsb
(
(lx.getBaseHuef() + .2*abs(p.y - model.cy)) % 360,
min(100, sf*dist(abs(p.x - cx), p.y, arm, middle)),
(lx.getBaseHuef() + .2*abs(p.y - model.cy)) % 360,
min(100, sf*dist(abs(p.x - cx), p.y, arm, middle)),
-
max(0, 120 - d*falloff
));
+
constrain(120 - d*falloff, 0, 100
));
}
}
}
}
}
}
@@
-110,7
+110,7
@@
class MidiMusic extends SCPattern {
}
float posf = position.getValuef();
for (Point p : model.points) {
}
float posf = position.getValuef();
for (Point p : model.points) {
- colors[p.index] = blendColor(colors[p.index],
color
(
+ colors[p.index] = blendColor(colors[p.index],
lx.hsb
(
(lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
100,
max(0, bright - posf*100 - falloff*abs(p.y - posf*model.yMax))
(lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
100,
max(0, bright - posf*100 - falloff*abs(p.y - posf*model.yMax))
@@
-255,7
+255,7
@@
class MidiMusic extends SCPattern {
for (Point p : s.points) {
int wavi = (int) constrain(p.x / model.xMax * wval.length, 0, wval.length-1);
float wavb = max(0, wave.getValuef()*100. - 8.*abs(p.y - wval[wavi]));
for (Point p : s.points) {
int wavi = (int) constrain(p.x / model.xMax * wval.length, 0, wval.length-1);
float wavb = max(0, wave.getValuef()*100. - 8.*abs(p.y - wval[wavi]));
- colors[p.index] =
color
(
+ colors[p.index] =
lx.hsb
(
(lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
100,
constrain(wavb + max(0, maxBright - 40.*abs(sparklePos - abs(i - (Cube.POINTS_PER_STRIP-1)/2.))), 0, 100)
(lx.getBaseHuef() + .2*abs(p.x - model.cx) + .2*abs(p.y - model.cy)) % 360,
100,
constrain(wavb + max(0, maxBright - 40.*abs(sparklePos - abs(i - (Cube.POINTS_PER_STRIP-1)/2.))), 0, 100)
@@
-1412,7
+1412,7
@@
class ColorFuckerEffect extends SCEffect {
float bMod = level.getValuef();
float sMod = 1 - desat.getValuef();
float hMod = hueShift.getValuef();
float bMod = level.getValuef();
float sMod = 1 - desat.getValuef();
float hMod = hueShift.getValuef();
- float fSharp =
1/(1.0001-sharp.getValuef()
);
+ float fSharp =
sharp.getValuef(
);
float fSoft = soft.getValuef();
boolean mon = mono.getValuef() > 0.5;
boolean ivt = invert.getValuef() > 0.5;
float fSoft = soft.getValuef();
boolean mon = mono.getValuef() > 0.5;
boolean ivt = invert.getValuef() > 0.5;
@@
-1426,7
+1426,12
@@
class ColorFuckerEffect extends SCEffect {
hsb[2] = 1 - hsb[2];
}
if (fSharp > 0) {
hsb[2] = 1 - hsb[2];
}
if (fSharp > 0) {
- hsb[2] = hsb[2] < .5 ? pow(hsb[2],fSharp) : 1-pow(1-hsb[2],fSharp);
+ fSharp = 1/(1-fSharp);
+ if (hsb[2] < .5) {
+ hsb[2] = pow(hsb[2],fSharp);
+ } else {
+ hsb[2] = 1-pow(1-hsb[2],fSharp);
+ }
}
if (fSoft > 0) {
if (hsb[2] > 0.5) {
}
if (fSoft > 0) {
if (hsb[2] > 0.5) {
@@
-1478,7
+1483,7
@@
class QuantizeEffect extends SCEffect {
class BlurEffect extends SCEffect {
class BlurEffect extends SCEffect {
- final
LX
Parameter amount = new BasicParameter("AMT", 0);
+ final
Basic
Parameter amount = new BasicParameter("AMT", 0);
final int[] frame;
final LinearEnvelope env = new LinearEnvelope(0, 1, 100);
final int[] frame;
final LinearEnvelope env = new LinearEnvelope(0, 1, 100);