News for hackers. Stuff that matters.
Re:Music theory for nerds by skrebbel on Monday September 19, 2016 @05:27AM (#12530034)
I'd like to elaborate a bit, in the same "for nerds" manner, on where Eevee seems to get lost a bit with scales and notation. He (she? not sure) calls the A minor and C major scales the same, because they contain the same notes. That's not an odd thought, but it's like calling sine and cosine the same because both functions contain the same set of values, in the same order.

The difference is phase. Basically, scales aren't just an ordered set of notes, they also have a starting point. This note, the note the scale is named after, is often the last note of a tune played in that scale, and often the first too (especially for more poppy tunes). So if you play Für Elise in C major, like Eevee suggests, the entire melody will be pitched 3 semitones higher than playing Für Elise in A major. And it'll sound awkward because you're supposed to play it on a minor scale.

Once you understand this, the whole notation thing makes a lot more sense as well.

Re:Music theory for nerds by abruzzi on Monday September 19, 2016 @12:53PM (#12532805)
Even though the key signature for a major and its relative minor are the same, that is only part of the story.

When you see that A Minor has the same key signature as C Major, what you are seeing is the "natural minor" scale. This is simply the notes implied by the key signature, and so is identical (but down a third) from the relative major. If you play purely in the natural minor, you are really closer to the Aeolian mode than a minor key.

There is also the "harmonic minor" and "melodic minor" which, in common practice period, are much more commonly used than natural minor. Harmonic minor has a raised seventh. This makes the dominant (V) triad a major triad which increases its need to resolve to the tonic (I). It is used for harmonies (obviously based on the name) for this reason, but it makes the step from 6 to 7 an augmented second (i.e. minor third) so its isn't used melodically very often. Which is why there is also a Melodic Minor.

Melodic minor is tricky because it varies depending on whether the melody is ascending or descending. Descending is easy, it is identical to natural minor. Ascending is similar to the harmonic minor with its raised seventh (creating what is known as a leading tone, i.e. a half step below the tonic that wants to resolve up to the tonic.) But the ascending scale also has a raised sixth, which eliminates the augmented second between 6 and 7.

Re:Music theory for nerds by midgetjones on Tuesday September 20, 2016 @08:24AM (#12538928)
I've never quite understood why you learn a melodic minor as being different depending on if it's ascending or descending.

Are there examples of this in music? Or is it just something invented to test young pianists in exams?

Re:Music theory for nerds by spurgu on Friday September 23, 2016 @09:59AM (#12564647)
That's only in classical music. Jazzers play "pure" melodic minor both up and down.
Re:Music theory for nerds by cicero on Monday September 19, 2016 @02:02PM (#12533339)
Thank you for this. I learned to write natural, harmonic, and melodic minor scales when I was a kid, but I never knew this explanation. It makes perfect sense!
Re:Music theory for nerds by SamBam on Monday September 19, 2016 @01:13PM (#12532966)
> they also have a starting point

Indeed. For anyone that is not sure about that, take a piano (like this virtual one[1]) and play a scale of all the white notes starting with C.

The play a scale of all those same white notes, but starting with A.

You should immediately notice that the second version is in a minor key (sounds "sadder").

1: http://virtualpianos.info/

Re:Music theory for nerds by skrebbel on Monday September 19, 2016 @02:20PM (#12533491)
Awesome example! Folks, do this if this stuff is new to you, it's beautifully enlightening.
Re:Music theory for nerds by perlgeek on Monday September 19, 2016 @08:27AM (#12530842)
Thanks, that's an explanation I haven't heard that way before, but that makes sense to me.

Follow-up question: how are phase of the scale and the piece of music synchronized? When I think in terms of a wave, I could Fourier-Transform it into sines or in cosines, or any other phase-shifted variant (a * sin(nx + const.))?

Is it always the first note of the piece of music that "anchors" the piece in its scale?

Does that question even make sense? :-)

Re:Music theory for nerds by skrebbel on Monday September 19, 2016 @09:41AM (#12531344)
Nice question, I think I can answer (although you'll soon notice that my understanding of this subject is limited as well)

First of all, this is a mathematically undecidable problem, as in that there exist tunes that could be in multiple scales. The extreme example is a melody that consists of only a single note. Ridiculous, but as a fellow nerd I'm sure you can see how I could call a single note a melody. So we have to lose the phase metaphor here a little bit.

Most songs "anchor" with the last note. If you really can't tell whether a song is in major or minor (songs in major are a bit happier, jollier; songs in minor a bit sadder and more melancholic), going for the very last note (or the last note of the chorus, if the song a chorus) is a very good bet. Find the core melody of the song, the thing everything is hung up on, the last note of that core melody is the ground note of the scale. This is a really safe bet.

There are, of course, exceptions, and then I think you'll need to do some mathematical analysis to find out which key the notes in the melody match the best to. I'm not 100% sure how this is defined but I'm sure people have researched it.

All that said, musicians don't really have this problem. After all, hardly any of this stuff was designed. The only genius piece of engineering in all this was the discovery that if you choose to 12 notes in an octave (and not 8 or 15 or whatever), you have a very versatile instrument that can play almost any melody at any pitch in a way that sounds pretty good to human ears (pretty good, not perfect, because of the all the ≈'s in the "Intervals" section of Eevee's article).

But the rest was discovered, not designed, just by fooling around. The analysis came after the music.

Musicians just start with a scale and then make the music they compose fit. This comes pretty natural to you with a bit of practice; most people have a pretty decent innate ability to hear which melodies "match" with a chord and which chords "match" with a previous chord. In all honesty, once you've understood things this far, I'd recommend fooling around with the easiest instrument or tool you know, rather than diving even deeper in to the mathematics of things :-)

Re:Music theory for nerds by debrisapron on Monday September 19, 2016 @12:11PM (#12532492)
> The extreme example is a melody that consists of only a single note. Ridiculous, but as a fellow nerd I'm sure you can see how I could call a single note a melody.

I got your single note melody right here:

https://www.youtube.com/watch?v=PQfKFwa-jEY

Re:Music theory for nerds by kd0amg on Monday September 19, 2016 @12:58PM (#12532840)
I was half expecting the One Note Samba (which is sort of the pathological case for the key-finding heuristic skrebbel describes).
Re:Music theory for nerds by abannin on Monday September 19, 2016 @09:16AM (#12531164)
This gets pretty complicated and subjective.

Strictly speaking, a "note" cannot define a key. To determine a key, you really need at least 2 intervals, wherein interval a somehow resolves to interval b. Keys are just a mapping of relationships; how does each of the 12 notes relate to each other? If you just play a C major chord, you aren't really playing in the key of CMaj, you're just playing a CMaj chord.

For example: Play B+G, then C+G. This is (arguably) C major. The B note resolves into the C note. That's the 7th moving into the Tonic (#1). This is an example of a V-I resolution, the strongest possible. If you'd like more examples, look up "cadences". There are 'principles' for determining the key, but they should not be understood as proofs.

I think you're also asking if/how to change keys. This is not only possible, but often highly encouraged. There are two extremely common key changes in pop music: 1) Up one step: This is incredibly common and can be heard in "I Will Always Love You" (album version, right after the 3 minute mark when she starts singing the chorus again). Once you start hearing this, you can't stop. It's all over the place. If we're in the key of C, we'll just play a D chord with a lot of confidence, typically after a G chord. 2) Minor to Major (or reverse, moving from sine to cosine in the analogy): This is much more subtle than the previous example. Typically you'll recognize this as a change in 'mood' or 'feeling'. You'll find a lot of Am-Em changes, then the chorus will be a lot of C-G changes. The tonic changes from Am to C, even though all the chords and notes being used are still the same (although the duration of said chords will probably be different).

Most "classical" music moves around keys pretty frequently, in extreme cases multiple times within a measure. And then there are chords/sections in which the key is debatable if not indiscernible (I would argue that the intro to Smashing Pumpkins "1979" is changing keys every 2 measures, but I think there's also a strong argument for it being in a single key)

Thinking about keys in terms of phases is a good basic explanation, but ultimately phase is much easier to measure. Perhaps I see it this way because my understanding of music is much better than my understanding of physics.

Re:Music theory for nerds by mkd1964 on Sunday September 25, 2016 @07:49PM (#12578124)
Yes, I was trying to explain some theory to my sister and she had it in her head that "black notes" on the piano - or anything we call a sharp or flat - were "minor". It took a lot of explaining to get her to realize that a single note on it's own is in no particular key and no particular mode (scale).
Re:Music theory for nerds by msg on Monday September 19, 2016 @09:52AM (#12531437)
That's funny because B+G, C+G to me says G major: a major third, then a fourth. Is the ear guided to keys by inversion, some inversions more natural or root-y than others?

I've been composing pop music for a long time without knowing stuff like this.

Re:Music theory for nerds by abannin on Monday September 19, 2016 @10:20AM (#12531640)
I can see the G major argument. That would be a I/3 into IV. My professor would have said that answer is wrong due to voice leading, the 7 to 1 is very powerful. And the last chord is C, in root, meaning that's where you have resolved. Had the second interval been G+B, it would make the GMaj argument stronger. Ultimately, it's really context. You're really just asking about cadences, very roughly translated means "how chords resolve".
Re:Music theory for nerds by hellofunk on Monday September 19, 2016 @12:04PM (#12532438)
B+G is a minor sixth, not a major third. If you invert it, it's a major third.

B+G followed by C+G is most likely going to sound like a cadence in C Major. You could claim it is G major only if you considered it unresolved transition to the subdominant.

Re:Music theory for nerds by tim333 on Monday September 19, 2016 @11:21AM (#12532093)
>Is it always the first note of the piece of music that "anchors" the piece in its scale?

No it isn't. If you put any piece of music that is harmonious through a device that analyses the frequencies you'll find three main notes and those give you the key. In C-major for example the main notes are C, E and G. The section will be in C even if the first note is E for example.

You can do this with software. There's a nice video of this here https://youtu.be/xVmkIznjUPE?t=24s

or you can upload a recording to get the chords https://chordify.net/

You can indeed fourier transform the music. I imagine the above software does so.

Re:Music theory for nerds by arcticfox on Monday September 19, 2016 @12:16PM (#12532536)
My teacher always said "music is about tension and the resolution of tension". So in A minor if you play tense chords and then resolve them to A minor, you're in A minor. If you resolve them to C, you're in C major.
Re:Music theory for nerds by dharma1 on Monday September 19, 2016 @11:41AM (#12532255)
The phase of a sound wave doesn't play a role in the context of compositions or scales. It does of course play a role in audio in general though - in recording, and analog and digital signal processing etc.
Re:Music theory for nerds by anentropic on Tuesday September 20, 2016 @06:41AM (#12538441)
they're not talking about phase of the sound wave but "phase" of the scale notes as an alternative way of describing what music theory calls modes
Re:Music theory for nerds by torrent-of-ions on Monday September 19, 2016 @08:40AM (#12530917)
It's not even just that. They are only "the same" with equal temperament. If you use proper intervals then they are quite different.
Re:Music theory for nerds by abannin on Monday September 19, 2016 @09:28AM (#12531241)
I'm not sure this applies here. Equal temperament explains how an interval is in tune and does not determine what key a song is in.
Re:Music theory for nerds by arnarbi on Tuesday September 20, 2016 @12:36PM (#12540839)
Torrent-of-ions is correct. Equal temperament is a compromise in tuning (assigning pitches to notes) which makes the most keys sound ok. The intervals aren't perfect, but close enough. If you tuned a piano for perfect intervals in one key, those pitches would be too much off for another key.

See e.g. http://www.phy.mtu.edu/~suits/scales.html

Re:Music theory for nerds by abannin on Wednesday September 21, 2016 @12:03PM (#12549430)
Yes, equal temperament is basically a compromise of tuning methods. While it can help ensure that a piece which modulates into different keys is in tune (as close as possible), equal temperament cannot tell the key that is being played.
Re:Music theory for nerds by fao_ on Monday September 19, 2016 @10:28AM (#12531689)
> He (she? not sure)

FTR the pronoun where gender is ambiguous is 'they' (It's also sometimes explicitly requested by nonbinary people).

Re:Music theory for nerds by RileyKyeden on Monday September 19, 2016 @10:49AM (#12531830)
From eevee's Twitter:

> she/they/he

I have a similar relationship with pronouns. My own perception of my gender jumps around so much that I don't even bother trying to figure it out. It usually leans in one direction, but I don't have many strong feelings about it.