Merge pull request #15 from jackstah/master
authorJack Stahl <jackstah@gmail.com>
Sun, 24 Nov 2013 01:36:14 +0000 (17:36 -0800)
committerJack Stahl <jackstah@gmail.com>
Sun, 24 Nov 2013 01:36:14 +0000 (17:36 -0800)
Fix Swim and balance

JackieBavaro.pde [new file with mode: 0644]
SugarCubes.pde
VincentSiao.pde [new file with mode: 0644]
_Internals.pde
_Mappings.pde
_PandaDriver.pde

diff --git a/JackieBavaro.pde b/JackieBavaro.pde
new file mode 100644 (file)
index 0000000..fc1576a
--- /dev/null
@@ -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<FaceFlash> 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<FaceFlash>();
+  }
+  
+  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<FaceFlash> 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<StripFlash> 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<StripFlash>();
+  }
+  
+  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<StripFlash> 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<PointFlash> 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<PointFlash>();
+  }
+  
+  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<PointFlash> i = flashes.iterator();
+    while (i.hasNext()) {
+      PointFlash flash = i.next();
+      boolean dead = flash.age(deltaMs);
+      if (dead) {
+        i.remove();
+      }
+    }
+  } 
+}
+
index 40f9a764ed1a782ca5cb4e1e01e2a4cdb96b85fc..88f229a2a4bee26274e86821edcf96aec058a8bc 100644 (file)
@@ -65,7 +65,15 @@ LXPattern[] patterns(GLucose 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/VincentSiao.pde b/VincentSiao.pde
new file mode 100644 (file)
index 0000000..48a368e
--- /dev/null
@@ -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<Tower, Boolean> 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<TowerFlash>();
+    towerOn = new HashMap();
+    for (Tower t : model.towers) {
+      towerOn.put(t, false);
+    }
+  }
+
+  private List<TowerFlash> 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<TowerFlash> it = flashes.iterator();
+    while (it.hasNext()) {
+      TowerFlash flash = it.next();
+      if (flash.run(deltaMs)) {
+        towerOn.put(flash.t, false);
+        it.remove();
+      }
+    }
+  }
+}
+
index 61c453e34d88eaa31273e754b30f5224431ccd94..425ea0e3c8a34532ef54f39f10bca368be15ba28 100644 (file)
@@ -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;
 
index 435ca9086fd7fba8fffc2425c731e89d2803de81..171ff13e26808b056c55392661fecb621050a8a4 100644 (file)
@@ -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<NumBackTowers/2; i++) scubes.add(new StaggeredTower(
                   (i+1)*CW,                                                                 // x
                   (i % 2 == 0) ? 0 : CH * 2./3.                ,   // y
-                 - ((i % 2 == 0) ? 0 : 11) + 80          ,   // z
-                 225, (i % 2 == 0) ? MaxCubeHeight : MaxCubeHeight-1) );         // num cubes
+                 - ((i % 2 == 0) ? 11 : 0) + 80          ,   // z
+                 -45, (i % 2 == 0) ? MaxCubeHeight : MaxCubeHeight) );         // num cubes
         
-        for (int i=0; i<NumBackTowers/2; i++) scubes.add(new StaggeredTower(
-                  (i+1)*CW,                                                                 // x
-                  (i % 2 == 0) ? 0 : CH * 2./3.                ,   // y
-                 - ((i % 2 == 0) ? 0 : 11) + 80 - pow(CH*CH + CW*CW, .5),   // z
-                 225, (i % 2 == 0) ? MaxCubeHeight : MaxCubeHeight-1) ); 
+//        for (int i=0; i<NumBackTowers/2; i++) scubes.add(new StaggeredTower(
+//                  (i+1)*CW,                                                                 // x
+//                  (i % 2 == 0) ? 0 : CH * 2./3.                ,   // y
+//                 - ((i % 2 == 0) ? 0 : 11) + 80 - pow(CH*CH + CW*CW, .5),   // z
+//                 225, (i % 2 == 0) ? MaxCubeHeight : MaxCubeHeight-1) ); 
 
       // for (int i=0; i<2 ; i++) scubes.add(new StaggeredTower(
       //             (i+1)*CW,                                                                 // x
@@ -213,9 +214,13 @@ float current_x_position = 0;
   }
 
   
-  for (Cube cube : singleCubes) cubes[cubeIndex++] = cube;
-  for (Cube cube : dcubes)                 cubes[cubeIndex++] = cube;
-for (StaggeredTower st : scubes) {
+  for (Cube cube : singleCubes) {
+    cubes[cubeIndex++] = cube;
+  }
+  for (Cube cube : dcubes) {
+    cubes[cubeIndex++] = cube;
+  }
+  for (StaggeredTower st : scubes) {
     tower = new ArrayList<Cube>();
     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 
index 24afa20438d80422bab8bef435901781824beec0..5d8ad249bbe3171446033c720c1d15f60cfda226 100644 (file)
@@ -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 = {