On 29 Feb 2008, at 21:10, Kassen wrote:
ChucK uses a "pull through" model to calculate samples. So; every time the DAC wants to output a sample the DAC asks (pulls) all Ugens connected to it to report a value and those in turn ask all their inputs for one before returning it (recursively). This works very well and guarantees a proper calculation order of samples
I had a problem with the 'pull' model, though, in trying to craft a Ugen that would allow me to send UI input to chuck from an external environment. This was in the chuck~ object, where I hoped to be able to set up a way of connecting data coming from max/msp objects (sliders, etc.) into an executing chuck script. The difficulty was to create a Ugen who could 'grab' a value when data appeared, or at least do some kind of sample-and-hold equivalent so that a data value would be maintained without having to constantly poll all possible interface objects. I recall there being some problem trying to do this in chuck~ in addition to the inefficiency, but I don't remember exactly what the problem was. I also haven't looked at the source for the audicle stuff and how it handles UI input. Maybe there's an elegant solution I don't know. brad http://music.columbia.edu/~brad