Three short, three long, three short: why SOS needs 3.0 seconds
What most people remember about Morse code is the shape of a string of lights, not a span of time. The trouble starts when you want to put telegraph beeps under an old video clip, or check a signal table in a manual for old equipment: how long is a dot, how long is a dash, how long is the gap between symbols inside a letter, and how long are the gaps between letters and between words. The fact that SOS is 9 tones and about 3.0 seconds follows entirely from those few numbers.
The ratios are the standard set: a dot is 1 unit, a dash 3 units, the gap inside a character 1 unit, between letters 3 units, between words 7 units. Speed does not change the ratios; it only changes the length of the base dot. Once the base dot is fixed, every other duration is an integer multiple of it.
| Duration | In dot units | Setting 13 | Setting 5 |
|---|---|---|---|
| Dot | 1 unit | 92 ms | 240 ms |
| Dash | 3 units | 276 ms | 720 ms |
| Between letters | 3 units | 276 ms | 720 ms |
| Between words | 7 units | 644 ms | 1680 ms |
The base dot is calculated very plainly: the dot in milliseconds is 1200 divided by the speed value, rounded down. At the default setting of 13 that gives 92 ms, with an unrounded value of 92.307692. Set the speed to 5 and the dot becomes 240 ms; at 20 it is 60 ms, and pushed all the way to 40 only 30 ms remain. Multiply that through the ratios and the same sentence takes eight times longer at one end than at the other.
Figure 1 | With a base dot of 92 ms, the dash and the letter gap are both 276 ms, and the word gap is 644 ms. Bar lengths are proportional to duration.
How many tones a long sentence needs depends on the symbol count, not the character count
Encoding the full alphabet sentence THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG gives 104 symbols, 54 dots and 50 dashes. Accumulating the timings above tone by tone, up to the end of the last tone, gives 37720 ms, and adding one more dash length of 276 ms at the end is what makes the page report 38.0 seconds. That does not sound long, but the sentence has 43 characters including spaces, 35 character groups and 9 words; that is fewer than four groups per word on average, yet more than eleven tones. The real cost is in the gaps, not in the symbols.
Figure 2 | Tone counts and durations for the four samples at the same speed setting; bars are proportional to tone count. The date string has only 10 character groups but takes 52 tones.
HELLO WORLD is a handier comparison: 10 character groups, 2 words, 32 symbols (19 dots, 13 dashes), which comes to 80 units and 10488 ms accumulated tone by tone. Divide 10488 by the 92 ms base dot and you get exactly 114.000 dot units. I ran all four samples through Morse Code Translator, and its notice reads "Starting playback, 32 tones in total, about 10.8 seconds"; 10488 plus the closing 276 ms, converted to seconds and rounded, is exactly 10.8.
The code table is smaller than you think, but it does not grow by "no more than 5 marks" either
- The whole table has 54 keys: 26 letters, 10 digits and 18 punctuation marks. All 54 code values are distinct, so reverse lookup is one-to-one.
- The shortest code is just 1 mark: a dot decodes to E and a dash to T. Digits are always 5 marks, so five dots is 5 and five dashes is 0.
- There are 13 codes longer than 5 marks, all of them punctuation; the longest is the 7-mark code for $, ...-..-.
One warning about a mismatch with the page copy: the decoding-failure notice always says "each segment may only contain . and - and no more than 5 marks", yet the 7-mark ...-..- still decodes to $, and the 6-mark .-.-.- decodes to a period. That sentence describes the usual length of letters and digits, not the boundary of the whole table. Likewise, the tool description's "20 punctuation marks" is actually 18, so do not count by it.
Tolerance is a whitelist, not "close enough"
So that the various dashes in handwritten copy can get in, there is a set of replacements before encoding: 4 characters map to a dot, 5 to a dash and 2 to a word separator. But it is a whitelist: full-width asterisks, full-width minus signs, Chinese full stops and full-width question marks are not on it and are left as they are. The underscore, on the other hand, is treated as a dash, so encoding A_B gives .- ..--.- -... (the underscore itself is in the table as the 6-mark ..--.-), yet decoding A_B gives ? because the underscore first turns into a dash, the whole string joins into one overlong group and the reverse lookup fails. The clearest example is ._, which normalises to -.- and decodes neatly to K.
Chinese is blunter still: enter two Chinese characters followed by HELLO and the output is just .... . .-.. .-.. ---, with a notice that 2 characters which cannot be encoded have been skipped. To send Chinese at all you first have to convert it to pinyin or four-digit telegraph code; a step that turns characters into Latin, such as Chinese to Pinyin, is unavoidable. Full-width punctuation is skipped the same way, so the idea of translating between Chinese and English punctuation does not hold for this table. Case does not matter at all; everything is uppercased before encoding, so hello world and HELLO WORLD give the same output. If your source mixes the two, run it through Text Case Converter first.
Two more things you can adjust: speed and pitch
The speed field accepts 5 to 40, and the clamping rules are worth knowing: leaving it empty, typing 0 or typing abc all fall back to 13; typing 500 or 41 pushes it down to 40; typing -7, 4 or even 4.9 raises it to 5 (round first, then clamp, with the fractional part thrown away). Pitch is not continuous; there are only four settings, 500, 600, 700 and 800, with 600 selected by default.
Q: Why is the output empty when I type Chinese?
Because the table has no Chinese characters. All four characters of a four-character greeting are skipped, the output is an empty string, and the warning lists the four skipped characters. This is not an encoding failure; those characters are simply not in the table.
Q: How far apart are setting 5 and setting 40, and why start slow?
Eight times. At 5 the dot is 240 ms and the word gap 1680 ms; at 40 the dot is down to 30 ms and the word gap 210 ms. The same SOS is easier to follow at a slow setting because the 3 units that separate one letter from the next are scaled up by the same factor. For beginners I suggest 8 to 13.
Q: Can a playback be reproduced exactly?
No. The encoding is deterministic: the same input always gives the same string of marks. But the timing of playback is computed on the fly from that string and the speed setting in force, with no third parameter to save, so if you need a record, keep the encoded string rather than a recording.
Q: Do the codes in common signal tables match freshly encoded ones?
They do; only the space placement differs. DE is -.. ., CQ is -.-. --.-; AR encoded letter by letter gives .- .-., while signal tables usually write it joined as .-.-., which is the same stretch of sound. The tables and the code table agree on these entries, so you can use them to check your own reading.