Most beginners memorise the Morse alphabet in an afternoon — A is .-, B is -..., and so on. Then they try to send or decode a real message and it falls apart. The reason is rarely the dots and dashes. It's the timing.
Morse code is not just two symbols. It is a timed rhythm, and every pause matters as much as every signal. The international standard defines five simple rules, all measured in "units". One unit is the base duration — the length of a single dit. Everything else is a multiple of it.
The five timing rules
- A dit (
.) lasts 1 unit. - A dah (
-) lasts 3 units. - The gap between signals within one letter is 1 unit. Without this rule, the three dits of S (
...) would merge into one long blur. - The gap between letters is 3 units. This is what tells the listener that
.-(A) is followed by-.(N), rather than reading the whole string as a single letter. - The gap between words is 7 units. This is the longest silence, and it is what makes SOS (
... --- ...) readable as three distinct letters.
Put another way: within a letter, signals are separated by 1 unit; letters are separated by 3 units; words are separated by 7 units. Miss any one of these and decoding becomes guesswork.
What is a unit?
A unit is not fixed — it depends on your speed. Speed is measured in words per minute (wpm), and at the standard of 20 wpm one unit is roughly 60 milliseconds. So a dah lasts 180 ms, the gap between letters is 180 ms, and the gap between words is 420 ms. Slower sending simply means a longer unit; the ratios never change. That is the hidden elegance of the system: it scales to any speed as long as the ratios hold.
Putting it into code
If you have ever built a Morse player in JavaScript, you have had to model these timings. Here is a small function that converts text into a timed signal list — each entry holds the character, the signal, and its duration in milliseconds:
const MORSE = { A: '.-', B: '-...', C: '-.-.', D: '-..', E: '.', F: '..-.',
G: '--.', H: '....', I: '..', J: '.---', K: '-.-', L: '.-..', M: '--',
N: '-.', O: '---', P: '.--.', Q: '--.-', R: '.-.', S: '...', T: '-',
U: '..-', V: '...-', W: '.--', X: '-..-', Y: '-.--', Z: '--..' };
function textToTimedMorse(text, unitMs = 60) {
const plan = [];
for (const ch of text.toUpperCase()) {
if (ch === ' ') { // 7-unit gap between words
plan.push({ ch: ' ', sig: 'gap', ms: unitMs * 7 });
continue;
}
const code = MORSE[ch];
if (!code) continue;
for (const sig of code) { // dit = 1 unit, dah = 3 units
plan.push({ ch, sig, ms: sig === '.' ? unitMs : unitMs * 3 });
plan.push({ ch, sig: 'gap', ms: unitMs }); // 1-unit gap inside a letter
}
plan.push({ ch, sig: 'gap', ms: unitMs * 2 }); // complete the 3-unit letter gap
}
return plan;
}
console.log(textToTimedMorse('SOS'));
Each element of the array is a single instruction for a player: sound the tone for ms milliseconds, then stay silent for the gap. The function returns exactly the [{ch, sig, ms}] shape that an audio scheduler or LED blinker can consume directly.
Hearing the rhythm
Reading about timing is one thing; hearing it is another. Try Morse Zone — a free online Morse code translator that converts text to Morse code and decodes it back instantly, with audio playback so you can hear correct timing in action. If you want the letter patterns at a glance while you practise, keep the morse code alphabet chart open beside it.
Learn the alphabet in an afternoon, then spend a week on the timing. That is where the signal becomes a language.
Top comments (0)