The CREATE Signal Library (CSL) Project Home Page
Late-breaking news
(Oct, 2009) CSL 5.1 now also on Linux
The SVN repository now has working projects for Mac OSX 10.6, MS-Windows XP/Vista, and Ubuntu Linux 9.04.
System Requirements
- MacOS X: OSX 10.5 or newer with Xcode 3
- Linux: Tested on Ubuntu 9.04 with X11-libs, ALSA, Freetype, pthreads, openGL/GLUT
- MS-windows: Tested on XP with DirectX 9, ASIO4All, ASIO SDK
- All: JUCE 1.50 (patched audio file IO)
(Oct, 2009) CSL 5.0g now on MS-Windows
We have a new VisualStudio project for CSL 5.0 that uses JUCE 1.50 to build on MS-Windows XP and Vista. It requires that JUCE and the DirectX9 SDKs be installed. Here's a screen shot of the CSL_JUCE 5.0 demo running (with audio) on XP.
(Oct, 2009) CSL Subversion Repository Available
To access the CSL subversion (svn) code repository at the Media Arts & Technology (MAT) servers at the University of California, Santa Barbara (UCSB), use any SVN client or shell terminal and enter the command,
svn co https://svn.mat.ucsb.edu/svn/CSL
to down-load the latest CSL source, doc, and Mac/Linux/Windows build projects to your machine.
You can also browse the whole file tree on-line as,
https://svn.mat.ucsb.edu/svn/CSL
See, e.g.,
https://svn.mat.ucsb.edu/svn/CSL/README
https://svn.mat.ucsb.edu/svn/CSL/CSL/Kernel/CSL_Core.h
https://svn.mat.ucsb.edu/svn/CSL/Doc/CSL_Overview.pdf
Note that the repository does not include the CSL Data directory or the patched JUCE library.
(Sept., 2009): CSL 5.0 (JUCE) Released
-
-
-
-
-
-
NEW: "The CSL Show" Screencasts
|
 |
The CREATE Signal Library (CSL)

The CREATE
Signal Library (CSL, pron. "sizzle") is a cross-platform
general-purpose software framework
for sound synthesis and digital audio signal processing. It is
implemented as a C++ class library to be used as a stand-alone
synthesis server, or embedded as a library into other programs.
CSL provides simple and reusable implementations of all common sound
synthesis and processing techniques, and includes support for a wide
variety of audio I/O interfaces such as PortAudio, RTAudio, JACK, VST,
CoreAudio and JUCE. As illistrated in the screen shots below, we
generally use JUCE for
graphical user interfaces to CSL programs.
In previous versions, it was complicated to install CSL because it used
a variety of 3rd-party APIs for sound playback (e.g., PortAudio), sound
file I/O (e.g., libSndFile), FFT (e.g., FFTW), and GUI-building (e.g.,
Qt). As of CSL 5.0, we have based the
system on JUCE (Jules' Utility Class Extensions, see here);
this means that frameworks for real-time sound I/O, sound file I/O, and
GUI construction are the same. Note that we use an extended version of
JUCE 1.50; see the download links below for our enhancements.
CSL Downloads
Documentation
Related Packages
Project Description
Introduction
The CREATE Signal Library (CSL) is a flexible,
portable, and scalable C++ software framework for sound synthesis and
digital signal processing. The following sections describe the basic
system requirements and present the current design and its
implementation, giving extensive code examples along the way. The
initial design of CSL dates back to 1998, but the current
(version 4.2) implementation was undertaken by students in the MAT 240D
Sound
Synthesis Techniques course at UCSB in the Spring of 2006. A simple C++
implementation of a sound synthesis framework (in less than 1000 lines)
was introduced at the start of the class, and during the quarter the
students added a large number of synthesis classes (refining the basic
framework significantly as they went). CSL is now an open source
project; the current source code and
documentation can be retrieved over the Internet from
http://FASTLabInc.com/CSL/.
What CSL is
CSL is a simple
yet powerful library of sound synthesis and signal processing
functions. It is packaged as an object-oriented class hierarchy for
standard DSP and computer music techniques, and is suitable for
integration into existing applications, or use as a stand-alone
synthesis/processing server. CSL is similar to the JSyn (Burke),
CommonLispMusic (Schottstaedt), STK (Cook), and
Cmix (Lansky) frameworks in that it is integrated as a library into a
general-purpose
programming language, rather than being a separate “sound compiler” as
in
the Music-N family of languages (Pope). CSL is designed from the ground
up to be used in distributed systems,
with several CSL programs running as servers on a local-area network.
These CSL DSP servers receive control commands via the network and send
their output sample blocks to other servers over the network.
CSL supports the following synthesis/interaction techniques
- Additive (sum-of-sines, vector synthesis or inverse FFT)
- Subtractive (filter-based)
- Non-linear (FM, wave-shaping, etc.)
- Sample-based synthesis, sample playback, sample-vector synthesis
- Granular synthesis (in several flavors)
- Chaotic systems (attractors)
- Physical models (Karplus-Strong, waveguides, etc.)
- Hybrid methods
- Virtual-analog (band-limited oscillators, ladder filters, etc.)
- Sound spatialization using any of several methods
(binaural HRTF, Ambisonics, Wavefield synthesis)
What CSL is not
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.
This flexibility means, however, that CSL can serve a number of
different purposes, from being used as a plug-in library for other
applications to serving
as the basis of synthesis servers for other front-end languages, such
as
MPEG4/SAOL.
CSL and JUCE
In the most recent version, CSL has been simplified to use the sound
and sound file I/O facilities of JUCE
(Jules' Utility Class Extensions). This means that fewer out-board
libraries and APIs need to be installed to start using CSL. Users can
still use other sound IO APIs (e.g., portAudio, RTAudio or
platform-native APIs) or sound-file APIs (e.g., libSoundFile), but the
JUCE-only version is simpler to install and get running. The only
3rd-party library needed for the CSL core is JUCE.
The CSL Core
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.
CSL Example
// 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();
Getting started using CSL
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.
CSL Demo GUI Menu
- Oscillator Tests
- Sweep test -- Test a sine wave with swept freq and volume swell
- Simple sines -- Test some simple sine oscilators
- Standard waveforms -- Demonstrate the standard wave forms
- Scaled sine -- Play a scaled sine wave
- Wavetable interpolation -- Show truncated/interpolated wave tables
- AM/FM sines -- Play an AM and FM sine wave
- Dump AM/FM sines -- Dump the graph of the AM/FM sine
- SumOfSines cached -- Play a sum-of-sines
- SumOfSines non-cached -- Play an uncached inharmonic sum-of-sines
- SumOfSines build -- Build up a harmonic series
- SumOfSines 1/f -- Play a 1/f spectrum sum-of-sines
- Wavetable from file -- Load a wave table frmo a sound file
- SHARC SOS -- Load/print the SHARC timbre database, play example
- Vector SHARC -- Show vector cross-fade of SHARC spectra
- Source Tests
- Noise tests -- Test noise generators
- Plucked string -- Waves of string arpeggii in stereo with reverb
- Mono Snd file player -- Test playing a sound file
- Stereo Snd file player -- Play a stereo sound file
- Snd file transpose -- Demonstrate transposing a sound file
- Snd file bank -- Play a large sample bank form sound files
- FM instrument -- Play the basic FM instrument
- Fancy FM instrument -- FM note with attack chiff and vibrato
- SumOfSines instrument -- Demonstrate the SumOfSines instrument
- Snd file instrument -- Test the sound file instrument
- IFFT synthesis -- Make a sound with IFFT synthesis
- Vector IFFT -- Vector synthesis with 2 IFFTs
- Soundfile granulation -- Sound file granulation example
- Envelope Tests
- Glissando test -- Demonstrate a glissando function
- Swell on aqmplitude -- Make an amplitude swell
- Frequency envelope -- Play a note with a frequency envelope
- AR sine -- Play an AR (attack/release) amplitude envelope
- AM/FM envelopes -- Test AM and FM envelopes
- ADSR 2 -- Play an ADSR (attack/decay/sustain/release)
- ADSR FM -- Dual-envelope FM example
- Rand Freq envelope -- Play a random-walk frequency envelope
- 50 Rand F/A envs -- Test 50 random frequency envelope players
- Fancy FM -- Play a fancy FM note
- Complex envelope -- Play a note with a complex amplitude envelope
- Many random SOS -- Layer many SumOfSines instruments with envelopes
- Effect Tests
- Clipper -- Demonstrate the signal clipper
- FIR filter -- Play an FIR band-pass filter
- All filters -- Test different filter types
- Filtered snd file -- Dynamic BPF on a voice track
- Dynamic filter -- Play a dynamic BP filter on noise
- Many dynamic filters -- Many dynamic filtered-noise instruments
- Reverb -- Show mono reverb on impulses
- Stereo-verb -- Listen to the stereo freeverb
- Multi-tap -- Play a multi-tap delay line
- Block up-sizer -- Test the block resizer on up-sizing
- Block down-sizer -- Test the block resizer on down-sizing
- Sample-avg filter -- Test the simple sample-averager filter
- Panner Tests
- Stereo panner -- Demonstrate the stero panner
- Mixer -- Mixer with 4 sine inputs (slow sum-of-sines)
- Panning mixer -- Play a panning stereo mixer
- Bigger panning mixer -- Test a mixer with many inputs
- Osc bank -- Mix a bank of oscillators
- HRTF horiz circles -- Test the HRTF-based binaural panner
- HRTF axial circles -- Play a HRTF-panner with axial circles
- HRTF median circles -- Play a HRTF-panner with median circles
- Ambisonics -- Test the Ambisonic-based spatial panner
- Control Tests
- Dump ports -- Dump list of MIDI ports to stdout
- Dump input -- Dump MIDI input cmds from MIDI kbd
- MIDI notes -- Play MIDI notes (reads MIDI kbd input)
- MIDI output -- Test sending MIDI output
- MIDI listener -- Start the MIDI listener object
- MIDI file player -- Play a MIDI file on an instrument library
- OSC client/server -- OSC client/server on a library
- OSC server -- Start OSC server on a library
- Audio Tests
- Dump audio ports -- Dump list of audio ports to stdout
- Echo audio in -- Play the microphone in
- Audio echo -- Add echo to the live input
- Input panner -- Stereo panner on the live input
- Input listener -- Demonstrate recording input listener
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].