Mathcamp 2008 Project Page
- Fourier Transform and Gaussian Random Fields Brief summary of the Fourier transform and how to generate stationary Gaussian random fields in one and two dimensions.
- ftrans1d.m example of how to perform a Fourier transform in 1-dimension
- k_of_x.m transforms Fourier variable to original variable
- x_of_k.m transforms original variable to Fourier variable
- mhfft.m Fourier transform of a function
- mhifft.m Inverse Fourier transform
- mhfft2.m Fourier transform of a function of 2 variables
- mhifft2.m Inverse Fourier transform in 2 variables
- grf1.m generate a stationary Gaussian Random Field in 1 dimension
- grf1.m generate a stationary Gaussian Random Field in 2 dimensions
- grf_example.m Example of how to use grf1.m
These files are intended to help you learn to use Matlab to write simple programs and generate sounds. Download them and learn how they work, and play around with them.
Once you are comfortable with Matlab, there are a number of things you can investigate:
- sound_temp.m Example of generating notes in Matlab
- playnote.m Example of how to write a function in Matlab.
- playnote_n.m A function that is a little bit more complicated.
- Notes can be thought of as a bunch of sin waves added up. The frequencies of the waves determines the notes. But sin waves must be specified by a phase shift as well. Does the phase of these waves matter? Test it!
- Virtual Pitch
- When a fundamental frequency is played together with its harmonics, we hear just one note, the fundamental. But when we take away the fundamental and play only the harmonics, we still hear just one note: the fundamental! In this project you would investigate virtual pitch and see when it occurs. This is strongly related to the next project, Streched Partials.
- Stretched Partials
- Suppose we take the setup from the project above, but now we strech the harmonics so that they are no longer perfect harmonics. Then what note do we hear? What if we decide to shrink the harmonics instead, or to add a constant to each of them? Can you come up with a formula to predict what note we will hear, given a series of harmonics that have been changed in some way?
- Just Noticeable Difference
- How far apart do notes have to be before you can tell that they're different notes? Does this distance depend on the frequency in question? Set up an experiment to test this on mathcampers. You will have to play two notes in a random order, and repeat the experiment several times.
- Shepard scale
- This is a scale that always goes up, yet repeats itself infinitely many times. Try to program it.
- Tritone paradox
- This is an example of an auditory illusion: when two frequencies related by a particular relation are played one after the other, some people hear the notes as ascending while other hear it as descending. Set up an experiment to test this with mathcampers. See if you can explain what is going on.
- Masking is a phenomenon where two sounds are played together, but because of the way the inner ear is structured, we can only hear one of them. In this project you would test which frequencies can mask which other frequencies, and how loud they have to be for this to happen. Then, try to explain your results.
- Stochastic Melodies
- Use random numbers to generate random melodies.
- Backwards Music
- Download a song. Load it in Matlab. Play each channel separately. Play it backwards. Have fun with it.
- download files from Random Surfaces and Music, learn to use these
- Music: A Mathematical Offering Download the pdf of this book. The following sections might be useful:
- Chapter 2: (2.1-2.3), 2.6* + Appendix C*, 2.13 + Exercise 1, 2.15.