C/C++ API
The Csound C API provides the core interface for embedding. All other language bindings are built on top of this.Basic workflow
The first parameter is optional host data (a pointer accessible in callbacks). The second parameter optionally overrides the opcode directory.
Complete example
Here’s a minimal C program that outputs audio to the default device:Setting options
Set Csound options before compilation:Audio I/O callbacks
For custom audio I/O, implement callbacks:MIDI callbacks
Custom MIDI input:Channel communication
Communicate with Csound instruments through channels:Score events
Send score events in real-time:Python binding
The Pythonctcsound module provides a Pythonic interface: