From: Mark Slee Date: Tue, 20 Aug 2013 11:14:06 +0000 (-0700) Subject: Test pattern to work better with speakers X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;ds=sidebyside;h=e105ef7c5f2d4acafe97d1844aafbd6dfac80557;p=SugarCubes.git Test pattern to work better with speakers --- diff --git a/TestPatterns.pde b/TestPatterns.pde index 6a2747a..51402f2 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -6,8 +6,12 @@ abstract class TestPattern extends SCPattern { } class TestStripPattern extends TestPattern { + + SinLFO d = new SinLFO(4, 40, 4000); + public TestStripPattern(GLucose glucose) { super(glucose); + addModulator(d).trigger(); } public void run(int deltaMs) { @@ -16,7 +20,7 @@ class TestStripPattern extends TestPattern { colors[p.index] = color( lx.getBaseHuef(), 100, - max(0, 100 - 10*dist(p.x, p.y, s.cx, s.cy)) + max(0, 100 - d.getValuef()*dist(p.x, p.y, s.cx, s.cy)) ); } } @@ -176,11 +180,11 @@ class TestProjectionPattern extends TestPattern { for (Coord c : projection) { float d = sqrt(c.x*c.x + c.y*c.y + c.z*c.z); // distance from origin // d = abs(d-60) + max(0, abs(c.z) - 20); // life saver / ring thing - d = max(0, abs(c.y) - 10 + .3*abs(c.z) + .08*abs(c.x)); // plane / spear thing + d = max(0, abs(c.y) - 10 + .1*abs(c.z) + .02*abs(c.x)); // plane / spear thing colors[c.index] = color( (hv + .6*abs(c.x) + abs(c.z)) % 360, 100, - constrain(140 - 10*d, 0, 100) + constrain(140 - 40*d, 0, 100) ); } } diff --git a/code/GLucose.jar b/code/GLucose.jar index c1bd9a3..9b2d5b0 100644 Binary files a/code/GLucose.jar and b/code/GLucose.jar differ