Skip to content

Commit

Permalink
Updated everything for 0.1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobjoaquin committed Aug 20, 2010
1 parent 81c7b82 commit 55fb090
Show file tree
Hide file tree
Showing 20 changed files with 27 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/chnInOut/chnInOut.pde
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void setup() {
frameRate(30);
smooth();

cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "chnInOut.csd");
cs.run();
}

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/devScratchPad/devScratchPad.pde
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void setup() {
size(720, 480);
noLoop();

cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "devScratchPad.csd");
cs.run();
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/drawTables/drawTables.pde
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void setup() {
smooth();
noLoop();

cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "drawTables.csd");
cs.run();
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/events/events.pde
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void setup() {
background(0);
noStroke();

cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "events.csd");
cs.run();
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/experiment_1/experiment_1.pde
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void setup() {
net = new Net(N_NODES, MIN_NODE_SIZE, MAX_NODE_SIZE);

if (IS_SOUND_ON) {
cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "experiment_1.csd");
cs.run();
}
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/headerInfo/headerInfo.pde
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void setup() {
font = loadFont("Courier-24.vlw");
textFont(font);

cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "headerInfo.csd");
cs.run();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/playMessage/playMessage.pde
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void setup() {
background(0);
noLoop();

cs = new Csoundo(this, "data/message_from_another_planet.csd");
cs = new Csoundo(this, "message_from_another_planet.csd");
cs.run();
}

Expand Down
File renamed without changes.
20 changes: 11 additions & 9 deletions examples/protectedTable/protectedTable.pde
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,34 @@ void setup() {
size(740, 480);
frameRate(30);
smooth();

ellipseMode(RADIUS);
background(0);
fill(0, 12);

cs = new Csoundo(this, "data/synth.csd");
background(0);
cs = new Csoundo(this, "protectedTable.csd");
cs.run();
}

void draw() {
noStroke();
fill(0, 8);
rect(0, 0, width, height);

float size = pow(2, 12);
cs.event("f 20 0 " + size + " 10 0");
int length = cs.tableLength(20);
float phase = (float) (frameCount % 240) / 240 * TWO_PI;
float phase = (float) (frameCount % 60) / 60 * TWO_PI;

stroke(255, 255);
beginShape();
for (int i = 0; i < length; i++) {
float r = random(255.0);
stroke(r, r, 255);


// Intentionally read backwards
cs.tableSet(20, length - i - 1, sin(2 * PI * (float) i *
(random(0.0001) + 2.0) / (float) length + phase));

float v = cs.tableGet(20, length - i - 1);
point((float) i / (float) length * (float) width, height / 2.0 + height / 2.0 * v);
vertex((float) i / (float) length * (float) width, height / 2.0 + height / 2.0 * v);
}

endShape();
}
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/random/random.pde
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void setup() {
size(740, 480);
frameRate(10);
smooth();
cs = new Csoundo(this, "data/test.csd");
cs = new Csoundo(this, "random.csd");
cs.run();
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/sliders/sliders.pde
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void setup() {
smooth();

controlP5 = new ControlP5(this);
cs = new Csoundo(this, "data/synth.csd");
cs = new Csoundo(this, "sliders.csd");
cs.run();

// Set default values in Csound chn bus memory
Expand Down
11 changes: 7 additions & 4 deletions src/csoundo/Csoundo.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ public class Csoundo{
private Mutex mutex;

/**
* The Csoundo onstructor, usually called in the setup() method in your
* sketch to initialize and start the library.
* The Csoundo constructor, usually called in the setup() method in your
* sketch. Only supports 1 csd file for now, regardless of the number
* of instances of Csoundo you are running. Your Csound csd file must
* reside in the /data folder of your sketch. A temporary CSD file called
* __CSOUNDO__.csd is created in your /data folder.
*
* @param theParent The PApplet. Usually pass 'this'
* @param f The Csound file to run. Requires full absolute path.
Expand All @@ -60,8 +63,8 @@ public Csoundo(PApplet theParent, String _csd) {
myParent.registerDispose(this);
myParent.registerPost(this);

csd = myParent.sketchPath(_csd);
path = myParent.sketchPath("");
path = myParent.dataPath("");
csd = myParent.dataPath(path + _csd);
engine = new Engine(csd, path);
}

Expand Down

0 comments on commit 55fb090

Please sign in to comment.