Oops - here's the code that doesn't compile: fun void PlayImpact( float intensity ) { // play a collision sound...}
global Event impactHappened; global float impactIntensity; while( true ) { impactHappened => now; spork ~ Also: regarding chuck.h. I did discover the valuable methods: setGlobalInt() setGlobalFloat() signalGlobalEvent() broadcastGlobalEvent() If I can get these to work, I'll be "on my way" (I think...). fwiw: setGlobalString() appears to be missing... Thanks again for your help! On Thu, Aug 2, 2018 at 3:16 PM Dana Batali <dana.bat...@gmail.com> wrote: > Hi Jack and thank you for your response! > > Indeed the external keyword doesn't produce a syntax error, so that's a > sign that miniAudicle is a bit behind the times. > > Regarding builds, I have been building out of the master branch and am > continuing to investigate why the global keyword is producing a syntax > error in my own mainline builds. If I replace global with external, i see > this message: > > [test.ck]:line(1): 'external' keyword is deprecated. please use 'global' > > So something good is happening. That said, the following .ck file, taken > from the chunity paper, doesn't compile: > > > On Thu, Aug 2, 2018 at 10:07 AM Jack Atherton <l...@ccrma.stanford.edu> > wrote: > >> Hi! >> >> 1. It's possible that the Windows build of miniAudicle is a little >> behind. I can't remember when it was built. Do things work in miniAudicle >> if you use the (now-deprecated) "external" keyword instead of "global"? >> 1a. The dac-ugen-replacement branch holds a few extra features that are >> used in Chunity but haven't been rolled into the main ChucK branch yet. You >> could start building your application from either the master branch or that >> branch, depending on your needs. (Check out chuck.h for a hint towards the >> extra features -- it adds a few more global types.) >> 2. There is a github repo for Chunity but it's still private at the >> moment. The place to start for developing a new application that embeds >> ChucK is to make sure you have access to whatever calls you need from >> core/chuck.h, built into whatever wrapper makes sense for your own >> application. Chunity doesn't really do much more special than that on the >> C++ side, other than a few gnarly nuances unique to Unity audio >> programming. I do think that the global keyword is activated for all (new) >> builds of ChucK -- there are quite a few tests for the command line version >> that use it. Sorry I don't know much about ChucK Racks, maybe Spencer could >> chime in about that! >> >> Best, >> Jack >> >> >> On Thu, Aug 2, 2018 at 9:50 AM Dana Batali <dana.bat...@gmail.com> wrote: >> >>> Hi all - I'm not sure if this is more of a developer question, but I'll >>> try here first. >>> >>> I'm investigating integrating ChucK into a custom app and am intrigued >>> by the new chunity integration. The key aspects of chunity (for my >>> purposes) are the new global keyword coupled with the ability to send/recv >>> values (and events) from a controlling application. >>> >>> I have two questions: >>> >>> 1. does the new global keyword actually work? >>> In miniAudicle 1.4.0.0 (on windows), i have a one-line script: >>> >>> global int myvar; >>> >>> This produces an error message: >>> >>> [untitled]:line(1).char(33): syntax error >>> >>> which goes away with the removal of the global keyword. >>> >>> 1a. i do see a special branch of chuck called dac-ugen-replacement which >>> may be hold the answers to my question. Perhaps it's only a matter of the >>> windows build being a little behind (due to the grammar change)? >>> >>> 2. is there a github repository for the chunity plugin? I don't see it >>> in the standard chuck github. It's possible that the global keyword is >>> only activated for special builds of chuck and I might be able to get to >>> the bottom of that question by inspecting the chunity builds. >>> Incidentally, I see that ChucK Racks addressed a set of similar problems in >>> a different manner (by extending the chuck environment directly via >>> PluginHost). My impression is that these two activities occurred in >>> parallel and that there may be an advantage in combining the two >>> approaches, perhaps ultimately producing a publicly available .so/.dll as >>> part of the chuck distribution. >>> >>> Advanced thanks for any comments or pointers on these questions! >>> And the usual giant kudos to the ChucK devs for producing such a cool >>> thing!. >>> >>> Regards, >>> Dana Batali >>> >> _______________________________________________ >>> chuck-users mailing list >>> chuck-users@lists.cs.princeton.edu >>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users >>> >> _______________________________________________ >> chuck-users mailing list >> chuck-users@lists.cs.princeton.edu >> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users >> >
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users