Csound API  6.01
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Csound API Documentation

Csound is a unit generator-based, user-programmable, user-extensible computer music system. It was originally written by Barry Vercoe at the Massachusetts Institute of Technology in 1984 as the first C language version of this type of software. Since then Csound has received numerous contributions from researchers, programmers, and musicians from around the world.

Outline of the API

The Csound Application Programming Interfaces

The Csound Application Programming Interface (API) reference is contained herein. The Csound API actually consists of several APIs:

Purposes

The purposes of the Csound API are as follows:

Users

Users of the Csound API fall into two main categories: hosts, and plugins.

An Example Using the Csound API

The Csound command–line program is itself built using the Csound API. Its code reads as follows:

* #include "csound.h"
*
* int main(int argc, char **argv)
* {
* // Create Csound.
* void *csound = csoundCreate(0);
* // One complete compile/perform cycle.
* int result = csoundCompile(csound, argc, argv);
* if(!result) {
* while(csoundPerformKsmps(csound) == 0){}
* csoundCleanup(csound);
* }
* // Destroy Csound.
* csoundDestroy(csound);
* return result;
* }
*

Everything that can be done using C as in the above examples can also be done in a similar manner in Python or any of the other Csound API languages.