Experiments › Physics
Math behind the music
Mathematics of Music
A guided experiment in the Stemious app: students read it first, run it at the bench with the sensors listed below, and their data and conclusions are saved to their record. The first steps are below in View mode; the full lab is in the app.
Try it in View mode
Alpha: being verified by teachersThis is how the lab opens in the Stemious app: the first 5 of its 7 steps. To run it with the sensors, record data and take the quiz, students use the app.

Wonder
Is music actually secret math that your ears love to hear?
Show the answer
Every musical note vibrates at an exact frequency. Today you will catch sound waves with a sensor and discover the hidden numbers behind harmonious music.

Introduction
Math Behind the Music
When you strike a piano key or blow into a flute, air molecules wiggle back and forth. Your ears hear this vibration as pitch. Centuries ago, ancient Greek mathematicians discovered that notes sounding pleasing together follow simple number patterns. In this lab, you will capture sound waves with a microphone sensor. Using a special math tool called an FFT, you will find each note's exact vibration speed and unlock the secret ratio of music.
Driving question: Why do certain musical notes sound so harmonious together?
What you will learn
Today you will find out
- I can use a sound sensor and FFT graph to find the frequency of a musical note.
- I can explain how a note's pitch connects to its vibration frequency.
- I can calculate ratios between musical notes to discover a constant step pattern.
- I can find simple whole-number ratios between notes that sound pleasant together.
- I can explain how instrument builders use frequency math to tune keyboards and guitars.
Why it matters: Audio engineers, music producers, and instrument makers use sound frequency every day to tune instruments and create balanced songs.
Safety first
Laboratory and Hearing Safety
- Keep keyboard volume at a moderate, comfortable classroom level to protect your ears.
- Route all power cords and USB cables neatly across the desk so nobody trips.
- Purple gloves = teacher does it. Blue gloves = you do it.
- Keep drinks and water bottles completely away from all keyboards, sensors, and laptops.
- Handle the sound sensor gently. Do not blow or tap directly against the microphone grille.
What you need
- Go Direct Sound Sensor1
- electronic music keyboard1
- Tablet running Graphical Analysis1

Step 1 of 7
Power up and connect the sound sensor
- Press the power button once to turn on your Go Direct Sound Sensor.
- Open Vernier Graphical Analysis on your tablet or Chromebook.
- Tap Sensor Data Collection. Find your sensor in the list. Tap Connect.
- Look at the sensor light. A green LED that blinks shows a good connection.
- The sensor battery is charged.
- Bluetooth is turned on in your tablet settings.
Careful: If you connect to another team's sensor by mistake, you get their sound data instead of yours. Check the 8-digit sensor ID on the back label before you tap Connect.

Step 2 of 7
Set the sampling time to 0.2 seconds
- Tap the Mode button in the bottom-left corner of the app screen.
- Make sure that the data collection mode is Time Based.
- Change the End Collection time to 0.2 seconds. Tap Done.
- A short 0.2-second window captures clean sound waves and does not collect extra room noise.
- The sensor is connected to the app.
- The Mode settings menu is open.
Careful: If you leave collection on the default 10 seconds, the wave graph becomes overcrowded. Make sure the duration says 0.2 s so each individual wave cycle is clearly visible.

Step 3 of 7
Set keyboard voice to flute tone
- Turn on your electronic keyboard. Set its volume to a comfortable medium level.
- Select a clean flute, recorder, or organ voice setting.
- Make sure that you turn off vibrato, chorus, and pitch-bend wheels fully.
- A pure tone makes a smooth sine wave that is much easier to analyse.
- The keyboard volume is moderate and not too loud.
- Desk cables are arranged neatly.
Careful: A complex synth voice with heavy echo creates noisy, bumpy wave peaks. Choose the simplest flute or organ sound available on the keyboard.

Step 4 of 7
Record Middle C (Note C4)
- Locate Middle C (C4, Key 1) on the keyboard.
- Hold the sound sensor microphone port about 5 to 10 cm from the keyboard speaker.
- Press and hold the C4 key to produce a steady tone.
- While the tone plays, click Collect in Graphical Analysis. Keep the key down until collection stops.
- Room is quiet so extra voices are not recorded.
- The sensor points directly at the keyboard speaker.
Careful: If you release the key before 0.2 seconds ends, the wave cuts short. Press and hold the key steadily throughout the entire measurement.

Step 5 of 7
Find the frequency using FFT
- Tap Graph Tools (the small graph icon in the bottom-left of the graph).
- Select Apply FFT from the menu to open the frequency spectrum window.
- Tap the tallest peak on the FFT graph: this is the fundamental frequency of the note.
- Read the frequency value in Hertz (Hz) and record it in row 1 (C4) of your data table.
- A clear sound wave is displayed on the main graph.
- Graph Tools menu is visible.
Careful: If you tap a tiny background noise bump, you get an incorrect frequency. Always select the tallest, sharpest peak on the FFT graph.
2 more steps, then data, observations, conclusions and a quiz
The full lab is free for teachers. Tell us where to send it and we will share it, along with the app for your students.
Where it fits in the syllabus
- Related Class 8, Science, chapter 10: Sound
Versions and what each needs
- Math behind the music
Physics with Vernier, 45 min, Based on a Vernier lab
Needs: Go Direct Sound Sensor
Vernier instruments are designed for education and are not intended for industrial, medical or commercial testing.