Programming for Musicians and Digital Artists
Creating Music with ChucK
Ajay Kapur, Perry Cook, Spencer Salazar and Ge Wang
Manning – paperback
Manning’s Programming for Musicians and Digital Artists is enjoyable, informative reading, particularly if you like music and programming and are motivated to combine them in some way.
The book offers plenty of clear how-to content for those who want to take their first deep dives into the techniques needed to make, modify and perform music using computers.
Indeed, this excellent guide can help take you from generating “Hello, World” and “Twinkle, Twinkle, Little Star” to linking up with MIDI devices and creating sophisticated music and sounds that can be used in live performances and elsewhere.
Don’t be scared by the word “Programming” in the title. Yes, it can help–but it is not required–to have a little bit of programming experience. As you start working with the audio-centric programming language ChucK, you will simply type a few brief lines of code or paste them from downloaded files into a simple on-screen tool known as the “miniAudicle.” With this tool, you can then make changes and hear the results “instantly without interrupting other sounds being synthesized and heard,” the authors point out. You also can save your files, load different files and do other tasks quickly.
The free, open-source ChucK programming language, the authors’ emphasize, “is designed specifically for real-time sound synthesis and music creation.” Their book provides numerous short code examples to tinker with, as well as a few basic physics, math and music pointers that illustrate features and help support the authors’ descriptions.
Note: If your goal is to sit down at a keyboard and immediately start creating digital music, you may want to skip this book and look for other options. The authors concede that “many artists are happy with over-the-counter software systems and controllers for real-time performance work. And there are many who only want to use computers to produce static final products in the form of .wav/.mp3 files, CDs or collections of songs, sound tracks for videos, and more. A large number of those artists are happy to learn and use the packages and tools from commercial or free sources.
“But there are many, and we’re betting you’re one, who want more,” they add. “Maybe you’re coming to this book with a big idea (or many big ideas) and want the tools to help you realize it/them. Maybe you’re looking to shift directions in your art making. Or perhaps you already know how to program in a language such as Java, but you find it doesn’t do what you want.”
ChucK gives you “greater under-the-hood access” than some of the other popular music/sound languages and systems, such as Csound, SuperCollider, JSyn, Max/MSP and PD (Pure Data). And Chuck, the authors note, “is generally more succinct, requiring much less code (lines of typed text) than these other languages in order to accomplish a particular task.”
You learn how to work with many different tools, ranging from oscillators, to filters, to delay generators, reverberators and other audio effects, and MIDI (even without a MIDI interface and cable). You also learn how to generate the sounds of several different musical instruments.
ChucK has a key emphasis on ease of controlling time: for example, how long a tone or sounds occurs, how often it occurs within a set time period, and how long are the silences between tones or sounds.
I have not yet tried all of the code examples in the book, but the ones I have tried in several chapters have worked very well on a Windows laptop and are easily modified and tested in real time using the miniAudicle. (The book also shows how to install ChucK on Mac OS X and Ubuntu Linux systems).
Thus far, I have encountered only one typo in the printed book’s code examples. In Listing 1.8, “Playing notes with integer values,” there is a mistake in the line that is supposed to multiply the frequency of a tone pitch by 2. However, the line is printed “1 *=> myPitch;” — which simply repeats previous pitch. Changing the line to “2 *=> myPitch;” fixes the problem and takes only a couple of seconds to implement in the miniAudicle.
— Si Dunn