Code covered by the BSD License  

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Super Mario Brothers Theme - Huggins Illusion

4.2 | 4 ratings Rate this file 18 Downloads (last 30 days) File Size: 167 KB File ID: #16647 Version: 1.0
image thumbnail

Super Mario Brothers Theme - Huggins Illusion


Nick Clark (view profile)


29 Sep 2007 (Updated )

Huggins pitch via all-pass filtering played to the tune of Mario bro's

| Watch this File

File Information

Huggins binaural pitch is a faint tone which can be detected by slightly altering a noise sample played to one of the two ears. The pitch you hear does not actually exist in the signal, but is generated in your head by neural interactions. This illusion is still not fully understood. Please see the PDF document for more details on the efficient generation of Huggins pitch using all-pass filters.

This submission is made of 2 functional files. The huggins.m function is where all the DSP resides and is where the Huggins pitch is generated. The uploaded screenshot shows the phase reversals which can be introduced fom the cascade filtering. The mario_huggins.m file is where the fun stuff is for those who are not too interested in the details.

The Super Mario Brothers theme song is used as a demo here as it has a nice alto and tenor part which coincide in timing and are in a good frequency range to be able to hear the binaural Huggins pitch. To hear the tune place the two m files in the same directory and run the mario_huggins script. Use good headphones and be prepared to wait a few seconds for processing of the song. Concentrate as the pitch is very faint! Mario is in your brain! Try one headphone at a time with a finger in your other ear to make sure and you should just hear noise. If you dont have the signal processing toolbox just knock out the Butterworth filtering at the end of the Mario theme file and all should work fine. Have fun . . .

Kudos to:
Elisabet Molin - filter coefficient derivation
Stewart Bozarth - Song Transcription
James Humes - Original Mario song matlab-central submission


Theme From Super Mario Brothers Song inspired this file.

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
14 Dec 2010 Joao Henriques

Intriguing stuff; it's impossible to hear the "tune" when listening to it only with the left or right side of the headphones. I still can't believe it's an illusion, it sounds so real! As someone who has always liked optical illusions I can now add an audio illusion to the mix :) Thanks also for the PDF and references to more reading material.

22 Aug 2010 Pete

Pete (view profile)

I think Zhipeng Liang has rather missed the point and those 2 stars should be ignored.

Seems to work well, though remember it may take a few repeats to hear it properly (and, of course, remember to wear headphones!).

Newer versions of Matlab complain about some of the syntax -- which could be tweaked a bit -- but all trivial stuff.

Oh, and it even comes with a handy little pdf on Huggins pitch. Nice.

06 Jul 2010 Matt Roos

Very nice packaging including information on both the effect and the implementation. While the effect may be weak (through not fault of the contributors) it clearly demonstrates the concept of binaural processing in the central nervous system. Great for education and study of the auditory system.

30 Sep 2008 Zhipeng Liang

attractive title, weak effect. like a cellphone rings in a storm.

Contact us