Sound and Music

Vibrations in the Air

We’ll start our discussion by considering the sound of a single clap. How is this sound produced, how is it transmitted to us, and how do we hear it?

  • When we clap, we rapidly close our hands together.

  • The resulting impact compresses some of the air trapped between the colliding skin, forcing it out and away.

  • This creates an outward expanding wave of high pressure air (a sphere that increases in radius at the speed of sound).

  • As that wave reaches our ears, it hits the eardrum and causes it to vibrate.

  • Those vibrations move the series of bone and tissue of the inner ear.

  • Which in turn vibrate the cochlea, a small spiral of bone covered with tiny hairs.

  • The movement of those hairs activates neurons, and the resulting signals are interpreted by our brain as sound.

So we can think of sound very generally as a rapid change in air pressure, which will expand outward in spherical waves from its origin.

Expanding Spherical Compression Wave

*Thierry Dugnolle, CC0, via Wikimedia Commons

But what about musical notes?

If the air pressure changes reaching our ear arrives at regular intervals over a sustained period of time, we hear a single, sustained tone. The specific tone we hear depends on the frequency of these pressure changes, which is typically measured as the number of high pressure peaks to reach our ear in a second.

For example, the note we call A4 (sometimes used as a reference tone for concert pitch) is created from vibrations at the frequency of 440 Hz (440 high pressure peaks per second). The following command produces this pitch in scamper:

(import music)
(note 69 qn)

Don’t worry too much about what this command means yet, or where that 69 came from (it’s a MIDI value). We still have a ways to go. We’ll see the music library in lab.

To summarize so far: sound is the result of pressure changes, while musical tones come from sustained vibrations. These pressure changes/vibrations will travel through a medium as expanding waves.

It’s interesting to stop and note that these pressure changes and vibrations don’t have to travel through air alone (although those are the most common sounds we tend to hear). It is possible to hear even when submerged underwater. And stories of people putting their ears to the ground and hearing horses at great distances are actually plausible given the right type of terrain and/or enough horses. In both of these cases, the sounds are being transmitted as vibrations, but with water or rock as the medium.

This also explains why there’s no sound in space: there’s nothing to vibrate in a vacuum.

Acoustics

Musical notes are sustained vibrations in the air (typically). To produce music, we build instruments with parts that vibrate when we play them. Here are some examples of how musical vibrations are produced. For all of these examples, altering the sizes, shapes, and materials can result in dramatically different sounds and dramatically different instruments.

  • Drums produce sound when the thin material stretched across their head vibrates as the result of being struck.

  • When a (guitar, harp, kora, banjo, guqin, pipa, sitar, etc) string is plucked, it vibrates the entire body of the instrument to produce specific tones. Different length strings produce different notes.

  • When a piano key is pressed, it causes a hammer to strike a group of strings in the interior. As the strings vibrate, they cause the whole instrument to vibrate (including other strings). Again, different length strings produce different notes.

  • Drawing a bow across a string can cause the string to rapid vibrate, as with a violin, a cello, an erhu, and many other string instruments.

  • Many woodwinds like clarinets produce music when the musician blows through the mouthpiece. The moving air vibrates a damp reed (thin piece of light wood), which causes the full body of the instrument to vibrate. Depressing valves on can open and close various holes, changing the airflow and shifting the frequency of the vibrations.

  • Brass instruments like trumpets, trombones, and more generally solid-body horns, vibrate as the blown air passes through their body. Valves or sliders can again change the airflow and vibrations.

  • Even the human voice produces song through vibrations! When you sing, your exhaled breath passes through your voice-box and causes it to vibrate. Meanwhile, whistling is the sound produced when quickly blown air vibrates your lips.

  • Computers sound comes through their speakers, which often produce sound by vibrating a diaphragm, a circular stretched material commonly hidden behind a screen.

Pitch, Duration, Loudness, and Timbre

Now that we have an understanding of what musical sound is, let’s start defining the various components of the perceived ‘quality’ of the sound. How can we distinguish different sounds from each other?

There are six qualities of sound often discussed, although we will mainly focus on the first four listed below.

  • Pitch: the perceived note, how “high” or “low” it sounds. Controlled by the frequency of the vibrations, the number of pressure changes per second.

    Pitch

  • Duration: how long the note is sustained, from when the first audible vibrations are produced to when it noticeably ceases or changes.

  • Loudness: how loud or soft the note sounds. Depends on the magnitude of the pressure change: larger changes in pressure lead to louder volumes. The magnitude of the pressure is also called the amplitude of the sound wave, with large amplitudes waves being louder. Dynamics is often a term used to describe changing loudness in music. Note: loudness can also be described based on the listener’s perception of loudness related to the number of nerves firing in the ear.

  • Timbre: a measure of perceived quality of the sound that mostly depends on the “shape” of the sound wave, which is typically dependent on the objects producing the sound and the medium through which it is traveling. We will revisit timbre in the future, where we discuss synthesizing instrumentation ourselves!\

    Timbre

    *By Rburtonresearch - Own work, CC BY-SA 4.0,
    https://commons.wikimedia.org/w/index.php?curid=45074868

  • Texture: the composition of multiple sounds into a single perceived moment of noise, whether harmonized into music or a dissonant cacophony of overlapping sounds.

  • Location: the location of the source of the sound with respect to the listener’s environment.

Each of these qualities are affected by different aspects of the sound wave like its frequency, amplitude, or shape. When we go to synthesize our own music, we will be able to control the actual waves our speakers generate. This will enable us to completely control all of these different qualities of the music we produce.

MIDI and Scamper

Further in the course, we will generate our own sounds. But for now, we are going to limit our interactions to the MIDI interface in the Scamper music library. The timbre of the MIDI music is mostly fixed (except for a few mods like the percussion mod), but the other sound qualities can be controlled through several functions or specified values.

The Pitch of a note is specified by the given MIDI value, which is an integer from 0 to 127. Each of these integers refers to a note in the classical western tradition. Some important note values are 60 (Middle-C, C4, 261.63 Hz) and 69 (A4, Concert Pitch, 440 Hz). The MIDI values from 21 to 108 are the keys on the classical piano.

The Duration of a note can be controlled with dur. We will explore this in much more detail in the future. For now, it is useful to know there are a number of specified values. Two important ones are qn denoting a quarter note (a standard ‘beat’), and en denoting an eighth note (half of a standard ‘beat’).

The Loudness of a note can be controlled through the use of mod and dynamics functions. We’ll see examples in lab.
The mod and percussion functions can be used to have notes represent specific percussive instruments.