Csound Csound-dev Csound-tekno Search About

Algorithmic composition with csound

Date1999-08-19 13:02
FromPeter Neubacker
SubjectAlgorithmic composition with csound
Hi all,

I was thinking about algorithmic composition within csound,
i.e. not generating a score file that represents the composition
but having a composer instrument in the orchestra that generates
the composition completely with csound operators and sends events
to sound generating instruments in the same orchestra in realtime.

I first thought the schedwhen operator might do that job, but I
found that you can only generate one event per operator, not an
arbitrary number of events. (Am I right, or did I miss something?)

Anyway, I found a solution that seems very simple and elegant
to me. Here is the header from my sample algocomp.csd:

;===========================================================================
; ALGOCOMP.CSD
; A sample instrument for realtime algorithmic composition in CSound
; Written by Peter Neubaecker 
;---------------------------------------------------------------------------
;
; The purpose of this instrument is to generate algorithmic compositions
; by Csound directly. There is one event-generating instrument and one
; or more sound-generating instruments. There are multiple instances of the
; sound-generating instruments allocated and indexed. The number of instances
; correponds to the intended polyphony - but they can be allocated generously
; as an inactive instance is very inexpensive in time. The event-generating
; instrument knows these instances by index and communicates with them over
; global table space. Each time the event-generating instrument assigns a new
; duration to an instance, that instance initialises itself, reads its
; individual parameters from the communication table, then runs and becomes
; inactive after the given duration.
; In this example, the event-generating instrument only writes initialisation
; values for each sound-generating instance that are used by that instruments
; like usual p-fields. But the event-generating instrument could also update  
; the individal parameters continuously.
;
;---------------------------------------------------------------------------

You can get algocomp.csd from:
http://www.harmonik.de/femc/femcdown.html
This page is in german, but you will find the file...

Any comments are welcome!
Best greetings   -   Peter