# Mathcamp 2008 Project Page

## Random Surfaces

• 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

## Music

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:
Phase
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.