gogins / csound-extended

Extensions for Csound including algorithmic composition, Android app, and WebAssembly.
GNU Lesser General Public License v2.1
40 stars 1 forks source link

Enable the use of Csound to play Slippery Chicken compositions #107

Closed gogins closed 4 years ago

gogins commented 4 years ago

This should be added in the nudruz directory but be in the sc package. There should be a csound-play function similar to the clm-play function.

Please note, to run Slippery Chicken from the GitHub repository, make a symbolic link to src from the slippery-chicken source code repository directory.

On the plus side, once I did that, I got music and a LilyPond score right away.

gogins commented 4 years ago

Rather than emulate clm-play, a better approach seems to be to find ways of translated a sequence of event instances to Csound score statements. See https://michael-edwards.org/sc/robodoc/event_lsp.html#robo400.

gogins commented 4 years ago

The cm.lsp file in Slippery Chicken appears to use Common Music functions to perform low level MIDI file output. I can either use this, or modify it to be used for Csound. I think the method to look at is midi-play at cm.lsp:4037.

Unfortunately, there is no thought of interchange with Common Music, that is, nothing seems to return a cm::seq object. I can, however, modify the midi-play function to become csound-play.

I can see what would work, swap MIDI file output in cm::events which is the output function that Slippery Chicken uses, either to csoundReadScore or save the cm::seq objects and pass them to render-with-csd or such.

Just maybe there is a more elegant way with less duplication of code (which would break some fine day), I will think about that.