Music is part of our everyday lives. We hear it in movies, video games, classrooms, and through our headphones. Whether we're listening to a favorite song or learning to play an instrument, music gives us opportunities to be creative and express ourselves.
But have you ever wondered what makes music possible?
Behind every melody, rhythm, and musical instrument is science.
From the vibrations of a guitar string to the technology used to record a song, music connects to physics, mathematics, engineering, and computer science in surprising ways.
For students who love music but aren't sure whether STEM is for them, exploring the science of sound can be a fun way to discover how their interests connect to technology.
What Is Sound, and How Does It Work?
Sound begins with vibrations.
When an object vibrates, it causes nearby particles in a material, such as air, to move back and forth. These vibrations travel outward as sound waves.
When sound waves reach our ears, they cause the eardrums to vibrate. Our auditory system converts these vibrations into signals that the brain interprets as sound.
Think about what happens when you pluck a guitar string.
The string vibrates, causing the surrounding air to vibrate as well. Those vibrations travel through the air until they reach your ears.
The same basic principle applies to drums, piano strings, and even our voices.
Understanding sound waves is an important part of physics, but students can begin exploring these concepts through instruments and everyday objects.
Why Do Some Sounds Have Higher Pitches?
Have you ever noticed that a small bell produces a higher-pitched sound than a large drum?
One important factor is the frequency of a sound wave.
Frequency describes how many times a vibration repeats each second. It is measured in hertz (Hz).
Sounds with higher frequencies are generally perceived as having higher pitches, while lower frequencies are perceived as lower pitches.
For example, when you tighten a guitar string, its vibration frequency generally increases, producing a higher note.
When you loosen the string, its frequency decreases, producing a lower note.
This relationship between vibrations and pitch is one reason musical instruments can produce so many different sounds.
It also gives students an opportunity to explore how changing a physical object can affect the sound it produces.
The Mathematics Hidden in Music
Music and mathematics have more in common than you might think.
Rhythm involves patterns, timing, and fractions.
For example, in a common 4/4 time signature, a measure contains four quarter-note beats. A half note lasts two beats, while two eighth notes together last one beat.
Musicians use these mathematical relationships to organize sounds into rhythms.
Mathematics also helps explain musical pitch.
When the frequency of one note is twice the frequency of another, the notes are separated by an octave.
For example, a sound vibrating at 440 Hz and another at 880 Hz are one octave apart.
These relationships show how mathematical patterns can shape something as creative as music.
Students don't need advanced mathematical knowledge to begin noticing these connections. Clapping rhythms, counting beats, and experimenting with different notes can introduce the ideas in an approachable way.
How Engineers Create Musical Instruments
Every musical instrument is an example of engineering.
Engineers and instrument makers must consider how materials, shapes, and dimensions affect sound.
For example, the length and tension of a string influence the pitch it produces.
In wind instruments, the length of the vibrating air column helps determine the notes that can be played.
Drums produce sound when their membranes vibrate, and changing the tension of a drumhead can affect its pitch.
Designing an instrument involves understanding how these physical properties interact.
Even small changes in a design can affect how an instrument sounds.
This is why engineering isn't only about building bridges, robots, or machines. It can also be used to create tools for artistic expression.
How Coding Is Used to Make Music
Technology has changed the way music is created, recorded, and shared.
Today, musicians can use computers to compose songs, generate sounds, and experiment with different instruments.
Digital audio workstations allow users to record, edit, and arrange music on a computer.
Computer programs can also generate sounds by controlling properties such as frequency, duration, and volume.
Students can explore these ideas using beginner-friendly coding platforms.
For example, Scratch includes sound blocks that allow users to play recordings, change sound effects, and incorporate audio into interactive projects.
A student could create a virtual piano where pressing different keys produces different notes.
Another could program a simple drum machine that plays a repeating rhythm.
These activities combine creativity with sequencing, patterns, and computer programming.
Try It at Home: Make Music With Water Glasses
You don't need an expensive instrument to explore the science of sound.
This activity allows students to investigate how the amount of water in a glass affects the pitch it produces.
Materials
Four or five identical drinking glasses
Water
A spoon
A flat, stable surface
Step 1: Prepare your glasses
Place the glasses in a row and fill each with a different amount of water.
Step 2: Make a prediction
Ask which glass will produce the highest-pitched sound when gently tapped.
Step 3: Test your idea
Carefully tap each glass with the spoon and listen to the sound.
Step 4: Compare the pitches
Arrange the glasses from lowest to highest pitch.
Step 5: Experiment
Change the amount of water in one glass and test it again.
What happens to the pitch?
When a glass is tapped, the glass and water vibrate together. Adding more water generally lowers the vibration frequency, producing a lower pitch.
Interestingly, blowing across the opening of a bottle involves a different vibration mechanism, so changing the water level can produce a different relationship between water level and pitch.
Safety note: Use sturdy glasses, tap gently, and have an adult supervise younger children. Stop if a glass becomes cracked or damaged.
This experiment introduces children to vibration, frequency, and scientific testing while allowing them to create their own musical sounds.
Music Can Make STEM More Approachable
Not every student immediately connects with traditional science or engineering activities.
Some children are more interested in music, art, sports, or storytelling.
Connecting STEM concepts to those interests can help students recognize that science and technology are relevant to their everyday lives.
A child who loves playing piano might become curious about sound frequencies.
Someone interested in producing music might enjoy learning about audio software or coding.
A student who likes building things might experiment with designing a homemade instrument.
These experiences can introduce new possibilities without requiring children to abandon the interests they already enjoy.
Discovering STEM Through Creativity
Music reminds us that science and creativity aren't separate worlds.
Understanding sound waves can help explain how instruments work. Mathematics can help us recognize musical patterns. Engineering allows us to design new instruments, while coding makes it possible to create and manipulate digital sounds.
Each field offers a different way to explore the same creative experience.
At Girls Code the World, we believe that helping girls discover STEM begins with showing them how it connects to their interests and everyday lives.
Whether they're experimenting with musical instruments, creating a digital song, or exploring the physics of sound, students are developing curiosity and problem-solving skills that can support future learning.
Because sometimes, discovering a passion for STEM begins with something as simple as listening to your favorite song and wondering how it works.
Sources
1. National Institute on Deafness and Other Communication Disorders — How Do We Hear?
Explains how sound waves travel through the ear and are converted into signals interpreted by the brain.
https://www.nidcd.nih.gov/health/how-do-we-hear
2. The Physics Classroom — Sound Waves and Music
Educational explanations of frequency, pitch, sound waves, and the physics of musical instruments.
https://www.physicsclassroom.com/class/sound
3. Exploratorium — Science of Music
Explores the connections between sound, music, science, and hands-on experimentation.
https://www.exploratorium.edu/explore
4. Scratch — About Scratch
Introduces a beginner-friendly programming platform where students can create interactive projects using animation, sound, and coding.
5. Smithsonian Science Education Center — Science Education Resources
Provides science learning resources and hands-on activities for students and educators.