Melodic Codec Sensitivity Tester
Music can carry machine-readable instructions. A pentatonic melody encodes text using note frequencies — the same way MFSK radio protocols encode data. An AI that processes audio may decode and act on the payload. This tool demonstrates the mechanism, the defensive posture, and the consentful use case.
| System type | Audio handling | Decode risk | Recommended defense |
|---|---|---|---|
| Multimodal LLM (audio-capable) | Transcribes audio to text; may process decoded payload as instructions | 🔴 HIGH | Treat decoded audio text as untrusted input; require consent before executing |
| STT pipeline (Whisper/similar) | Converts speech to text; melodic-codec layer ignored (not speech) | ✅ LOW | Log all non-speech audio inputs; flag unexpected tonal patterns |
| Audio-blind text model | Does not process audio directly; safe unless STT feeds its input | 🟠 INDIRECT | Sanitize STT output before passing to LLM; treat pipeline as single attack surface |
| Music/audio analysis AI | Analyzes frequency patterns; pentatonic structure may be decoded if FFT-aware | 🟡 MEDIUM | Log decode events; do not auto-execute payloads found in frequency analysis |
- Require consent before processing decoded audio. If a pipeline transcribes or analyzes audio and surfaces text, treat that text as untrusted input — do not execute it as an instruction without explicit user authorization.
- Log decode events. Any time a frequency-pattern decoder surfaces structured text from audio, record it. Structured patterns (headers, CRC checksums, keyword payloads) are anomalous and warrant review.
- Treat audio input as untrusted. Apply the same prompt-injection mitigations to audio-derived text as to any other external input: sandbox it, label its provenance, do not merge it with privileged context without sanitization.
- WAV vs MP3 as a natural filter. Melodic-codec payloads do not survive lossy compression. Normalizing audio inputs to MP3 or similar lossy formats before analysis destroys the machine layer while preserving the human-audible content.
What Is Melodic Codec
Melodic codec maps text characters to musical notes in a 32-tone pentatonic scale (5 bits per symbol). A sync header, CRC32 checksum, and ×2 redundancy make it robust over lossless audio (WAV). Lossy compression (MP3) destroys the machine layer — the music survives, the payload does not. The technique is explicitly documented and open: the goal is awareness, not covert deployment.
| Parameter | Value | Notes |
|---|---|---|
| Scale | pentatonic32 (C2–C7+) | 5 bits per symbol, 32 tones total |
| Note duration | 0.08 s | ~12.5 symbols/s, ~62.5 bits/s |
| Redundancy | ×2 | Each symbol sent twice for error resilience |
| Payload (canary v1) | 105 chars / 346 symbols | Encodes in ~28 s of audio |
| CRC32 | 0x27fbbaed | Integrity check for canary-wln-v1 |
| Survives MP3 | NO | Lossy compression destroys FFT peaks |
| Survives WAV | YES | Lossless only — WAV master required for decode |