ChucK

On-the-fly Programming Commands

These are used for on-the-fly programming (see http://on-the-fly.cs.princeton.edu). 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. These flags may be combined but do note that some are opposites.

--loop

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)

--poop

%>chuck --poop

A possible typo when trying to call --loop. See page XX for a in-depth explanation on why this shouldn't be used.

--halt / -h

 - Tells the vm to halt and exit if there are no more shreds in the VM (on by default), opposite of --loop .

%>chuck --halt 

--add / +

Adds new shreds from source files to the listener VM. this process then exits. for example:

%>chuck + foo.ck bar.ck

Integrates foo.ck and bar.ck 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 foo.ck 

Replaces shred 2 with foo.ck

--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]: foo.ck [sporked]: 21.43s ago
     [shred id]: 2 [source]: bar.ck [sporked]: 28.37s ago 

--time

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) 

--kill

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

%>chuck --kill

--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 @192.168.1.1 + foo.ck bar.ck 

(or)

%>chuck @foo.example.org -p8888 + foo.ck bar.ck 

Sends foo.ck and bar.ck to VM at 192.168.1.1 or foo.example.org:8888

--audio / -a

 - Enable real-time audio output(on by default).

%>chuck --audio 

--silent / -s

Disable real-time audio output - computations in the VM is not changed, except that the actual timing is no longer clocked by the real-time audio engine. Timing manipulations (such as operations on 'now') still function fully. This is useful for synthesizing audio to disk or network. It is also handy for running a non-audio program. Note that combining this with --loop will take up 100% of your cpu doing nothing and is therefore not recommended.

%>chuck --silent 

--srate(N)

Sets the internal sample rate to (N) Hz. by default, ChucK runs at 44100Hz on OS X and Windows, and 48000Hz on linux/ALSA. even if the VM is running in --silent mode, the sample rate is still used by some unit generaters (for example SubNoise) to compute audio, this is important for computing samples and writing to file. Not all sample rates are supported by all devices! Use --probe to consult your the options on your soundcard(s). It has been found that certain soundcards that allow for using any sample-rate in a given range (most notably some RME models) will appear to give responses to --probe calls that do not reflect the full range of what can be set buy --srate. Also note that when combined with --silent you can set rates that couldn't be played back by your device, for example for the purpose of over-sampling when intending to downsample the resultant files in other programs later.

%>chuck --srate22050

--bufsize(N)

Sets the internal audio buffer size to (N) sample frames. Larger buffer size often reduce audio artefacts due to system/program timing. Smaller buffers reduce audio latency. The default is 512. If (N) is not a power of 2, the next power of 2 larger than (N) is used. For example:

 %> chuck --bufsize950

sets the buffer size to 1024.

--dac(N)

opens audio output device #(N) for real-time audio. by default, (N) is 0. This should correspond to your system's default sound-device in most cases.

%> chuck --dac0

--adc(N)

Opens audio input device #(N) for real-time audio input. by default, (N) is 0. This should correspond to your system's default sound-device in most cases.

%> chuck --adc0

--chan(N) / -c(N)

Opens (N) number of input and output channels on the audio device. by default, (N) is 2 (or stereo).

%> chuck --chan6

--in(N) / -i(N)

Opens (N) number of input channels on the audio device. by default (N) is 2 (or stereo).

%> chuck --in4

--out(N) / -o(N)

Opens (N) number of output channels on the audio device. by default (N) is 2 (or stereo).

%> chuck --out6

--hostname(host) / -h(host)

Sets the hostname to connect to if accompanied by the on-the-fly programming commands. (host) can be name or ip of the host. default is 127.0.0.1 (localhost).

%> chuck --hostname192.168.0.30

--port(N) / -p(N)

Sets the port to listen on if not used with on-the-fly programming commands. sets the port to connect to if used with on-the-fly programming commands.

%> chuck --port418

--verbose(N) / -v(N)

Sets the report level to (N). 0 is none, 10 is all, default is 1.

%> chuck --verbose4

--probe

Probes the system for all audio devices and MIDI devices, and prints them. Extremely useful for detecting audio and MIDI devices and seeing what values other flags can or should be set to.

%> chuck --probe

--about / --help

Prints the usage message, with the ChucK URL.

%> chuck --about

--version

Prints the version of ChucK installed. Useful for confirming your update worked correctly.

%> chuck --version

--callback

Utilizes a callback for buffering (default).

%> chuck --callback

--blocking

Utilizes blocking for buffering.

%> chuck --blocking

--deprecate

What the parser is to do at finding deprecated syntax/names in files. The argument should be one of ":stop", ":warn" or ":ignore", default is ":warn".

%> chuck --deprecate:stop

--shell

Opens a dialog with the -currently not fully implemented- shell. Note that this implies --loop as well in a way that supersedes --halt

%> chuck --shell

--empty

Opens a ChucK shell without a virtual machine

%> chuck --empty --shell

--standalone

Disable remote commands to this VM

%> chuck --standalone

--server

Enable remote commands to this VM. On by default and --loop implies this

%> chuck --server

--caution-to-the-wind

Enables Std.system(string), which has been disabled by default. Please note that setting this, combined with --server or it's equivalent, enables third parties to run arbitrary commands on your computer with your privileges. Consider using --standalone. Powertools can maim.

%> chuck --caution-to-the-wind

--abort.shred

Aborts the current shred, if there is one (if there is none the VM may be empty or may be calculating the UGen-graph). Similar to the "watchdog" popup-dialogs in the miniAudicle.

%> chuck --abort.shred