Back

Music Theory for Programmers

40 points3 daysrunjs.app
kmoser1 hour ago

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 (falsely) claim they're the "same note" and I'd believe it. This is one reason I've always had trouble learning music.

> √2 the awkward one -> 311.13Hz

That one doesn't sound particularly awkward to me. Again, I blame my inability to distinguish pitch.

The only instrument I was able to pick up pretty easily was drums.

ergonaught1 hour ago

I want to read it, because it’s interesting. And yet.

https://bcantrill.dtrace.org/2026/09/05/the-revolt-of-the-re...

tessierashpool1 hour ago

yeah, this is robot garbage.

the post says: I wanted to start from scratch and learn music from first principles, and I began that journey by writing code.

but we know that's not true. you began that journey in Claude Code, or Codex, or ChatGPT, or whatever. you just want to demo your startup that embeds JavaScript in web pages.

lefra1 hour ago

I should not have to install a browser plug-in to opt out of Google analytics (that's what proposed as an opt-out option in the privacy policy).

Where's the "reject non-essential cookies" button?

altmanaltman2 hours ago

I learned to play guitar by my own when I was around 12. You don't really even need to know music theory to play guitar, as long as you understand the shapes etc.

Over time, I developed shorthands for understanding theory like i can easily look at a fretboard and know which note it is.

But what bugged me is that you seem to imply the reason why you couldn't learn a instrument was because you did not understand the why. That makes very little sense to me. I know several professional musicians who don't even know what a mode is or what formal notation is. One of them has pitch perfect ear, he can literally hear anything and tranpose that on his guitar. He has no idea how notes work and just writes tabs.

So while this is very nicely from a programmer point of view and an objective explanation of things but learning all this will not make you a better musician is the point.

Practice above all. Dont try to fit all theory into the pratice but understand what you are practicing particulalry using the theory. Otherwise you end up with all theory and no practice experience of using that theory and creativity.

As a perosn who likes code, this is interesting. As a musician who also understands music theory, this is kind of alienating in terms of how it presented. Like if someone just read this article and thought they understood music theory now, they would be pretty unsufferable to actual musicians.

jemmyw1 hour ago

It's funny though how different people respond to learning music theory differently. I started on guitar when I was 19. I played for a long time at campfire level. When my kids started learning music I also learnt a lot, and now I know scale shapes and modes on guitar, so I can reasonably play to a song I'm hearing for the first time, then figure it out by ear. But I just cannot make the leap to knowing the notes at each position. I can read music, very slowly, to play on piano, but fluency has never clicked for me even though I've put the time in.

My 8 year old hardly ever practices but just looks at the music and knows the notes on piano and violin.

In any case, I agree that this isn't that helpful to being able to play, it's just an interesting way to understand why things are as they are.

dyzone1 hour ago

Your kid might have absolute pitch. Only a few percent of people have it.

https://www.youtube.com/watch?v=t3Cb1qwCUvI

sjrd1 hour ago

Perfect pitch is not correlated with the ability to see written notes and immediately know how to play them on any instrument. It is only barely correlated with the same but for singing the note.

I do not have perfect pitch, but I could always do what GP's kid does. I am now a pretty good amateur singer.

What matters for this is learning to read the music notation and developing a sense (mostly subconscious) of scales and harmony. Perfect pitch does not help either of those things.

JonathanRaines3 days ago

Fantastic post. You took a subject that never made sense to me and made it seem simple.

Fannon2 hours ago

Very nice, thanks for creating this!

> The system we want, where the octave is pure and the fifths are pure and everything closes into a neat loop, does not exist and never has. Every tuning system in history is a different choice about where to dump the error.