The ChucK Audio Programming Language
Keywords: chuck
programming language
audio
music
synthesis
strongly-timed
concurrent
on-the-fly
Princeton University
computer science
Thesis

The computer has long been considered an extremely attractive tool for creating, manipulating, and analyzing sound. Its precision, possibilities for new timbres, and potential for fantastical automation make it a compelling platform for expression and experimentation -- but only to the extent that we are able to express to the computer what to do, and how to do it. To this end, the programming language has perhaps served as the most general, and yet most precise and intimate interface between humans and computers. Furthermore, “domain-specific” languages can bring additional expressiveness, conciseness, and perhaps even different ways of thinking to their users.
This thesis argues for the philosophy, design, and development of ChucK, a general-purpose programming language tailored for computer music. The goal is to create a language that is expressive and easy to write and read with respect to time and parallelism, and to provide a platform for precise audio synthesis/analysis and rapid experimentation in computer music. In particular, ChucK provides a syntax for representing information flow, a new time-based concurrent programming model that allows programmers to flexibly and precisely control the flow of time in code (we call this “strongly-timed”), and facilities to develop programs on-the-fly -- as they run. A ChucKian approach to live coding as a new musical performance paradigm is also described. In turn, this motivates the Audicle, a specialized graphical environment designed to facilitate on-the-fly programming, to visualize and monitor ChucK programs in real-time, and to provide a platform for building highly customizable user interfaces.
In addition to presenting the ChucK programming language, a history of music and programming is provided (Chapter 2), and the various aspects of the ChucK language are evaluated in the context of computer music research, performance, and pedagogy (Chapter 6). As part of an extensive case study, the thesis discusses ChucK as a primary teaching and development tool in the Princeton Laptop Orchestra (PLOrk), which continues to be a powerful platform for deploying ChucK 1) to teach topics ranging from programming to sound synthesis to music composition, and 2) for crafting new instruments, compositions, and performances for computer-mediated ensembles. Additional applications are also described, including classrooms, live coding arenas, compositions and performances, user studies, and integrations of ChucK into other software systems.
The contributions of this work include the following. 1) A time-based programming mechanism (both language and underlying implementation) for ultra- precise audio synthesis, naturally extensible to real-time audio analysis. 2) A non-preemptive, time/event-based concurrent programming model that provides fundamental flexibility and readability without incurring many of the difficulties of programming concurrency. 3) A ChucKian approach to writing code and designing audio programs on-the-fly. This rapid prototyping mentality has potentially wide ramifications in the way we think about coding audio, in designing/testing software (particular for real-time audio), as well as new paradigms and practices in computer-mediated live performance. 4) The Audicle as a new type of audio programming environment that combines live development with visualizations. 5) Extended case studies of using, teaching, composing, and performing with ChucK, most prominently in the Laptop Orchestra. These show the power of teaching pro- gramming via music, and vice versa - and how these two disciplines can reinforce each other.