I have written a number of programs to explore the connections between mathematics and music:

First, the program below (written as a shockwave movie) allows you to play combinations of pure sounds, choosing the pitch and amplitude of up to eight tones. To play a tone, enter a value in the pitch column, click the approriate check box,a nd click "Play" when ready. You can alter the amplitude (which corresponds roughly to volume) by dragging the appropriate slider. The graph of the linear combination of sine functions (that is, the mathematical model of the sound wave) is shown at left.

Here are a few things you can try:

• Octaves are formed by doubling a frequency. Perfect fifths (the basis of rock 'n' roll!) are formed by playing (3/2) = 1.5 times the frequency (all intervals rely on multiplication of frequencies by numbers). Set a base tone, say A 440 Hz (frequency 440), and try setting the second tone to 880 Hz or 660 Hz.
• Harmonics are formed when objects, by the nature of their construction, generate tones that are multiples of the original frequency (some instruments, like pianos, generate harmonics that are not always an integer multiple of the original tone). You can try to set a bse tone and add harmonics (by multiplying the base tone's frequencies by whole numbers such as 2, 3, 4, and so on), seeing how the harmonics chosen can affect the tone's quality.
• Beats occur when two frequencies are quite close together, but nbot quite in tune. Beats become more spread out as the frequencies come closer together, and disappear when the two frequencies are identical (beats are how piano tunres tune the strings in a piano without necessarily having perfect pitch!). Try setting one frequency say to 440, and another to a value close to, but not equal to the first. You should hear beats, or wave-like changes in the colume. Vary the second pitch until the beats disappear (the frequncies should coincide).

Anothe prrogram I have written allows you to explore scales and frequencies. Our currect scale is even tempered, which means that a semitone is achieved by multiplying a frequency by 2 to the power 1/12th, which is about 1.059). The pythagorean scale has 7 notes of a "major" sclae, and is based on multiplication by small fractions. A geometric scale is formed by multplying frequencies in a scale with x semitones by 2x. An arithmetic scale is formed by taking a scale with x semitones and making the frequency of the ith tone to be the original base frequency times (1 + i/x). You can try out each of these scales below (the pythagorean scale is only available as a 7 semitone scale, but the others can have any number of semitones from 1 to 19).

Make sure after setting the number os semitones to click play to create the keyboard. It is ready for you to play by clicking the mouse on each key. You can even move some notes up higher or back down again (as on a piano keyboard) by holding down the control key.

You can hear the difference between the scales, even with the same number of semitones. Try creating you own songs in standard and nonstandard scales!