ChucK

Last updated
ChucK
ChucK logo2.jpg
Paradigm Multi-paradigm
Designed by Ge Wang
First appeared2003;20 years ago (2003) [1]
Stable release
1.5.2.0 / November 2023;1 month ago (2023-11) [2]
Typing discipline Strong
OS Cross-platform
License Mac, Linux, Windows: GPL-2.0-or-later
iOS: Closed Source (Not Public)
Website chuck.cs.princeton.edu

ChucK is a concurrent, strongly timed audio programming language for real-time synthesis, composition, and performance, [3] 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. [4]

Contents

ChucK was created and chiefly designed by Ge Wang as a graduate student working with Perry R. Cook. [1] 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". [5]

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: [6]

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 loopwhile( 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. [8] PLOrk organizers attribute some of the uniqueness of their performances to the live coding they can perform with ChucK. [9]

See also

Related Research Articles

Computer music is the application of computing technology in music composition, to help human composers create new music or to have computers independently create music, such as with algorithmic composition programs. It includes the theory and application of new and existing computer software technologies and basic aspects of music, such as sound synthesis, digital signal processing, sound design, sonic diffusion, acoustics, electrical engineering, and psychoacoustics. The field of computer music can trace its roots back to the origins of electronic music, and the first experiments and innovations with electronic instruments at the turn of the 20th century.

In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, and most commonly, digital logic circuits.

Csound is a domain-specific computer programming language for audio programming. It is called Csound because it is written in C, as opposed to some of its predecessors.

Granular synthesis is a sound synthesis method that operates on the microsound time scale.

SuperCollider is an environment and programming language originally released in 1996 by James McCartney for real-time audio synthesis and algorithmic composition.

MUSIC-N refers to a family of computer music programs and programming languages descended from or influenced by MUSIC, a program written by Max Mathews in 1957 at Bell Labs. MUSIC was the first computer program for generating digital audio waveforms through direct synthesis. It was one of the first programs for making music on a digital computer, and was certainly the first program to gain wide acceptance in the music research community as viable for that task. The world's first computer-controlled music was generated in Australia by programmer Geoff Hill on the CSIRAC computer which was designed and built by Trevor Pearcey and Maston Beard. However, CSIRAC produced sound by sending raw pulses to the speaker, it did not produce standard digital audio with PCM samples, like the MUSIC-series of programs.

<span class="mw-page-title-main">Max (software)</span> Visual programming language

Max, also known as Max/MSP/Jitter, is a visual programming language for music and multimedia developed and maintained by San Francisco-based software company Cycling '74. Over its more than thirty-year history, it has been used by composers, performers, software designers, researchers, and artists to create recordings, performances, and installations.

<span class="mw-page-title-main">Pure Data</span> Visual programming language

Pure Data (Pd) is a visual programming language developed by Miller Puckette in the 1990s for creating interactive computer music and multimedia works. While Puckette is the main author of the program, Pd is an open-source project with a large developer base working on new extensions. It is released under BSD-3-Clause. It runs on Linux, MacOS, iOS, Android and Windows. Ports exist for FreeBSD and IRIX.

Perry R. Cook is an American computer music researcher and professor emeritus of computer science and music at Princeton University. He was also founder and head of the Princeton Sound Lab.

Programming is a form of music production and performance using electronic devices and computer software, such as sequencers and workstations or hardware synthesizers, sampler and sequencers, to generate sounds of musical instruments. These musical sounds are created through the use of music coding languages. There are many music coding languages of varying complexity. Music programming is also frequently used in modern pop and rock music from various regions of the world, and sometimes in jazz and contemporary classical music. It gained popularity in the 1950s and has been emerging ever since.

<span class="mw-page-title-main">Live coding</span> Integration of programming as part of running program

Live coding, sometimes referred to as on-the-fly programming, just in time programming and conversational programming, makes programming an integral part of the running program.

A synchronous programming language is a computer programming language optimized for programming reactive systems. Computer systems can be sorted in three main classes: (1) transformational systems that take some inputs, process them, deliver their outputs, and terminate their execution; a typical example is a compiler; (2) interactive systems that interact continuously with their environment, at their own speed; a typical example is the web; and (3) reactive systems that interact continuously with their environment, at a speed imposed by the environment; a typical example is the automatic flight control system of modern airplanes. Reactive systems must therefore react to stimuli from the environment within strict time bounds. For this reason they are often also called real-time systems, and are found often in embedded systems.

A laptop orchestra or laptop ensemble (LE) is a chamber music ensemble consisting primarily of laptops. Education based laptop orchestras include SCLOrk , BLOrk, CLOrk, CMLO, HELO, L2OrkOLO, PLOrk, SLOrk, SAMPLE, and ELUNM (Ensamble de Laptops de la Universidad Nacional de Música in Peru. City based laptop orchestras include BiLE, MiLO, and BSBLOrk.

Live electronic music is a form of music that can include traditional electronic sound-generating devices, modified electric musical instruments, hacked sound generating technologies, and computers. Initially the practice developed in reaction to sound-based composition for fixed media such as musique concrète, electronic music and early computer music. Musical improvisation often plays a large role in the performance of this music. The timbres of various sounds may be transformed extensively using devices such as amplifiers, filters, ring modulators and other forms of circuitry. Real-time generation and manipulation of audio using live coding is now commonplace.

<span class="mw-page-title-main">Impromptu (programming environment)</span>

Impromptu is a Mac OS X programming environment for live coding. Impromptu is built around the Scheme language, which is a member of the Lisp family of languages. The source code of its core has been opened as the Extempore project.

<span class="mw-page-title-main">Music and artificial intelligence</span> Common subject in the International Computer Music Conference

Artificial intelligence and music (AIM) is a common subject in the International Computer Music Conference, the Computing Society Conference and the International Joint Conference on Artificial Intelligence. The first International Computer Music Conference (ICMC) was held in 1974 at Michigan State University. Current research includes the application of AI in music composition, performance, theory and digital sound processing.

Gareth Loy is an American author, composer, musician and mathematician. Loy is the author of the two volume series about the intersection of music and mathematics titled Musimathics. Loy was an early practitioner of music synthesis at Stanford, and wrote the first software compiler for the Systems Concepts Digital Synthesizer. More recently, Loy has published the freeware music programming language Musimat, designed specifically for subjects covered in Musimathics, available as a free download. Although Musimathics was first published in 2006 and 2007, the series continues to evolve with updates by the author and publishers. The texts are being used in numerous math and music classes at both the graduate and undergraduate level, with more current reviews noting that the originally targeted academic distribution is now reaching a much wider audience. Music synthesis pioneer Max Mathews stated that Loy's books are a "guided tour-de-force of the mathematics of physics and music... Loy has always been a brilliantly clear writer. In Musimathics, he is also an encyclopedic writer. He covers everything needed to understand existing music and musical instruments, or to create new music or new instruments. Loy's book and John R. Pierce's famous The Science of Musical Sound belong on everyone's bookshelf, and the rest of the shelf can be empty." John Chowning states, in regard to Nekyia and the Samson Box, "After completing the software, Loy composed Nekyia, a beautiful and powerful composition in four channels that fully exploited the capabilities of the Samson Box. As an integral part of the community, Loy has paid back many times over all that he learned, by conceiving the (Samson) system with maximal generality such that it could be used for research projects in psychoacoustics as well as for hundreds of compositions by a host of composers having diverse compositional strategies."

<span class="mw-page-title-main">Ge Wang</span>

Ge Wang is a Chinese American professor, musician, computer scientist, designer, and author, known for inventing the ChucK audio programming language and for being the co-founder, chief technology officer (CTO), and chief creative officer (CCO) of Smule, a company making iPhone and iPad music apps. He also helped create the Princeton Laptop Orchestra and later founded its Stanford counterpart Stanford Laptop Orchestra, as well as the Stanford Mobile Phone Orchestra. Wang is the designer of the Ocarina and Magic Piano iPhone apps. Wang is currently an associate professor at Stanford University’s Center for Computer Research in Music and Acoustics (CCRMA). Wang is the author of Artful Design: Technology in Search of the Sublime , a book on design and technology, art and life, created entirely in the format of a photo comic book, published by Stanford University Press in 2018.

Georg Essl is an Austrian computer scientist and musician, who works in the areas of human-computer interaction, acoustics, mobile computing and mobile music. He is a visiting research professor at the College of Letters & Sciences at the University of Wisconsin–Milwaukee, and he is also affiliated with the Center for 21st Century Studies. Prior to that he was an assistant professor at the University of Michigan.

References

  1. 1 2 Dean, R. T. (2009). The Oxford handbook of computer music. Oxford Handbooks in Music Series. Oxford University Press US. p. 57. ISBN   0-19-533161-3.
  2. "github.com/ccrma/chuck" . Retrieved 2021-01-18.
  3. Wang, Ge (2008). The ChucK Audio Programming Language: A Strongly-timed and On-the-fly Environ/mentality (Ph.D.). Princeton University.
  4. "ChucK : Strongly-timed, Concurrent, and On-the-fly Music Programming Language". Archived from the original on 2003-11-18. Retrieved 2013-09-06. ...offers composers, researchers, and performers a powerful programming tool for building and experimenting with complex audio synthesis/analysis programs, and real-time interactive music.
  5. Wang, Ge. "ChucKian greetings and updates!". chuck-users mailing list. Princeton University. Retrieved 2011-05-24.
  6. Wang, G. and P. Cook (2003). "ChucK: A concurrent, on-the-fly audio programming language" (PDF). Proceedings of the International Computer Music Conference.
  7. "FLOSS manual". Flossmanuals. Retrieved 2021-01-18.
  8. Kirn, Peter (July 22, 2009). "Interview: Smule's Ge Wang on iPhone Apps, Ocarinas, and Democratizing Music Tech". Create Digital Music. Retrieved 2011-05-24.
  9. Petersen, Brittany (2008-06-11). "Laptop Orchestra Makes (Sound) Waves". PC Magazine. Archived from the original on 2017-07-11. Retrieved 2017-08-25. The other thing that set PLOrk apart from the beginning was its use of a text-based program called ChucK, developed by a Princeton graduate student. ChucK allows the user to code quickly—similar to live coding—and "on the fly" for a performance, allowing for the spontaneity and real-time interaction that is important in live music performance. "ChucK is the only language that I know of that was designed from the outset to facilitate that," Trueman says. The program is also "concurrent," meaning that it can handle many different processes going on at once. Its "innate sense of time" allows performers to communicate during live rehearsals and performances, he says, adding that many other laptop musicians probably use a program like Max/MSP (which PLOrk uses in addition to ChucK) or another widely available commercial program. Today some other laptop orchestras—including the Stanford Laptop Orchestra (SLOrk), which was directly inspired by PLOrk—also employ ChucK.

Further reading

Literature by its authors

Seemingly independent coverage