Table of Contents
Preface
Preface to the Csound Manual
Acknowledgements
History of the Canonical Csound Reference Manual
Copyright Notice
Getting Started with Csound
What's new in Csound 5.08
I. Overview
Introduction
Recent Developments
Features of Csound 5
Features of CsoundAC
The Csound Command
Order of Precedence
Description of the command syntax
Csound command line
Command-line Flags (by Category)
Csound Environment Variables
Unified File Format for Orchestras and Scores
Description
Example
Command Line Parameter File (.csoundrc)
Score File Preprocessing
The Extract Feature
Independent Pre-Processing with Scsort
Using Csound
How Csound5 works
Amplitude values in Csound
Real-Time Audio
Realtime I/O on Linux
Windows
Mac
Optimizing Audio I/O Latency
Configuring
Syntax of the Orchestra
Orchestra Header Statements
Instrument and Opcode Block Statements
Ordinary Statements
Constants and Variables
Variable Initialization
Expressions
Directories and Files
Nomenclature
Macros
Named Instruments
User Defined Opcodes (UDO)
The Standard Numeric Score
Preprocessing of Standard Scores
Carry
Tempo
Sort
Score Statements
Next-P and Previous-P Symbols
Ramping
Score Macros
Multiple File Score
Evaluation of Expressions
Front Ends
CsoundAC
CsoundVST
TclCsound
The Tcl interpreter: cstclsh
Cswish: the windowing shell
A Csound server
A Scripting Environment
TclCsound as a language wrapper
TclCsound Command Reference
Building Csound
Csound Links
II. Opcodes Overview
Signal Generators
Additive Synthesis/Resynthesis
Basic Oscillators
Dynamic Spectrum Oscillators
FM Synthesis
Granular Synthesis
Hyper Vectorial Synthesis
Linear and Exponential Generators
Envelope Generators
Models and Emulations
Phasors
Random (Noise) Generators
Sample Playback
Soundfonts
Scanned Synthesis
Table Access
Wave Terrain Synthesis
Waveguide Physical Modeling
Signal Input and Output
File Input and Output
Signal Input
Signal Output
Software Bus
Printing and Display
Sound File Queries
Signal Modifiers
Amplitude Modifiers and Dynamic processing
Convolution and Morphing
Delay
Panning and Spatialization
Reverberation
Sample Level Operators
Signal Limiters
Special Effects
Standard Filters
Specialized Filters
Waveguides
Waveshaping and Phase Distortion
Instrument Control
Clock Control
Conditional Values
Duration Control Statements
FLTK Widgets and GUI controllers
FLTK Containers
FLTK Valuators
Other FLTK Widgets
Modifying FLTK Widget Appearance
General FLTK Widget-related Opcodes
Instrument Invocation
Program Flow Control
Real-time Performance Control
Initialization and Reinitialization
Sensing and Control
Stacks
Sub-instrument Control
Time Reading
Function Table Control
Table Queries
Read/Write Operations
Table Reading with Dynamic Selection
Mathematical Operations
Amplitude Converters
Arithmetic and Logic Operations
Comparators and Accumulators
Mathematical Functions
Opcode Equivalents of Functions
Random Functions
Trigonometric Functions
Pitch Converters
Functions
Tuning Opcodes
Real-time MIDI Support
Virtual MIDI Keyboard
MIDI input
MIDI Message Output
Generic Input and Output
Converters
Event Extenders
Note-on/Note-off Output
MIDI/Score Interoperability opcodes
System Realtime Messages
Slider Banks
Spectral Processing
Short-time Fourier Transform (STFT) Resynthesis
Linear Predictive Coding (LPC) Resynthesis
Non-standard Spectral Processing
Tools for Real-time Spectral Processing (pvs opcodes)
ATS Spectral Processing
Loris Opcodes
Strings
String Manipulation Opcodes
String Conversion Opcodes
Vectorial Opcodes
Tables of vectors operators
Operations Between a Vectorial and a Scalar Signal
Operations Between two Vectorial Signals
Vectorial Envelope Generators
Limiting and wrapping of vectorial control signals
Vectorial Control-rate Delay Paths
Vectorial Random Signal Generators
Zak Patch System
Plugin Hosting
DSSI and LADSPA for Csound
VST for Csound
OSC and Network
OSC
Network
Remote Opcodes
Mixer Opcodes
Python Opcodes
Introduction
Orchestra Syntax
Image processing opcodes
Miscellaneous opcodes
III. Reference
Orchestra Opcodes and Operators
!=
#define
#include
#undef
#ifdef
#ifndef
$NAME
%
&&
>
>=
<
<=
*
+
-
/
=
==
^
||
0dbfs
&
|
¬
#
A
a
abetarand
abexprnd
abs
acauchy
active
adsr
adsyn
adsynt
adsynt2
aexprand
aftouch
agauss
agogobel
alinrand
alpass
ampdb
ampdbfs
ampmidi
apcauchy
apoisson
apow
areson
aresonk
atone
tone
atonek
tonek
atonex
atrirand
ATSadd
ATSaddnz
ATSbufread
ATScross
ATSinfo
ATSinterpread
ATSbufread
ATSread
ATSreadnz
ATSpartialtap
ATSbufread
ATSsinnoi
aunirand
aweibull
B
babo
balance
bamboo
barmodel
bbcutm
bbcuts
betarand
bexprnd
bformenc
bformdec
binit
biquad
biquada
birnd
bqrez
butbp
butbr
buthp
butlp
butterbp
butterbr
butterhp
butterlp
button
buzz
C
cabasa
cauchy
ceil
cent
cggoto
chanctrl
changed
chani
chano
chebyshevpoly
checkbox
chn
chnclear
chnexport
chnget
chnmix
chnparams
chnset
cigoto
ckgoto
clear
clfilt
clip
clock
clockoff
clockon
cngoto
comb
compress
control
convle
convolve
cos
cosh
cosinv
cps2pch
cpsmidi
cpsmidib
cpsmidinn
cpsoct
cpspch
cpstmid
cpstun
cpstuni
cpsxpch
cpuprc
cross2
crunch
ctrl14
ctrl21
ctrl7
ctrlinit
cuserrnd
D
dam
date
dates
db
dbamp
dbfsamp
dcblock
dconv
delay
delay1
delayk
delayr
delayw
deltap
deltap3
deltapi
deltapn
deltapx
deltapxw
denorm
diff
diskgrain
diskin
diskin2
dispfft
display
distort
distort1
divz
downsamp
dripwater
dssiactivate
dssiaudio
dssictls
dssiinit
dssilist
dumpk
dumpk2
dumpk3
dumpk4
duserrnd
E
else
elseif
endif
endin
endop
envlpx
envlpxr
eqfil
event
event_i
exitnow
exp
expcurve
expon
exprand
expseg
expsega
expsegr
F
ficlose
filelen
filenchnls
filepeak
filesr
filter2
fin
fini
fink
fiopen
flanger
flashtxt
FLbox
FLbutBank
FLbutton
FLcloseButton
FLcolor
FLcolor2
FLcount
FLexecButton
FLgetsnap
FLgroup
FLgroupEnd
FLgroupEnd
FLhide
FLhvsBox
FLhvsBoxSetValue
FLjoy
FLkeyIn
FLknob
FLlabel
FLloadsnap
FLmouse
flooper
flooper2
floor
FLpack
FLpackEnd
FLpack_end
FLpanel
FLpanelEnd
FLpanel_end
FLprintk
FLprintk2
FLroller
FLrun
FLsavesnap
FLscroll
FLscrollEnd
FLscroll_end
FLsetAlign
FLsetBox
FLsetColor
FLsetColor2
FLsetFont
FLsetPosition
FLsetSize
FLsetsnap
FLsetSnapGroup
FLsetText
FLsetTextColor
FLsetTextSize
FLsetTextType
FLsetVal_i
FLsetVal
FLshow
FLslidBnk
FLslidBnk2
FLslidBnkGetHandle
FLslidBnkSet
FLslidBnkSetk
FLslidBnk2Set
FLslidBnk2Setk
FLslider
FLtabs
FLtabsEnd
FLtabs_end
FLtext
FLupdate
fluidAllOut
fluidCCi
fluidCCk
fluidControl
fluidEngine
fluidLoad
fluidNote
fluidOut
fluidProgramSelect
fluidSetInterpMethod
FLvalue
FLvkeybd
FLvslidBnk
FLvslidBnk2
FLxyin
fmb3
fmbell
fmmetal
fmpercfl
fmrhode
fmvoice
fmwurlie
fof
fof2
fofilter
fog
fold
follow
follow2
foscil
foscili
fout
fouti
foutir
foutk
fprintks
fprints
frac
freeverb
ftchnls
ftconv
ftfree
ftgen
ftgentmp
ftlen
ftload
ftloadk
ftlptim
ftmorf
ftsave
ftsavek
ftsr
G
gain
gainslider
gauss
gbuzz
getcfg
gogobel
goto
grain
grain2
grain3
granule
guiro
H
harmon
harmon2
hilbert
hrtfer
hrtfmove
hrtfmove2
hrtfstat
hsboscil
hvs1
hvs2
hvs3
I
i
ibetarand
ibexprnd
icauchy
ictrl14
ictrl21
ictrl7
iexprand
if
igauss
igoto
ihold
ilinrand
imagecreate
imagefree
imagegetpixel
imageload
imagesave
imagesetpixel
imagesize
imidic14
imidic21
imidic7
in
in32
inch
inh
init
initc14
initc21
initc7
ino
inq
inrg
ins
insremot
insglobal
instimek
instimes
instr
int
integ
interp
invalue
inx
inz
ioff
ion
iondur
iondur2
ioutat
ioutc
ioutc14
ioutpat
ioutpb
ioutpc
ipcauchy
ipoisson
ipow
is16b14
is32b14
islider16
islider32
islider64
islider8
itablecopy
itablegpw
itablemix
itablew
itrirand
iunirand
iweibull
J
jacktransport
jitter
jitter2
jspline
K
k
kbetarand
kbexprnd
kcauchy
kdump
kdump2
kdump3
kdump4
kexprand
kfilter2
kgauss
kgoto
klinrand
kon
koutat
koutc
koutc14
koutpat
koutpb
koutpc
kpcauchy
kpoisson
kpow
kr
kread
kread2
kread3
kread4
ksmps
ktableseg
ktrirand
kunirand
kweibull
L
lfo
limit
line
linen
linenr
lineto
linrand
linseg
linsegr
locsend
locsig
log
log10
logbtwo
logcurve
loop_ge
loop_gt
loop_le
loop_lt
loopseg
loopsegp
lorenz
lorisread
lorismorph
lorisplay
loscil
loscil3
loscilx
lowpass2
lowres
lowresx
lpf18
lpfreson
lphasor
lpinterp
lposcil
lposcil3
lposcila
lposcilsa
lposcilsa2
lpread
lpreson
lpshold
lpsholdp
lpslot
M
mac
maca
madsr
mandel
mandol
marimba
massign
max
maxabs
maxabsaccum
maxaccum
maxalloc
max_k
mclock
mdelay
metro
midic14
midic21
midic7
midichannelaftertouch
midichn
midicontrolchange
midictrl
mididefault
midiin
midinoteoff
midinoteoncps
midinoteonkey
midinoteonoct
midinoteonpch
midion
midion2
midiout
midipitchbend
midipolyaftertouch
midiprogramchange
miditempo
midremot
midglobal
min
minabs
minabsaccum
minaccum
mirror
MixerSetLevel
MixerGetLevel
MixerSend
MixerReceive
MixerClear
mode
monitor
moog
moogladder
moogvcf
moogvcf2
moscil
mpulse
mrtmsg
multitap
mute
mxadsr
N
nchnls
nestedap
nlfilt
noise
noteoff
noteon
noteondur
noteondur2
notnum
nreverb
nrpn
nsamp
nstrnum
ntrpol
O
octave
octcps
octmidi
octmidib
octmidinn
octpch
opcode
OSCsend
OSCinit
OSClisten
oscbnk
oscil
oscil1
oscil1i
oscil3
oscili
oscilikt
osciliktp
oscilikts
osciln
oscils
oscilx
out
out32
outc
outch
outh
outiat
outic
outic14
outipat
outipb
outipc
outkat
outkc
outkc14
outkpat
outkpb
outkpc
outo
outq
outq1
outq2
outq3
outq4
outrg
outs
outs1
outs2
outvalue
outx
outz
P
p
pan
pan2
pareq
partials
partikkel
partikkelsync
pcauchy
pchbend
pchmidi
pchmidib
pchmidinn
pchoct
pconvolve
pcount
pdclip
pdhalf
pdhalfy
peak
peakk
pgmassign
phaser1
phaser2
phasor
phasorbnk
pindex
pinkish
pitch
pitchamdf
planet
pluck
poisson
polyaft
polynomial
pop
pop_f
port
portk
poscil
poscil3
pow
powershape
powoftwo
prealloc
prepiano
print
printf
printk
printk2
printks