Csound Csound-dev Csound-tekno Search About

[Csnd] Code Share: Score Generation with Orchestra Code

Date2021-02-26 14:40
FromSteven Yi
Subject[Csnd] Code Share: Score Generation with Orchestra Code
Attachmentsproject.zip  
Hi All,

I saw a question on Discord which spurred me to finally put together
an example for score generation with orchestra code.  The example is
available at:

https://ide.csound.com/editor/rKv9jfB8a0Q84IHdiOgd

and I've attached a zip of the current version here as well.

Some things to note in the example:

* utils.orc contains a simple Note UDO for scheduling based on tempo
that is held in a global variable. You can live code and change tempo
and the scheduling adapts nicely. The Note's p2 and p3 then correspond
to beat time rather than time in seconds.

* score.orc contains the score generation. Instruments are used to
contain Note calls. some are pre-written while others generate Notes.
Instruments call other instruments to facilitate a hierarchical
organization of material and easy reuse of parts. The example isn't
the most musically exciting but does show the technique. Harm1 and
Chord1 show that you can parameterize your score generation.  A fuller
example might have a bar() or measures() UDO to help larger scale time
organization.

One nice thing about breaking up the score like this into parts is
that you can live code to experiment pretty rapidly.  Since score
instruments generate relative to P2, you can eval any score part and
hear it immediately without having to fuss with -+skip_seconds and
calculating where in a SCO you want to start rendering from.

Enjoy!
Steven

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here