Skip to main content

Tools — Build it yourself

WAV Encoder: Build a Workout Timer File

An uncompressed audio file is the most honest file format on this site: a 44-byte header, then the sound itself, one number after another. This tool writes those numbers in your browser to build an interval timer — a beep at the start of every work round, a lower beep at the start of every rest, silence in between — and hands you the result as a real WAV file, generated from your settings on your device. The preview player below plays the exact same bytes the download button saves.

Each beep is a sine wave, the purest tone there is, computed sample by sample: the value at any moment is the sine of the elapsed time times the frequency, scaled to fit the 16-bit range. Silence is simpler still — zeros. At 8,000 samples per second, a five-minute timer is 2.4 million numbers, and the script writes every one of them. That sample rate is half of what a telephone call uses and a fifth of a compact disc’s, chosen honestly: beeps need clarity, not fidelity, and the file stays small enough to build instantly.

The header is a form the file fills in about itself. A player reads it first and learns everything it needs before it plays a single sample:

WAV Encoder: Build a Workout Timer File
FieldThis fileWhat it tells the player
Chunk ID / formatRIFF / WAVEThe container type, in plain letters
Audio format1 (PCM)Samples are raw numbers, not compressed
Channels1 (mono)One stream of samples, not two
Sample rate8,000 HzHow many samples make one second
Byte rate16,000 per secondSample rate times bytes per sample frame
Block align2 bytesOne frame: one 16-bit sample, one channel
Bits per sample16Each sample is a signed number, -32,768 to 32,767
Data sizeFile size minus 44Where the sound ends

Byte rate and block align are not new information — they are arithmetic on the other fields, repeated so a player can stream the file without thinking. That redundancy is typical of RIFF, the resource interchange format WAV belongs to: a little ceremony up front, then raw data. Set your rounds, check the duration and size readout, and take the file to whatever speaker runs your training.

Loading the encoder…