Chapter 1. Basics: sound, waves, and ChucK programming

 

This chapter covers

  • Introduction to acoustics, sound, and waveforms
  • Sine waves and other oscillators
  • Variables
  • Control structures and logic

So far we’ve talked about why we think ChucK is the best and most powerful language to make all kinds of art and artistic systems. Now it’s time to begin learning how to program in ChucK to make sound and music. We’ll first talk about sound in general, looking at a graphed sound waveform or two. We’ll talk about properties of sounds in terms of loudness, pitch, and noise. You’ll learn that things that oscillate are fundamental to physics, sound, and music, and you’ll make music with ChucK’s built-in oscillators. You’ll learn:

  • How data is managed and manipulated in ChucK by the use of variables.
  • About the timing mechanisms built into ChucK. The way it handles timing is one of the things that makes it different from all other programming languages, and which makes it so great for programming music, sound, and time-based art.
  • About controlling the flow of your programs by using logical variables and tests, and looping.

By the end of the chapter, you’ll have written your first composition in ChucK!

1.1. Sound waves and waveforms

1.2. Your first ChucK programs

1.3. Data types and variables

1.4. Time in ChucK: It’s about now

1.5. Logic and control structures for your compositions

1.6. Using multiple oscillators in your music

1.7. A final example: “Twinkle” with oscillators, variables, logic, an- nd control structures

1.8. Summary

sitemap