From: Leighton Wallace Date: Sun, 24 Nov 2013 02:13:40 +0000 (-0800) Subject: Merge branch 'master' of https://github.com/sugarcubes/SugarCubes X-Git-Url: https://git.piment-noir.org/?p=SugarCubes.git;a=commitdiff_plain;h=129886e5fc5c351eb3ddb534f49b5f5e413bda97;hp=f7f0bfe5fb8b5a4bcd9c4c4092a6063c45df32cc Merge branch 'master' of https://github.com/sugarcubes/SugarCubes Conflicts: SugarCubes.pde --- diff --git a/BenMorrow.pde b/BenMorrow.pde index 51945a8..f88e208 100644 --- a/BenMorrow.pde +++ b/BenMorrow.pde @@ -1,3 +1,111 @@ +class XYZPixel extends SCPattern +{ + float xm = model.xMin; + float ym = model.yMin; + float zm = model.zMin; + + float cubeWidth = 35; + float xm2 = model.xMin+cubeWidth; + float ym2 = model.yMin+cubeWidth; + float zm2 = model.zMin+cubeWidth; + + XYZPixel(GLucose glucose) { + super(glucose); + //myP = new LXPoint(20,20,20); + } + + void run(double deltaMs) + { + for(LXPoint p : model.points) + { + if(p.x > xm && p.x<= xm2 && p.y > ym && p.y<= xm2 && p.z<= zm2 && p.z > zm) + { + colors[p.index] = lx.hsb(lx.getBaseHue()+100, 100, 100); + + }else{ + colors[p.index] = 0; + } + } + float minIS=min(model.xMax,model.yMax,model.zMax); + xm = (xm + 1 ) % minIS; + ym = (ym + 1 ) % minIS; + zm = (zm + 1 ) % minIS; + + xm2 = xm + cubeWidth; + ym2 = ym2 + cubeWidth; + zm2 = zm2 + cubeWidth; + } +} + +class MultipleCubes extends SCPattern +{ + float xm = model.xMin; + float ym = model.yMin+10; + float zm = model.zMin+5; + + float xma = model.xMin; + float xmb = model.xMin; + + float cubeWidth = 35; + + float minIS; + + MultipleCubes(GLucose glucose) { + super(glucose); + minIS = 200; + } + + void drawVirtualCube(float bottomX, float bottomY, float bottomZ, float side, int cubeColor) + { + for(LXPoint p : model.points) + { + if(p.x > bottomX && p.x<= bottomX+side && p.y > bottomY && p.y<= bottomY + side && p.z > bottomZ && p.z<= bottomZ+side) + { + colors[p.index] = cubeColor; + } + } + } + + void clear() + { + for(int i=0;i y_in_range ? (100 + 100*(y_in_range - sin_x)) : 0; + float size_of_sin_wave = 0.4; + + float v1 = (abs(y_in_range - sin_x) > size_of_sin_wave) ? 0 : abs((y_in_range - sin_x + size_of_sin_wave) / size_of_sin_wave / 2 * 100); + float hue_color = (lx.getBaseHuef() + hueScale.getValuef() * (abs(p.x-model.xMax/2.)*.3 + abs(p.y-model.yMax/2)*.9 + abs(p.z - model.zMax/2.))) % 360; - colors[p.index] = lx.hsb(hue_color, 70, v1); + colors[p.index] = lx.hsb(hue_color, 100, v1); } } } diff --git a/JackieBavaro.pde b/JackieBavaro.pde new file mode 100644 index 0000000..fc1576a --- /dev/null +++ b/JackieBavaro.pde @@ -0,0 +1,265 @@ +class JackieSquares extends SCPattern { + private BasicParameter rateParameter = new BasicParameter("RATE", 0.25); + private BasicParameter attackParameter = new BasicParameter("ATTK", 0.3); + private BasicParameter decayParameter = new BasicParameter("DECAY", 0.2); + private BasicParameter saturationParameter = new BasicParameter("SAT", 0.7); + + SinLFO hueMod = new SinLFO(0, 360, 4000); + SinLFO spreadMod = new SinLFO(1, 10, 8000); + + + class FaceFlash { + Face f; + float value; + float hue; + boolean hasPeaked; + + FaceFlash(int n) { + f = model.faces.get(n % model.faces.size()); + hue = random(360); + boolean infiniteAttack = (attackParameter.getValuef() > 0.999); + hasPeaked = infiniteAttack; + value = (infiniteAttack ? 1 : 0); + } + + // returns TRUE if this should die + boolean age(double ms) { + if (!hasPeaked) { + value = value + (float) (ms / 1000.0f * ((attackParameter.getValuef() + 0.01) * 5)); + if (value >= 1.0) { + value = 1.0; + hasPeaked = true; + } + return false; + } else { + value = value - (float) (ms / 1000.0f * ((decayParameter.getValuef() + 0.01) * 10)); + return value <= 0; + } + } + } + + private float leftoverMs = 0; + private List flashes; + private int faceNum = 0; + + public JackieSquares(GLucose glucose) { + super(glucose); + addParameter(rateParameter); + addParameter(attackParameter); + addParameter(decayParameter); + addParameter(saturationParameter); + addModulator(hueMod).trigger(); + addModulator(spreadMod).trigger(); + + flashes = new LinkedList(); + } + + public void run(double deltaMs) { + leftoverMs += deltaMs; + float msPerFlash = 1000 / ((rateParameter.getValuef() + .01) * 100); + while (leftoverMs > msPerFlash) { + leftoverMs -= msPerFlash; + faceNum += int(spreadMod.getValuef()); + flashes.add(new FaceFlash(faceNum)); + } + + for (LXPoint p : model.points) { + colors[p.index] = 0; + } + + for (FaceFlash flash : flashes) { + float hue = (hueMod.getValuef() + flash.hue) % 360.0; + color c = lx.hsb(hue, saturationParameter.getValuef() * 100, (flash.value) * 100); + for (LXPoint p : flash.f.points) { + colors[p.index] = c; + } + } + + Iterator i = flashes.iterator(); + while (i.hasNext()) { + FaceFlash flash = i.next(); + boolean dead = flash.age(deltaMs); + if (dead) { + i.remove(); + } + } + } +} + + +class JackieLines extends SCPattern { + private BasicParameter rateParameter = new BasicParameter("RATE", 0.25); + private BasicParameter attackParameter = new BasicParameter("ATTK", 0.3); + private BasicParameter decayParameter = new BasicParameter("DECAY", 0.2); + private BasicParameter saturationParameter = new BasicParameter("SAT", 0.7); + + SinLFO hueMod = new SinLFO(0, 360, 4000); + SinLFO spreadMod = new SinLFO(1, 10, 8000); + + + class StripFlash { + Strip f; + float value; + float hue; + boolean hasPeaked; + + StripFlash(int n) { + f = model.strips.get(n % model.strips.size()); + hue = random(360); + boolean infiniteAttack = (attackParameter.getValuef() > 0.999); + hasPeaked = infiniteAttack; + value = (infiniteAttack ? 1 : 0); + } + + // returns TRUE if this should die + boolean age(double ms) { + if (!hasPeaked) { + value = value + (float) (ms / 1000.0f * ((attackParameter.getValuef() + 0.01) * 5)); + if (value >= 1.0) { + value = 1.0; + hasPeaked = true; + } + return false; + } else { + value = value - (float) (ms / 1000.0f * ((decayParameter.getValuef() + 0.01) * 10)); + return value <= 0; + } + } + } + + private float leftoverMs = 0; + private List flashes; + private int stripNum = 0; + + public JackieLines(GLucose glucose) { + super(glucose); + addParameter(rateParameter); + addParameter(attackParameter); + addParameter(decayParameter); + addParameter(saturationParameter); + addModulator(hueMod).trigger(); + addModulator(spreadMod).trigger(); + + flashes = new LinkedList(); + } + + public void run(double deltaMs) { + leftoverMs += deltaMs; + float msPerFlash = 1000 / ((rateParameter.getValuef() + .01) * 100); + while (leftoverMs > msPerFlash) { + leftoverMs -= msPerFlash; + stripNum += int(spreadMod.getValuef()); + flashes.add(new StripFlash(stripNum)); + } + + for (LXPoint p : model.points) { + colors[p.index] = 0; + } + + for (StripFlash flash : flashes) { + float hue = (hueMod.getValuef() + flash.hue) % 360.0; + color c = lx.hsb(hue, saturationParameter.getValuef() * 100, (flash.value) * 100); + for (LXPoint p : flash.f.points) { + colors[p.index] = c; + } + } + + Iterator i = flashes.iterator(); + while (i.hasNext()) { + StripFlash flash = i.next(); + boolean dead = flash.age(deltaMs); + if (dead) { + i.remove(); + } + } + } +} + + + +class JackieDots extends SCPattern { + private BasicParameter rateParameter = new BasicParameter("RATE", 0.15); + private BasicParameter attackParameter = new BasicParameter("ATTK", 0.3); + private BasicParameter decayParameter = new BasicParameter("DECAY", 0.2); + private BasicParameter saturationParameter = new BasicParameter("SAT", 0.7); + + SinLFO hueMod = new SinLFO(0, 360, 4000); + SinLFO spreadMod = new SinLFO(1, 10, 16000); + + + class PointFlash { + LXPoint f; + float value; + float hue; + boolean hasPeaked; + + PointFlash(int n) { + f = model.points.get(n % model.points.size()); + hue = random(360); + boolean infiniteAttack = (attackParameter.getValuef() > 0.999); + hasPeaked = infiniteAttack; + value = (infiniteAttack ? 1 : 0); + } + + // returns TRUE if this should die + boolean age(double ms) { + if (!hasPeaked) { + value = value + (float) (ms / 1000.0f * ((attackParameter.getValuef() + 0.01) * 5)); + if (value >= 1.0) { + value = 1.0; + hasPeaked = true; + } + return false; + } else { + value = value - (float) (ms / 1000.0f * ((decayParameter.getValuef() + 0.01) * 10)); + return value <= 0; + } + } + } + + private float leftoverMs = 0; + private List flashes; + private int pointNum = 0; + + public JackieDots(GLucose glucose) { + super(glucose); + addParameter(rateParameter); + addParameter(attackParameter); + addParameter(decayParameter); + addParameter(saturationParameter); + addModulator(hueMod).trigger(); + addModulator(spreadMod).trigger(); + + flashes = new LinkedList(); + } + + public void run(double deltaMs) { + leftoverMs += deltaMs; + float msPerFlash = 1000 / ((rateParameter.getValuef() + .01) * 5000); + while (leftoverMs > msPerFlash) { + leftoverMs -= msPerFlash; + pointNum += int(spreadMod.getValuef()); + flashes.add(new PointFlash(pointNum)); + } + + for (LXPoint p : model.points) { + colors[p.index] = 0; + } + + for (PointFlash flash : flashes) { + float hue = (hueMod.getValuef() + flash.hue) % 360.0; + color c = lx.hsb(hue, saturationParameter.getValuef() * 100, (flash.value) * 100); + colors[flash.f.index] = c; + } + + Iterator i = flashes.iterator(); + while (i.hasNext()) { + PointFlash flash = i.next(); + boolean dead = flash.age(deltaMs); + if (dead) { + i.remove(); + } + } + } +} + diff --git a/SugarCubes.pde b/SugarCubes.pde index c1d74a0..2c9ecab 100644 --- a/SugarCubes.pde +++ b/SugarCubes.pde @@ -43,6 +43,8 @@ LXPattern[] patterns(GLucose glucose) { new Blinders(glucose), new CrossSections(glucose), new Psychedelia(glucose), + + new MultipleCubes(glucose), new Traktor(glucose).setEligible(false), new BassPod(glucose).setEligible(false), @@ -58,14 +60,25 @@ LXPattern[] patterns(GLucose glucose) { // Alex G // Tim + new TimMetronome(glucose), new TimPlanes(glucose), new TimPinwheels(glucose), new TimRaindrops(glucose), new TimCubes(glucose), // new TimTrace(glucose), new TimSpheres(glucose), + + + + // Jackie + new JackieSquares(glucose), + new JackieLines(glucose), + new JackieDots(glucose), + + // Vincent + new VSTowers(glucose), // Toby new GlitchPlasma(glucose), diff --git a/TimBavaro.pde b/TimBavaro.pde index 5ed805b..3fcd5b1 100644 --- a/TimBavaro.pde +++ b/TimBavaro.pde @@ -3,8 +3,9 @@ */ class TimSpheres extends SCPattern { private BasicParameter hueParameter = new BasicParameter("RAD", 1.0); + private BasicParameter periodParameter = new BasicParameter("PERIOD", 4000.0, 200.0, 10000.0); private final SawLFO lfo = new SawLFO(0, 1, 10000); - private final SinLFO sinLfo = new SinLFO(0, 1, 4000); + private final SinLFO sinLfo = new SinLFO(0, 1, periodParameter); private final float centerX, centerY, centerZ; class Sphere { @@ -18,6 +19,7 @@ class TimSpheres extends SCPattern { public TimSpheres(GLucose glucose) { super(glucose); addParameter(hueParameter); + addParameter(periodParameter); addModulator(lfo).trigger(); addModulator(sinLfo).trigger(); centerX = (model.xMax + model.xMin) / 2; @@ -828,3 +830,72 @@ class TimTrace extends SCPattern { } } } + +class TimMetronome extends SCPattern { + private BasicParameter clickyParameter = new BasicParameter("CLICK", 0, 0, 10.0); + private BasicParameter derezParameter = new BasicParameter("DREZ", 0.5, 0, 1.0); + private BasicParameter driftParameter = new BasicParameter("DRIFT", 0, 0, 1.0); + private BasicParameter fadeParameter = new BasicParameter("FADE", 0.05, 0, 0.2); + private float modelWidth; + private int beatNum; + private float prevTempoRamp; + private LXProjection projection; + private float[] values; + private float[] hues; + + TimMetronome(GLucose glucose) { + super(glucose); + addParameter(clickyParameter); + addParameter(derezParameter); + addParameter(driftParameter); + addParameter(fadeParameter); + modelWidth = model.xMax - model.xMin; + projection = new LXProjection(model); + beatNum = 0; + prevTempoRamp = 0; + values = new float[model.points.size()]; + hues = new float[model.points.size()]; + } + + public void run(double deltaMs) { + float tempoRamp = lx.tempo.rampf(); + if (tempoRamp < prevTempoRamp) { + beatNum = (beatNum + 1) % 1000; + } + prevTempoRamp = tempoRamp; + + float phase = beatNum + pow(tempoRamp, 1.0 + clickyParameter.getValuef()); + + projection.reset(); + projection.translateCenter(model.xMin, model.yMin, model.cz); + projection.rotate(phase * 0.5 * PI, 0, 0, 1); + + projection.translate(driftParameter.getValuef() * tempoRamp * modelWidth * 0.5, 0, 0); + + float derezCutoff = derezParameter.getValuef(); + + float fadeMultiplier = (1.0 - fadeParameter.getValuef()); + + float armRadius = modelWidth * 0.1; + for (LXVector p : projection) { + boolean onArm = false; + if (abs(p.x) < armRadius) { + onArm = (p.y > 0) || (sqrt(pow(p.x, 2) + pow(p.y, 2)) < armRadius); + } + if (onArm) { + values[p.index] = 1.0; + hues[p.index] = (floor(phase / 4) * 90) % 360; + } else { + values[p.index] *= fadeMultiplier; + } + + float saturation = pow(1 - values[p.index], 0.5) * 0.7 + 0.3; + float brightness = values[p.index]; + + if (random(1.0) > derezCutoff) { + colors[p.index] = lx.hsb(hues[p.index], saturation * 100, brightness * 100); + } + } + } +} + diff --git a/VincentSiao.pde b/VincentSiao.pde new file mode 100644 index 0000000..48a368e --- /dev/null +++ b/VincentSiao.pde @@ -0,0 +1,119 @@ +class VSTowers extends SCPattern { + private BasicParameter saturationParameter = new BasicParameter("SAT", 80, 0, 100); + private BasicParameter attackParameter = new BasicParameter("ATTK", 0.96, 0.1, 1.0); + private BasicParameter decayParameter = new BasicParameter("DECAY", 0.7, 0.1, 1.0); + private SawLFO hueLfo = new SawLFO(0, 360, 20000); + + private Map towerOn; + + class TowerFlash { + Tower t; + float value; + float maxVal; + float hue; + boolean hasPeaked; + + TowerFlash() { + do { + t = model.towers.get(floor(random(model.towers.size()))); + } while (towerOn.get(t)); + towerOn.put(t, true); + hue = (hueLfo.getValuef() + 50*(random(2)-1.0f)) % 360; + value = 0.0; + maxVal = random(0.4) + 0.6; + } + + boolean run(double deltaMs) { + if (!hasPeaked) { + float atk = attackParameter.getValuef(); + float atkDuration = 10000 * (1/sqrt(atk) - 1.0f); + value = value + (float)deltaMs / atkDuration; + if (value >= maxVal) { + value = maxVal; + hasPeaked = true; + } + return false; + } else { + float dec = decayParameter.getValuef(); + float decDuration = 10000 * (1/sqrt(dec) - 1.0f); + value = value - (float)deltaMs / decDuration; + return value <= 0; + } + } + } + + public VSTowers(GLucose glucose) { + super(glucose); + addParameter(saturationParameter); + addParameter(attackParameter); + addParameter(decayParameter); + addModulator(hueLfo).trigger(); + flashes = new LinkedList(); + towerOn = new HashMap(); + for (Tower t : model.towers) { + towerOn.put(t, false); + } + } + + private List flashes; + private float accDelta = 0; + + public void run(double deltaMs) { + accDelta += deltaMs; + float rate = lx.tempo.rampf(); + float msPerFlash = 5000 * (1/sqrt(rate) - 1.0f); + if (accDelta >= msPerFlash) { + accDelta -= msPerFlash; + if (flashes.size() < model.towers.size()) { + flashes.add(new TowerFlash()); + } + } + for (LXPoint p : model.points) { + if (random(1) < 0.2) { + colors[p.index] = 0; + } + } + for (TowerFlash tf : flashes) { + for (LXPoint p : tf.t.points) { + float towerHeight = model.yMin + tf.value * (model.yMax - model.yMin); + if (p.y <= towerHeight) { + colors[p.index] = lx.hsb( + (tf.hue + tf.value*50 - p.y/2) % 360, + saturationParameter.getValuef(), + tf.value*100); + } + } + if (tf.hasPeaked) { + float towerMaxHeight = model.yMin + tf.maxVal * (model.yMax - model.yMin); + Cube top = tf.t.cubes.get(tf.t.cubes.size()-1); + for (int i = tf.t.cubes.size()-1; i >= 0; --i) { + Cube c = tf.t.cubes.get(i); + float maxY = c.points.get(0).y; + for (LXPoint p : c.points) { + maxY = max(maxY, p.y); + } + if (towerMaxHeight < maxY) { + top = c; + } + } + for (LXPoint p : top.points) { + if (tf.value > 0.5) { + colors[p.index] = lx.hsb(0, 0, tf.value*100); + } else if (random(1) < 0.2) { + colors[p.index] = 0; + } + } + } + } + // Run flashes and remove completed ones + Iterator it = flashes.iterator(); + while (it.hasNext()) { + TowerFlash flash = it.next(); + if (flash.run(deltaMs)) { + towerOn.put(flash.t, false); + it.remove(); + } + } + } +} + diff --git a/_Internals.pde b/_Internals.pde index 61c453e..425ea0e 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -36,9 +36,6 @@ final float TRAILER_WIDTH = 240; final float TRAILER_DEPTH = 97; final float TRAILER_HEIGHT = 33; -final int MaxCubeHeight = 7; -final int NumBackTowers = 18; - int targetFramerate = 60; int startMillis, lastMillis; diff --git a/_Mappings.pde b/_Mappings.pde index 435ca90..171ff13 100644 --- a/_Mappings.pde +++ b/_Mappings.pde @@ -13,6 +13,9 @@ * when physical changes or tuning is being done to the structure. */ +final int MaxCubeHeight = 6; +final int NumBackTowers = 16; + public Model buildModel() { // Shorthand helpers for specifying wiring more quickly @@ -24,8 +27,6 @@ public Model buildModel() { // Utility value if you need the height of a cube shorthand final float CH = Cube.EDGE_HEIGHT; final float CW = Cube.EDGE_WIDTH ; - - // Positions for the bass box final float BBY = BassBox.EDGE_HEIGHT + BoothFloor.PLEXI_WIDTH; @@ -79,14 +80,14 @@ public Model buildModel() { for (int i=0; i(); for (int i=0; i < st.n; i++) { Cube.Wiring w = (i < st.wiring.length) ? st.wiring[i] : WRR; @@ -239,48 +244,63 @@ public PandaMapping[] buildPandaList() { return new PandaMapping[] { new PandaMapping( "10.200.1.28", new ChannelMapping[] { - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 16, 17, 18}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1, 2, 3}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 4, 5, 6}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 7, 8, 9}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 10, 11, 12}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 13, 14, 15}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 37, 38, 39 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 43, 44, 45 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 46, 47, 48 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // new front thing + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // new back thing + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 13, 14, 15 }), // new back thing }), new PandaMapping( "10.200.1.29", new ChannelMapping[] { - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 34, 35, 36}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 19, 20, 21}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 22, 23, 24}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 25, 26, 27}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 28, 29, 30}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 31, 32, 33}), - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 19, 20, 21 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1, 2, 3 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 4, 5, 6 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 7, 8, 9 }), + + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 10, 11, 12 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 16, 17, 18 }), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 34, 35, 36}), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 19, 20, 21}), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 22, 23, 24}), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 25, 26, 27}), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 28, 29, 30}), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 31, 32, 33}), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), }), new PandaMapping( "10.200.1.30", new ChannelMapping[] { - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1,1}), // 30 J3 * - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1,1}), // 30 J4 //ORIG * - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 37, 38, 39}), // 30 J7 * - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 40, 41, 42}), // 30 J8 * - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 43, 44, 45}), // 30 J13 (not working) - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 46, 47, 48}), // 30 J14 (unplugged) - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 49, 50, 51}), // 30 J15 (unplugged) - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 52, 53, 54}), // 30 J16 + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 40, 41, 42 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 22, 23, 24 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 25, 26, 27 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 28, 29, 30 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 31, 32, 33 }), + new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 34, 35, 36 }), +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1,1}), // 30 J3 * +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1,1}), // 30 J4 //ORIG * +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 37, 38, 39}), // 30 J7 * +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 40, 41, 42}), // 30 J8 * +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 43, 44, 45}), // 30 J13 (not working) +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 46, 47, 48}), // 30 J14 (unplugged) +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 49, 50, 51}), // 30 J15 (unplugged) +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 52, 53, 54}), // 30 J16 }), - new PandaMapping( - "10.200.1.31", new ChannelMapping[] { - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 65, 66}), // J3 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1}), // J4 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 55, 56}), // 30 J7 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 57, 58}), // J8 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 59, 60}), // J13 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 61, 62}), // 30 J14 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 63, 64}), // J15 - new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1}), // J16 - }), +// new PandaMapping( +// "10.200.1.31", new ChannelMapping[] { +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 65, 66}), // J3 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1}), // J4 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 55, 56}), // 30 J7 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 57, 58}), // J8 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 59, 60}), // J13 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 61, 62}), // 30 J14 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 63, 64}), // J15 +// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,1}), // J16 +// }), + // new PandaMapping( // "10.200.1.32", new ChannelMapping[] { // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // J3 diff --git a/_PandaDriver.pde b/_PandaDriver.pde index 24afa20..5d8ad24 100644 --- a/_PandaDriver.pde +++ b/_PandaDriver.pde @@ -84,10 +84,17 @@ public static class PandaDriver { * corner of the cube the data wire comes in. */ private final static int[][] CUBE_STRIP_ORDERINGS = new int[][] { +// { 2, 1, 0, 3, 13, 12, 15, 14, 4, 7, 6, 5, 11, 10, 9, 8 }, // FRONT_LEFT +// { 6, 5, 4, 7, 1, 0, 3, 2, 8, 11, 10, 9, 15, 14, 13, 12 }, // FRONT_RIGHT +// { 14, 13, 12, 15, 9, 8, 11, 10, 0, 3, 2, 1, 7, 6, 5, 4 }, // REAR_LEFT +// { 10, 9, 8, 11, 5, 4, 7, 6, 12, 15, 14, 13, 3, 2, 1, 0 }, // REAR_RIGHT + + { 2, 1, 0, 3, 13, 12, 15, 14, 4, 7, 6, 5, 11, 10, 9, 8 }, // FRONT_LEFT { 6, 5, 4, 7, 1, 0, 3, 2, 8, 11, 10, 9, 15, 14, 13, 12 }, // FRONT_RIGHT { 14, 13, 12, 15, 9, 8, 11, 10, 0, 3, 2, 1, 7, 6, 5, 4 }, // REAR_LEFT - { 10, 9, 8, 11, 5, 4, 7, 6, 12, 15, 14, 13, 3, 2, 1, 0 }, // REAR_RIGHT + { 9, 8, 11, 5, 4, 7, 6, 10, 14, 2, 1, 0, 3, 13, 12, 15 }, // REAR_RIGHT + }; private final static int[][] BASS_STRIP_ORDERING = {