Reference#
- Engine
An
Engine
wraps a live csound process and provides a simple way to define instruments, schedule events, load soundfiles, etc., for realtime audio processing / synthesis. Any.csd
script can be adapted to be run using anEngine
.- Session
The
Session
class implements a high-level interface on top of a runningEngine
. Within aSession
it is possible to define instrument templates (Instr
), which can be scheduled at any order to construct complex processing chains (see the bus opcodes or using thechnget
/chnset
opcodes to communicate between instruments). Such instrument template provide other extra features, like named arguments, automatic gui generation, groups, etc.The same instrument templates can be reused for offline (non-real-time) rendering
- Instr
An
Instr
is an instrument template. It defines the csound code and its parameters and default values. A concrete csound instrument is created only when anInstr
is scheduled. The main difference with a csoundinstr
is that anInstr
can be scheduled at any level within the evaluation chain. Similar to plugins in a DAW,Instr
can be organized to build processing chains of any depth.- Synth
A
Synth
wraps an event scheduled within aSession
. It has methods for setting and automating/modulating parameters, querying audio inputs and outputs and can auto-generate a user-interface to interact with its parameters in real-time.
- Offline Rendering
Both an
Engine
and its associatedSession
are concieved to run in real-time. For offline rendering csoundengine provides theRenderer
class, which has the same interface as aSession
but collects all scheduled events, soundfiles, automation, etc. and renders everything offline (and probably much faster). ARenderer
is a drop-in replacement for aSession
. It can also be used to generate a csound project to be further edited and/or rendered by the csound executable. See Offline Rendering