ChucK
From Wikipedia, the free encyclopedia
![]() |
|
| Paradigm | Multi-paradigm |
|---|---|
| Appeared in | 2003 |
| Designed by | Ge Wang and Perry R. Cook |
| Typing discipline | strong, static |
| OS | Cross-platform |
| License | GNU General Public License |
| Website | http://chuck.cs.princeton.edu/ |
| This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (May 2008) |
|
|
This section may contain original research or unverified claims. Please improve the article by adding references. See the talk page for details. (May 2008) |
ChucK is a concurrent, strongly timed audio programming language for real-time synthesis, composition, and performance, which runs on Mac OS X, Linux, and Microsoft Windows. 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 add, remove, and modify 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.
Distributed under the terms of the GNU General Public License, ChucK is free software.
Contents |
[edit] Language features
- precise (sample-synchronous) control over time (strongly timed)
- syntax and semantics designed to promote readability and maintainability
- powerful and simple concurrent programming model
- the ChucK operator,
=>, is overloaded on types and encourages a left-to-right syntax - on-the-fly programming
- MIDI
- Open Sound Control
- strongly typed
- Synthesis Toolkit unit generators
- dynamically compiled to ChucK virtual machine bytecode
- real-time audio synthesis
- unified timing mechanism (no imposed control-rate, can be completely and dynamically throttled by the programmer)
- comments (inline and multiline style similar to C++)
[edit] Current limitations
The ChucK programming language lacks some features that are common in programming languages.
Such features include:
- string operations (lacks many string functions)
- namespace resolution or include files
[edit] Code example
The following is a simple ChucK program that generates sound and music:
// our signal graph (patch)
SinOsc s => JCRev r => dac;
// set gain
.2 => s.gain;
// set dry/wet mix
.1 => r.mix;
// an array of pitch classes (in half steps)
[ 0, 2, 4, 7, 9, 11 ] @=> int hi[];
// infinite time loop
while( true )
{
// choose a note, shift registers, convert to frequency
Std.mtof( 45 + Std.rand2(0,3) * 12 +
hi[Std.rand2(0,hi.cap()-1)] ) => s.freq;
// advance time by 120 ms
120::ms => now;
}
About the Authors & Abilities of ChucK:
The professor was raised in a musical family and learned accordion at an early age. In high school he picked up guitar and fell in love with heavy metal. At the same time he developed his talent in music he discovered his talent for manipulating code, and vowed to fuse his two passions together. As a PhD student at Princeton, Wang composed his own music-manipulating computer language on a Macintosh laptop, using developer tools like Xcode. “I wanted to focus on the intersection of music and computer science,” he said. “So I authored a language with my advisor, Perry Cook, and researchers at Princeton and beyond. We called it ChucK. It’s a programming language completely tailored for sound. It let us quickly synthesize sound and use various controllers in our performances.” The language is similar to C and Java. Users can write lines of code to directly manipulate their sound, and run several ChucK programs at once to create complex compositions of music.
ChucK premiered with and is still used by the Princeton Laptop Orchestra (PLOrk), the first orchestra of its kind in the world, which Wang helped establish. Wang is now teaching for at Stanford and he brought the ChucK language with him. Today the Stanford Laptop Orchestra, (SLOrk) runs ChucK with an ensemble of 20 performers to augment the timbre of their laptop-based orchestral instruments instantaneously. “Each musician uses their own interface to play their part,” said Wang. “Some use the keyboard, others use the trackpad like a violin bow. We have musicians using USB controllers, joysticks, Wii Remotes, anything. Some of them are generating sound by manipulating ChucK code in real time.”
Wang has also tapped into the laptops sensors to augment sound during live performances. “We use the built-in accelerometer a lot in our compositions,” he said. “You’ll often see me signaling to the musicians, asking them to tilt their notebooks to one side, forward or backward. We can map those changes in position and use them to change sound.” Since it debuted in early 2008, SLOrk continues to perform on and off campus, giving students and music fans a chance to experience their unique ability to manipulate sound in real time with code. Along with other projects, SLOrk once collaborated on an Internet-based performance with other musicians at the Central Conservatory of China in Beijing. They connected with them via an audio system from SoundWIRE (another research group at the Center for Computer Research in Music (CCRMA), led by Director, Chris Chafe) and jammed live with conservatory musicians in real time. This was the first performance of it's kind in history. Professor Wang plans to hold more Internet concerts with orchestras around the world, and hopes to connect with the Beijing musicians directly one day, laptop to laptop.
But live performances alongside other talented orchestras are just the beginning. Professor Wang still plans on finding new ways for people to create and manipulate music using computers and code, taking advantage of all emerging technologies to further fade the lines between standard computers and music composition.
Referenced from apple.com/pro/profiles/slork/index.html
[edit] See also
[edit] References
- [1] Wang, G. and P. Cook. 2003. "ChucK: A concurrent, on-the-fly audio programming language." Proceedings of the International Computer Music Conference.
- [2] Wang, G. and P. Cook. 2004. "On-the-fly programming: Using code as an expressive musical instrument." In Proceedings of the International Conference on New Interfaces for Musical Expression.
- [3] Wang, G. and P. Cook. 2004. "The Audicle: A context-sensitive, on-the-fly audio programming environ/mentality." In Proceedings of the International Computer Music Conference.
- [4] Wang, G., A. Misra, A. Kapur, and P. Cook. 2005. " Yeah ChucK it! => Dynamic, controllable, interface mapping" In Proceedings of the International Conference on New Interfaces for Musical Expression.
- [5] Wang, G., P. Cook, and A. Misra. 2005. "Designing and implementing the ChucK programming language." In Proceedings of the International Computer Music Conference.
- [6] Wang, G., R. Fiebrink, and P. Cook. 2007. "Combining analysis and synthesis in the ChucK programming language." In Proceedings of the International Computer Music Conference.
[edit] External links
- ChucK homepage
