Syntax of the Orchestra
Nomenclature
Throughout this document, opcodes are indicated in boldface and their argument and result mnemonics, when mentioned in the text, are given in italics. Argument names are generally mnemonic (amp, phs), and the result is usually denoted by the letter r. Both are preceded by a type qualifier i, k, a, or x (e.g. kamp, iphs, ar). The prefix i denotes scalar values valid at note init time; prefixes k or a denote control (scalar) and audio (vector) values, modified and referenced continuously throughout performance (i.e. at every control period while the instrument is active). Arguments are used at the prefix-listed times; results are created at their listed times, then remain available for use as inputs elsewhere. With few exceptions, argument rates may not exceed the rate of the result. The validity of inputs is defined by the following:
- arguments with prefix i must be valid at init time;
- arguments with prefix k can be either control or init values (which remain valid);
- arguments with prefix a must be vector inputs;
- arguments with prefix x may be either vector or scalar (the compiler will distinguish).
All arguments, unless otherwise stated, can be expressions whose results conform to the above. Most opcodes (such as linen and oscil) can be used in more than one mode, which one being determined by the prefix of the result symbol.
In the Csound orchestra, statements fall into twelve major categores, consisting of sixty-five sub-categories. The categories are as follows:
Orchestra Syntax
- Orchestra Header Statements
- Instrument Block Statements
- Variable Initialization
Instrument Control
- Instrument Invocation
- Duration Control
- Realtime Performance Control
- Time Reading
- Clock Control
- Sensing and Control
- Conditional Values
- Macros
- Program Flow Control
- Reinitialization
Mathematical Operations
- Arithmetic and Logic Operations
- Mathematical Functions
- Trigonometric Functions
- Amplitude Functions
- Random Functions
- Opcode Equivalents of Functions
Pitch Converters
MIDI Support
- Converters
- Controller Input
- Slider Banks
- Generic I/O
- Note-on/Note-off
- MIDI Message Output
- Realtime Messages
- MIDI Event Extenders
Signal Generators
- Linear and Exponential Generators
- Table Access
- Phasors
- Basic Oscillators
- Dynamic Spectrum Oscillators
- Additive Synthesis/Resynthesis
- FM Synthesis
- Sample Playback
- Granular Synthesis
- Waveguide Physical modeling
- Models and Emulations
- STFT Resynthesis (Vocoding)
- LPC Resynthesis
- Random (Noise) Generators
Function Table Control
- Tables Queries
- Table Selection
- Read/Write Operations
Signal Modifiers
- Standard Filters
- Specialized Filters
- Envelope Modifiers
- Amplitude Modifiers
- Signal Limiters
- Delay
- Reverberation
- Waveguides
- Special Effects
- Convolution and Morphing
- Panning and Spatialization
- Sample Level Operators
Zak Patch System
Operations Using Spectral Data Types
- Operations Using Spectral Data Types
Signal Input and Output
- Input
- Output
- File I/O
- Sound File Queries
- Printing and Display
Syntax of the Orchestra