How to use it
Press Start sound, then play the piano keys with the mouse, your fingers or the computer keyboard. Choose a preset, then move one slider at a time and listen to what changes. Above the keys, the oscilloscope draws the shape of the sound wave over a few thousandths of a second, and the spectrum shows how strong each frequency is, from bass on the left to treble on the right.
The Instrument switch chooses what the keys play. Poly synth is an eight-voice synthesizer: the boxes under its presets are the signal path, and selecting a box takes you to its controls. Bass line is a one-voice bass synth with a 16-step sequencer: press Play, then edit the steps or turn Cutoff and Resonance while it runs. Organ is a drawbar organ that mixes nine sine waves for every key. Plucked string has six strings to pluck or strum. FM synth has four sine operators that modulate one another.
Controls
- Keys: click or tap a key, or drag across the keys to slide between notes. Several fingers on a touch screen play a chord.
- Computer keyboard: A S D F G H J K L ; ' are white keys starting at C, and W E T Y U O P are the black keys between them (QWERTY key positions). Z and X shift the keyboard down or up an octave.
- Hold keeps notes sounding after you let go; press a key again to stop it. Stop silences every note and switches Hold off, and Mute silences the page.
- Poly synth panels: each of the two oscillators has a waveform, octave, fine detune in cents and level, and there is a noise level. Unison stacks up to seven detuned copies of each oscillator across left and right. The other panels set the filter (low-pass, high-pass or band-pass), the envelope, the LFO, chorus, echo, reverb and master volume.
- Presets: ten starting points, ten Classic styles built on unison, chorus and the filter types, and Reset.
- Bass line steps: tap a step or use the left and right arrow keys. Up and down change its note, and Space makes it a rest. The row below sets note, octave, Gate, Accent and Slide.
- Pattern tools: five built-in patterns, Random, Clear, Shift, Transpose and Copy link.
- Bass voice: waveform, Tuning, Cutoff, Resonance, Env mod, Decay, Accent and Drive; the tempo goes from 60 to 180 beats per minute. With the sequencer stopped, the keys play it one note at a time.
- Organ: drag a drawbar down to pull it out, or focus it and press the arrow keys or a digit from 0 to 8. Seven registrations set all nine at once and play a short chord. Percussion adds a short ping to the first key after all keys were up. Key click adds a brief burst of noise to every note; Vibrato and the Rotary speaker (Off, Slow, Fast) are below.
- Plucked string: tap a string, drag across the strings to strum, or choose one with the arrow keys and press Space. Chord buttons change the notes of the strings; Strum down and Strum up play them one after another. Decay, Brightness, Body, Pluck position and Pluck hardness shape the next note. Body adds the pluck as it rings through four fixed resonances.
- FM synth: eight presets, each played as a short note. Choose an algorithm, then an operator (Op 1 to Op 4) and set its Ratio, Level and envelope. Feedback sharpens the wave of operator 4.
How it works
An oscillator repeats one wave shape many times per second. The number of repeats per second is the frequency, which we hear as pitch. Each key has a number n (A4, the A above middle C, is 69), and its frequency is
So A4 is 440 Hz, every key is about 6 % higher than the one before, and twelve keys up doubles the frequency.
Any repeating wave can be built from sine waves at whole-number multiples of its lowest frequency. These are its harmonics, and their strengths give the wave its tone colour. A sine has only the first harmonic. A sawtooth has every harmonic, with harmonic n at 1/n of the amplitude of the first. A square wave has only the odd harmonics, also at 1/n. A triangle has only odd harmonics at 1/n2, so it sounds soft. Noise has no pitch, because it contains all frequencies at once.
Subtractive synthesis starts with such a rich wave and removes part of it. The low-pass filter of the poly synth passes frequencies below the cutoff and weakens those above it by 12 decibels per octave. Resonance boosts a narrow band right at the cutoff, which gives the sound a nasal or whistling edge. High-pass does the opposite and removes the bass; band-pass keeps only a band around its centre frequency.
The ADSR envelope shapes the loudness of each note. Attack is the time to reach full level, decay is the time to fall to the sustain level, sustain is the level held while the key is down, and release is the time to fade out after you let go. Envelope amount lets the same envelope raise the cutoff by up to six octaves, so with the low-pass filter a note starts bright and then turns duller.
Unison plays several copies of each oscillator a few cents apart. Their waves drift in and out of step, so one key sounds like a group of players. The chorus adds two copies delayed by about 15 ms, and a slow sine wave lengthens one delay while it shortens the other, which bends their pitch slightly.
The LFO (low-frequency oscillator) is a slow sine wave that you do not hear directly. It moves the pitch (vibrato), the cutoff (a wah effect) or the volume (tremolo). The echo is a delay line that feeds part of its output back into its input. The reverb adds the sound convolved with a short burst of fading noise, which stands in for the thousands of reflections in a room.
The bass line follows the small bass-line machines of the early 1980s. One sawtooth or square oscillator feeds a steeper filter, 24 decibels per octave, made of two stages in a row. Each new note kicks the cutoff up by Env mod, and it falls back within the Decay time. With high resonance the filter boosts whichever harmonic sits at the cutoff, so the falling cutoff makes the harmonics ring out one after another. That is the squelch. Soft clipping after the filter rounds off the peaks, and Drive pushes harder into it.
An accent makes a step louder with a deeper, faster sweep. A slide ties a step to the next: the pitch glides there in about 60 ms and the envelopes do not restart. Steps are sixteenth notes, so at T beats per minute one step lasts
At 120 beats per minute that is 125 ms.
The organ uses additive synthesis: it adds pure sine waves instead of filtering a rich one. Counted from the pitch of the key (the 8′ drawbar), the nine drawbars sound at 0.5, 1.5, 1, 2, 3, 4, 5, 6 and 8 times its frequency, and each drawbar step is 3 decibels. As on a tonewheel organ, the tones stay between about 32 Hz and 6 kHz: a partial outside that range sounds whole octaves higher or lower instead. The rotary speaker swings loudness, pitch and left-right position 0.8 or 6.7 times a second.
The plucked string uses the Karplus–Strong method. A burst of random noise, one period long, circles a delay line. A round trip of N samples at fs samples per second gives the pitch fs / N. On every trip a gentle low-pass filter removes some of the high frequencies, so the noise smooths into a tone that fades like a real string. The browser's audio nodes cannot form a loop shorter than 128 samples, so the page computes every note in full when it is plucked and plays it from memory.
The FM synth uses frequency modulation. A modulator is an oscillator that moves the frequency of another one, the carrier, up and down at audio speed. This adds partials at the carrier frequency plus and minus whole multiples of the modulator frequency. The modulation index is the frequency swing divided by the modulator frequency: the higher it is, the more partials are strong. The page modulates the frequency directly, with the sample-to-sample change of the modulator, so the carrier's phase shifts by index times modulator. Feedback is not a real loop: the page computes the wave of an operator that modulates itself and plays it.
Things to try
- Press Reset, set the level of oscillator 2 to zero and step oscillator 1 through the four waveforms. The sine shows a single peak on the spectrum, and the square is missing every second peak.
- Turn on Hold, play a low note and pull the cutoff down. The peaks vanish from the right. Then raise the resonance and watch a bump travel along with the cutoff.
- Detune one of two equal oscillators by 8 cents. At A4 the two waves drift in and out of step about twice a second, which you hear as a slow beat.
- Set sustain to zero and decay to about 200 ms for a plucked sound, or attack to one second for a slow swell.
- Load Wind. Its oscillators are silent: you hear noise shaped by a resonant filter and a slow LFO.
- Hold a note and raise the unison voices to 5: the upper peaks on the spectrum widen and flicker. Then choose high-pass and raise the cutoff: now the peaks vanish from the left.
- Press X and play the same key again. The first peak on the spectrum moves to twice the frequency.
- Switch to Bass line, press Play and sweep Cutoff down and up while the pattern runs. Raise Resonance and do it again.
- Turn on Slide for a step and put the next step an octave higher. The pitch bends up without a new attack.
- On the Organ, compare Hollow Reed, with only odd harmonics (a nearly square wave), and Near Sawtooth, with odd and even ones (a sawtooth-like wave).
- On the Plucked string, set Pluck position to 50 % and pluck a string: every second harmonic almost vanishes from the spectrum. Then try the preset Bare Wire.
- On the FM synth, load Warm Brass, hold a key and move the Level of Op 2: the higher the index, the more peaks the spectrum shows.
Frequently asked questions
Why is there no sound?
Browsers only let a page play audio after a click, tap or key press, so press Start sound first. Then check the master volume and your device volume. On some phones the silent switch also mutes web pages.
How many notes can I play at once?
Eight in the poly synth, or six, five or four with five, six or seven unison voices. One note more takes over a voice: one that is already fading out if there is one, otherwise the oldest note. The organ takes up to 48 notes, the plucked string 16 and the FM synth 10; the bass line plays one note at a time. Many computer keyboards also cannot register certain combinations of keys pressed together.
Can I share a bass pattern?
Yes. Copy link makes a web address that contains the pattern, the tempo and the bass settings.
What is a cent?
One hundredth of a semitone, which is the step between two neighbouring keys. An octave is 1200 cents.
Why do big chords sound squashed?
The limiter turns the level down for a moment when many voices together would go over the maximum. This prevents harsh digital clipping.
Are my sounds stored or sent anywhere?
Only the current settings, the chosen instrument and the bass pattern are saved, in the local storage of your browser. Nothing is uploaded.