# Actual MP3 and WAV size comparison

These five MP3s are new local encodes of an existing original Saturalabs test
signal: `/audio-examples/loudness/pulsed.wav`. The original WAV is unchanged,
mono, 48 kHz, 16-bit PCM, 192,000 frames, four seconds and 384,044 bytes. It is
a 440 Hz synthesized tone with short louder pulses, quieter intervals and 20 ms
outer fades. It is not speech, a music performance or an AI separation result.
Its existing generation/license notes are `/audio-examples/loudness/README.md`.

## Generation

`scripts/generate-format-examples.ts` reads the stored integer PCM, decodes it
to floats and invokes the same `encodeMp3Async` path used by the free tools.
The script uses a Node adapter to run the actual shipped classic worker and
unmodified lamejs 1.2.1 encoder. It is not a browser interaction test. No extra
fade, normalization, trimming, tags or artwork are applied/copied. Rates are
64, 96, 128, 192 and 320 kbps, independently encoded from the same original.

Each actual MP3 is inspected with FFprobe and decoded with FFmpeg. The included
`measurements.json` records source/encoder/worker SHA-256, actual byte counts,
codec/rate/channels, payload estimates and decoded lengths. `file-sizes.csv`
contains the measured comparison table, including the original WAV row.

Run from the repository root with Node and FFmpeg/FFprobe installed:

```
node --import tsx scripts/generate-format-examples.ts
node --import tsx --test tests/format-examples.test.ts
```

## What the numbers establish

Actual MP3 sizes are 32,256 / 48,384 / 64,512 / 96,768 / 161,280 bytes for the
five increasing bitrates. The four-second payload estimates are 32,000 / 48,000 /
64,000 / 96,000 / 160,000 bytes. The stored encodes contain 168 MPEG audio frames,
each representing 1,152 decoded samples: 193,536 frames at 48 kHz, or 4.032 s.
The original has exactly 192,000 PCM frames. Codec delay/padding accounts for
additional decoded duration; a player/decoder can handle timing metadata
differently. No precise synchronization promise is made for MP3.

The original WAV adds its basic 44-byte header to a 384,000-byte PCM payload.
Other WAV chunks, encoder settings, MP3 metadata and variable bitrate can change
real file sizes. This controlled mono example is separate from the article's
one-minute stereo size calculations. A byte ratio is not a quality multiplier.

The tone exercise does not establish a recommended bitrate, perceptual codec
quality, speech intelligibility or music fidelity. Do not infer that two files
sound identical merely because this simple signal is recognizable. Keep the
original for editing and compare your actual delivery at a suitable level.

## Reuse and software

To the extent possible under law, Saturalabs dedicates these five derived MP3
files, this measurement JSON and the size CSV under CC0 1.0:
https://creativecommons.org/publicdomain/zero/1.0/ . The original WAV retains
its existing CC0 notice. This dedication does not cover third-party recordings,
other site assets or encoder software. The separate 23-file WAV ZIP is unchanged.

lamejs/LAME attribution and source remain separately available:
`/vendor/lamejs/1.2.1/README.md`, `LICENSE.txt`, `LGPL-3.0.txt`, `GPL-3.0.txt`
and `/vendor/lamejs/1.2.1/lamejs-1.2.1.tgz`.
