+// for (Sphery s : spherys) {
+// if (s == null) continue;
+// double bampv = s.bounceamp.getValue();
+// double brv = s.bouncerate.getValue();
+// double tempobounce = lx.tempo.bpm();
+// if (parameter == s.bounceamp)
+// {
+// s.ybounce.setRange(bampv*model.yMax/3 , bampv*2*model.yMax/3, brv);
+// }
+// else if ( parameter == s.bouncerate )
+// {
+// s.ybounce.setDuration(120000./tempobounce);
+// }
+// }
+// }
+
+ void StartRun(int deltaMs) {
+ float t = lx.tempo.rampf();
+ float bpm = lx.tempo.bpmf();
+ //spherys[1].run(deltaMs);
+ //spherys[2].run(deltaMs);
+ //spherys[3].run(deltaMs);
+
+
+
+
+ }
+ int spheremode = 0;
+
+ // void keyPressed() {
+ // spheremode++;
+ // }
+
+ color CalcPoint(xyz Px)
+ {
+ // if (spheremode == 0 )
+ //{
+ color c = 0;
+ c = blendColor(c, spherys[1].spheryvalue(Px.x, Px.y, Px.z, .75*model.xMax, model.yMax/2, model.zMax/2), ADD);
+ c = blendColor(c, spherys[0].spheryvalue(Px.x, Px.y, Px.z, model.xMax/4, model.yMax/4, model.zMax/2), ADD);
+ c = blendColor(c, spherys[2].spheryvalue(Px.x, Px.y, Px.z, model.xMax/2, model.yMax/2, model.zMax/2),ADD);
+ return c;
+ //}
+ // else if (spheremode == 1)
+ // {
+
+ // color c = 0;
+ // c = blendColor(c, spherys[3].ellipsevalue(Px.x, Px.y, Px.z, model.xMax/4, model.yMax/4, model.zMax/4, 3*model.xMax/4, 3*model.yMax/4, 3*model.zMax/4),ADD);
+ // return c;
+ // }
+ // return color(0,0,0);
+ // // else if(spheremode ==2)
+ // { color c = 0;
+ // return color(CalcCone( (xyz by = new xyz(0,spherys[2].ybounce.getValuef(),0) ), Px, mid) );
+
+ // }
+
+
+ }
+
+ }
+
+ class HueTestHSB extends SCPattern{
+ BasicParameter HueT = new BasicParameter("Hue", .5);
+ BasicParameter SatT = new BasicParameter("Sat", .5);
+ BasicParameter BriT = new BasicParameter("Bright", .5);
+
+HueTestHSB(GLucose glucose) {
+ super(glucose);
+ addParameter(HueT);
+ addParameter(SatT);
+ addParameter(BriT);
+}
+ void run(double deltaMs){
+
+ for (Point p : model.points) {
+ color c = 0;
+ c = blendColor(c, color(360*HueT.getValuef(), 100*SatT.getValuef(), 100*BriT.getValuef()), ADD);
+ colors[p.index]= c;
+ }
+ int now= millis();
+ if (now % 1000 <= 20)
+ {
+ println("Hue: " + 360*HueT.getValuef() + "Sat: " + 100*SatT.getValuef() + "Bright: " + 100*BriT.getValuef());
+ }
+ }