Using CSound with Strudel
🧪 Strudel has experimental support for csound, using @csound/browser.
Importing .orc files
To use existing csound instruments, you can load and use an orc file from an URL like this:
Note that the above url uses the
github: shortcut, which resolves to the raw file on github, but you can use any URL you like.
livecode.orc by Steven Yi comes packed with many sounds ready for use:
Writing your own instruments
You can define your own instrument(s) with
loadCsound like this:
.csound function sends the following p values:
|instrument name e.g.
|time offset, when it should play
|the duration of the event / hap
|frequency in Hertz
There is an alternative
.csoundm function with a different flavor:
|midi key number, unrounded, 0-127
|midi velocity, 0-127
In both cases, p4 is derived from the value of
Limitations / Future Plans
Apart from the above listed p values, no other parameter can be patterned so far. This also means that audio effects will not work. In the future, the integration could be improved by passing all patterned control parameters to the csound instrument. This could work by a unique channel for each value. Channels could be read like this. Also, it might make sense to have a standard library of csound instruments for strudel’s effects.