Skip to main content

Morse Code Audio Engine

Generate and play Morse code audio with the Web Audio API. Choose from four waveforms, adjust WPM speed and frequency, visualize the waveform in real-time, and download WAV files, all without leaving your browser or sending data anywhere.

39 chars · 0:08 total
.... . .-.. .-.. --- / -- --- .-. ... .
Waveform Visualizer
sine
0:000:08
15 WPM
Dot: 80ms · Dash: 240ms
70

How the Audio Engine Works

The audio engine is built on the Web Audio API, a low-level JavaScript API for real-time audio synthesis in the browser. When you press Play, the engine reads your Morse input (either typed directly or converted from plain text), computes a precise schedule of tones and silences using the ITU-R M.1677 timing rules, and asks the browser to fire oscillators at the exact milliseconds those tones should begin.

Each tone is a short burst of an oscillator running at your chosen frequency (default 600 Hz). A gain envelope ramps the volume up at the start of the tone and down at the end so the oscillator does not click on or off abruptly. Without that envelope, the leading edge of every dot would produce an audible pop that distracts from the rhythm. With it, the audio sounds clean and continuous, just like a real CW transmitter.

An AnalyserNode sits between the oscillator and your speakers. It samples the audio waveform 60 times per second and feeds the data to a canvas, which draws the bouncing waveform visualizer you see above the Play button. The visualizer is purely diagnostic. It does not affect the audio, but it is a useful sanity check that the engine is actually producing sound, especially on systems where the volume is muted or low.

The download button uses an OfflineAudioContext to render the same schedule to a 16-bit PCM WAV file. Offline rendering is much faster than real-time (a 10-second Morse message renders in a fraction of a second), and produces a lossless file that plays in any audio player. The file uses the same WPM, frequency, and waveform as the live preview, so what you hear is exactly what you download.

Timing and the PARIS Standard

Morse code timing is built around a single unit: the duration of one dot. Every other duration (the dash, the silence between symbols, the silence between letters, the silence between words) is a fixed multiple of that dot. The reference word used to calibrate the speed is PARIS, which contains exactly 50 dot-units including all gaps. So a speed of 1 word per minute (WPM) means 50 dot-units per minute, and the dot duration in seconds is 1.2 / WPM.

The audio engine applies this formula on every WPM change. At 5 WPM a dot is 240 ms (slow enough for a beginner to write down each letter); at 15 WPM it is 80 ms (the standard ham radio examination speed); at 25 WPM it is 48 ms (a comfortable conversational speed for experienced operators); at 40 WPM it is 30 ms (close to the upper limit of human copy speed). The dash is always exactly three times the dot duration, the inter-letter gap is three dots, and the inter-word gap is seven dots.

dot_duration (seconds) = 1.2 / WPM Example at 20 WPM: dot = 1.2 / 20 = 0.060 s (60 ms) dash = 3 × 60 = 0.180 s (180 ms) letter gap = 3 × 60 = 0.180 s (180 ms) word gap = 7 × 60 = 0.420 s (420 ms) full PARIS = 50 × 60 = 3.000 s (one "word" at 20 WPM)

If the rhythm feels wrong, double-check the WPM setting and make sure the frequency is at least 400 Hz. Tones below 400 Hz can sound muffled and make the gaps hard to perceive. For practice at very slow speeds, enable the visual flash so you can see each dot and dash as well as hear it.

Choosing the Right Waveform

The audio engine offers four waveforms. Each has a distinct harmonic character that affects how easy the Morse is to hear, especially through noise or at low volumes. Pick the one that matches your use case.

Sine

Pure single-frequency tone. Smooth, mellow, and easy on the ear for long sessions. The default for learning and casual listening.

Best for: Default listening, study sessions, headphone use

Square

Rich in odd harmonics. The classic CW radio tone that cuts through noise and interference. Best when you need maximum intelligibility.

Best for: Ham radio practice, noisy environments, authentic CW sound

Triangle

Softer than square but brighter than sine. A good middle ground when sine feels too plain but square feels too harsh.

Best for: Moderate-volume listening, blended practice sessions

Sawtooth

Most harmonically rich waveform. Bright and buzzy, easy to pick out at low volumes, but can fatigue the ear at high frequencies.

Best for: Low-volume listening, hearing through background noise

Audio Engine FAQ

How does the Morse code audio engine work?+

The engine uses the Web Audio API to schedule short oscillator bursts in precise time slots. For each dot and dash in your Morse input, it creates an oscillator at your chosen frequency and waveform, applies a gain envelope so the tone ramps on and off cleanly, and stops it for the silence gaps defined by the ITU timing rules. The result is clean, click-free Morse audio generated entirely in your browser. No server round-trip, no audio files to download.

What is the PARIS standard and why does it matter?+

PARIS is the reference word used to calibrate Morse code speed. The word PARIS (including the inter-character and inter-word gaps) takes exactly 50 dot durations to send. So a speed of 1 word per minute (WPM) means 50 dot durations per minute, and one dot duration equals 1.2 divided by the WPM. At 15 WPM a dot is 80 ms; at 20 WPM it is 60 ms; at 25 WPM it is 48 ms. The audio engine uses this formula to keep timing accurate at any speed.

Which waveform should I choose?+

Sine is the default and the most pleasant for long listening; it is the closest to a pure tone with no harmonics. Square is the classic CW radio sound, rich in odd harmonics, cutting through noise. Triangle is softer than square but brighter than sine. Sawtooth is the most harmonically rich and the easiest to hear at low volumes or through background noise, but it can sound harsh at high frequencies. If you are not sure, start with sine.

Can I download the generated audio as a file?+

Yes. Click the Download WAV button and the engine renders the current Morse input to a 16-bit PCM WAV file using an OfflineAudioContext, then downloads it directly to your device. The file uses the same WPM, frequency, and waveform settings as the live preview, so the downloaded audio matches what you hear during playback. WAV is uncompressed and plays in every audio player.

What frequency should I use for Morse code?+

There is no mandatory international tone frequency for Morse code, but 600 Hz is the de facto convention used by most ham radio CW operators and is the default on most practice tools. Many operators prefer a slightly higher tone (700–800 Hz) for clarity, while 400–500 Hz can sound more mellow. The audio engine lets you choose any frequency from 200 Hz to 1200 Hz. Avoid going below 300 Hz; the tone becomes hard to distinguish and the rhythm feels muddy.

Why does my audio cut off or sound choppy?+

The most common cause is a browser throttling background audio. Make sure the tab is in the foreground and not muted. Some browsers block audio playback until you interact with the page. Clicking the Play button counts as an interaction, so the first click should work. If you are on mobile, check that silent mode is off and that the browser has permission to play sound. Very high WPM settings (above 35) can also sound choppy on slow devices because the scheduler has to fire many oscillators per second.

Can I use this audio engine for practice?+

Absolutely. Set the WPM to a comfortable speed (5–8 for beginners, 12–15 for intermediate), enable the visual flash, and use the Repeat option to loop the audio while you write down what you hear. For structured drills with built-in scoring and streaks, pair this engine with the practice trainer. For sending practice, use the telegraph key simulator. It lets you tap out Morse and decodes it in real time.

Put It Into Practice

Pair the audio engine with these companion tools for a complete Morse code learning and practice workflow.