The way to do this would be to write a C++ program that uses all of the "core/" source files, but not the "host/" source files, and write your own host that interfaces with an audio callback of your choosing (could reuse / modify the included host). Then, use a global Event to be your clock and use your custom host to respond to events fired from that global Event and to pass the event messages on over to Touchdesigner.

On Wed, Jun 5, 2019 at 2:08 PM Da Xu <djsignal7@yahoo.com> wrote:
Hi guys, 

Since, I am not developing for Chuck itself, so, I thought this might be a more appropriate place to ask this question. 

Is it possible to integrate Chuck into a program that I am writing? Basically, I would like to utilize Chuck's strong time nature to create a custom clock plugin for another environment, specifically Touchdesigner. TD is great for visuals, however, for audio related stuff, its clock can be bit unstable. It has a feature which allows external programs to communicate with it via a shared memory block, which would be the fastest way to get info into TD without overheads like protocol decoding. 

My goal is to create a custom clock(s) generator to send pulses into TD via the shared mem block. So, my question is can I use Chuck in this way? And how would I go about doing that? I know this is a rather simplistic use of Chuck, but I really like Chuck's strong time nature, its concurrency abilities and being particularly lightweight.

I searched the documentations, and didn't really find anything. So, any info would be greatly appreciated.

Thank you!

Da. 
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users