Permalink
Browse files

Updated everything for 0.1.2 release

  • Loading branch information...
1 parent 81c7b82 commit 55fb0908d7ae3420dfc726fbdbf51ec9d845733a @jacobjoaquin committed Aug 20, 2010
View
2 examples/chnInOut/chnInOut.pde
@@ -14,7 +14,7 @@ void setup() {
frameRate(30);
smooth();
- cs = new Csoundo(this, "data/synth.csd");
+ cs = new Csoundo(this, "chnInOut.csd");
cs.run();
}
View
0 examples/chnInOut/data/synth.csd → examples/chnInOut/data/chnInOut.csd
File renamed without changes.
View
0 examples/devScratchPad/data/synth.csd → ...ples/devScratchPad/data/devScratchPad.csd
File renamed without changes.
View
2 examples/devScratchPad/devScratchPad.pde
@@ -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();
}
View
0 examples/drawTables/data/synth.csd → examples/drawTables/data/drawTables.csd
File renamed without changes.
View
2 examples/drawTables/drawTables.pde
@@ -18,7 +18,7 @@ void setup() {
smooth();
noLoop();
- cs = new Csoundo(this, "data/synth.csd");
+ cs = new Csoundo(this, "drawTables.csd");
cs.run();
}
View
0 examples/events/data/synth.csd → examples/events/data/events.csd
File renamed without changes.
View
2 examples/events/events.pde
@@ -17,7 +17,7 @@ void setup() {
background(0);
noStroke();
- cs = new Csoundo(this, "data/synth.csd");
+ cs = new Csoundo(this, "events.csd");
cs.run();
}
View
0 examples/experiment_1/data/synth.csd → examples/experiment_1/data/experiment_1.csd
File renamed without changes.
View
2 examples/experiment_1/experiment_1.pde
@@ -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();
}
}
View
0 examples/headerInfo/data/synth.csd → examples/headerInfo/data/headerInfo.csd
File renamed without changes.
View
2 examples/headerInfo/headerInfo.pde
@@ -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();
}
View
2 examples/playMessage/playMessage.pde
@@ -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();
}
View
0 examples/protectedTable/data/synth.csd → ...es/protectedTable/data/protectedTable.csd
File renamed without changes.
View
20 examples/protectedTable/protectedTable.pde
@@ -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();
}
View
0 examples/random/data/test.csd → examples/random/data/random.csd
File renamed without changes.
View
2 examples/random/random.pde
@@ -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();
}
View
0 examples/sliders/data/synth.csd → examples/sliders/data/sliders.csd
File renamed without changes.
View
2 examples/sliders/sliders.pde
@@ -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
View
11 src/csoundo/Csoundo.java
@@ -48,8 +48,11 @@
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.
@@ -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);
}

0 comments on commit 55fb090

Please sign in to comment.