ChucK : Examples ( 1.2.x.x )
version: 1.2.x.x (dracula)

Chuck Examples (v2)

The following are sample files which demonstrate basic language features, in addition to the new functionality introduced in chuck-v2. All of these samples files can be found in the distribution (download page) under the folder examples - in either the source download or the executable download.

Examples listed together are variations on a theme, or are intended to be run in parallel, like this:

% chuck moe.ck larry.ck curly.ck
or perhaps:
% chuck otf*.ck
Basic Demonstrations
time and duration
variable assignment and use
chucking & unchucking ugens
modulating ugen parameters
using command line arguments
mic input
ADSR method
digital delay
simple comb filter using Delay
echo effect
using Envelope
knuckleheads (time shifted phase locking)
knuckleheads++ (with glottal voicing)
function demo
po-tweet!
the uh, whole tone scale
sinosc + blit (bandlimited oscillators)
FM synthesis "by hand"
FM synthesis with two sinosc
FM (actual frequency modulation)
mic input and simple comb filter
impulse generator
imp
recording (via WvOut)
clocks (useful when recording and other)
basic ring-mod (demonstrate ugen input)
sndbuf (file read/write/playback)
sndbuf.valueat() - random access samples
step ugen
unchuck
whirl
noise & filters
function test
math.isinf() also math.isnan()
IO examples
"Deep" Stuff
audio dithering "by hand"
how phones dial
one pole envelope follower
karplus strong plucked string
plucked string with mandolin body excitation
tuned plucked string (a la jaffe/smith)
Reich's Clapping Music using glottal pulses
Compositions & Other Experiments
variations on towers of hanoi sonification
on-the-fly synchronization (concurrent)
 
 

Language Topics(v2)

These files demonstrate and/or test the features described in each section of the ChucK Language Specification

Types
survey of chuck's primitive types
Object type (more later)
Arrays
store and retrieve values
array @=> assignment
instantiating multidimensional arrays
reassigning sub-arrays
array as function argument
Operators
operators for assignment
logical operators
pre/post increment
arithmetic operators
Time & Timing
time and duration
reasoning about time
Control Structures
for loop
until
do-until
break
break w/ nesting
continue w/ nested blocks
Functions
function overloading
recursive functions
objects as function arguments
Shreds & Concurrency
shred spork demo
shred spork
machine.add() .remove() .replace()
Classes & Objects
Dinky instrument implemented as class
a file that used the class Dinky
Events
event broadcast method
event signal method
extending events (creating custom events)
    > HID support (Joystick, Mouse, Keyboard)
Joystick demo
Mouse demo
Keyboard demo
    > Keyboard Input (from Terminal)
Keyboard demo
kb | kb2
    > MIDI
MIDI event demo
    > OSC
OSC message event demo (run in parallel)
Unit Generators
    > STK ( Synthesis ToolKit ) demos
BandedWG (Banded Waveguide)
BlowBotl
BlowHole
Bowed
Brass
Clarinet
Flute
Mandolin
ModalBar
Moog (r.i.p. bob)
Rhodey (Rhodes synth)
Saxofony
Shakers
Sitar
StifKarp
VoicForm
Wurley (Wurlitzer model)
Unit Analyzers
    > transformations
FFT
IFFT
Windowing
(really bad) spectral cross-synthesis
    > feature extractors
Centroid
Flux
RMS
RollOff