Reference

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 an Engine.

Session

The Session class implements a high-level interface on top of a running Engine. Within a Session it is possible to define instrument templates (Instr), which can be scheduled at any order to construct complex processing chains using buses or using the chnget/chnset opcodes to communicate between instruments

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 an Instr is scheduled. The main difference with a csound instr is that an Instr 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. They can also be used for offline (non-real-time) rendering

Synth

A Synth wraps an event scheduled within a Session. 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 associated Session are concieved to run in real-time. For offline rendering csoundengine provides for each an offline version, OfflineEngine and OfflineSession. These have the same interface as their real-time counterparts, but render everything offline to a soundfile (and probably much faster). They can also be used to generate a csound project (a .csd file plus needed assets) to be further edited and/or rendered by the csound executable. See Offline Rendering