RPM Disc Encoder / Decoder Prototype – extremely lossy voice-range transform

1. Input Audio

Load or record an audio clip (mono/stereo) – we downmix to mono, extract a sparse voice-band spectrogram and encode to a circular disc PNG.

Label preview — shows the imported image. If empty, import failed.

2. Encode ➜ Disc

Convert the clip into 6 quantized voice bands (80–4000 Hz) per frame. Each frame becomes 3 bytes packed into angular/radial pixel cells of a disc. Outside the disc is transparent.

Encoding Parameters
Bands:?
Bits/Frame:?

Debug Pipeline

Play audio reconstructed from different intermediate stages to isolate loss sources.

2. Import Disc ➜ Decode

Load a previously exported disc PNG; we reconstruct the spectrogram & synthesize back an approximation of the audio (additive band-limited synthesis).

Notes

This is a deliberately esoteric, very lossy encoding. It packs only six coarse energy bands (4-bit each) per time frame -> 24 bits/frame (3 bytes). Frames are arranged radially with angular indexing. Reconstruction invents phases and sums band-limited sines.

Intended for experimentation & curiosity – not archival fidelity.

Packing Layout
Byte0: B0(hi4) B1(lo4) | Byte1: B2 B3 | Byte2: B4 B5

Metadata: Center pixel 0,0 (relative to center) stores frame count (24-bit). The pixel to the right stores sample rate (16-bit) + bandCount (low 8 as band count). Alpha=255 inside disc, 0 outside.