The short answer is: the diatonic scale in a given key consists of notes whose frequencies are those of the keynote times certain simple rational numbers; the white notes on the piano are those that belong to the diatonic scale based on C.
What's special about those simple rational-number ratios? Answer: on most musical instruments, notes whose frequencies are in simple rational ratios sound nice together. This turns out (surprisingly, at least to me) to be a fact about the instrument and not merely about the notes; when you play a given note on a given instrument, you get (kinda) sine waves whose frequencies are those of the given note, plus some higher frequencies; exactly what the higher frequencies are and how much of each you get depends on the instrument. For most instruments, the higher frequencies are integer multiples of the fundamental frequency, and that turns out to mean that the good-sounding combinations of notes are ones with simple rational frequency ratios; but there are instruments that behave differently (e.g., a tuned circular drum; or you can make a synthesized instrument that does anything you like) and different chords will sound good on them.
For much more on this, see William Sethares's book "Tuning, Timbre, Spectrum, Scale" and his web pages at http://eceserv0.ece.wisc.edu/~sethares/ttss.html where you can find, e.g., some music in unorthodox scales performed on (synthetic) instruments designed to make the harmony sound good.
The top answer on stackexchange is a superb explanation of musical science that most of the finest musicians in history could not give you. They just don't teach you these things in music class.
Musical culture seems to resist illumination, perhaps fearing that the "magic" will somehow be broken. The irony is that music is, in a sense, a mathematical illusion, but revealing the trick only makes it more fascinating.
I will add one important point that hasn't really been made: The purpose of equal temperament may have originally been to "change keys without retuning", but it also essentially allows you to play in 12 different keys at the same time. This has been exploited to great lengths as source of musical novelty and is absolutely fundamental to modern music.
Do you think that was all created by non-musicians while 'most of the finest musicians in history' cowered in the corner afraid of the magic being broken?
I remember studying this right near the beginning of freshman music theory in university. It's also at the beginning of a more than one basic music theory textbook.
We covered it more deeply (including, gasp, math) in a higher-level electronic music class.
It's probably true that many fine musicians won't think much about the mathematical side of music very often at all (practically speaking, this knowledge is not necessary to master an instrument), but certainly anyone who's gone through an academic music education will have covered it, quite possibly more than once.
> They just don't teach you these things in music class.
Go read "How Equal Temperament Destroyed Harmony". By a musician, for musicians. I would add there are a number of conductors and musicians that insist on playing compositions in their original tunings.
> Musical culture seems to resist illumination
And I'm sure elsewhere in cyberspace at this precise moment some musician is lamenting the ability of scientists to understand their craft. Plus ca change...
I realize that some people know this stuff and some places teach it as part of an advanced music education, it's just remarkably uncommon considering how fundamental it is. I would have meticulously qualified my earlier generalization but I foolishly assumed that my hyperbole would not be taken literally.
I'm speaking as a musician when I say that we resist illumination. I've raised this topic with many teachers and peers and there is a sort of disbelief in the connection between the artistic experience of music and the underlying mathematics.
I don't think this is because musicians are ignorant luddites, I think it's because the emotional response to music is primal and not at all intuitive. Why do we feel so strongly about harmonically related tones? It doesn't sound like anything, in the way a painting or a sculpture looks like something. Abstract art is a relatively recent invention, yet music has been almost purely abstract for as long as anyone remembers.
Musical culture seems to resist illumination, perhaps fearing that the "magic" will somehow be broken. The irony is that music is, in a sense, a mathematical illusion, but revealing the trick only makes it more fascinating.
This is true, but I think the answer is far more mundane. Musicians operate at a couple of levels of abstraction above that SO answer, so such details become irrelevant to them.
Imagine if the standard introduction to programming was a course on Java or PHP. Pretty soon you'd have a plethora of programmers who didn't know a thing about pointers or any of the old tricks programmers used to do with assembly. Wait... that's already happened :)
I'm not sure I understand. Your argument for why musicians should start at a higher level of abstraction is that starting programmers at a higher level of abstract works out poorly?
Yeah, and now we argue about whether or not knowing the basic mechanics of your typical language (be it programming or music) can help you achieve a greater global understanding and thus allow you to be a better musician/programmer overall.
I'm glad folks are finding this interesting. However, this is pretty much common knowledge to anyone who has taken music theory. It's usually not given a great deal of attention as most musicians using the standard 12 tone don't care much about what's going on under the hood. They're a bit like programmers who use a high level language and an IDE and don't know how a compiler or assembly works.
Just a bit funny to come across it here, it'd be a bit like finding out musicians were talking on a forum going 'wow, computer programs are written using structured text files!' or something of the like. Not trying to be rude..
The piano to me feels like an iPhone, it does a lot of things well, and it hides many details from you. I don't know if real pianos are tunable/adjustable, but the electronic one we have at home certainly isn't (except in its ability to sounds as different instruments).
I recently bought a Oud[1], a classical stringed middle eastern instrument, it's not fretted, it's portable, and adjustable. To me, when I compare it to the piano, the Oud feels like the Unix of musical instruments. It's a bit hard to get used to at first, but it's designed to be lite-weight (portable) and adjustable, allowing power users to be very creative and expressive. Most other users will stick to a standard tuning and placement of fingers.
I'm not super-bothered by the way the piano is layed out, to me it's just a simplified instrument that works for 95% of the cases.
What I don't understand is why do all the middle eastern scales (maqam[2]) have 7 tones. The fact the western C major scale also has 7 tones is just another example of yet another scale with 7 tones (and it happens to correspond to the Ajam maqam[3]).
There are some middle eastern scales not really playable on a piano, like the Rast[4], unless the piano is somehow adjustable.
> I don't know if real pianos are tunable/adjustable, but the electronic one we have at home certainly isn't (except in its ability to sounds as different instruments).
An acoustic piano cannot be easily tuned (it takes a couple of hours to a trained specialist, because there are more than 200 strings to adjust). However "serious" electronic keyboards have been fine-tunable for more than 20 years. Many of them can play any microtonal scale you may imagine, and many different classic temperaments are pre-programmed.
Years ago I watched a British documentary called Howard Goodall's Big Bangs. It's well worth watching. It explains how music theory developed from Pythagoras's (matching the 12 keys on the piano). It's an interesting exercise to "prove" these 12 steps based on this simple ratio.
What came much later was equal temperament. The 12 steps don't match up exactly. Equal temperament changes the notes slightly by changing the ratio slightly (to factors of the 12th root of 2). I believe it was Bach who first discovered this.
Not all cultures use equal temperament but it is overwhelmingly dominant in the West.
The series also explains chords, keys and so on. For someone like me who is more mathematically inclined it was fascinating. Give it a look if you can.
Oh also it wasn't the BBC as you might expect. It was Channel 4.
I think there are different answers at different levels.
On one level, the white notes are the notes of the C major scale, and the black notes are the semitones which are left over. Why not put all the semitones in one row? That would be much harder to play. Why split it into "C major" and "leftovers"? A bunch of semi-arbitrary decisions made by early harpsichord manufacturers, I guess, which happen to make the instrument easier to play than most alternatives.
If you're looking for an explanation of why the notes of the major scale sound good together whereas most alternative modes sound weird, that's a more difficult question.
Supposedly there is a mathematical reason for the 2-2-1-2-2-2-1 spacing of the major scale. If you take all possible pairs of notes in the diatonic scale, you get a richer distribution of intervals than you can produce with any other seven-note selection from the twelve note scale. Similarly, the classic pentatonic scale provides the best set of intervals for any five-note selection from the twelve. A better set of intervals might lead to a better choice of chords too.
This is my somewhat fuzzy recollection from a paper I read a long time ago. Someone out there can check with three lines of R, right?
If you start with the 12 chromatic tones and start addding notes to a scale going up a circle of fifths, there are two natural stopping points where you have spanned the octave with a complete-sounding set of notes with relatively equal spacing and no gaps: five notes, which gives whole-step and minor-third intervals; and seven notes, which gives whole-step and half-step intervals. These two scales correspond to the spacing of the black notes and the white notes, which are mirror images of each other around the circle of fifths. Any other choice of scale size would have gaps, I believe.
The drawback to this explanation is that the diatonic scale is 10,000 years older than the "circle of fifths". So it presumably had some appeal to musicians as well as to music theorists.
So if we stard from C, and take steps of fifths, we get the notes in the order: C, G, D, A, E, B, F#, C#, G#, D#, A#, F (and then C again).
It is true that if you take the first 5, you get a scale with pattern of intervals C-<2>-D-<2>-E-<3>-G-<2>-A-<3>-C, and then it you'd add the sixth note (B), that would be only 1 step from C. So if we aim for a "nice" distribution of intervals, 5-note scale is a good stopping point.
But your explanation doesn't give any light on why the 7-note scale would be the next stopping point.
I can highly recommend this lecture, Notes and Neurons, from the 2009 World Science Festival. It features a panel of neuroscientists discussing the possible physiological encodings of the various mathematical structures discussed here. It also includes some amazing participative musical performances from Bobby McFerrin.
If you're just after a listen, there are lots of examples of alternative systems on youtube. Here's 19-tone, equal temperament (as opposed to the usual 12 TET): http://www.youtube.com/watch?v=1EP0KvbxW8o
I like the above example because it always starts by sounding "off" to me but seems okay by the end of the piece. It's a matter of what you're used to.
kinda-off-topic: I am very often baffled by the sheer mathematical and general complexity of music. Each music-related wikipedia article is the stub of a link-tree that quickly ends up in confounding complexity.
The highly emotional associations I get of rock musicians and metal concerts when thinking about music could not be further from the science of music.
What's special about those simple rational-number ratios? Answer: on most musical instruments, notes whose frequencies are in simple rational ratios sound nice together. This turns out (surprisingly, at least to me) to be a fact about the instrument and not merely about the notes; when you play a given note on a given instrument, you get (kinda) sine waves whose frequencies are those of the given note, plus some higher frequencies; exactly what the higher frequencies are and how much of each you get depends on the instrument. For most instruments, the higher frequencies are integer multiples of the fundamental frequency, and that turns out to mean that the good-sounding combinations of notes are ones with simple rational frequency ratios; but there are instruments that behave differently (e.g., a tuned circular drum; or you can make a synthesized instrument that does anything you like) and different chords will sound good on them.
For much more on this, see William Sethares's book "Tuning, Timbre, Spectrum, Scale" and his web pages at http://eceserv0.ece.wisc.edu/~sethares/ttss.html where you can find, e.g., some music in unorthodox scales performed on (synthetic) instruments designed to make the harmony sound good.
For instance: listen to http://eceserv0.ece.wisc.edu/~sethares/mp3s/tenfingersX.mp3 and hear how out-of-tune it sounds. Now try http://eceserv0.ece.wisc.edu/~sethares/mp3s/Ten_Fingers.mp3 which has exactly the same notes but played on a synthetic instrument designed to make the harmonies work.