Part 1. Introduction to programming in ChucK

 

In chapter 0 we told you why we wrote ChucK, why we love programming in it so much, and some of the things we’ve done in our own art making.

Now, in these first five chapters we will teach you the basics of programming in ChucK. Chapter 1 begins with the basics of ChucK, including variables, types, conditional statements, and looping structures. With these features of ChucK, you will quickly be putting together a program to synthesize the first few notes and bars of a song. Chapter 2 introduces the libraries (tools) built into ChucK. Using those functions, you’ll be able to set and modify pitches, volumes, and durations of the notes in your songs. You’ll also learn how random numbers and mathematical calculations can be used to make much more interesting music automatically, letting the computer do most of the work.

In chapter 3 we introduce arrays, and show how to make, store, and play melodies more easily. We also show how to control other parameters in ChucK. In chapter 4 we show you how to use sound files in ChucK and how you can use them to create soundscapes and even a cool electronic dance piece. Chapter 5 introduces the concept of functions and how they can be used in modularizing and organizing your code.