Paradigm Multi-paradigm Typing discipline Strong | OS Cross-platform | |
![]() | ||
First appeared 2003; 14 years ago (2003) Stable release 1.3.5.2 / October 21, 2015; 16 months ago (2015-10-21) |
ChucK is a concurrent, strongly timed audio programming language for real-time synthesis, composition, and performance, which runs on Linux, Mac OS X, Microsoft Windows, and iOS. It is designed to favor readability and flexibility for the programmer over other considerations such as raw performance. It natively supports deterministic concurrency and multiple, simultaneous, dynamic control rates. Another key feature is the ability to live code; adding, removing, and modifying code on the fly, while the program is running, without stopping or restarting. It has a highly precise timing/concurrency model, allowing for arbitrarily fine granularity. It offers composers and researchers a powerful and flexible programming tool for building and experimenting with complex audio synthesis programs, and real-time interactive control.
Contents
ChucK was created and chiefly designed by Ge Wang as a graduate student working with Perry R. Cook. ChucK is distributed freely under the terms of the GNU General Public License on Mac OS X, Linux and Microsoft Windows. On iPhone and iPad, ChiP (ChucK for iPhone) is distributed under a limited, closed source license, and is not currently licensed to the public. However, the core team has stated that it would like to explore "ways to open ChiP by creating a beneficial environment for everyone".
Language features
The ChucK programming language is a loosely C-like object-oriented language, with strong static typing.
ChucK is distinguished by the following characteristics:
ChucK standard libraries provide:
Code example
The following is a simple ChucK program that generates sound and music:
// our signal graph (patch) SinOsc f => dac; // set gain .3 => f.gain; // an array of pitch classes (in half steps) [ 0, 2, 4, 6, 9, 10 ] @=> int hi[]; // infinite loop while( true ) { // choose a note, shift registers, convert to frequency Std.mtof( 65 + Std.rand2(0,1) * 43 + hi[Std.rand2(0,hi.cap()-1)] ) => f.freq; // advance time by 120 ms 120::ms => now; }Uses
ChucK has been used in performances by the Princeton Laptop Orchestra (PLOrk) and for developing Smule applications, including their ocarina emulator. PLOrk organizers attribute some of the uniqueness of their performances to the live coding they can perform with ChucK.