How to use it
Press the big Play button, or the space bar, to start a tone, and press it again to stop. The volume starts low on purpose: raise it slowly, especially with headphones. Choose the pitch with the slider, an exact number, the step buttons or the note picker. While the tone plays, the readouts show its period, wavelength in air and nearest note, and the oscilloscope and spectrum show the signal your browser really produces. Nothing plays until you press a button.
Controls
- Frequency: a logarithmic slider from 1 Hz to 22 000 Hz, a number box, −10, −1, +1 and +10 Hz buttons, and ×2 and ÷2 for one octave up or down. On the slider the arrow keys change it by 1 Hz, Shift plus an arrow by 10 Hz. Changes glide smoothly.
- Waveform, volume, balance: sine, triangle, square or sawtooth, plus a left/right balance slider.
- Note picker: choose a note name and octave. The A4 reference can be 415 to 466 Hz; the default is 440 Hz.
- Two tones: a second frequency, the beat frequency, and a choice between mixed sound and one tone per ear.
- Sweep: start, end, duration and a linear or logarithmic scale, with a moving marker.
- Hearing experiment, noise, WAV download, link: the page remembers your settings, and a link such as
?f=440opens it at that frequency.
How it works
A pure tone is a sine wave: air pressure rising and falling smoothly a fixed number of times per second. That number is the frequency f in hertz. The time for one cycle is the period T, and the distance sound travels in one cycle is the wavelength λ. In air at 20 °C sound travels at about 343 m/s.
fnote = fA4 · 2n/12 cents = 1200 · log2(f / fnote)
fbeat = |f1 − f2|
At 343 Hz the wavelength is 1 m. A 20 Hz tone is 17 m long, a 20 kHz tone only 17 mm.
Pitch and octaves. We hear ratios, not differences. Doubling the frequency raises the pitch by one octave. In equal temperament an octave has 12 equal semitones, each a factor of 21/12 (about 1.0595) and each worth 100 cents. The page shows the nearest note and your distance from it in cents.
Harmonics. A sine wave has only its fundamental. A square wave adds the odd harmonics with amplitudes 1/3, 1/5, …; a triangle wave also has only odd harmonics, but they fade as 1/n²; a sawtooth has every harmonic with amplitude 1/n. The spectrum panel shows these peaks.
Beats. Two close tones add up to a tone at their average frequency whose loudness swells and fades: sin(2πf1t) + sin(2πf2t) = 2 cos(π(f1−f2)t) sin(π(f1+f2)t). The loudness peaks |f1−f2| times per second. With one tone per ear nothing beats in the air; any pulsing you notice is created by your hearing system.
Hearing range. Humans hear roughly from 20 Hz to 20 kHz. The ear is much less sensitive near both ends, and the upper limit generally falls with age.
Small speakers and low tones. To keep the same sound pressure, halving the frequency means the speaker cone must move about four times as far. A tiny cone in a phone cannot do that, so very low tones come out faint or distorted.
Noise. White noise has equal power at every frequency. Pink noise has equal power in every octave, so its spectrum falls 3 dB per octave. Brown noise falls 6 dB per octave and sounds like a deep rumble.
Safe listening. Sound above roughly 85 dB(A) can damage hearing over long periods. Start quiet and take breaks.
Things to try
- Set 440 Hz and press ×2 several times. Each doubling is the same note one octave higher.
- Play 220 Hz in all four waveforms: same pitch, different sound, different spectrum.
- Add a second tone with a beat of 1 Hz, then 4 Hz, then 10 Hz, and count the pulses.
- Run a logarithmic sweep from 20 to 20 000 Hz over 30 seconds, then a linear one.
- Try the high hearing sweep at low volume and note where the tone fades. Repeat with other headphones.
- Play white, pink and brown noise one after another and compare them with the spectrum.
Frequently asked questions
Is the hearing experiment a medical test?
No. Speakers and headphones cut off at different frequencies, and the volume changes what you hear, so the result says as much about your equipment as about your ears.
Why is the note a few cents sharp or flat?
Most frequencies fall between two notes. Cents measure the distance to the nearest one, and the A4 reference shifts every note.
What is the difference between mixed and one tone per ear?
Mixed tones add up in the air and really beat. With one tone per ear, f1 goes to the left channel and f2 to the right, so any beating is perceived inside the head. Use headphones.
Can I play a frequency above 20 kHz?
The slider goes to 22 kHz, but devices playing at 44.1 kHz cannot go above 22.05 kHz, and few people can hear such tones.