Foreword - Programming for Musicians and Digital Artists: Creating music with ChucK (2015)

Programming for Musicians and Digital Artists: Creating music with ChucK (2015)

Foreword

“Happy ChucKing!”

What could this short phrase, uttered by Ge Wang, one of the authors of this excellent book, mean? My interpretation is “Happy ChucKing!” means exploring and composing sound in a playful way with ChucK, the programming language that is the basis of this book. But, “ChucKing” is more than that—it’s an approach to learning to code with a focus on the arts; it is both lively and profound.

Like many, I care about the visual arts and music more than anything else. I am interested in computers too, but primarily as tools to make images and noise. However, through the many times I failed to learn how to program computers from the ages of 10 to 25, I was forced to learn to code by making text—by printing “Hello World” to a screen or writing code to calculate numbers. To clarify, I like to write and I find math invaluable for what I love to do, but words and numbers are never the focus. They are always a means to an end.

What if I could have learned to program through what I cared about the most? To learn to program by making images and noise? Before computers became the extraordinary media machines they are today, most people used computers to work with only text. Students who were most interested in images and sound weren’t able to learn to program by pursuing their passions. Fortunately, this has changed and now computers (from mobile phones to supercomputers) can generate images, synthesize sound, and do much more. Unfortunately, most learn-to-program classes remain the same way they were 40 years ago—learning to program forces everyone, visual artists and musicians alike, into the rigid constraints of inputting and outputting alphanumeric characters.

I struggled through learning to code in the traditional way. For the last decade, I have taught people how to program through a new programming platform that I co-invented with Ben Fry. At MIT in 2001, we started to develop a programming language and environment called Processing. Processing was created for people to learn how to program for the first time and to encourage “sketching” with code. The most important thing about Processing is that people learn all of the basics of coding, but they learn through working with dynamic visual media—for instance, drawing, color, and animation. At the time we were starting Processing, we didn’t know that Ge Wang, then a graduate student at Princeton, was doing the same thing for the domain of music. Through his “on-the-fly” programming language, ChucK, people learn to program through creating sound.

One of the first programs you’ll see in this book cuts to the core:

SinOsc s => dac;

440 => s.freq;

1:: second => now;

This program creates a pure tone for one second; it’s the software equivalent of hitting a piano key for the first time. This is an extraordinary way to learn to program; it invites exciting questions. What is this strange => symbol? To what does 440 refer? The answers to these questions open a new world; a new way to think about making sound and music while simultaneously learning the basics of coding. From this program, a new world of possibilities opens.

I was thrilled to read Programming for Musicians and Digital Artists. With a plethora of well-explained examples in the fascinating ChucK language, readers learn in an engaged, hands-on way. I can’t imagine a more knowledgeable and clever group to write about learning to program through creating music. Ajay Kapur, Perry Cook, Spencer Salazar, and Ge created ChucK and developed the way it is taught. After over a decade of experience with ChucK in the classroom and deep experience prior to that, this book sets the bar impossibly high. I hope you enjoy learning to code the “ChucKian” way and “Happy ChucKing!”