# Database inside a song experiment

This experiment composes an original 40-second stereo synth track, compresses a complete SQLite database, protects each packet bit with repetition-3 majority voting, and carries the frame as 18/20 kHz binary frequency-shift keying in the stereo side channel.

## Reproduce

    python -m venv .venv
    .\.venv\Scripts\python.exe -m pip install -r requirements.txt
    .\.venv\Scripts\python.exe run_experiment.py

On macOS or Linux, use .venv/bin/python.

## Passing conditions

- outputs/side-channel.wav remains an ordinary 48 kHz, 16-bit stereo PCM song.
- The decoder operates on the written WAV rather than the in-memory source.
- The recovered database matches the source SHA-256 byte for byte.
- SQLite returns ok from PRAGMA integrity_check.
- The recovered database exposes the expected track title and liner notes.

The benchmark tests deterministic digital transformations. It does not claim that the payload survives lossy streaming services, mono speakers, a physical speaker-to-microphone loop, or unknown timing drift. Mono conversion and a 15 kHz low-pass filter are expected to remove the stereo-side carrier.

## Outputs

- side-channel.wav: the playable song containing the database.
- source.sqlite and recovered.sqlite: the original and decoded databases.
- manifest.json: hashes, protocol parameters, signal levels, and recovery summary.
- benchmark.csv: exact recovery outcomes for every channel transformation.
- waveform-spectrum.png: first-party waveform and spectrum evidence.

## Verify the published outputs

Run `python verify_artifact.py` to check the committed WAV metadata, source and
recovered SHA-256 hashes, SQLite integrity and recovered rows, plus all 12
benchmark outcomes without regenerating the song.
