# Morse Code Oscillator — OOK Telegraph Keying

Interactive Morse code oscillator. Type a message and watch it encode into dots and dashes with the strict 1:3:7 timing, see the on-off-keyed (OOK) carrier waveform and spectrogram, and play the real telegraph tone. Adjust WPM (words per minute) and carrier frequency.

> Canonical page: https://elysiatools.com/en/visualizations/morse-code-oscillator

- **Category:** Signal Processing

## Overview

Interactive Morse code oscillator that turns typed text into the strict 1:3:7 international Morse timing and plays it as real telegraph sound — an active signal-generation workshop complementing the passive spectrogram-analyzer and the abstract z-transform. Each character encodes to dots (·) and dashes (—) with timing measured in one unit (the dot length): dot=1, dash=3, intra-character gap=1, inter-character gap=3, inter-word gap=7. Speed is quoted in Words Per Minute (WPM) via the standard reference word PARIS (=50 units including its trailing word gap), so one unit = 1200/WPM ms (at 12 WPM a dot is 100 ms, at 24 WPM it is 50 ms). The output is On-Off Keying (OOK, the one-bit case of Amplitude-Shift Keying ASK): a pure carrier sine at f₀ (300–1000 Hz, classic 600 Hz side-tone) switched on during dots/dashes and off in gaps, s(t)=A·gate(t)·sin(2πf₀t), with 5 ms raised-cosine ramps to suppress clicks. Three visualization panels: (1) Keying Timeline showing dot/dash blocks (cyan) and the three gap lengths shaded amber (1/3/7 units), with a moving play cursor. (2) OOK Carrier Waveform showing the gated sine over the first ~12 units with envelope shading marking key-down intervals. (3) Spectrogram (self-implemented STFT with Hann window) where each dot/dash lights up as a horizontal bar at f₀ and the spacing reveals the Morse rhythm, with the carrier line marked. Adjustable parameters: WPM (5–30), carrier frequency f₀ (300–1000 Hz), volume (0–1). Six scenario presets: PARIS (the WPM reference word), SOS (· · · — — — · · · universal distress, sent as one continuous rhythm), Fast (28 WPM contest speed), Slow (6 WPM easy to copy by ear), High Tone (1000 Hz piercing), Low Tone (350 Hz mellow). Real-time statistics: unit duration, dot/dash/letter-gap durations in ms, total message duration, and symbol count. Educational content covers the 1:3:7 timing standard and PARIS WPM calibration, On-Off Keying as the simplest modulation underlying all digital communication, and applications (Samuel Morse & Alfred Vail 1844 'What hath God wrought', transatlantic cables, ship-to-shore, amateur radio, aviator NDB beacons, the Titanic SOS, and why a narrow-band tone still punches through noise). Multi-language support (zh, en, es, fr, de, ru, pt).

## Related content

- [Zero-Order Reaction - Interactive Visualization](https://elysiatools.com/en/visualizations/zero-order-reaction): Interactive visualization of zero-order reaction kinetics and concentration changes over time
- [First-Order Reaction - Interactive Visualization](https://elysiatools.com/en/visualizations/first-order-reaction): Interactive visualization of first-order reaction kinetics and exponential concentration decay
- [Second-Order Reaction - Interactive Visualization](https://elysiatools.com/en/visualizations/second-order-reaction): Interactive visualization of second-order reaction kinetics and bimolecular collision dynamics
- [Arrhenius Equation](https://elysiatools.com/en/visualizations/arrhenius-equation): Interactive visualization of temperature effect on reaction rate - Explore activation energy, pre-exponential factor, and rate constant relationship
- [Reversible Reaction](https://elysiatools.com/en/visualizations/reversible-reaction): Interactive visualization of A ⇌ B reversible reaction kinetics - Explore forward and reverse reaction rates, equilibrium constant, and concentration changes over time
- [Consecutive Reaction](https://elysiatools.com/en/visualizations/consecutive-reaction): Interactive visualization of A → B → C consecutive reaction kinetics - Explore intermediate concentration peaks, rate-determining steps, and complete evolution of all species
- [Chain Reaction](https://elysiatools.com/en/visualizations/chain-reaction): Interactive visualization of free radical chain reaction polymerization - Explore initiation, propagation, termination steps, chain growth animation, and molecular weight distribution
- [Le Chatelier's Principle](https://elysiatools.com/en/visualizations/le-chateliers-principle): Interactive visualization of Le Chatelier's Principle - Explore how changes in concentration, pressure, and temperature affect chemical equilibrium with animated molecular dynamics
