<div dir="ltr">Hi list, I&#39;m hoping someone can give me some brief guidance as I&#39;m sure this is a solved problem in S7 and CM but is beyond my lisp knowledge for how to do it correctly.<div><br></div><div>Max/MSP has a scheduler that works with it&#39;s global clock. I want to enable something like the following:</div><div><br></div><div>(delay :4n &#39;(my-funct a b c))</div><div><br></div><div>So the delaying side will be implemented in C, and that side will handle converting :4n to the right time according to the max clock and then call *something* in S7 from C at the right time. My question is what the right way to store and then call the delayed function is, given that it might also have anonymous elements</div><div><br></div><div>(delay :4n (list (lambda (x) (...)) :foo :bar))</div><div><br></div><div>Ideally, the way this is done would be compatible with future plans to allow a variant that we can cancel:</div><div><br></div><div>(define future (delay :4n &#39;(my-fun a b c)))</div><div>... now I can cancel it by doing something to future if need be</div><div><br></div><div>Do I need to do something like have my arg 3 to delay be converted to a function and environment captured and stored with gensym? Is there a known pattern for this that I can look at in the common music sources or other lisp literature? Any help preventing slow wheel re-invention much appreciated!</div><div><br></div><div>thanks</div><div>iain</div><div><br></div><div><br></div></div>