/Shepard-tone-music21

Shepard tone with music21 (Python)

Primary LanguagePython

Shepard tone with music21 (Python)

"A Shepard tone is an auditory illusion of a tone that continually ascends or descends in pitch, yet which ultimately seems to get no higher or lower." (wiki)

A great explanation is available in this youtube video.

The code creates three tracks with notes moving up the scale in C major. Each track is separated by two octaves. In the higher track, the volume gradually decreases. In the middle track, the volume stays constant. In the lower track, the volume gradually increases. The final result is created by overlapping and looping over these three tracks.

MIDI files:

(Piano) (Woodblock)