Random Morse Code Generator
Generate random Morse code sequences with audio playback, visual waveform, and adjustable speed, frequency, and character sets for practice.
About
Morse code proficiency degrades without regular exposure to unfamiliar sequences. Practicing only memorized phrases creates recognition bias rather than genuine decoding skill. This generator produces cryptographically random character sequences encoded in International Morse Code per ITU-R M.1677 standard, with configurable character pools (letters, digits, punctuation, prosigns) and transmission parameters. The audio output uses a pure sine wave oscillator at user-defined frequency f (default 600 Hz) with timing derived from WPM using the PARIS standard: one word-unit equals 50 dot-lengths, so dot duration t = 1200WPM ms.
Note: the generator approximates ideal transmission conditions with instantaneous rise/fall times smoothed by a 5 ms ramp to prevent key clicks. Real-world CW signals exhibit fading, QRM, and operator timing variance not modeled here. For Farnsworth spacing practice, increase word gap independently. Pro tip: start at 15 - 20 WPM character speed with extended spacing to build reflex recognition rather than slow counting.
Formulas
Morse timing follows ITU-R M.1677 ratios. The fundamental time unit is the dot duration, derived from the PARIS word standard where one standard word equals 50 dot-length units.
All other timing elements are integer multiples of tdot:
The audio tone frequency f is independent of speed. Standard CW practice uses 400 - 800 Hz. The oscillator applies a 5 ms raised-cosine ramp on attack and release to suppress spectral splatter (key clicks). Total sequence duration T depends on the random character distribution and is computed as the sum of all element and gap durations.
Where: WPM = words per minute (PARIS standard), tdot = duration of one dot element, f = oscillator frequency in Hz.
Reference Data
| Character | Morse Code | Dot/Dash Units | Category |
|---|---|---|---|
| A | ยท - | 5 | Letter |
| B | - ยท ยท ยท | 9 | Letter |
| C | - ยท - ยท | 11 | Letter |
| D | - ยท ยท | 7 | Letter |
| E | ยท | 1 | Letter |
| F | ยท ยท - ยท | 9 | Letter |
| G | - - ยท | 9 | Letter |
| H | ยท ยท ยท ยท | 7 | Letter |
| I | ยท ยท | 3 | Letter |
| J | ยท - - - | 13 | Letter |
| K | - ยท - | 9 | Letter |
| L | ยท - ยท ยท | 9 | Letter |
| M | - - | 7 | Letter |
| N | - ยท | 5 | Letter |
| O | - - - | 11 | Letter |
| P | ยท - - ยท | 11 | Letter |
| Q | - - ยท - | 13 | Letter |
| R | ยท - ยท | 7 | Letter |
| S | ยท ยท ยท | 5 | Letter |
| T | - | 3 | Letter |
| U | ยท ยท - | 7 | Letter |
| V | ยท ยท ยท - | 9 | Letter |
| W | ยท - - | 9 | Letter |
| X | - ยท ยท - | 11 | Letter |
| Y | - ยท - - | 13 | Letter |
| Z | - - ยท ยท | 11 | Letter |
| 0 | - - - - - | 19 | Digit |
| 1 | ยท - - - - | 17 | Digit |
| 2 | ยท ยท - - - | 15 | Digit |
| 3 | ยท ยท ยท - - | 13 | Digit |
| 4 | ยท ยท ยท ยท - | 11 | Digit |
| 5 | ยท ยท ยท ยท ยท | 9 | Digit |
| 6 | - ยท ยท ยท ยท | 11 | Digit |
| 7 | - - ยท ยท ยท | 13 | Digit |
| 8 | - - - ยท ยท | 15 | Digit |
| 9 | - - - - ยท | 17 | Digit |
| . | ยท - ยท - ยท - | 17 | Punctuation |
| , | - - ยท ยท - - | 19 | Punctuation |
| ? | ยท ยท - - ยท ยท | 15 | Punctuation |
| / | - ยท ยท - ยท | 11 | Punctuation |
| = | - ยท ยท ยท - | 11 | Prosign (BT) |