[chuck-users] Wrapping ChucK

Brad Garton garton at columbia.edu
Fri Oct 16 15:53:14 EDT 2009


On Oct 16, 2009, at 11:28 AM, Andrew C. Smith wrote:

> Brad, I didn't think about your Max object, which seems like a logical
> model now that you mention it. In fact, I could probably do all of
> what I'm doing in Max, but where's the challenge in that?

Oh max can be, uh, "challenging"... :-)

> One thing, though, is that you're making ChucK output its sound to the
> Max/MSP interface, while I really just want it to output it to its
> default place (that is, CoreAudio or whatever else I make available
> from a mini-like menu option).

Aha -- you'd have to repair the damage I did to digiio_rtaudio.cpp.
Could be that if you just use the version that comes with chuck it will
work.

> So, Brad, do you first "make maxmsp" in chuck-maxmsp.1.2.1.2/src, then
> use the resulting chuckdylib.so to run the engine in Max?

Yep.

> This is
> tentative, because I don't really know what I'm talking about, but can
> NSCreateObjectFileImageFromFile with NSLinkModule link to a
> chuckdylib.so-type library in any environment (not just Max)?

Yes -- in fact I think you can use any kind of dyn-loading scheme
so long as you can find the proper entry-points into the code.  I
used to use the CF Bundle loading approach, but Apple seems to
have changed the way they handle the public/private sharing of
symbol space (and I'm not savvy enough to deal with mutli-level
compiles).

> And,
> finally, thank you for commenting the source so heavily, including
> things like "BIG HACK" to point out where ChucK might trip someone up.
> I'll post a working product if I ever get one.

Glad it helps!  I tried to put "// BGG mm" to mark all of my  
modifcations,
I think my goal was to replace them with #ifdefs in the chuck distro  
so it
would make updating easier.  But I'm too lazy.

brad
http://music.columbia.edu/~brad



More information about the chuck-users mailing list