![]() |

Documentation
- ICMC 2006 CSL 4.0 Metamodel Paper
- CSL Presentation Slides (good quick intro and examples)
- ICMC 2003 CSL 3 Paper (the best general reference to CSL)
- CSL "Manual" (obsolete but still useful)
- Doxygen on-line API manual for CSL 5
- Get API doc (tgz tarball of Doxygen HTML pages)
- CSL mailing list admin page
- For more examples of CSL applications, see here
Source/Data/Doc ZIP files
- CSL version 5.0 source ZIP file (5.0d: Sept. 16, 2009)
- CSL Doc (9 MB PDF & Doxygen files)
- CSL Test Data (99 MB snd files, HRTF data, etc.)
- CSL "old" code (somewhat stale or unsupported apps)
Support Libraries
- CSL 5.0 extensions to JUCE 1.50 (added methods for sound file I/O; un-tar this file in the base JUCE folder)
- CSL support libraries (PortAudio, PortMIDI, LibSndFile, FFTW, etc.) ZIP file with binaries for Intel/Mac (not needed for CSL 5.0)
Related Packages
- Chandrasekhar Ramakrishnan's Occam (OSC-to-MIDI)
- Garry Kling's Macco (MIDI-to-OSC)
- GestureSensor drivers: EBeam, FlockOfBirds, P5 Glove, DataGlove, Matrix, etc. (C++ for MS-Windows)
Project Description
CSL is not a music-specific programming language such as Music-N or
SuperCollider (McCartney); rather, CSL programs (i.e., CSL-based
servers) are written in C++ and compiled with the CSL library. CSL has
no graphical user interface (as in Max [Puckette] or Kyma [Scaletti]),
but it is expected that GUIs will be built that manipulate “patches”
and “scores” for CSL. CSL is not a music representation language such
as Smoke (Pope), rather it is a low-level synthesis and processing
engine. CSL has no scheduler, it simply responds to in-coming control
messages (received, e.g., via MIDI or OSC) as fast as it can. |
In contrast to the traditional MusicN stand-alone sound compiler, CSL is packaged as a class library in a general-purpose programming language (C++). The simplest CSL program is a 5-line main() function in a simple C program, and it is intended that CSL can be used in several ways, including for the development of stand-alone interactive (MIDIor OSC-driven) sound synthesis programs, serving as a plugin library for other applications or plug-in hosts, or as a back-end DSP library for programs written in scripting languages. CSL is designed from the ground up to be used in distributed systems, where networks of CSL programs run as servers on a local-area network, streaming control commands (MIDI and OSC) and sample buffers (RTP) between them.
// This is a simple FM test program -- paste this into a main() function
float frq = 440.0f; // float values for freq and dur
float dur = 0.2f;
JUCEIO theIO; // create a JUCE IO object
Sine car, mod(frq); // declare 2 oscillators: carrier and modulator
// amplitude env = std ADSR
ADSR a_env(dur, 0.1, 0.1, (dur - 0.6), 1);
// index env = time/value breakpoints
Envelope i_env(dur, 0, 0, 0.1, 2, 0.2, 1, 2.2, 8, dur, 0);
a_env.setScale(0.2); // make ampl envelope quieter
i_env.setScale(frq * 3.0f); // multiply index envelope by mod freq * 3 (index depth)
mod.setScale(i_env); // scale the modulator by its envelope
mod.setOffset(frq); // add in the base freq
car.setFrequency(mod); // set the carrier's frequency
car.setScale(a_env); // scale the carrier's output by the amplitude envelope
logMsg("CSL playing FM..."); // print a message and play
theIO.setRoot(car); // set the IO's root to be the FM carrier
theIO.open(); // open the IO
theIO.start(); // start the driver callbacks and it plays!
a_env.trigger(); // reset the envelopes to time 0
i_env.trigger();
sleepSec(dur + 0.25); // sleep for dur plus a bit
logMsg("CSL done.");
theIO.stop(); // stop the driver and close down
theIO.close();
We assume CSL users are proficient C++ programmers and know the native development environment of their platform.
Down-load and unpack JUCE V 1.50 and compile its base library.
Down-load and unpack CSL 5.0 and read the documentation. CSL assumes
it's installed in the folder ~/Code/CSL; there are some default
settings in CSL/Kernel/CSL_Types.h that have to be changed if you put
it somewhere else. The system assumes JUCE is in ~/Code/juce (../juce
from the root of the CSL hierarchy).
The best way to get started is to look at the Doxygen-generated API
documentation in
Doc/api_doc.tgz
You can untar this file to get the full HTML doc and to print out and
study the files
CSL/Kernel/CSL_Types.h (note the system
defaults here)
CSL/Kernel/CSL_Core.h (the
kernel classes are here)
and
CSL/Sources/SimpleSines.{h,cpp}
(this is a tutorial for writing unit generators)
To compile the sources, you may need to create the links in the
CSL/Includes folder; to do this, open a UNIX shell (AKA terminal) and
execute the commands,
### change to the Includes folder
cd ~/Code/CSL/CSL/Includes
### make symbolic links from
the include files to this folder
ln -s ../*/*.h .
ln -s ../Spatializers/*/*.h .
Now, you should be able to use the Mac XCode project in JUCE, the
premake script and makefile in Linux, or to build an Eclipse project on
Windows. The supplied VisualStudio projects are known to produce errors
because of CSL's non-Windows-compatible header and code.
Here's the JUCE demo GUI's Menu List
Simple sines
Standard waveforms
Scaled sine
Wavetable interpolation
AM/FM sines
Dump AM/FM sines
SumOfSines cached
SumOfSines non-cached
Wavetable from file
Sweep test
Noise tests
Plucked string
Mono Snd file player
Stereo Snd file player
Snd file transpose
FM instrument
Snd file instrument
Fancy FM instrument
IFFT synthesis
Vector IFFT
Glissando
Swell
Freq envelope
AR sine
AR sine 2
AM/FM envelopes
ADSR 2
ADSR FM
Rand Freq envelope
Envelope scaling
Fancy FM
Clipper
FIR filter
All filters
Dynamic filters
Reverb
Stereo-verb
Multi-tap
Stereo panner
N2M panner
Mixer
Panning mixer
Osc bank
CMap IO
HRTF horiz circles
HRTF axial circles
HRTF median circles
Ambisonics
VBAP
The source code for all these tests is in the CSL/Tests directory (and file group in the IDE); it's a good way to learn CSL to run the JUCE demo in an XCode/Eclipse debugger and set breakpoints in the test functions while using the GUI.
For more information, please contact Stephen Pope [stephen (at) FASTLabInc.com].