public final LXProjection sinespin2;
public final LXProjection sinespin3;
- Pick Galaxy, SpheryTime;
+ Pick Galaxy, STime;
public BasicParameter rotationx = new BasicParameter("rotx", 0, 0, 1 );
public BasicParameter rotationy = new BasicParameter("roty", 1, 0, 1);
public BasicParameter bouncerate;
public BasicParameter bounceamp;
public BasicParameter vibrationrate;
- public final PVector circlecenter = new PVector();
+ public final PVector circlecenter;
public Sphery(float f1xcenter, float f1ycenter, float f1zcenter, float radius, float vibration_magnitude , float vperiod)
{
this.f1ycenter = f1ycenter;
this.f1zcenter = f1zcenter;
this.radius = radius;
+ this.circlecenter= new PVector(f1xcenter,f1ycenter,f1zcenter);
this.vibration_magnitude = vibration_magnitude;
float quadrant(PVector q) {
float qtheta = atan2( (q.x-f1xcenter) , (q.z - f1zcenter) );
+ float qphi = acos( (q.z-f1zcenter)/(PVector.dist(q,circlecenter)) );
return map(qtheta, -PI/2, PI/2, 200-huespread.getValuef(), 240+huespread.getValuef());
}
+boolean noteOn(Note note) {
+ int row = note.getPitch(), col = note.getChannel();
+ // if (row == 57) {KeyPressed = col; return true; }
+ return super.noteOn(note);
+ }
-public boolean noteOn(Note note) {
-pitch= note.getPitch();
-velocity=note.getVelocity();
-channel=note.getChannel();
-return true;
-}
-public boolean gridPressed(int row, int col) {
- pitch = row; channel = col;
- cur = NumApcCols*(pitch-53)+col;
-//setState(row, col, 0 ? 1 : 0);
-return true;
-}
+// public boolean noteOn(Note note) {
+// pitch= note.getPitch();
+// velocity=note.getVelocity();
+// channel=note.getChannel();
+// return true;
+// }
+
+// public boolean gridPressed(int row, int col) {
+// pitch = row; channel = col;
+// cur = NumApcCols*(pitch-53)+col;
+// //setState(row, col, 0 ? 1 : 0);
+// return true;
+// }
//public grid
final Sphery[] spherys;
addModulator(yrot).trigger();
addModulator(yrot2).trigger();
addModulator(yrot3).trigger();
- Galaxy = addPick("Galaxy", 1, 3, new String[] {"home", "vertical","single","aquarium"});
- SpheryTime =addPick("Time", 3, 4, new String[]{"half", "triplet", "beat", "2x", "3x" });
+ //Galaxy = addPick("Galaxy", 1, 3, new String[] {"home", "vertical","single","aquarium"});
+ STime =addPick("Time", 1, 4, new String[]{"half", "triplet", "beat", "2x", "3x" });
spherys = new Sphery[] {
new Sphery(model.xMax/4, model.yMax/2, model.zMax/2, modelrad/12, modelrad/25, 3000),
float t = lx.tempo.rampf();
float bpm = lx.tempo.bpmf();
float scalevalue = scale.getValuef();
-
+ int spherytime= STime.Cur();
+
- // switch (cur) {
+ switch (spherytime) {
- // case 1: t = map(.5*t ,0,.5, 0,1); bpm = .5*bpm; break;
+ case 0: t = map(.5*t ,0,.5, 0,1); bpm = .5*bpm; break;
- // case 2: t = t; bpm = bpm; break;
+ case 1: t = t; bpm = bpm; break;
- // case 3: t = map(2*t,0,2,0,1); bpm = 2*bpm; break;
+ case 2: t = map(2*t,0,2,0,1); bpm = 2*bpm; break;
- // default: t= t; bpm = bpm;
- // }
+ default: t= t; bpm = bpm;
+ }
//switch(sphery.colorscheme)
// }
}
+/*This just takes all of Dan Horwitz's code that I want to inherit and leaves the rest behind.
+ A work in progress. */
public class APat extends SCPattern
+
+
{
ArrayList<Pick> picks = new ArrayList<Pick> ();
ArrayList<DBool> bools = new ArrayList<DBool> ();