 |
All examples are tested on Csound 5.10 on Mac OSX and Windows XP.
A minimum screen size of 1024 x 768 is recommended.
If you have problems running any of the examples please check the following:
Some examples require the use of a sound file or analysis file in addition to the Csound .csd file.
Download the required files and place them in your defined SSDIR, SADIR or present working directory.
Some examples include the option of using a MIDI input and include the -M flag within the CsOptions part of the .csd.
If your computer has no MIDI device the file will not run.
Either delete the -M flag and lose the MIDI functionality or use the virtual MIDI device by including the flags -M0 -+rtmidi=virtual.
If you are still not able to run examples please email me.
11th June, 2009. Added 1 new example.
5th June, 2009. Added 4 new examples.
4th June, 2009. Added 9 new examples.
8th March, 2009. Added 32 new examples.
The entire catalogue of 221 example .csd files can be downloaded here:
CsoundRealtimeExamples.zip
Sound files, analysis files etc. can be downloaded here:
SourceMaterials.zip
Individual examples are as follows:
- 3D Audio
- Additive Synthesis
- Convolution
-
new! pconvolve.csd
- a demonstration of the 'pconvolve' opcode.
Convolution between an audio signal and a short impulse sound file stored on the hard drive.
Ideally suited to real-time convolution. Uses the sound files
StairwellL.wav,
StairwellR.wav,
dishL.wav and
dishR.wav.
-
new! convolve.csd
- a demonstration of the 'convolve' opcode.
Convolution between an audio signal and an impulse file created beforehand using csound's cvanal utility.
Uses the cvanal files
StairwellL.wav,
StairwellR.wav,
dishL.cv and
dishR.cv.
-
new! dconv.csd
- a demonstration of the 'dconv' opcode.
Direct convolution between an audio signal and an impulse sound file loaded into a function table.
Uses the sound files
Wood.wav and
Mug.wav.
- Delays - effects involving digital delays
- Distortion Effects
- FFT
- Filters
-
areson.csd
- Demonstration of the areson band reject filter opcode. Uses the sound file
Seashore.wav.
-
atone.csd
- Demonstration of the atone high pass filter opcode. Uses the sound file
Seashore.wav.
-
atonex.csd
- Demonstration of the atonex high pass filter filter opcode. Uses the sound file
Seashore.wav.
-
bqrez.csd
- Demonstration of the bqrez multi-mode filter opcode. Uses the sound file
Seashore.wav.
-
butterbp.csd
- Demonstration of the butterbp band pass filter opcode. Uses the sound file
Seashore.wav.
-
butterbr.csd
- Demonstration of the butterbr band reject filter opcode. Uses the sound file
Seashore.wav.
-
butterhp.csd
- Demonstration of the butterhp high pass filter opcode. Uses the sound file
Seashore.wav.
-
butterlp.csd
- Demonstration of the butterlp low pass filter opcode. Uses the sound file
Seashore.wav.
-
clfilt.csd
- Demonstration of the clfilt multi-mode filter opcode. Uses the sound file
Seashore.wav.
-
lowpass2.csd
- Demonstration of the lowpass2 low pass filter opcode. Uses the sound file
Seashore.wav.
-
lowres.csd
- Demonstration of the lowres low pass filter opcode. Uses the sound file
Seashore.wav.
-
lowresx.csd
- Demonstration of the lowresx low pass filter opcode. Uses the sound file
Seashore.wav.
-
lpf18.csd
- Demonstration of the lpf18 low pass filter opcode.
-
moogladder.csd
- Demonstration of the moogladder low pass filter opcode.
-
moogvcf.csd
- Demonstration of the moogvcf low pass filter opcode.
-
reson.csd
- Demonstration of the reson band pass filter opcode. Uses the sound file
Seashore.wav.
-
tbvcf.csd
- Demonstration of the tbvcf low pass filter opcode.
-
tone.csd
- Demonstration of the tone low pass filter opcode. Uses the sound file
Seashore.wav.
-
tonex.csd
- Demonstration of the tonex low pass filter opcode. Uses the sound file
Seashore.wav.
-
vlowres.csd
- Demonstration of the vlowres lowpass filter opcode. Uses the sound file
Seashore.wav.
-
pareq.csd
- Demonstration of the pareq parametric equalization opcode. Uses the sound file
Seashore.wav.
-
statevar.csd
- Demonstration of the statevar filter opcode which provides a digital emulation of an analogue state-variable filter. Uses the sound file
Seashore.wav.
-
FormantFilter.csd
- 5 reson filters are used to create a filtering effect that imitates the filtering effect of the human mouth expressing a range of vowel sounds.
Uses the sound file
Seashore.wav.
-
hilbert.csd
- Demonstration of the hilbert filter opcode, used to implement frequency shifting.
Uses the sound files
anditsall.wav,
loop.wav and
songpan.wav.
-
rbjeq.csd
- Demonstration of the rbjeq multi-mode filter opcode.
Uses the sound file
Seashore.wav.
-
reson_resonr_resonz.csd
- Demonstration and comparison of the opcodes reson, resonr and resonz.
Uses the sound file
Seashore.wav.
-
resony.csd
- Demonstration of the resony filter opcode, which implements a stack of second order band-pass filters.
Uses the sound file
Seashore.wav.
-
rezzy.csd
- Demonstration of the rezzy filter opcode, an implementation of a resonant low or high-pass filter.
Uses the sound file
Seashore.wav.
-
svfilter.csd
- Demonstration of the svfilter filter opcode, a 2nd order resonant filter that simultaneously creates low-pass high-pass and band-pass outputs.
Uses the sound file
Seashore.wav.
- FLTK
- Frequency Modulation (FM) Synthesis, Phase Modulation (PM) Synthesis, Ring Modulation and Amplitude Modulation
- Granular Synthesis
- Live Audio Input and Processing
-
01ins.csd
- Introduction of the ins opcode used to read the computer's live audio input.
-
02meters.csd
- Adds amplitude meters, amplitude value readouts, independent channel gain controls and independent channel panning controls to the previous example.
-
03follow2gate.csd
- Uses the follow2 opcode to implement a simple amplitude gating effect.
-
follow2.csd
- Uses the follow2 opcode to implement envelope following filter effect using also the moogladder resonant low pass filter. Uses either the live input or the sound file
loop.wav.
-
pitch.csd
- Demonstration of the pitch opcode which is used for pitch and amplitude following.
-
updated! pitchamdf.csd
- Demonstration of the pitchamdf opcode which is used for pitch and amplitude following.
-
MIDIKeyboardControlledPitchShifter.csd
- A live input pitch shifter effect which dynamically adds transposing voices depending upon notes played on a connected MIDI keyboard.
- Live Sampling
-
TableRecBasic.csd
- This example records live audio to a function table which can then be played back either once or as a loop.
Playback speed can be modulated as can the start and end points.
-
MultiTableRec.csd
- Six independent function tables can be recorded to and played back from with speed control.
-
DynamicTriggeredRecord.csd
- Recording is automatically triggered whenever the dynamics of the input signal crosses a defined threshold.
Recording stops when the dynamics drops below another threshold.
Playback can be automatic once recording has completed as can the record ready function.
-
DiskRecAndPlayback.csd
- Recording and playback from disk. This method is suited to situations where recording of long pieces of audio is required.
-
sndloop.csd
- Demonstration of the sndloop opcode, that allows quick recording and looped playback of live sampled audio.
This example implements MIDI modulation of playback speed.
- MIDI Input and MIDI Synthesizer Designs
-
01MIDIInstrActivate.csd
- Basic demonstration of Csound instrument activation via MIDI.
-
02MIDIReadPitchAndVelocity.csd
- Demonstration of reading pitch and key velocity into a Csound instrument from a MIDI keyboard using the cpsmidi and ampmidi opcodes.
-
03MIDILinsegrEnvelope.csd
- Demonstration of how to design an envelope with a MIDI controlled release stage using the linsegr opcode.
-
04MIDIController.csd
- Demonstration of how to read data from a MIDI continuous controller using the ctrl7 opcode.
-
05MIDIControllerInitialisation.csd
- Demonstration of how to give a MIDI controller derived variable in Csound an initial value.
-
06MIDIOneControllerTwoOutputs.csd
- Multiple instances of ctrl7 creates two independent variables in Csound.
-
07MIDIRescaledController.csd
- A MIDI controller's output is rescaled within a Csound to produce a non-linear response to fader movement.
-
08MIDIPitchBend.csd
- Demonstration of how to read MIDI pitch bend information into Csound using the pchbend opcode and implement it as pitch bend in a Csound synthesizer.
-
09PitchBendDiskin1.csd
- Pitch bend is implemented in the playback of a sound file using diskin. Uses the sound files
808loopMono.wav.
and
AndItsAll.wav.
-
10PitchBendDiskin2.csd
- Another method of using pitch bend in the playback of a sound file using diskin. Uses the sound files
808loopMono.wav.
and
AndItsAll.wav.
-
11cpstmid.csd
- Demonstration of the cpstmid opcode which allows the user to define alternative tuning systems triggerable via MIDI.
-
BasicMonophonicSynth.csd
- Demonstration of how to design a basic monophonic MIDI controlled synthesizer with portamento and legato and non-legato envelopes.
-
MonophonicSynth.csd
- A more elaborate monophonic MIDI controlled synthesizer with a multi-mode oscillator, filter, pitch and amplitude envelopes, an LFO and a ping-pong delay.
-
PolyphonicSynth.csd
- A polyphonic version of the above synthesizer.
-
LiveQuantize.csd
- A demonstration of how to quantize an incoming MIDI stream in realtime along with a sounding metronome.
-
MIDITapTempo.csd
- Note taps on a MIDI keyboard are interpretted as a tempo and applied to a delay effect.
-
MonoOverlaps.csd
- Demonstration how to design a monophonic MIDI instrument that allows note releases to overlap with the next note.
This could be used to prevent clicks. This technique could be equally applicable to non-MIDI instruments when using realtime score generation.
- Miscellaneous
-
fout.csd
- Demonstration of how to use the fout opcode to simultaneously monitor and record the output of a realtime Csound session.
-
waveset.csd
- Demonstration of the waveset opcode which performs timestretching on streaming audio signals by repeating wavelets. Uses the sound files
808loopmono.wav.
and
AndItsAll.wav.
-
DistanceEmulator.csd
- An FLTK slider controls multiple parameters to create a more complexing morphing of the sound. This example emulates a sound receding into the distance. Uses the sound file
Songpan.wav.
-
date_dates.csd
- Opcodes that output the date since 1st January, 1970.
-
timeinsts.csd
- An opcode that reports the time elapsed since an instrument was called.
-
rtclock.csd
- An opcode that reports the time elapsed since the beginning of the current Csound performance.
-
ftsave_ftload.csd
- FLTK slider data is stored to function tables and also as a file on disk using the 'ftsave' and 'ftload' opcodes.
This presents an alternative and possibly more powerful method of storing FLTK presets.
-
pan2.csd
- Demonstration of the 'pan2' opcode.
-
DbToAmp.csd
- Conversion between 'amplitude' and 'decibel' formats for sound intensity.
The user can observe and investigate both the numerical and the acoustical relationship between the two formats.
-
Theremin.csd
- An FLTK 'theremin'.
-
risset_rhythms.csd
- A demonstration of the effect called 'Risset Rhythms'. Uses the sound files
808loopMono.wav,
loop.wav,
MFEM.wav and
sine.wav.
-
limit_mirror_wrap.csd
- Demonstration of the opcodes 'limit', 'mirror' and 'wrap',
useful in dealing with variables going beyond user defined maxima and minima in a variety of ways.
- Physical Models
-
bamboo.csd
- Demonstration of the bamboo opcode. A physical model of a bamboo shaker.
-
dripwater.csd
- Demonstration of the dripwater opcode. A physical model of a drip of water.
-
guiro.csd
- Demonstration of the guiro opcode. A physical model of a guiro.
-
sekere.csd
- Demonstration of the sekere opcode. A physical model of a sekere shaker.
-
sleighbells.csd
- Demonstration of the sleighbells opcode. A physical model of a sleighbells instrument.
-
tambourine.csd
- Demonstration of the tambourine opcode. A physical model of a tambourine.
-
wgbow.csd
- Demonstration of the wgbow opcode. A physical model of a bowed string.
-
wgbowedbar.csd
- Demonstration of the wgbowedbar opcode. A physical model of a bowed bar.
-
wgclar.csd
- Demonstration of the wgclar opcode. A physical model of a clarinet.
-
wgflute.csd
- Demonstration of the wgflute opcode. A physical model of a flute.
-
wgpluck2.csd
- Demonstration of the wgpluck2 opcode. A physical model of a plucked string using the Karpluss-Strong algorithm.
-
pluck.csd
- Demonstration of the pluck opcode. A physical model of a plucked string using the Karpluss-Strong algorithm.
-
PrePiano.csd
- A physical model of a 'Cagian' prepared piano. Original model written by Stefan Bilbao.
-
barmodel.csd
- A physical model of a struck metal bar. Original model written by Stefan Bilbao.
-
cabasa.csd
- A physical model of a cabasa.
-
crunch.csd
- A physical model of a crunch sound.
-
gogobel.csd
- A physical model of an agogobel sound. Uses the sound files
marmstk1.wav and
bounce.wav.
-
mandol.csd
- A physical model of a mandolin sound. Uses the sound file
mandpluk.aiff.
-
marimba.csd
- A physical model of a marimba sound. Uses the sound files
marmstk1.wav and
Songpan.wav.
-
moog.csd
- A physical model of a Moog synthesizer tone. Uses the sound files
impuls20.aiff and
mandpluk.aiff.
-
repluck.csd
- A physical model of a plucked string using the Karpluss-Strong algorithm. Uses the sound file
Songpan.wav.
-
sandpaper.csd
- A physical model of the sound of rubbed sandpaper.
-
shaker.csd
- A physical model of a shaker sound.
-
stix.csd
- A physical model of the sound of sticks being struck.
-
vibes.csd
- A physical model of a vibraphone sound. Uses the sound files
marmstk1.wav and
Songpan.wav.
-
wgbrass.csd
- A physical model of the sound of a brass instrument.
-
wgpluck.csd
- A physical model of a plucked string using the Karpluss-Strong algorithm. Uses the sound file
Songpan.wav.
- Realtime Score Generation
-
SimpleSchedkwhenNoteGenerator.csd
- Demonstration of the schedkwhen opcode which, in this example, is used to generate streams of algorithmically defined note events which are fed to another instrument within Csound.
-
DrunkWalk.csd
- Demonstration of the 'Drunk Walk'. A popular method of data generation in algorithmic composition.
-
timedseq.zip
- Demonstration of how to play back stored sequences of notes using the 'timedseq' opcode.
-
SimpleDrumSequencer.csd
- A simple loop drum sequencer.
-
DrumSequencerVariableLength.csd
- A looping drum sequencer with loops of different, metrically related, length.
-
NoteClusters.csd
- Generates aleatoric clusters of notes. The number of notes in each cluster can be defined by the user in realtime.
This example also serves to demonstrate looping constructions in Csound code.
- Reverbs
- Sound Generators
-
buzz.csd
- Demonstration of the buzz opcode.
-
gbuzz.csd
- Demonstration of the gbuzz opcode.
-
vco.csd
- Demonstration of the vco opcode.
-
vco_with_PWM_LFO_and_LPF.csd
- Demonstration of the vco opcode with the addition of a pulse width modulation LFO and a moogvcf resonant low pass filter.
-
WhiteNoisePinkNoise.csd
- Demonstration of the noise and pinkish opcodes, using to generate white and pink noise respectively.
-
hsboscil.csd
- Demonstration of the hsboscil opcode, an oscillator which takes tonality and brightness as arguments.
Includes an implementation of the Risset Glissando (Shepard Tones).
-
pdhalf.csd
- Demonstration of the opcodes pdhalf and pdhalfy, used to implement phase distortion synthesis, a method of synthesis used by Casio in their CZ range of synthesizers in the late 1980s.
- Sound File Playback
-
flooper2.csd
- Demonstration of the flooper2 looping sound file playback opcode. Uses the sound files
AndItsAll.wav
and
808loop.wav.
-
loscil_loscil3.csd
- Demonstration of the loscil and loscil3 opcodes - Csound's sampling building blocks. Both opcodes include sustain and release loops. Uses the sound files
808loopMono.wav.
and
AndItsAll.wav.
-
table_tablei_table3.csd
- Demonstration of the table, tablei and table3 opcodes, used to read stored samples. These opcodes are slightly more awkward to use than loscil but utimately offer greater flexibility. Loop start and end points are modifiable in realtime. Uses the sound files
808loopMono.wav.
and
AndItsAll.wav.
-
bbcut.csd
- Demonstration of the bbcut opcode which performs break beat style cut-ups on an audio stream or drum loop. Uses the sound file
loop.wav.
-
lposcilsa.csd
- Demonstration of the lposcilsa opcode, used to play back a sound file stored in a function table with looping.
The loop points are variable at k-rate. Uses the sound file
Songpan.wav.
- Specialized Filters
- Waveguides
-
streson.csd
- Demonstration of the streson opcode which filters an audio stream through a string resonator model. Uses the sound file
Seashore.wav
-
wguide1.csd
- Demonstration of the wguide1 opcode which filters an audio stream through a simple delay and lowpass filter algorithm. Similar to streson and the effect of comb filtering. Uses the sound file
Seashore.wav
All additional required materials (sound files, analysis files etc.): SourceMaterials.zip
Last update 11th June, 2009
Please report errors and comments to i_mccurdy@hotmail.com