From: Mark Slee Date: Tue, 25 Feb 2014 21:17:51 +0000 (-0800) Subject: SCPattern moved out of GLucose X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=dde759833df1c0190d9d3a982a90c0a4f8d76a26;p=SugarCubes.git SCPattern moved out of GLucose --- diff --git a/AlexGreen.pde b/AlexGreen.pde index e44ff70..db7e0af 100644 --- a/AlexGreen.pde +++ b/AlexGreen.pde @@ -198,9 +198,9 @@ return true; //public grid final Sphery[] spherys; - SineSphere(GLucose glucose) + SineSphere(LX lx) { - super(glucose); + super(lx); println("modelrad " + modelrad); sinespin = new LXProjection(model); sinespin2 = new LXProjection(model); @@ -386,8 +386,8 @@ private SinLFO curl = new SinLFO(0, Cube.EDGE_HEIGHT, 5000 ); private SinLFO bg = new SinLFO(180, 220, 3000); -CubeCurl(GLucose glucose){ -super(glucose); +CubeCurl(LX lx){ +super(lx); addModulator(curl).trigger(); addModulator(bg).trigger(); this.CH = Cube.EDGE_HEIGHT; @@ -460,8 +460,8 @@ float cfloor = c.y; BasicParameter SatT = new BasicParameter("Sat", .5); BasicParameter BriT = new BasicParameter("Bright", .5); -HueTestHSB(GLucose glucose) { - super(glucose); +HueTestHSB(LX lx) { + super(lx); addParameter(HueT); addParameter(SatT); addParameter(BriT); diff --git a/AntonK.pde b/AntonK.pde index f5b2edf..5010a4e 100644 --- a/AntonK.pde +++ b/AntonK.pde @@ -121,9 +121,9 @@ class AKPong extends SCPattern return true; } - public AKPong(GLucose glucose) + public AKPong(LX lx) { - super(glucose); + super(lx); addParameter(speed); addParameter(leftKnob); addParameter(rightKnob); @@ -170,9 +170,9 @@ class AKPong extends SCPattern class AKInvader extends SCPattern { private final SawLFO h = new SawLFO(0, 1, 5000); - public AKInvader(GLucose glucose) + public AKInvader(LX lx) { - super(glucose); + super(lx); addModulator(h).trigger(); } @@ -319,9 +319,9 @@ class AKTetris extends SCPattern } } - public AKTetris(GLucose glucose) + public AKTetris(LX lx) { - super(glucose); + super(lx); } public boolean noteOn(Note note) @@ -372,9 +372,9 @@ class AKMatrix extends SCPattern } } - public AKMatrix(GLucose glucose) + public AKMatrix(LX lx) { - super(glucose); + super(lx); // for (Tower t : model.towers) { Tower t = model.towers.get(0); @@ -415,9 +415,9 @@ class AKEgg extends SCPattern private final float Y = model.yMax / 2; private final float Z = model.zMax / 2; - public AKEgg(GLucose glucose) + public AKEgg(LX lx) { - super(glucose); + super(lx); addModulator(xRadius).trigger(); addModulator(yRadius).trigger(); addModulator(zRadius).trigger(); @@ -446,9 +446,9 @@ class AKCubes extends SCPattern private Cube cube; private int sec; - public AKCubes(GLucose glucose) + public AKCubes(LX lx) { - super(glucose); + super(lx); cube = model.cubes.get((int) random(model.cubes.size())); sec = 0; } @@ -473,9 +473,9 @@ class AKCubes extends SCPattern class AKSpiral extends SCPattern { private int ms; - public AKSpiral(GLucose glucose) + public AKSpiral(LX lx) { - super(glucose); + super(lx); ms = 0; } @@ -537,9 +537,9 @@ class AKSpace extends SCPattern } } - public AKSpace(GLucose glucose) + public AKSpace(LX lx) { - super(glucose); + super(lx); stars = new LinkedList(); for (int i = 0; i < 50; ++i) stars.add(new Star()); diff --git a/ArjunBanker.pde b/ArjunBanker.pde index 4709bdc..e4f1ec9 100644 --- a/ArjunBanker.pde +++ b/ArjunBanker.pde @@ -5,8 +5,8 @@ class TelevisionStatic extends SCPattern { BasicParameter hueParameter = new BasicParameter("HUE", 1.0); SinLFO direction = new SinLFO(0, 10, 3000); - public TelevisionStatic(GLucose glucose) { - super(glucose); + public TelevisionStatic(LX lx) { + super(lx); addModulator(direction).trigger(); addParameter(brightParameter); addParameter(saturationParameter); @@ -28,8 +28,8 @@ class AbstractPainting extends SCPattern { SinLFO colorMod = new SinLFO(0, 360, 5000); SinLFO brightMod = new SinLFO(0, model.zMax, 2000); - public AbstractPainting(GLucose glucose) { - super(glucose); + public AbstractPainting(LX lx) { + super(lx); addModulator(colorMod).trigger(); addModulator(brightMod).trigger(); @@ -52,8 +52,8 @@ class Spirality extends SCPattern { float rad = 0; int direction = 1; - Spirality(GLucose glucose) { - super(glucose); + Spirality(LX lx) { + super(lx); addParameter(r); for (LXPoint p : model.points) { colors[p.index] = lx.hsb(0, 0, 0); diff --git a/BenMorrow.pde b/BenMorrow.pde index f88e208..081da53 100644 --- a/BenMorrow.pde +++ b/BenMorrow.pde @@ -9,8 +9,8 @@ class XYZPixel extends SCPattern float ym2 = model.yMin+cubeWidth; float zm2 = model.zMin+cubeWidth; - XYZPixel(GLucose glucose) { - super(glucose); + XYZPixel(LX lx) { + super(lx); //myP = new LXPoint(20,20,20); } @@ -50,8 +50,8 @@ class MultipleCubes extends SCPattern float minIS; - MultipleCubes(GLucose glucose) { - super(glucose); + MultipleCubes(LX lx) { + super(lx); minIS = 200; } @@ -130,8 +130,8 @@ class TowerParams extends SCPattern ArrayList towerParams; int towerSize; int colorSpan; - TowerParams(GLucose glucose) { - super(glucose); + TowerParams(LX lx) { + super(lx); towerParams = new ArrayList(); addParameter(hueoff); @@ -199,8 +199,8 @@ class Sandbox extends SCPattern int towerrange = model.towers.size(); int counter=0; - Sandbox(GLucose glucose) { - super(glucose); + Sandbox(LX lx) { + super(lx); println("points "+pointrange); println("strips "+striprange); println("faces "+facerange); @@ -234,9 +234,9 @@ class Sandbox extends SCPattern class GranimTestPattern extends GranimPattern { - GranimTestPattern(GLucose glucose) + GranimTestPattern(LX lx) { - super(glucose); + super(lx); addGraphic("myReds",new RedsGraphic(100)); int[] dots = {0,128,0,128,0,128,0,128,0,128,0,128}; addGraphic("myOtherColors",new ColorDotsGraphic(dots)); @@ -270,9 +270,9 @@ class GranimTestPattern extends GranimPattern class GranimTestPattern2 extends GranimPattern { - GranimTestPattern2(GLucose glucose) + GranimTestPattern2(LX lx) { - super(glucose); + super(lx); /*for(int i = 0;i < 100; i++) { Graphic g = addGraphic("myReds_"+i,new RedsGraphic(Math.round(Math.random() * 100))); @@ -310,8 +310,8 @@ class DriveableCrossSections extends CrossSections BasicParameter zd; BasicParameter mode; - DriveableCrossSections(GLucose glucose) { - super(glucose); + DriveableCrossSections(LX lx) { + super(lx); } public void addParams() diff --git a/DanHorwitz.pde b/DanHorwitz.pde index ab23fa5..cdec36b 100644 --- a/DanHorwitz.pde +++ b/DanHorwitz.pde @@ -5,8 +5,8 @@ public class Pong extends DPat { Pick pChoose; PVector v = new PVector(), vMir = new PVector(); - Pong(GLucose glucose) { - super(glucose); + Pong(LX lx) { + super(lx); cRad = mMax.x/10; addModulator(dx = new SinLFO(6000, 500, 30000 )).trigger(); addModulator(dy = new SinLFO(3000, 500, 22472 )).trigger(); @@ -57,8 +57,8 @@ public class Noise extends DPat int _ND = 4; NDat N[] = new NDat[_ND]; - Noise(GLucose glucose) { - super(glucose); + Noise(LX lx) { + super(lx); pSpeed = addParam("Fast" , .55); pDensity = addParam("Dens" , .5); pSharp = addParam("Shrp" , 0); @@ -175,8 +175,8 @@ public class Play extends DPat float LastBeat=3, LastMeasure=3; int curRandTempo = 1, curRandTPat = 1; - Play(GLucose glucose) { - super(glucose); + Play(LX lx) { + super(lx); pRadius = addParam("Rad" , .1 ); pBounce = addParam("Bnc" , .2 ); pAmp = addParam("Amp" , .2 ); @@ -452,8 +452,8 @@ class Worms extends SCPattern { new PVector(randX(), random(2)<1 ? model.yMin:model.yMax, zMidLat) ; } - Worms(GLucose glucose) { - super(glucose); + Worms(LX lx) { + super(lx); addModulator(moveChase).start(); addParameter(pBeat); addParameter(pSpeed); addParameter(pBlur); addParameter(pWorms); diff --git a/DanKaminsky.pde b/DanKaminsky.pde index 87bfa3b..c94b573 100644 --- a/DanKaminsky.pde +++ b/DanKaminsky.pde @@ -3,7 +3,7 @@ class GenericController { public void RotateKnob(int type, int num, float val){ LXParameter p = null; if(type==0) { - p = glucose.getPattern().getParameters().get(num); + p = getPattern().getParameters().get(num); if(p!=null) { p.setValue(val); } } if(type==1) { @@ -146,7 +146,7 @@ import oscP5.*; abstract class OSCPattern extends SCPattern { - public OSCPattern(GLucose glucose){super(glucose);} + public OSCPattern(LX lx){super(lx);} public abstract void oscEvent(OscMessage msg); } @@ -160,8 +160,8 @@ class Ball { class OSC_Balls extends OSCPattern { Ball[] balls; - public OSC_Balls(GLucose glucose){ - super(glucose); + public OSC_Balls(LX lx){ + super(lx); balls = new Ball[20]; for(int i=0; i displayList; - GranimPattern(GLucose glucose) + GranimPattern(LX lx) { - super(glucose); + super(lx); displayList = new HashMap(); } diff --git a/JR.pde b/JR.pde index 025d74f..4abcc62 100644 --- a/JR.pde +++ b/JR.pde @@ -21,8 +21,8 @@ class Gimbal extends SCPattern { private final BasicParameter bP = new BasicParameter("b", 0); private final BasicParameter gP = new BasicParameter("g", 0); - Gimbal(GLucose glucose) { - super(glucose); + Gimbal(LX lx) { + super(lx); projection = new LXProjection(model); addParameter(beatsPerRevolutionParam); addParameter(hueDeltaParam); @@ -205,8 +205,8 @@ class Zebra extends SCPattern { _P size; */ - Zebra(GLucose glucose) { - super(glucose); + Zebra(LX lx) { + super(lx); projection = new LXProjection(model); addModulator(angleM).trigger(); diff --git a/JackStahl.pde b/JackStahl.pde index 4299543..3b69815 100644 --- a/JackStahl.pde +++ b/JackStahl.pde @@ -21,8 +21,8 @@ class Swim extends SCPattern { final BasicParameter hueScale = new BasicParameter("HUE", 0.3); - public Swim(GLucose glucose) { - super(glucose); + public Swim(LX lx) { + super(lx); projection = new LXProjection(model); addParameter(hueScale); addParameter(crazyParam); @@ -108,8 +108,8 @@ class Balance extends SCPattern { private final float centerX, centerY, centerZ, modelHeight, modelWidth, modelDepth; SinLFO heightMod = new SinLFO(0.8, 1.9, 17298); - public Balance(GLucose glucose) { - super(glucose); + public Balance(LX lx) { + super(lx); projection = new LXProjection(model); diff --git a/JackieBavaro.pde b/JackieBavaro.pde index fc1576a..806fec0 100644 --- a/JackieBavaro.pde +++ b/JackieBavaro.pde @@ -42,8 +42,8 @@ class JackieSquares extends SCPattern { private List flashes; private int faceNum = 0; - public JackieSquares(GLucose glucose) { - super(glucose); + public JackieSquares(LX lx) { + super(lx); addParameter(rateParameter); addParameter(attackParameter); addParameter(decayParameter); @@ -131,8 +131,8 @@ class JackieLines extends SCPattern { private List flashes; private int stripNum = 0; - public JackieLines(GLucose glucose) { - super(glucose); + public JackieLines(LX lx) { + super(lx); addParameter(rateParameter); addParameter(attackParameter); addParameter(decayParameter); @@ -221,8 +221,8 @@ class JackieDots extends SCPattern { private List flashes; private int pointNum = 0; - public JackieDots(GLucose glucose) { - super(glucose); + public JackieDots(LX lx) { + super(lx); addParameter(rateParameter); addParameter(attackParameter); addParameter(decayParameter); diff --git a/L8onWallace.pde b/L8onWallace.pde index fc4bac0..a819016 100644 --- a/L8onWallace.pde +++ b/L8onWallace.pde @@ -42,8 +42,8 @@ class L8onLife extends SCPattern { // Hold the new lives private List new_lives; - public L8onLife(GLucose glucose) { - super(glucose); + public L8onLife(LX lx) { + super(lx); //Print debug info about the cubes. //outputCubeInfo(); @@ -310,8 +310,8 @@ class L8onAutomata extends SCPattern { // Hold the new lives private List new_states; - public L8onAutomata(GLucose glucose) { - super(glucose); + public L8onAutomata(LX lx) { + super(lx); //Print debug info about the cubes. //outputCubeInfo(); @@ -552,8 +552,8 @@ class L8onStripLife extends SCPattern { // Hold the new lives private List new_lives; - public L8onStripLife(GLucose glucose) { - super(glucose); + public L8onStripLife(LX lx) { + super(lx); //Print debug info about the strips. //outputStripInfo(); diff --git a/MarkSlee.pde b/MarkSlee.pde index 202e7da..1423994 100644 --- a/MarkSlee.pde +++ b/MarkSlee.pde @@ -6,8 +6,8 @@ class Cathedrals extends SCPattern { private final BasicParameter sat = new BasicParameter("SAT", 0.5); private GraphicEQ eq; - Cathedrals(GLucose glucose) { - super(glucose); + Cathedrals(LX lx) { + super(lx); addParameter(xpos); addParameter(wid); addParameter(arms); @@ -81,8 +81,8 @@ class MidiMusic extends SCPattern { private final BasicParameter wave = new BasicParameter("WAVE", 0); - MidiMusic(GLucose glucose) { - super(glucose); + MidiMusic(LX lx) { + super(lx); addParameter(lightSize); addParameter(wave); addModulator(sparkle).setValue(1); @@ -286,8 +286,8 @@ class Pulley extends SCPattern { private BasicParameter sz = new BasicParameter("SIZE", 0.5); private BasicParameter beatAmount = new BasicParameter("BEAT", 0); - Pulley(GLucose glucose) { - super(glucose); + Pulley(LX lx) { + super(lx); for (int i = 0; i < NUM_DIVISIONS; ++i) { addModulator(gravity[i] = new Accelerator(0, 0, 0)); addModulator(delays[i] = new Click(0)); @@ -392,8 +392,8 @@ class ViolinWave extends SCPattern { LinearEnvelope dbValue = new LinearEnvelope(0, 0, 10); - ViolinWave(GLucose glucose) { - super(glucose); + ViolinWave(LX lx) { + super(lx); addParameter(level); addParameter(edge); addParameter(range); @@ -565,8 +565,8 @@ class BouncyBalls extends SCPattern { final BasicParameter flr = new BasicParameter("FLR", 0); final BasicParameter blobSize = new BasicParameter("SIZE", 0.5); - BouncyBalls(GLucose glucose) { - super(glucose); + BouncyBalls(LX lx) { + super(lx); for (int i = 0; i < balls.length; ++i) { balls[i] = new BouncyBall(i); } @@ -600,8 +600,8 @@ class SpaceTime extends SCPattern { BasicParameter sizeParameter = new BasicParameter("SIZE", 0.5); - public SpaceTime(GLucose glucose) { - super(glucose); + public SpaceTime(LX lx) { + super(lx); addModulator(pos).trigger(); addModulator(rate).trigger(); @@ -652,8 +652,8 @@ class Swarm extends SCPattern { SinLFO fY = new SinLFO(model.yMin, model.yMax, 11000); SinLFO hOffX = new SinLFO(model.xMin, model.xMax, 13000); - public Swarm(GLucose glucose) { - super(glucose); + public Swarm(LX lx) { + super(lx); addModulator(offset).trigger(); addModulator(rate).trigger(); @@ -726,8 +726,8 @@ class BassPod extends SCPattern { private final BasicParameter clr = new BasicParameter("CLR", 0.5); - public BassPod(GLucose glucose) { - super(glucose); + public BassPod(LX lx) { + super(lx); addParameter(clr); } @@ -779,8 +779,8 @@ class CubeEQ extends SCPattern { private final BasicParameter clr = new BasicParameter("CLR", 0.5); private final BasicParameter blockiness = new BasicParameter("BLK", 0.5); - public CubeEQ(GLucose glucose) { - super(glucose); + public CubeEQ(LX lx) { + super(lx); } void onActive() { @@ -910,8 +910,8 @@ public class PianoKeyPattern extends SCPattern { final BasicParameter release = new BasicParameter("REL", 0.5); final BasicParameter level = new BasicParameter("AMB", 0.6); - PianoKeyPattern(GLucose glucose) { - super(glucose); + PianoKeyPattern(LX lx) { + super(lx); addParameter(attack); addParameter(release); @@ -985,8 +985,8 @@ class CrossSections extends SCPattern { final BasicParameter zl = new BasicParameter("ZLEV", 0.5); - CrossSections(GLucose glucose) { - super(glucose); + CrossSections(LX lx) { + super(lx); addModulator(x).trigger(); addModulator(y).trigger(); addModulator(z).trigger(); @@ -1063,8 +1063,8 @@ class Blinders extends SCPattern { final SinLFO s; final TriangleLFO hs; - public Blinders(GLucose glucose) { - super(glucose); + public Blinders(LX lx) { + super(lx); m = new SinLFO[12]; for (int i = 0; i < m.length; ++i) { addModulator(m[i] = new SinLFO(0.5, 120, (120000. / (3+i)))).trigger(); @@ -1102,8 +1102,8 @@ class Psychedelia extends SCPattern { TriangleLFO h = new TriangleLFO(0, 240, 19000); SinLFO c = new SinLFO(-.2, .8, 31000); - Psychedelia(GLucose glucose) { - super(glucose); + Psychedelia(LX lx) { + super(lx); addModulator(m).trigger(); addModulator(s).trigger(); addModulator(h).trigger(); @@ -1157,8 +1157,8 @@ class AskewPlanes extends SCPattern { final Plane[] planes; final int NUM_PLANES = 3; - AskewPlanes(GLucose glucose) { - super(glucose); + AskewPlanes(LX lx) { + super(lx); planes = new Plane[NUM_PLANES]; for (int i = 0; i < planes.length; ++i) { planes[i] = new Plane(i); @@ -1202,8 +1202,8 @@ class ShiftingPlane extends SCPattern { final SinLFO c = new SinLFO(-1.4, 1.4, 5700); final SinLFO d = new SinLFO(-10, 10, 9500); - ShiftingPlane(GLucose glucose) { - super(glucose); + ShiftingPlane(LX lx) { + super(lx); addModulator(a).trigger(); addModulator(b).trigger(); addModulator(c).trigger(); @@ -1240,8 +1240,8 @@ class Traktor extends SCPattern { private int index = 0; private GraphicEQ eq = null; - public Traktor(GLucose glucose) { - super(glucose); + public Traktor(LX lx) { + super(lx); for (int i = 0; i < FRAME_WIDTH; ++i) { bass[i] = 0; treble[i] = 0; diff --git a/SamMorrow.pde b/SamMorrow.pde index 350615d..00ed073 100644 --- a/SamMorrow.pde +++ b/SamMorrow.pde @@ -1,13 +1,13 @@ abstract class SamPattern extends SCPattern { - public SamPattern(GLucose glucose) { - super(glucose); + public SamPattern(LX lx) { + super(lx); setEligible(false); } } class JazzRainbow extends SamPattern { - public JazzRainbow(GLucose glucose) { - super(glucose); + public JazzRainbow(LX lx) { + super(lx); } diff --git a/ShaheenGandhi.pde b/ShaheenGandhi.pde index 83b97cf..cda8fed 100644 --- a/ShaheenGandhi.pde +++ b/ShaheenGandhi.pde @@ -183,8 +183,8 @@ class HelixPattern extends SCPattern { private static final float tMin = -200; private static final float tMax = 200; - public HelixPattern(GLucose glucose) { - super(glucose); + public HelixPattern(LX lx) { + super(lx); addParameter(helix1On); addParameter(helix2On); diff --git a/SugarCubes.pde b/SugarCubes.pde index 16e2402..0afeefe 100644 --- a/SugarCubes.pde +++ b/SugarCubes.pde @@ -23,113 +23,113 @@ * your name. Implement your classes there, and add them to the list below. */ -LXPattern[] patterns(GLucose glucose) { +LXPattern[] patterns(LX lx) { return new LXPattern[] { - new SineSphere(glucose), - //new CubeCurl(glucose), + new SineSphere(lx), + //new CubeCurl(lx), // Slee - // new Cathedrals(glucose), - new Swarm(glucose), - new MidiMusic(glucose), - new Pulley(glucose), + // new Cathedrals(lx), + new Swarm(lx), + new MidiMusic(lx), + new Pulley(lx), - new ViolinWave(glucose), - new BouncyBalls(glucose), - new SpaceTime(glucose), - new ShiftingPlane(glucose), - new AskewPlanes(glucose), - new Blinders(glucose), - new CrossSections(glucose), - new Psychedelia(glucose), + new ViolinWave(lx), + new BouncyBalls(lx), + new SpaceTime(lx), + new ShiftingPlane(lx), + new AskewPlanes(lx), + new Blinders(lx), + new CrossSections(lx), + new Psychedelia(lx), - new MultipleCubes(glucose), + new MultipleCubes(lx), - new Traktor(glucose).setEligible(false), - new BassPod(glucose).setEligible(false), - new CubeEQ(glucose).setEligible(false), - new PianoKeyPattern(glucose).setEligible(false), + new Traktor(lx).setEligible(false), + new BassPod(lx).setEligible(false), + new CubeEQ(lx).setEligible(false), + new PianoKeyPattern(lx).setEligible(false), // AntonK - new AKPong(glucose), + new AKPong(lx), // DanH - new Noise(glucose), - new Play (glucose), - new Pong (glucose), - new Worms(glucose), + new Noise(lx), + new Play (lx), + new Pong (lx), + new Worms(lx), // JR - new Gimbal(glucose), + new Gimbal(lx), // Alex G // Tim - new TimMetronome(glucose), - new TimPlanes(glucose), - new TimPinwheels(glucose), - new TimRaindrops(glucose), - new TimCubes(glucose), - // new TimTrace(glucose), - new TimSpheres(glucose), + new TimMetronome(lx), + new TimPlanes(lx), + new TimPinwheels(lx), + new TimRaindrops(lx), + new TimCubes(lx), + // new TimTrace(lx), + new TimSpheres(lx), // Jackie - new JackieSquares(glucose), - new JackieLines(glucose), - new JackieDots(glucose), + new JackieSquares(lx), + new JackieLines(lx), + new JackieDots(lx), // L8on - new L8onAutomata(glucose), - new L8onLife(glucose), - new L8onStripLife(glucose), + new L8onAutomata(lx), + new L8onLife(lx), + new L8onStripLife(lx), // Vincent - new VSTowers(glucose), + new VSTowers(lx), // Toby - new GlitchPlasma(glucose), - new FireEffect(glucose).setEligible(false), - new StripBounce(glucose), - new SoundRain(glucose).setEligible(false), - new SoundSpikes(glucose).setEligible(false), - new FaceSync(glucose), + new GlitchPlasma(lx), + new FireEffect(lx).setEligible(false), + new StripBounce(lx), + new SoundRain(lx).setEligible(false), + new SoundSpikes(lx).setEligible(false), + new FaceSync(lx), // Jack - new Swim(glucose), - new Balance(glucose), + new Swim(lx), + new Balance(lx), // Ben - // new Sandbox(glucose), - new TowerParams(glucose), - new DriveableCrossSections(glucose), - new GranimTestPattern2(glucose), + // new Sandbox(lx), + new TowerParams(lx), + new DriveableCrossSections(lx), + new GranimTestPattern2(lx), // Shaheen - // new HelixPattern(glucose).setEligible(false), + // new HelixPattern(lx).setEligible(false), // Sam - new JazzRainbow(glucose), + new JazzRainbow(lx), // Arjun - new TelevisionStatic(glucose), - new AbstractPainting(glucose), - new Spirality(glucose), + new TelevisionStatic(lx), + new AbstractPainting(lx), + new Spirality(lx), // Basic test patterns for reference, not art - new TestCubePattern(glucose), - new TestTowerPattern(glucose), - new TestProjectionPattern(glucose), - new TestStripPattern(glucose), - // new TestHuePattern(glucose), - // new TestXPattern(glucose), - // new TestYPattern(glucose), - // new TestZPattern(glucose), + new TestCubePattern(lx), + new TestTowerPattern(lx), + new TestProjectionPattern(lx), + new TestStripPattern(lx), + // new TestHuePattern(lx), + // new TestXPattern(lx), + // new TestYPattern(lx), + // new TestZPattern(lx), }; } -LXTransition[] transitions(GLucose glucose) { +LXTransition[] transitions(LX lx) { return new LXTransition[] { new DissolveTransition(lx), new AddTransition(lx), @@ -138,10 +138,6 @@ LXTransition[] transitions(GLucose glucose) { new DodgeTransition(lx), new SwipeTransition(lx), new FadeTransition(lx), -// new SubtractTransition(glucose), // similar to multiply - dh -// new BurnTransition(glucose), // similar to multiply - dh -// new ScreenTransition(glucose), // same as add -dh -// new SoftLightTransition(glucose), // same as overlay -dh }; } diff --git a/TestPatterns.pde b/TestPatterns.pde index 106cb16..728683e 100644 --- a/TestPatterns.pde +++ b/TestPatterns.pde @@ -1,6 +1,6 @@ class BlankPattern extends SCPattern { - BlankPattern(GLucose glucose) { - super(glucose); + BlankPattern(LX lx) { + super(lx); } public void run(double deltaMs) { @@ -9,8 +9,8 @@ class BlankPattern extends SCPattern { } abstract class TestPattern extends SCPattern { - public TestPattern(GLucose glucose) { - super(glucose); + public TestPattern(LX lx) { + super(lx); setEligible(false); } } @@ -19,8 +19,8 @@ class TestStripPattern extends TestPattern { SinLFO d = new SinLFO(4, 40, 4000); - public TestStripPattern(GLucose glucose) { - super(glucose); + public TestStripPattern(LX lx) { + super(lx); addModulator(d).trigger(); } @@ -42,8 +42,8 @@ class TestStripPattern extends TestPattern { * All pixels are full-on the same color. */ class TestHuePattern extends TestPattern { - public TestHuePattern(GLucose glucose) { - super(glucose); + public TestHuePattern(LX lx) { + super(lx); } public void run(double deltaMs) { @@ -60,8 +60,8 @@ class TestHuePattern extends TestPattern { */ class TestXPattern extends TestPattern { private final SinLFO xPos = new SinLFO(0, model.xMax, 4000); - public TestXPattern(GLucose glucose) { - super(glucose); + public TestXPattern(LX lx) { + super(lx); addModulator(xPos).trigger(); } public void run(double deltaMs) { @@ -82,8 +82,8 @@ class TestXPattern extends TestPattern { */ class TestYPattern extends TestPattern { private final SinLFO yPos = new SinLFO(0, model.yMax, 4000); - public TestYPattern(GLucose glucose) { - super(glucose); + public TestYPattern(LX lx) { + super(lx); addModulator(yPos).trigger(); } public void run(double deltaMs) { @@ -100,8 +100,8 @@ class TestYPattern extends TestPattern { */ class TestZPattern extends TestPattern { private final SinLFO zPos = new SinLFO(0, model.zMax, 4000); - public TestZPattern(GLucose glucose) { - super(glucose); + public TestZPattern(LX lx) { + super(lx); addModulator(zPos).trigger(); } public void run(double deltaMs) { @@ -119,8 +119,8 @@ class TestZPattern extends TestPattern { class TestTowerPattern extends TestPattern { private final SawLFO towerIndex = new SawLFO(0, model.towers.size(), 1000*model.towers.size()); - public TestTowerPattern(GLucose glucose) { - super(glucose); + public TestTowerPattern(LX lx) { + super(lx); addModulator(towerIndex).trigger(); } @@ -164,8 +164,8 @@ class TestProjectionPattern extends TestPattern { private final SawLFO angle = new SawLFO(0, TWO_PI, 9000); private final SinLFO yPos = new SinLFO(-20, 40, 5000); - public TestProjectionPattern(GLucose glucose) { - super(glucose); + public TestProjectionPattern(LX lx) { + super(lx); projection = new LXProjection(model); addModulator(angle).trigger(); addModulator(yPos).trigger(); @@ -204,8 +204,8 @@ class TestCubePattern extends TestPattern { private SawLFO index = new SawLFO(0, Cube.POINTS_PER_CUBE, Cube.POINTS_PER_CUBE*60); - TestCubePattern(GLucose glucose) { - super(glucose); + TestCubePattern(LX lx) { + super(lx); addModulator(index).start(); } @@ -246,8 +246,8 @@ class MappingTool extends TestPattern { private final int numChannels; - MappingTool(GLucose glucose) { - super(glucose); + MappingTool(LX lx) { + super(lx); // TODO(mcslee): port channels to grizzly numChannels = 1; setChannel(); diff --git a/TimBavaro.pde b/TimBavaro.pde index 3fcd5b1..2ca73d7 100644 --- a/TimBavaro.pde +++ b/TimBavaro.pde @@ -16,8 +16,8 @@ class TimSpheres extends SCPattern { private final Sphere[] spheres; - public TimSpheres(GLucose glucose) { - super(glucose); + public TimSpheres(LX lx) { + super(lx); addParameter(hueParameter); addParameter(periodParameter); addModulator(lfo).trigger(); @@ -236,8 +236,8 @@ class TimRaindrops extends SCPattern { private float msPerRaindrop = 40; private List raindrops; - public TimRaindrops(GLucose glucose) { - super(glucose); + public TimRaindrops(LX lx) { + super(lx); raindrops = new LinkedList(); } @@ -320,8 +320,8 @@ class TimCubes extends SCPattern { private float leftoverMs = 0; private List flashes; - public TimCubes(GLucose glucose) { - super(glucose); + public TimCubes(LX lx) { + super(lx); addParameter(rateParameter); addParameter(attackParameter); addParameter(decayParameter); @@ -397,8 +397,8 @@ class TimPlanes extends SCPattern { } } - TimPlanes(GLucose glucose) { - super(glucose); + TimPlanes(LX lx) { + super(lx); centerX = (model.xMin + model.xMax) / 2; centerY = (model.yMin + model.yMax) / 2; centerZ = (model.zMin + model.zMax) / 2; @@ -560,8 +560,8 @@ class TimPinwheels extends SCPattern { private final List pinwheels; private final float[] values; - TimPinwheels(GLucose glucose) { - super(glucose); + TimPinwheels(LX lx) { + super(lx); addParameter(horizSpreadParameter); // addParameter(vertSpreadParameter); @@ -727,8 +727,8 @@ class TimTrace extends SCPattern { List movingPoints; - TimTrace(GLucose glucose) { - super(glucose); + TimTrace(LX lx) { + super(lx); extraMs = 0; @@ -843,8 +843,8 @@ class TimMetronome extends SCPattern { private float[] values; private float[] hues; - TimMetronome(GLucose glucose) { - super(glucose); + TimMetronome(LX lx) { + super(lx); addParameter(clickyParameter); addParameter(derezParameter); addParameter(driftParameter); diff --git a/TobySegaran.pde b/TobySegaran.pde index a54658f..8769b10 100644 --- a/TobySegaran.pde +++ b/TobySegaran.pde @@ -7,8 +7,8 @@ class GlitchPlasma extends SCPattern { BasicParameter speedParameter = new BasicParameter("SPEED", 0.1); BasicParameter glitchParameter = new BasicParameter("GLITCH", 0.0); - public GlitchPlasma(GLucose glucose) { - super(glucose); + public GlitchPlasma(LX lx) { + super(lx); addParameter(saturationParameter); addParameter(speedParameter); addParameter(glitchParameter); @@ -49,8 +49,8 @@ class FireEffect extends SCPattern { private int ym; BasicParameter decayParameter = new BasicParameter("DECAY", 0.3); - public FireEffect(GLucose glucose) { - super(glucose); + public FireEffect(LX lx) { + super(lx); xm = int(model.xMax); ym = int(model.yMax); @@ -97,8 +97,8 @@ class StripBounce extends SCPattern { SinLFO[] sat = new SinLFO[numOsc]; float[] colorOffset = new float[numOsc]; - public StripBounce(GLucose glucose) { - super(glucose); + public StripBounce(LX lx) { + super(lx); for (int i=0;i