The Mathematics of Music

Discover the hidden mathematical patterns in sound and harmony

🌊 Interactive Waveform Analysis

Explore how different waveforms create different timbres and sounds. Move your mouse over the waveform to see frequency analysis.

Sine Wave
Square Wave
Sawtooth Wave
Triangle Wave
Frequency: 440 Hz | Note: A4 | Wavelength: 0.78m
Wave Equation: $y = A \times \sin(2\pi ft + \phi)$
Where: A = amplitude, f = frequency, t = time, $\phi$ = phase

🎵 Musical Notes and Frequency Relationships

Click on any note to hear its frequency and see its mathematical relationship to other notes.

The Mathematics Behind Musical Notes

Each note's frequency follows a precise mathematical pattern. Moving up one octave doubles the frequency, while moving down one octave halves it. The ratio between adjacent semitones is the twelfth root of 2 ($ \approx 1.059 $).

Note Frequency Formula: $ f = 440 \times 2^{((n-69)/12)} $
Where n is the MIDI note number (A4 = 69)

🎼 Harmonic Series Explorer

Discover how natural harmonics create the rich timbre of musical instruments. Each harmonic is a mathematical multiple of the fundamental frequency.

Harmonic Frequencies: $ f_n = n \times f_0 $
Where $f_0$ is the fundamental frequency and n is the harmonic number

🎯 Musical Interval Calculator

Explore the mathematical relationships between different musical intervals. See how frequency ratios create consonance and dissonance.

Resulting Note: G4 (392.00 Hz)
Interval Ratios:
Octave: 2:1 | Perfect Fifth: 3:2 | Perfect Fourth: 4:3
Major Third: 5:4 | Minor Third: 6:5 | Major Second: 9:8

🎶 Beat Frequency Generator

Explore how two slightly different frequencies create beating patterns - a fascinating acoustic phenomenon with clear mathematical origins.

Adjust the frequency sliders to hear and see the beating effect when two tones are played together

Beat Frequency: 5 Hz
Beat Frequency Formula: $ f_{beat} = |f_1 - f_2| $
When two waves interfere: $ A_1\sin(2\pi f_1 t) + A_2\sin(2\pi f_2 t) = 2A \cos(\pi(f_1-f_2)t) \times \sin(\pi(f_1+f_2)t) $