Musical Scales with (n != 12) Notes

Just been listening to a fascinating programme on Radio 4 whilst travelling between
offices, which coincidentally managed to follow on exactly from to something I was
musing about last night. Western music has twelve notes in each octave, as is well
known and understood by everyone from Bach to Julie Andrews in the Sound of Music
(who just sang about the white notes!). But why twelve? Why not a different number,
like eight? What would music sound like if it was played on a completely different
scale with an octave subdivided differently?

Some other cultures often play music with additional notes in the scale: Indian instruments
like the sitar are capable of playing quarter-notes (half way between two semitones),
and the Japanese shakuhachi can play an almost unlimited range of frequencies. Others,
too, have experimented with a different number of notes to the scale. Most interestingly,
the harmonies that are most pleasing to the ear are those which have low number ratios
(2:1, 3:2, 4:3 etc.) - it's exactly these ratios that form the common intervals on
our musical scale (e.g. a fifth: A=440Hz, E=660Hz = 3:2). The twelve-note scale offers
a very high number of these golden ratios with very few that don't match. These few
are the ones that sound dissonant to the ear (e.g. a major seventh = 15:8).

It would be nice to explore this territory by building a small piece of software to
let you select a scale containing an arbitrary number of intervals. Unfortunately
most of the APIs in Windows at least don't offer that flexibility of control - DirectMusic (part
of DirectX) only offers the diatonic MIDI scale, and the simple Beep()
Win32 API call only accepts integral values, which greatly reduces the accuracy of
any such computerised instrument. Something for further exploration, anyway. I found
some interesting websites on the subject here and here (although
I couldn't get the Java applet in the latter page to work - great pity).

Something for further exploration, anyway...