The following are example programs that demonstrate basic language features, tools, and techniques. All of these
examples files can be found in the distribution (download page)
under the folder examples. Additionally, they can be accessed from within miniAudicle, under "File > Open Example..." Good luck and have fun!
A selection of examples that demonstrate basic sound generation, timing, and control in ChucK. As with all examples here, feel free to try and experiment!
|
Survey of chuck's primitive types |
|
Object type (more later) |
|
Polymorphism in ChucK |
|
Analysis-related type |
|
Working with the Type type |
|
Querying active types in the VM |
|
Vectors 3D + 4D |
|
Using vec3 as a slewing interpolator |
|
|
store and retrieve values |
|
array @=> assignment |
|
instantiating multidimensional arrays |
|
reassigning sub-arrays |
|
array as function argument |
|
multi-dimensional array instantiation |
|
mixed associative and linear array |
|
resizing arrays |
|
negative indexing of arrays |
|
reversing an array |
|
shuffling an array |
|
zeroing the elements an array |
|
|
operators for assignment |
|
logical operators |
|
pre/post increment |
|
arithmetic operators |
|
|
time and duration |
|
reasoning about time |
|
|
for loop |
|
until |
|
do-until |
|
break |
|
break w/ nesting |
|
continue w/ nested blocks |
|
Philip's sequencer |
|
|
function overloading |
|
recursive function calls |
|
objects as function arguments |
|
|
sporking shreds |
|
sporking many shreds |
|
machine.add() .remove() .replace() |
|
These examples demonstrate pratical tools ranging from unit generators, events, mouse / keyboard / joystick input, file I/O, MIDI, Open Sound Control, how to extend ChucK unit generators, and more.
|
learning about objects with .help() (requires chuck-1.4.1.0 or later) |
|
Dinky instrument implemented as class |
|
a file that used the class Dinky |
|
Extending ChucK Unit Generators
|
chugraph (rhymes with "subgraph") |
|
chugen (rhymes with "ugen") |
|
chugin (rhymes with "plugin") |
|
|
event broadcast method |
|
event signal method |
|
extending events (creating custom events) |
|
|
chout ("shout") and cherr ("Cher") |
|
file directory access |
|
file input: reading ints |
|
file input: reading floats |
|
file input: reading lines |
|
file input: reading tokens |
|
file input: reading strings |
|
file input (binary mode): reading bytes |
|
file output |
|
file output (binary mode): writing bytes |
|
HID Input (Joystick, Mouse, Keyboard)
|
Joystick demo |
|
Mouse demo |
|
Keyboard demo |
|
Gametrak demo |
|
"SMELT: Small Musically Expressive Laptop Toolkit" |
|
Keyboard (terminal only; see HID usage above) |
|
|
MIDI input |
|
MIDI input with polophony |
|
MIDI file reader / player! |
|
MIDI output |
|
|
OSC message sender and receiver |
|
OSC multiple message at different rate |
|
OSC one sender to many receivers |
|
OSC multicast (broadcast to local area hosts)
|
|
OSC message dumper |
|
|
reading byte(s) |
|
reading ascii/binary |
|
writing |
|
listing serial devices |
|
Arduino INO file |
|
|
Stereo noise (using Pan2) |
|
Stereo powerup |
|
Stereo => arrays of mono UGens |
|
Stereo Stooges |
|
Multi-channel demos |
|
Live Sampling and Granular Synthesis Using LiSa
|
Basics of live sampling using LiSa |
|
Live sampling simple looping |
|
LiSa2 stereo |
|
Granular sampling examples |
|
|
|
Loading an audio file into a LiSa |
|
LiSa tracking mode examples |
|
Input-driven LiSA trigger |
|
|
String operations |
|
String escape sequences |
|
String input + tokenize (hacked; temporary) |
|
(More) Unit Generators Examples
|
|
low pass filter |
|
resonance low pass filter |
|
high pass filter |
|
resonance high pass filter |
|
resonance filter with equal-gain zeros |
|
band pass filter |
|
band reject filter |
|
> STK ( Synthesis Tool Kit ) demos
|
BandedWG (Banded Waveguide) |
|
BlowBotl |
|
BlowHole |
|
Bowed |
|
Brass |
|
Clarinet |
|
Flute |
|
FrncHrn (requires chuck-1.4.1.0 or later) |
|
HevyMetl => acoustic guitar (1.4.1.0 or later) |
|
HevyMetl => power chords (1.4.1.0 or later) |
|
HevyMetl => trumpet (1.4.1.0 or later) |
|
HnkyTonk (1.4.1.0 or later) |
|
KrstlChr (1.4.1.0 or later) |
|
Mandolin |
|
ModalBar |
|
Moog (r.i.p. bob) |
|
Rhodey (Rhodes synth) |
|
A lovely littel number made with Rhodey... |
|
Saxofony |
|
Shakers |
|
Sitar |
|
StifKarp |
|
VoicForm |
|
Wurley (Wurlitzer model) |
|
|
|
FFT |
|
IFFT |
|
DCT |
|
Windowing |
|
Flip / UnFlip |
|
auto-correlation-based pitch detection |
|
cross-correlation delay detection |
|
(really bad) spectral cross-synthesis |
|
|
Centroid |
|
Chroma |
|
Flux |
|
Kurtosis |
|
MFCC |
|
RMS |
|
RollOff |
|
SFM |
|
ZeroX |
|
Feature Collector |
|
Feature Collector (alt use) |
|
Feature-based Genre Classification (part of chai) |
|