ChucK : Programming Guide

On-the-fly Programming Commands

version: 1.5.x.x (numchucks)

On-the-fly Programming Commands

These are used for on-the-fly programming (see By default, this requires that a ChucK virtual machine be already running on the localhost. It communicates via sockets to add/remove/replace shreds in the VM, and to query VM state. The simplest way to set up a ChucK virtual machine to accept these commands is by starting an empty VM with --loop:

 %> chuck --loop

this will start a VM, looping (and advancing time), waiting for incoming commands. Successive invocations of 'chuck' with the appropriate commands will communicate with this listener VM.

(for remote operations over TCP, see below)

--add / +
adds new shreds from source files to the listener VM. this process then exits. for example:

 %> chuck +

integrates and into the listener VM. the shreds are internally responsible for finding about the timing and other shreds via the timing mechanism and vm interface.

--remove / -
removes existing shreds from the VM by ID. how to find out about the id? (see --status below) for example:

 %> chuck - 2 3 8

removes shred 2, 3, 8.

--replace / =
replace existing shred with a new shred. for example:

 %> chuck = 2

replaces shred 2 with

--status / ^
queries the status of the VM - output on the listener VM. for example:

 %> chuck ^

this prints the internal shred start at the listener VM, something like:

 [chuck](VM): status (now == 0h:2m:34s) ...
   [shred id]: 1  [source]:  [sporked]: 21.43s ago 
   [shred id]: 2  [source]:  [sporked]: 28.37s ago

prints out the value of now on the listener VM. for example:

 %> chuck --time

something like:

 [chuck](VM): the value of now:
    now = 403457 (samp)
        = 9.148685 (second)
        = 0.152478 (minute)
        = 0.002541 (hour)
        = 0.000106 (day)
        = 0.000015 (week)

semi-gracefully kills the listener VM - removes all shreds first.

--remote / @
specifies where to send the on-the-fly command. must appear in the command line before any on-the-fly commands. for example:

 %> chuck @ +
 %> chuck -p8888 +

sends and to VM at or

return to Documentation Home

chuck | soundlab | cs | music | ccrma