There isn't great documentation like those projects have, but if you want to embed ChucK then you just need to include all of the C++ files in the src/core folder. To use ChucK, make a new ChucK object and then all the functions you need to call are in chuck.h: https://github.com/ccrma/chuck/blob/master/src/core/chuck.h

A typical sequence might look something like this:

// create
the_chuck = new ChucK();

// set params (see full list at top of chuck.h)
the_chuck->setParam( CHUCK_PARAM_SAMPLE_RATE, (t_CKINT) MY_SRATE );
the_chuck->setParam( CHUCK_PARAM_INPUT_CHANNELS, (t_CKINT) MY_CHANNELS );
the_chuck->setParam( CHUCK_PARAM_OUTPUT_CHANNELS, (t_CKINT) MY_CHANNELS );

// init
the_chuck->init();

// start
the_chuck->start();

...
// add code
the_chuck->compileCode( "SinOsc foo => dac; while(true) { 2::second => now; }", "" );
// or
the_chuck->compileFile( "myChuckProgram.ck", "my:list:of:args:2:3.5" );

...
// in audio callback
the_chuck->run( inBuffer, outBuffer, numFrames );


...
// elsewhere in your application, might want to use global variables
the_chuck->setGlobalInt( "roughness", 2 );
the_chuck->broadcastGlobalEvent( "playTheSound" );


On Fri, Aug 16, 2019 at 4:07 AM Mario Buoninfante <mario.buoninfante@gmail.com> wrote:
Hi,

Do we have anything like ctcsound (https://csound.com/docs/ctcsound/ctcsound-API.html) or libpd (http://libpd.cc/) for ChucK.
I know changes have been made in the latest release, I was just wondering if there's anything to look at out there.

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