Features of CsoundAC

CsoundAC is a Python extension module for writing music by programming in Python. CsoundAC is based on Michael Gogins' concept of music graphs, in which a score is represented as hierarchical tree of nodes, which can contain notes, score generators, score transforms, and other nodes.

CsoundAC also provides a Python interface to the Csound API. This makes it very easy to use Csound to render CsoundAC compositions. Using Python's triple quotes, it is even possible to embed the formatted Csound orchestra code for a piece directly into the Python code for that piece, so that all programming for a composition can be maintained in a single file.

The coordinate system in CsoundAC is based on a Euclidean music space with dimensions {time, duration, event type, instrument number, pitch as MIDI key, loudness as MIDI velocity, phase, spatial X coordinate, spatial Y coordinate, spatial Z coordinate, pitch-class set, 1}. A point in music space can be a note, an inflection of a note, or even a grain of sound.

A music graph is a directed acyclical graph, or tree, of nodes in music space. These nodes are associated with local transformations of coordinate system. There are nodes for containing scores or fragments of scores, for generating scores, and for transforming scores. In addition, any node may contain child nodes that inherit the parent's coordinate system.

Thus, it is possible to compose a musical score by containing or generating notes in lower level nodes, assembling them into a score using higher level nodes, and finally rendering the score with Csound. The process is strictly analogous to the construction of a 3-dimensional scene in computer graphics by generating primitive objects such as spheres, cones, and cubes and moving them around in space to assemble a scene.

Some of the node classes included in CsoundAC are:

Finally, is is possible to derive a new Node class in Python from any existing Node, in order to create new score generators and transforms as part of the composing process.