Skip to content

Instantly share code, notes, and snippets.

View fgdrf's full-sized avatar

Frank Gasdorf fgdrf

  • Hamburg, Germany
View GitHub Profile
@michaelfm1211
michaelfm1211 / morse_wav.py
Last active April 10, 2026 12:54
Morse code WAV file generator
from struct import pack
# WAV format reference: http://soundfile.sapp.org/doc/WaveFormat/
# one period of a sine wave in 8 samples
beep = bytes([0x80, 0xd9, 0xff, 0xd9, 0x80, 0x26, 0x01, 0x26]) * 80
# one period of silence
sil = bytes([80] * 8) * 80
# morse code