Hello everyone,<div><br></div><div>I've been playing with chuck for a couple weeks and am having a lot of fun with it. Really cool environment and I was impressed how easy it was to set up the MIDI stuff.</div><div><br>
</div><div>After reading over a lot of material though, I still couldn't answer a few questions, so I thought I'd try the list.</div><div><br></div><div>- Is there any way to have a script load it's own dependencies? I tried Machine.add which is listed on <a href="http://github.com/heuermh/lick/wiki">http://github.com/heuermh/lick/wiki</a>, but it doesn't seem to work. Here's the code I'm trying: <a href="http://gist.github.com/611486">http://gist.github.com/611486</a></div>
<div><br></div><div>- Similar to the last question, when I do load both of the above files into chuck at once, it seems like only the class ends up in the global space. Is there any way share raw functions or variables between files? The reason I want to do this is mostly to avoid having to do timing code like this <a href="http://gist.github.com/611515">http://gist.github.com/611515</a>, or note definitions (cs, Cs) in every file. Something like a pre-processor include would probably do the trick.</div>
<div><br></div><div>- Is there a way to pass functions as arguments to another function or return a function? Also, are fun's proper closures or am I just getting lucky? I was thinking maybe I could use functional style programming to build things like arpeggiations. If this is totally overkill let me know :)</div>
<div><br></div><div>- The SinOsc seems to click whenever I stop or disconnect it. I've tried moving the gain to 0.1, then 0, but it still seems to click. Is there some technique for avoiding this?</div><div><br></div>
<div>Thanks in advance for your help. Looking forward to spending more time with ChucK in the future.</div><div>-Mat</div>