ChucK Language Reference

version 1.4.2.0 (ChAI/db)

See also ChucK Programmer's Reference.


Intro

ChucK is a strongly-typed, strongly-timed, concurrent audio and multimedia programming language. It is compiled into virtual instructions, which are immediately run in the ChucK Virtual Machine. This guide documents the features of the Language, Compiler, and Virtual Machine for a ChucK programmer.

Overview

running chuck
comments
reserved words

Types, Values, Variables

primitive types
values
variables
references
complex types

Arrays

declaring
multi-dimensional
lookup
associative arrays
assignment

Operators + Operations

=> =^ =< (chuck, upchuck, unchuck)
+ - * / (arithmetic) % (modulo)
&& || == != >= <= (logical) & | ^ (bitwise)
++ -- (inc / dec)
! + - new
$ (cast)
<< (array append)

Control Structures

if / else
while
do
until
for
repeat
break / continue

Manipulating Time

time and duration
operations (arithmetic)
the keyword 'now'
advancing time

Functions

writing
calling
overloading

Concurrency, Processes, Shreds

sporking shreds
the me keyword
using machine.add()
inter-shred communication
commandline

Classes and Objects

introduction
existing classes
working with objects
writing a class
members (data + functions)
static (data + functions)
inheritance
overloadation (overloading + overriding)

Unit Generators

declaring connecting
controlling (timing mechanism)
mono + stereo
built-in
creating (coming soon)

Unit Analyzers

declaring
connecting
controlling over time
representing metadata: the UAnaBlob
representing complex data
performing analysis in UAna networks
built-in unit analyzers
creating (coming soon)

Events

what they are
using
the MIDI event
the OSC event creating custom events

home .. language .. program .. examples