Auditory illusion lab: resources

For the design of your illusion page, check out the webpage design section. To learn tools for creating auditory illusions, check out the illusion design section.

Webpage design


  • HTML template for your gallery webpage
  • CSS stylesheet to format your HTML template
  • Feel free to personalize the html page and stylesheet, as long as it has all the necessary components outlined on the tasks page.
  • You can decide to leave your name off on the webpage if you would like.
  • To check if your HTML page formatted properly, put the stylesheet in the location indicated in the header of the HTML file. Then open your HTML file in your browser.

Sound design


  • Your previous problem sets have code that can help you make tones, noises, filters, and sound envelopes.
  • The recitation slides and MATLAB script show how to combine elements from problem sets into an illusion.
  • Tip: make sure your soundwaves are normalized or quieter than that otherwise you will have artifacts (divide by the maximum of the absolute value of the soundwave).
  • MATLAB spectrogram code to visualize your sounds as spectrograms (time-frequency images)
  • How to generate FM modulated tones
  • Code for embedded repetition
  • Code for synthesizing inharmonic speech
  • Code to generate sine-wave speech
  • Speech/vowel synthesis: MATLAB or Python
  • How to do simple instrument synthesis: use code from Q2 from problem set 1, combined with ADSR envelopes for each harmonic.
  • Let us know if you'd like access to a dataset of recorded natural sounds, such as speech or instruments.