Understanding the Physics and Math of a Guitar
Have you ever wondered why a guitar sounds different from a piano, even when they play the same note? The answer lies in a simple but powerful physics concept: **harmonics**.
When a guitar string vibrates, it doesn't just produce one single wave. It creates a **fundamental wave** (the main one that determines the note's pitch) and many smaller, faster waves on top of it. These smaller waves are called **harmonics**. Their frequencies are always exact integer multiples of the fundamental frequency.
This simulation shows you how these waves combine. The unique mix of a note's fundamental wave and its harmonics is what gives it its distinct sound quality, or **timbre**.
How to Read the Graph:
- The **X-axis** shows the **harmonic number** (1st, 2nd, 3rd, etc.).
- The **Y-axis** shows the **relative amplitude** or strength of each harmonic. Notice that the fundamental is the strongest, and the harmonics get weaker as they get higher. This is a key reason for a guitar's warm sound.
- The **bar chart** shows each harmonic's frequency and its relative strength.
- The **colored waves** (red, green, blue) show the individual shapes of the fundamental and the first two harmonics. They are simple, repeating sine waves.
- The **white wave** is the most important part. It's the **combined wave**—the result of all the individual waves adding together. This complex, irregular shape is the actual sound wave that a guitar string produces.
How to Use the Controls:
- **Slider:** Adjust the fundamental frequency to see how all the harmonics and the combined wave scale with it.
- **Buttons:** Click to hear the sound. The "Play Combined Sound" button lets you hear the full, rich timbre created by all the harmonics working together. The individual "Play" buttons let you hear how simple and pure each harmonic sounds on its own.