include/plugin.h and provides a comprehensive C++ interface for opcode development.
Core classes
Plugin base classes
The framework provides template base classes for different opcode configurations.Plugin (N outputs, M inputs)
For opcodes with N outputs and M inputs (N > 0):include/plugin.h
out_count(): Returns number of output arguments (for variable output count)in_count(): Returns number of input arguments (for variable input count)kr(): Local control rateksmps(): Local ksmps valuesr(): Sampling rateis_init(): Check if opcode runs at init timeis_perf(): Check if opcode runs at perf time
midi_channel(): MIDI channel numbermidi_note_num(): MIDI note numbermidi_note_vel(): MIDI velocitymidi_chn_aftertouch(): Channel aftertouchmidi_chn_polytouch(note): Poly aftertouch for notemidi_chn_ctl(ctl): Controller valuemidi_chn_pitchbend(): Pitch bend value
InPlug (N inputs)
For opcodes with 0 outputs or multiple/variable outputs:include/plugin.h
Plugin<N, M>.
FPlugin (N outputs, M inputs)
For spectral (fsig) processing opcodes:include/plugin.h
Parameter access
TheParam<N> template provides access to opcode arguments:
include/plugin.h
Container classes
AudioSig
Wraps an audio signal with sample-accurate offset handling:include/plugin.h
Vector (template)
One-dimensional array container:include/plugin.h
Fsig
Phase vocoder frame data:include/plugin.h
Table
Function table container:include/plugin.h
AuxMem (template)
Dynamic memory allocation using Csound’s allocator:include/plugin.h
Csound engine interface
TheCsound class provides access to the Csound engine:
include/plugin.h
Registration functions
Opcodes are registered using template functions:include/plugin.h
name: Opcode nameoargs: Output argument types (e.g., “k”, “a”, “k[]”, “f”)iargs: Input argument types (e.g., “ki”, “kk”, “i[]”, “m”)thr: Thread type (csnd::thread::i,ik,k,a,ia)flags: Optional flagsdeprec: Deprecation flag
i: i-rate (init-time) scalark: k-rate (control-rate) scalara: a-rate (audio-rate) signalS: Stringf: f-sig (spectral data)[]: Array (e.g.,k[],i[])m: Variable argumentsO: Optional argumento: Output argumentp: p-field
Constants and types
include/plugin.h