Interactive Dissonance Viewer
This is an interactive simulation inspired by the MinutePhysics video on the physics of musical harmony and dissonance. It allows you to explore the "dissonance landscape" of different sounds, revealing why certain combinations of notes sound pleasant (consonant) and others sound harsh (dissonant).
How It Works
The core idea is that the perceived dissonance of a sound is related to how its frequency components interfere with each other and with the mechanics of our inner ear. A musical note from an instrument is not a single, pure frequency (a sine wave), but a combination of a fundamental frequency and a series of higher-frequency overtones. The specific set of overtones determines the instrument's unique sound, or timbre.
This simulation calculates the total sensory dissonance by summing up the dissonances between every possible pair of overtones from the notes being played. The valleys in the resulting graph (blue areas) represent low-dissonance, consonant combinations, while the peaks (red/yellow areas) are high-dissonance combinations.
How to Use
- Toggle Audio: Click the "Audio" button to enable or disable sound. It's off by default. Headphones are recommended for the best experience.
- Select Mode: Choose between "Intervals" (2 notes) to see a 2D dissonance curve, or "Triads" (3 notes) to see a 2D heatmap of the 3D dissonance surface.
- Select Timbre: Choose a sound source from the dropdown. Notice how the landscape of consonance and dissonance changes dramatically with the overtone structure!
String / Open Pipe
: Has a harmonic series (1, 2, 3, 4...). This is the basis for most Western music.Closed Pipe
: Has only odd harmonics (1, 3, 5, 7...).- Other instruments like
Bell
,Drum
, andBar
have complex, non-harmonic overtones, leading to very different "natural" scales.
- Explore: Move your mouse (or finger on touch devices) over the canvas. The simulation will play the corresponding notes and display their frequency ratios and dissonance level.
- Keyboard Controls: Use arrow keys to move the cursor on the canvas. Press 'A' to toggle audio, 'M' to switch modes, and 'T' to cycle through timbres.
- Play Demo: Press this button to see an automated tour of interesting consonant and dissonant points for the currently selected timbre and mode.
Future Directions
This is a simplified model. A more advanced simulation could include:
- More accurate physiological models of the human ear (e.g., critical bandwidth varying with frequency).
- The ability to define custom overtone series to create your own unique instruments and scales.
- A true 3D view of the triad dissonance surface using WebGL.
- Exploring concepts like the Railsback curve for piano tuning, which compensates for the "stiffness" of real piano strings.