So why does this work? In this video, there are actually multiple octaves playing at the same time, like red stripes on a barber pole. Since our brains love continuity and pattern, we follow the melody up into the next octave when replaying the sequence.
You might be wondering why these tones in higher octaves seem hidden to you at first. Actually, almost all musical tones contain more than one frequency, but our brains would explode if we had to process all of them at once. So we wrap them in a neat little package we call a note. We usually consciously perceive only the lowest (and often loudest) frequency, called the fundamental frequency. The higher frequencies (called overtones) affect us more subconsciously by giving each note its own sonic “fingerprint” called timbre. The exception to this rule is that if an overtone is relatively louder than the fundamental tone, like in some bells and organs, that frequency may be heard as the “note.” That also helps explain why we hear the melody in this illusion sliding up like a barber pole without noticing the incoming lower tone.
Enough science, time for a fun example of Roger Shepard’s illusion: the Super Mario 64 endless stairs. You have to believe composer Koji Kondo took some notes from Roger Shepard when he composed this soundtrack.