Permalink
Browse files

Cleaning up for a release.

  • Loading branch information...
jacobjoaquin committed Aug 19, 2010
1 parent fc12d44 commit 2227ad28e71196c9625e13ea6141700c03d556ce
View
141 README
@@ -1,2 +1,141 @@
-'Csoundo' is a Processing library for Csound.
+'Csoundo' is a Csound library for Processing.
+
+Copyright (c) 2010 Jacob Joaquin
+jacobjoaquin@gmail.com
+http://csoundblog.com/
+
+Note
+----
+Csoundo development is in early Alpha. Though people have been successful in running Csoundo on Linux, OS X and Windows, there are still many issues that are preventing people from getting Csoundo to work on their computers. For example, Csoundo only works with the floats version of Csoundo, not doubles. (see "Known Issues" at the end)
+
+
+
+What is Processing?
+-------------------
+
+"Processing is an open source programming language and environment for people who want to create images, animations, and interactions. Initially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context, Processing also has evolved into a tool for generating finished professional work. Today, tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production."
+
+http://processing.org/
+
+
+
+What is Csound?
+---------------
+
+"Csound is a sound and music synthesis system, providing facilities for composition and performance over a wide range of platforms. It is not restricted to any style of music, having been used for many years in the creation of classical, pop, techno, ambient, experimental, and (of course) computer music, as well as music for film and television."
+
+http://csound.sourceforge.net/
+
+
+
+Running on OS X
+---------------
+1) Install Csound.
+
+Only one version of the pre-built Csound binaries has been confirmed to work on OS X, and only confirmed to work on Intel machines:
+
+csound5.12.4-OSX10.5-Universal.dmg
+http://sourceforge.net/projects/csound/files/csound5/csound5.12/csound5.12.4-OSX10.5-Universal.dmg/download
+
+
+2) Copy the Csoundo folder into your Processing 'libraries' folder. See instructions at Processing.org:
+
+http://wiki.processing.org/w/How_to_Install_a_Contributed_Library
+
+
+3) Copy or make a symlink to the csnd.jar file. The csnd.jar is located here:
+
+/Library/Frameworks/CsoundLib.framework/Resources/Java/csnd.jar
+
+Make a copy of csnd.jar in this folder:
+
+yoursketchbook/libraries/csoundo/library
+
+Alternatively, you can create a symbolic link using the terminal app.
+
+$ cd yoursketchbook/libraries/csoundo/library
+$ ln -s /Library/Frameworks/CsoundLib.framework/Resources/Java/csnd.jar csnd.jar
+
+
+
+Running on Linux
+----------------
+
+I do not have linux installed. If you have better instructions, please email me, and I will incorporate them into the Csoundo knowledge base.
+
+1) Install Csound:
+
+http://csound.sourceforge.net/
+
+
+2) Copy the Csoundo folder into your Processing 'libraries' folder. See instructions at Processing.org:
+
+http://wiki.processing.org/w/How_to_Install_a_Contributed_Library
+
+
+3) Copy or make a symlink to the csnd.jar here:
+
+yoursketchbook/libraries/csoundo/library
+
+To create a symbolic link:
+
+$ cd yoursketchbook/libraries/csoundo/library
+$ ln -s /Library/Frameworks/CsoundLib.framework/Resources/Java/csnd.jar csnd.jar
+
+
+4) Make modifications to the 'processing' lauch script.
+
+There is currently one known method for running Csoundo on linux. That is, to make to modifications to the 'processing' launcher script in the root folder of Processing.
+
+A. Towards the very end, right before the line "# Start Processing in the same directory as this script", add this code (your csound plugins folder may vary):
+
+#make sure that OPCODEDIR is set..
+export OPCODEDIR=/usr/local/lib/csound/plugins
+log OPCODEDIR
+
+B. Replace the last line "java processing.app.Base "$SKETCH" &" to the following:
+
+java -Djava.library.path=/usr/local/lib processing.app.Base "$SKETCH" &
+
+
+Thanks to Rory Walsh for this info.
+
+
+
+Running on Windows
+------------------
+
+There have been reports of Csoundo working on various versions of Windows. I do not have Windows installed. If you have better instructions, please email me, and I will incorporate them into the Csoundo knowledge base.
+
+1) Install Csound:
+
+http://csound.sourceforge.net/
+
+
+2) Copy the Csoundo folder into your Processing 'libraries' folder. See instructions at Processing.org:
+
+http://wiki.processing.org/w/How_to_Install_a_Contributed_Library
+
+
+3) Copy the csnd.jar here:
+
+yoursketchbook/libraries/csoundo/library
+
+
+
+Known Issues
+------------
+
+* Csound Doubles is not yet supported. To find out which version you are running, run csound, and about 5 lines down, you'll get a message like this: "Csound version 5.12 (float samples) Jun 4 2010"
+
+To track other issues, go here:
+
+http://github.com/jacobjoaquin/Csoundo/issues
+
+
+
+
+
+
+
@@ -1,3 +1,10 @@
+/*
+ * Demonstrates writing data to a csound channel (chn) bus then reading
+ * back the data. Move the mouse pointer around the screen.
+ *
+ * Example by Jacob Joaquin
+ */
+
import csoundo.*;
Csoundo cs;
@@ -7,18 +14,18 @@ void setup() {
frameRate(30);
smooth();
- cs = new Csoundo(this, sketchPath("data/synth.csd"));
+ cs = new Csoundo(this, "data/synth.csd");
cs.run();
}
void draw() {
background(0);
- /* Send mouse position to Csound chn busses */
+ // Send mouse position to Csound chn busses
cs.setChn("mouse_x", mouseX / (float) width);
cs.setChn("mouse_y", (1 - (mouseY / (float) height)));
- /* Read chn busses */
+ // Read chn busses
float mx = cs.getChn("mouse_x");
float my = cs.getChn("mouse_y");
@@ -1,6 +1,6 @@
<CsoundSynthesizer>
<CsOptions>
--d -odac /Users/clu/Documents/workspace/Csoundo/examples/chnInOut/temp.csd
+-g -odac /Users/clu/Documents/workspace/Csoundo/examples/chnInOut/temp.csd
</CsOptions>
<CsInstruments>
sr = 44100
@@ -1,37 +1,24 @@
<CsoundSynthesizer>
<CsInstruments>
sr = 44100
-kr = 1470
-ksmps = 30
+kr = 4410
+ksmps = 10
nchnls = 1
0dbfs = 1
-gi_sin ftgen 1, 0, 8192, 10, 1
+chn_k "elapsed", 1
-chn_k "amp", 1
-
-chnset 0.5, "amp"
+chnset 0, "elapsed"
instr 1
- ; Keep Csound running
-endin
-
-instr 2
- idur = p3
- iamp = p4
- ifreq = p5
+ k1 chnget "elapsed"
+ chnset k1 + 1, "elapsed"
- k2 chnget "amp"
-
- k1 line iamp, idur, 0
- a1 oscil k1 * k2, ifreq, gi_sin
-
- out a1
endin
</CsInstruments>
<CsScore>
i 1 0 [60 * 60 * 24]
-i 2 0 4 0.5 262
+
</CsScore>
</CsoundSynthesizer>
@@ -1,30 +1,21 @@
-import csoundo.*;
+/*
+ * Developer scratch pad. This isn't an example, just a place to try things.
+ */
+
+ import csoundo.*;
Csoundo cs;
void setup() {
size(720, 480);
- frameRate(30);
- smooth();
+ noLoop();
cs = new Csoundo(this, "data/synth.csd");
cs.run();
- println("perf status: " + cs.getPerfStatus());
- cs.tableSet(1, 2048, -1.0);
}
void draw() {
background(0);
- noStroke();
- fill(random(255));
- ellipseMode(RADIUS);
- ellipse(width / 2, height / 2, 50, 50);
-
- cs.kLock();
- if (frameCount % 30 == 0) {
- cs.event("i 2 0 0.3 0.5 440");
- cs.event("i 2 0.1 0.3 0.5 880");
- }
- cs.kUnlock();
-
+ println(cs.get0dBFS());
+ println(cs.getOptions());
}
@@ -1,41 +1,28 @@
<CsoundSynthesizer>
<CsOptions>
--d -odac /Users/clu/Documents/workspace/Csoundo/examples/devScratchPad/temp.csd
+-g -odac /Users/clu/Documents/workspace/Csoundo/examples/devScratchPad/temp.csd
</CsOptions>
<CsInstruments>
sr = 44100
-kr = 1470
-ksmps = 30
+kr = 4410
+ksmps = 10
nchnls = 1
0dbfs = 1
-gi_sin ftgen 1, 0, 8192, 10, 1
+chn_k "elapsed", 1
-chn_k "amp", 1
-
-chnset 0.5, "amp"
+chnset 0, "elapsed"
instr 1
- ; Keep Csound running
-endin
-
-instr 2
- idur = p3
- iamp = p4
- ifreq = p5
+ k1 chnget "elapsed"
+ chnset k1 + 1, "elapsed"
- k2 chnget "amp"
-
- k1 line iamp, idur, 0
- a1 oscil k1 * k2, ifreq, gi_sin
-
- out a1
endin
</CsInstruments>
<CsScore>
i 1 0 [60 * 60 * 24]
-i 2 0 4 0.5 262
+
</CsScore>
</CsoundSynthesizer>
@@ -1,3 +1,14 @@
+/*
+ * Demonstrates reading values from an f-table and how to format f-tables
+ * into nice looking graphics. Perfect for the class room, papers and blogs.
+ *
+ * This example can be modified to output scalable vector graphics (SVG)
+ * to use in programs such as illustrator. See the PDF Library for details.
+ *
+ * Example by Jacob Joaquin
+ */
+
+
import csoundo.*;
Csoundo cs;
@@ -7,7 +18,7 @@ void setup() {
smooth();
noLoop();
- cs = new Csoundo(this, sketchPath("data/synth.csd"));
+ cs = new Csoundo(this, "data/synth.csd");
cs.run();
}
@@ -1,6 +1,6 @@
<CsoundSynthesizer>
<CsOptions>
--d -odac /Users/clu/Documents/workspace/Csoundo/examples/drawTables/temp.csd
+-g -odac /Users/clu/Documents/workspace/Csoundo/examples/drawTables/temp.csd
</CsOptions>
<CsInstruments>
sr = 44100
@@ -1,3 +1,10 @@
+/*
+ * Create i-events using the cs.event() method. For example:
+ * cs.event("i 2 0 0.25 0.4 880");
+ *
+ * Example by Jacob Joaquin
+ */
+
import csoundo.*;
Csoundo cs;
@@ -10,7 +17,7 @@ void setup() {
background(0);
noStroke();
- cs = new Csoundo(this, sketchPath("data/synth.csd"));
+ cs = new Csoundo(this, "data/synth.csd");
cs.run();
}
View
@@ -1,6 +1,6 @@
<CsoundSynthesizer>
<CsOptions>
--d -odac /Users/clu/Documents/workspace/Csoundo/examples/events/temp.csd
+-g -odac /Users/clu/Documents/workspace/Csoundo/examples/events/temp.csd
</CsOptions>
<CsInstruments>
sr = 44100
@@ -1,4 +1,10 @@
-import csoundo.*;
+/*
+ * Something between a lava lamp and a wind chime.
+ *
+ * Example by Jacob Joaquin
+ */
+
+ import csoundo.*;
Net net;
Csoundo cs;
@@ -25,7 +31,7 @@ void setup() {
net = new Net(N_NODES, MIN_NODE_SIZE, MAX_NODE_SIZE);
if (IS_SOUND_ON) {
- cs = new Csoundo(this, sketchPath("data/synth.csd"));
+ cs = new Csoundo(this, "data/synth.csd");
cs.run();
}
}
Oops, something went wrong.

0 comments on commit 2227ad2

Please sign in to comment.