Hacker News new | ask | show | jobs
by yesenadam 3047 days ago
Gee.. page full of very low quality/BS answers there! Hadn't seen Music StackExchange before.. super non-impressive. The 2 top-voted answers are absolute without-a-clue nonsense, people-who-don't-know rambling aimlessly, not explaining anything.

I am also no music historian, don't know all the history, but:

Not until the third-top-voted answer, the one beginning "Historically, keyboards didn't always work that way" is it mentioned that..keyboards didn't always work that way. But they go on "Our musical notation is older than enharmonic equivalency that you get with "well-tempered" keyboards" - evidently confusing well temperament with equal temperament.

Which is understandable - it seems everyone's 'educated' with that misconception; I certainly was. (Classical then jazz pianist) Even in my 30s I remember reading a book from the 1880s talking in detail about the specific emotional qualities of the different keys, thinking they were just imagining things, deluded. Then I learnt that no, Bach's "well-tempered" actually wasn't our equal temperament, with each note 2^(1/12) higher than the next.[0] Every key (C major, E minor etc) actually sounded different, the intervals were different etc. So that 1880s book wasn't crazy at all. Apparently that's about when equal temperament was brought in everywhere (mid to late 19th C), and the old "different keys sound different" was abolished.[1] Many composers complained about the loss of..key personality, didn't want the new system. Now all the keys sounded exactly the same. (Well, not to me, I've got perfect pitch. But to most people they do now.) It seems a strangely huge cultural forgetting, that somehow I never heard about all that, during decades in various music worlds.

So before the equal temperament system of e.g. middle C is 3 semitones above A, so 220 x 2^(3/12) Hz, many different systems of ratios were used to compute the note frequencies, producing lots of different tunings, 'temperaments'.

The problem in all this is the Pythagorean comma, the gap resulting from the awkward fact that when trying to construct a scale from octaves (2x the frequency) and 5ths (3/2x), 2^x=3^y has no positive integer solution. With continued fractions they worked out that 2^7~(3/2)^12 (128~129.7463..) is a good approximation, which is, in short, why pianos have 12 notes per octave, and going up 12 5ths takes you up 7 octaves. With equal temperament, the gap is spread evenly among the notes, only now none of the intervals have simple ratios of frequencies like they did before (except the octave). There's now nothing perfect about a "perfect 4th" or "perfect 5th".

Anyway..going up in 5ths you get C,G,D,A,E,B,F#..

Going down you get C,F,Bb,Eb,Ab,Db,Gb..

Gb and F# on modern pianos are (just different names for) the same note, but in the pre-equal temperament days, going up a 5th wasnt just Freq x 2^(7/12) but multiplication by some ratio, most simply 3/2. And then the note you got going up (F#) was different to that you got going down (Gb). Some keyboards had black notes split in half, one playing the sharp, one the flat.

But I won't go into more historical detail, because I don't know it and I'm rambling aimlessly enough already. And you could fill a book with the answer to the Q.

[0] well, pedantic piano tuners won't agree, but that's the theory.

[1] Some instruments had been equal temperamentish for centuries, e.g. guitar I think, (it using the same frets for different keys) but others, like pianos, not until then.

1 comments

It seems that we could get our perfect ratios now that we have computers.

As the computer plays, it uses a psychoacoustic model to determine which notes would have significant local tonal impact in the listener's mind. (the automated choices can be overridden as desired) Both past and future notes are considered. Exact ratios are used to determine every note frequency, using nearby significant notes as references.

You'd get nice integer ratios all throughout the music. The pitch standard would slowly vary, such that you could start in A440 and end up in A337. In most music, the pitch wouldn't change all that much, since it is something of a random walk by tiny amounts. There would be the occasional piece of music that causes a continuous unidirectional change in the pitch standard, requiring a few tweaks if that is undesired behavior.

Note that this is already kinda the case for fretless instruments, such as the violin. What you are suggesting to be done by a computer would be done by the player themselves. Obviously deciding exactly what tuning of each note to land on for any part of a song relies on musical intuition which computers are notoriously bad at. But when decided to be appropriate, on the violin perfect 5ths and 4th intervals would be actually (to the limits of the players ability and ear) perfect ratios. The major 3rd itself, which is decidedly enharmonic in equal temperament would sound cleaner and less "beaty".

I've always thought Bach would love the keyboard tools we have today. Simply the ability to switch tunings on the fly, rather than stopping to laboriously change gears on your harpsi/clavichord. I imagine the ability to switch to whatever temperament/tuning you want at the press of a button would have masterfully been taken advantage of by him (to say nothing of arbitrary sound/timbre for each voice/key-range etc. I think he would have loved Switched-On Bach).

Ohh that's a very interesting idea. Wonder if you could actually make something sound significantly better like that. But like you say, people might have rather different ideas on what sounds better.

And after a lifetime of equal temperament, that's what sounds good to me, anything else sounds out of tune. (I haven't experimented to see if even proper perfect 4ths and 5ths sound out of tune to me! That would be weird. Though those notes are very close to their equal temperament versions I think.) I used to have some music software that came with hundreds of different historical temperaments and tunings, from many different traditions, it was fascinating playing around with.