[Haskell-cafe] pointers for EDSL design

Stephen Tetley stephen.tetley at gmail.com
Tue Oct 5 12:48:44 EDT 2010


Hi John

For the user level stuff, I don't think CSound really has "functions"
- either for the score or orchestra. The score I think is just a list
of /notes/ with many, many parameters and the orchestra is a graph
description saying how the UGens are connected.

This is good news - I believe Pan, Feldspar, Lava etc. generate
functions or procedures in the output code which means they have to
involve the complicated techniques for embedding lambdas and functions
in the EDSL. If they didn't, there would be massive code blow up.
However because CSound is more or less "straight line" code - i.e.
lines are interpreted sequentially, there are no procedures or
functions to define and call - generating it should be much simpler.

Andy Gill's Dot package on Hackage has a crafty, but simple technique
to allow you to reference graph nodes and link them within a monad and
output as "foreign" code - here dot files. Something similar might be
satisfactory for orchestra files.


Of course if you want to generate UGens in C things get complicated
again, but you still might be able to generate UGens as single
monolithic functions. I think Roger Dannenberg's Nyquist generates
UGens in this way from a Scheme like macro language, but its a long
time since I looked at it.

Best wishes

Stephen


More information about the Haskell-Cafe mailing list