This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |