Wave Superposition Cipher
The idea in plain English: Imagine a choir singing together — different voices blend into one sound. Your ears can still pick out the soprano from the bass, right? Now imagine an audio recording that contains multiple musical notes all playing at the same time, blended into one waveform. This puzzle gives you that blended waveform. You run it through an FFT (Fast Fourier Transform — a standard audio analysis tool) to separate the blended notes by pitch. Then you compare two specific notes (like "how many semitones apart are they?"), and that ratio tells you a letter. It's exactly how Shazam identifies songs — it analyzes the frequency pattern of a short audio clip.
Why this really exists: Every music recognition app (Shazam, SoundHound) works by taking an FFT of what your phone hears and comparing the frequency peaks against a database. Speech recognition systems also use FFTs to convert sound into features the AI can process. When you listen to music on Spotify, the audio is compressed by removing frequencies the human ear can't hear well — and that compression uses the Fourier transform too!
▸ Concrete Example
Step 1: Apply FFT → you get frequency peaks:
Peak 1: 262 Hz (Middle C)
Peak 2: 330 Hz (E4)
Step 2: Ratio = 330 / 262 ≈ 1.26
Step 3: Compute semitones = 12 × log₂(1.26) ≈ 4 semitones
Step 4: 4 semitones = C to E = major third interval → maps to letter "E"
Each pair of peaks gives you one interval → one letter. Collect them all → the answer word.
If there are 4 letters in the answer, the waveform contains 8 peaks (4 pairs). Each pair's frequency ratio maps to a different letter.
▸ How Sound Frequency Works (No Audio Engineering Degree Required)
Frequency = how fast the air vibrates. Measured in Hertz (Hz) = vibrations per second.
🎵 What does frequency sound like?
Low frequency (like 60 Hz) = deep bass, like thunder or a bass guitar
Mid frequency (like 440 Hz) = middle range, like a violin or a woman's voice
High frequency (like 2000 Hz) = high pitched, like a piccolo or a whistle
When two notes play at the same time, their sound waves add together into a single, more complex wave. The FFT is a math formula that untangles this blend back into its original parts. It's like untangling a knot of headphones — except with math instead of patience.
▸ What is FFT? (Really Simple)
Fast Fourier Transform is a computer algorithm that takes a sound wave and answers: "Which pitches are in this sound, and how loud is each one?"
🔊 Analogy — A Kitchen Blender:
Imagine you blend together strawberries, bananas, and milk. You get a pink smoothie. The FFT is like a reverse blender that takes your smoothie and separates it back into strawberries, bananas, and milk. For sound, it separates a mixed signal into individual pitches.
In code, you call a library function (like numpy.fft.fft() or scipy.fft).
It returns a list of frequency magnitudes — big numbers mean that pitch was present in the blend.
▸ How Semitones Work (Music Theory Lightning Round)
A semitone is the smallest step on a piano keyboard — going from one key to the very next key (including black keys). The 12-Tone Equal Temperament scale divides each octave into 12 equal semitones:
0 1 2 3 4 5 6 7 8 9 10 11 12
The formula to find how many semitones apart two frequencies are:
Example: 330 Hz / 262 Hz = 1.26
12 × log₂(1.26) = 12 × 0.333 = 4 semitones = major third
That number of semitones maps to the alphabet: 0 semitones = A, 1 = B, ..., 11 = L.
▸ How to Solve It
1. Take the waveform (list of numbers) and apply FFT
2. Find the strongest frequency peaks (ignore weak ones — they're noise)
3. Pair the peaks: (peak 1, peak 2), (peak 3, peak 4), ...
4. For each pair, compute the semitone difference
5. Map semitones to letters: 0=A, 1=B, ..., 11=L
6. Read the letters in order → answer word!
▸ Difficulty Scaling
| Difficulty | Letters (pairs) | Harmonics per note | Noise added |
|---|---|---|---|
| 1 | 3-4 | None (pure tones) | None |
| 3 | 4-5 | 1-2 extra | Low |
| 5 | 5-6 | 2-3 extra | Medium |
| 7 | 6-8 | 3-5 extra | High |
Higher difficulty adds harmonic overtones (other frequencies that naturally accompany a note, like when a guitar string also vibrates at double the frequency) and random noise that you have to filter out — just like real audio.
▸ Real-World Applications
- Shazam / SoundHound: Identifies songs by FFT-matching audio fingerprints
- Speech recognition: Siri, Alexa, and Google Assistant all use FFT to process voice
- Audio compression (MP3): Removes frequencies humans can't hear using FFT analysis
- Medical imaging: MRI machines use a form of Fourier transform to create images of your body
- Guitar tuners: Detect the frequency of your string and tell you if it's in tune