Live data from Hacker News

Basic Music Theory in ~200 Lines of Python

mvanga.com

131–140 of 192 posts

Re: Basic Music Theory in ~200 Lines of Python

#131

As a primer for music theory, this post doesn't teach much. It's using Python to derive various sets of notes in scales and modes, which is already easily available via google search, and in a more learnable format than Python code. The most basic aspect of Western music theory overlooked here is the relationship between tonic and dominant. If you know the "home" chord aka "the I" aka "tonic" is C major, the dominant…

Heh, I understood your first paragraph. I understood literally nothing in the following two paragraphs. Is this what it is like when I talk to people who don’t know anything about programming about my work? Pure gibberish?

I think it depends on who is explaining the complex topic. The main goal for the "explainer" is to implant ideas in someone else's head in a way they can understand and relate to. This is done through a shared vocabulary. If someone knows nothing about a topic, then the entire explanation must be done in the listener's vocabulary (while slowly and deliberately introducing new terms, and clearly defining them), which OP didn't really attempt to do.

Re: Basic Music Theory in ~200 Lines of Python

#132

Earlier quoted context omitted.

As a musician, I’d say no. Sure, you don’t get the significance of “what is this Dorian thing” unless Scarborough Fair is playing, but nothing in the article really applies to hearing music.

> As a musician, I’d say no. Sure, you don’t get the significance of “what is this Dorian thing” unless Scarborough Fair is playing, but nothing in the article really applies to hearing music. I don't know what's with the current flagging/downvoting trends on HN, comments get dead before I can reply. That said, your view seems rather extreme. What would be the downside of illustrating at least some of the samples wit…

I didn't mean there was no downside, certainly not. Just that it didn't seem as needful to me.

Re: Basic Music Theory in ~200 Lines of Python

#133

As a primer for music theory, this post doesn't teach much. It's using Python to derive various sets of notes in scales and modes, which is already easily available via google search, and in a more learnable format than Python code. The most basic aspect of Western music theory overlooked here is the relationship between tonic and dominant. If you know the "home" chord aka "the I" aka "tonic" is C major, the dominant…

Do you know why these chords are so common? Is it simply cultural or something else?

Re: Basic Music Theory in ~200 Lines of Python

#134

As a primer for music theory, this post doesn't teach much. It's using Python to derive various sets of notes in scales and modes, which is already easily available via google search, and in a more learnable format than Python code. The most basic aspect of Western music theory overlooked here is the relationship between tonic and dominant. If you know the "home" chord aka "the I" aka "tonic" is C major, the dominant…

Do you know why these chords are so common? Is it simply cultural or something else?

The notation OP is using is relative to the key of your song. So if your key is C major, the V chord is G. However, if your key is F major, the V chord is Bb. So it's not that there's only a few chords used in popular music, it's that there's a very consonant group of chords for any key your choose.

Also, OP is leaving out lots of ways to modulate these basic chords into more complex ones (adding a seventh step, inversions, power chords, etc.).

Finally, as with a lot of pseudo-Pareto type things, often the few exceptions are what make or break a piece musically.

Re: Basic Music Theory in ~200 Lines of Python

#135

As a primer for music theory, this post doesn't teach much. It's using Python to derive various sets of notes in scales and modes, which is already easily available via google search, and in a more learnable format than Python code. The most basic aspect of Western music theory overlooked here is the relationship between tonic and dominant. If you know the "home" chord aka "the I" aka "tonic" is C major, the dominant…

Your advice is good and most of the advices stop at this level. Do you have any advices for what to learn next?

Any suggestions about theory learning beyond of what you've described?

Something that would help with composition perhaps? Music phrasing? Some book to read?

Re: Basic Music Theory in ~200 Lines of Python

#136

As a primer for music theory, this post doesn't teach much. It's using Python to derive various sets of notes in scales and modes, which is already easily available via google search, and in a more learnable format than Python code. The most basic aspect of Western music theory overlooked here is the relationship between tonic and dominant. If you know the "home" chord aka "the I" aka "tonic" is C major, the dominant…

>The most basic aspect of Western music theory overlooked here is the relationship between tonic and dominant. If you know the "home" chord aka "the I" aka "tonic" is C major, the dominant will be G major, aka the V chord. Add just the F major chord, and you'll know 1-4-5 in a "basic" key: C major. 1-4-5 is the simplest chord progression, you can play amazing grace, you are my sunshine, even The Beatles, you'll be rocking with 1-4-5.

Having learned music theory on a guitar rather than a piano, I learned this in a different order. C Major wasn't the focus at first. We started with Am Pentatonic and learned the common 1-4-5 progression and how to build chords and progressions out of that. Then added the rest of the notes of the Am scale in before finally going into root notes and relative scales and learning C major.

It's just my conjecture, but i think Am works better on guitars for learning because it's right in the middle of the guitar starting on fret 5 on the 6th string. Makes it easy, like you say, for someone to solo along with a 1-4-5 progression just by running up and down the scale. As long as you hit the right frets, it'll sound decent, you don't have to stretch too far, you get a nice clear view of the scale's 'pattern' on the frets. Plus, it's the relative minor of Cmajor meaning, you can still play along with someone just hammering white keys on a piano.

We also learned using a lot of blues music. There's a lot of easy variations you can do on a guitar in an Am blues key that can teach you all those fundamentals.

Modes were also worked in at the same time. This was probably not the best though, cause i really didn't get them at the time and only fairly recently sat down to study them and actually figure them out.

Re: Basic Music Theory in ~200 Lines of Python

#137
post #59
post #47

Earlier quoted context omitted.

Different way of saying the same thing. "For historical reasons the notes B/C and E/F are one semitone apart."

But that is not for historical reasons, that is due to the universal mathematical properties of the intervals. The names of the notes and scales are due to historical reasons, but a major third and a fourth is one semitone apart due to math, not history.

[deleted]

Re: Basic Music Theory in ~200 Lines of Python

#138
post #59
post #47

Earlier quoted context omitted.

Different way of saying the same thing. "For historical reasons the notes B/C and E/F are one semitone apart."

But that is not for historical reasons, that is due to the universal mathematical properties of the intervals. The names of the notes and scales are due to historical reasons, but a major third and a fourth is one semitone apart due to math, not history.

What the article means is: we dont have 12 notes (A B C D E F G H I J K L). Instead, for historical reasons (the choice of CMaj/Amin as a reference due to the notation evolution from heptatonic scales) we have A B C D E F G and we annotate with accidentals but, since those are not evenly spaced, there are some missing "black keys" there.

Also, what devnonymous says, which I agree with too (but that's another story...)

Re: Basic Music Theory in ~200 Lines of Python

#139

Earlier quoted context omitted.

Do you know why these chords are so common? Is it simply cultural or something else?

The notation OP is using is relative to the key of your song. So if your key is C major, the V chord is G. However, if your key is F major, the V chord is Bb. So it's not that there's only a few chords used in popular music, it's that there's a very consonant group of chords for any key your choose. Also, OP is leaving out lots of ways to modulate these basic chords into more complex ones (adding a seventh step, inve…

Any suggestions about theory learning beyond this?

Something that would help with composition perhaps? Music phrasing? Some book to read? Something for self learning? I wish that melodies I am trying to compose would be better in reflecting what I like in music, and I whish to figure out what is missing.

I can improvise with different chords but it is getting boring and once I try to do something more comlex it doesn't reflect what I like.

I think I am missing something basic and simple but since I had no other option but to learn myself mostly it is probable that I simply wasn't exposed to something essential in theory, something that all good composers know very whell, something that allows experimenting but in a productive way.

May be there is a book that is like a bible for all composers and I simply never heard about it?

Re: Basic Music Theory in ~200 Lines of Python

#140

“ For historical reasons, there are no sharps or flats between the notes B/C, and E/F.” Mmmm yes, and that’s also a bit confusing because it dodges around why the scale was and is 7 notes to begin with.

As a kid I dismissed the piano because nobody explained to me why the keyboard was so stupid looking, laid out so irregularly. WbWbWWbWbWW. Wot? Only some self-education (much later) revealed that 12 tones per octave deliver some excellent harmonies, not 11 or 13 or 20 or 36 or whatever. Twelve. But the harmonies come only on odd steps. So we have 5 semitones to a perfect fourth (4:3 harmony), then two semitones to a…

I didn't really understand your explanation so I might be restating your ideas, but just in case:

> And then - just to keep it confusing - we have to split both of those groups of five semitones, so... we arbitrarily split them as 2-2-1 (i.e. WbWbWW keys). Thus the white/black keyboard pattern, starting at C, of WbWbWWbWbWW. If only someone had explained all this in grade school.

We don't arbitrarily split them! It was very much made on purpose to match the diatonic scales, which are very natural due to being a chain of fifths. E.g. from F ascending 5ths: F-C-G-D-A-E-B-¡F!

It's not arbitrary that we based modern keyboards around heptatonic scales! Then we added some black notes so we can transpose, which is pretty convenient on 12-TET.

Post reply on HN