Live data from Hacker News

Music Theory for Programmers

runjs.app

81–90 of 261 posts

Re: Music Theory for Programmers

#81

Earlier quoted context omitted.

You say that the article isn't music theory but don't bother to say why.

It's a fun webpage about a programmer dipping their toes in the very most basic elements of music and documenting some of their current understanding.Imagine I wrote an article called "Programming for musicians" that was mostly about how to turn your computer on and install homebrew[1] and finished by showing you step by step how to cut and paste "hello world" in javascript from stack overflow. You might rightly say…

> Here[2] Is the syllabus for ABRSM Grades 1-5 music theory.

I've always thought that's mistitled. Better would be Traditional Western Music Notation Theory.

Notice what's absent, e.g. frequency and timbre which are nicely introduced by the current article.

Music theory is a lot wider than the ABSRM syllabus. And the current article is a great starting point.

Re: Music Theory for Programmers

#82
post #40

Earlier quoted context omitted.

When I see my friends who are into music play and talk about different instruments, it actually feels like magic to me. I tried to learn Violin some years ago but I could never understand why the note was correct. I do know that if I had learnt Keyboard instead, I would know where the correct notes are but I am still not able to recognize a sound and understand what note that is. Any pointer as to what I can do? Beca…

> I am still not able to recognize a sound and understand what note that is That is called "perfect pitch" and it is not necessary to play music. It's very rare to have perfect pitch, and it seems to be innate, not something you learn. Contextual note recognition (relative pitch) is what musicians normally use to jam. It comes with practice and contextual clues that you pick up over tens of years (including familiari…

Isn't perfect pitch just when you can tell a note without having a reference tone?

Once you have a point of reference things just go up and down and from there it should be manageable to identify each note.

Also, not sure about the innate thing. Seems to me that it's just a neural pathway that can be created by playing or listening to a whole lot of music while being aware of which tone is which, for example by reading the score alongside.

Re: Music Theory for Programmers

#83

Let us try an experiment shall we: listen to any music you like and try and match the information the article provided to the complexity of what you are hearing. How much do you see a path from A(rticle) to S(ound in your ear). This article is trivializing music down to a few not-so-important facts and mistaking some math for anything that would help `programmers` (?) understand music. Maybe start by rewatching "This…

> Let us try an experiment shall we: listen to any music you like and try and match the information the article provided to the complexity of what you are hearing.

Trying now. Twinkle Twinkle Little Star.

> How much do you see a path from A(rticle) to S(ound in your ear).

100%.

I tried three more. Same result.

How much do you see?

Re: Music Theory for Programmers

#85

This is (mostly) not music theory and what is music theory is mostly wrong or incomplete to the point of being wildly misleading. Source: have degree and postgrad in music, was a professional musician until RSI put paid to that career, wife is a professional musician and teaches to postgrad level at 2 conservertoires, most of our friends are professional musicians, have a house full of scores and music books. If you…

Y

Re: Music Theory for Programmers

#87

This is (mostly) not music theory and what is music theory is mostly wrong or incomplete to the point of being wildly misleading. Source: have degree and postgrad in music, was a professional musician until RSI put paid to that career, wife is a professional musician and teaches to postgrad level at 2 conservertoires, most of our friends are professional musicians, have a house full of scores and music books. If you…

Yes, he could have approached it differently.

It’s really good at explaining the octave, the fifth, it shows the mathematical basis for why just intonation has “wolf notes”, and why we use 12-tone equal temperament.

Once it hits the 12-tone scale, and explains why we generally avoid the tritone, it doesn’t explain very well why we generally use diatonic instead of chromatic scales (well, OK, great music can use chromatic scales, but there’s a reason “Entrance of the Gladiators” sounds like a clown show).

I would had, after explaining how 12-tone gives us an almost perfect fifth and fourth, explained that a major third is 5/4, and a minor third is 6/5, and that the thirds are noticeably but tolerably out of tune in 12-tone equal temperament.

Once we have the fifth and the major third, we then explain the major chord (Base note, 3/2, and roughly 5/4). Next, we explain the perfect fourth. From there, we can show the I IV V chord progression. And once we have I IV V we can then demonstrate the major scale. (The linked article shows us a major scale but doesn’t explain why the major scale is tone-tone-semitone-tone-tone-tone-semitone—it’s that way because if we take all of the notes that exist in a I IV V chord progression, we get the seven notes of a major scale)

After I IV V, I would then look at a basic 4/4 rhythm, quarter notes, eight notes, the kick drum, the snare drum, and the closed hi hat.

I IV V, the major scale, and a simple 4/4 rhythm is enough music theory to write a good number of rock and pop songs.

I IV V and the major scale is roughly equivalent to understanding variables and variable assignment. Adding the structure of a 4/4 rhythm, with kick, snare, and high hat is equivalent to if-then-else and while.

From there, if I were to continue, I would next explain the minor third (6/5) and minor scale, the pentatonic scales (minor pentatonic gives us a large number of rock guitar solos), and probably show the I V vi IV chord progression.

Obviously, this is very basic, but things like ABRSM Grade 5 are the music equivalent of Forth-like and Lisp-like languages: They can be useful, but just as the majority of programs aren’t written in Forth or a Lisp dialect, the majority of music doesn’t use, say, an irregular time signature.

Re: Music Theory for Programmers

#88
post #10

This article is quite well done, especially from a programmer's perspective, but falls flat (no pun intended) for me because of my terrible ear for pitch. > Here are five notes. Every one is double the frequency of the one before it. [...] They are different pitches, and yet they sound like the same note. Nothing about these notes seem similar to me. You could play pretty much any sequence of rising notes and (falsel…

I thought the same for a long long time. At least for me the solution was to grind ear training for a few weeks/ months 10 minutes a day. I'll certainly never reach the heights of this skill but a bit of persistence to overcome lack of natural talent did propell me forward.

What method/software did you use for the ear training?

Re: Music Theory for Programmers

#89

Let us try an experiment shall we: listen to any music you like and try and match the information the article provided to the complexity of what you are hearing. How much do you see a path from A(rticle) to S(ound in your ear). This article is trivializing music down to a few not-so-important facts and mistaking some math for anything that would help `programmers` (?) understand music. Maybe start by rewatching "This…

> How much do you see a path from A(rticle) to S(ound in your ear). Very clearly. The author constructed a melody from first principles in the article. You can take any song, deconstruct it using the information in there and begin to see why it sounds nice. > This article is trivializing music down to a few not-so-important facts This is a music theory lecture with code examples. Hardly “not-so-important”. > mistakin…

Music theory is just that. Theory. There is no set of laws.

Creating melodies by doggedly applying any system is almost guaranteed to feel tired, predictable and boring.

Re: Music Theory for Programmers

#90
post #73

Earlier quoted context omitted.

You say that the article isn't music theory but don't bother to say why.

I think what he means as music theory is the next step after what this (blatantly AI-written, but passable) article talks about. This is the part that you take for granted, but it certainly is music theory in the same way that Peano's axioms are number theory even though you don't use them explicitly . The AI style gets boring very quickly, but I liked the explanation of what Western music notation is optimized for.…

There's no such thing as "music theory".

Music theory was originally a tool for music critics in the 19th century to talk about conservatory music of the time.

There's nothing rigorous, systematic or scientific in it; it's mostly a historical cultural artifact more than anything else.

For example, music "theory" is completely helpless when describing an EDM track or how to compose one. EDM is one of the most primitive music styles ever (barely even qualifies as music in my opinion) and yet music "theory" is worthless in this case.

Post reply on HN