On Tue, 22 Mar 2016, amin...@gmail.com wrote: > - No required arguments: some UGens don't/can't have a "default" > value, but there's nothing preventing the user from calling it without > modifying any args
Then you can fall back to regular Haskell function arguments. > - It's more work to create a new UGen: you need to create the type of > the record with "foo" prefixes on its args, then an instance of that > record, and also the Freq, etc instances for each arg. You'll also need > a function to convert that particular ugen to something SC understands. > My hope is that users can make UGens themselves fairly quickly. Most > ugens in vivid are defined in a couple of lines, with a standard > "makeUGen" function. If there is a uniform internal data structure like Binary or String, you do not even need a new record type per UGen. If a record is the right internal structure you might compose records on the fly from bricks like this: data Freq more = Freq Double more data Phase more = Phase Double more data Empty = Empty type Osc = Freq (Phase Empty) -- Read the whole topic here: Haskell Art: http://lurk.org/r/topic/2z2Uok4ny6ANjzaUnIywd9 To leave Haskell Art, email haskell-...@group.lurk.org with the following email subject: unsubscribe