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