10 ms·
Music Theory for Programmers
- JonathanRaines 2mo agoFantastic post. You took a subject that never made sense to me and made it seem simple.
- BigTTYGothGF 1mo ago"Seem" is doing a lot of work there.
- cindyllm 1mo ago[dead]
- Fannon 1mo agoVery 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.
- altmanaltman 1mo agoI 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.
- jemmyw 1mo agoIt'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.
- dyzone 1mo agoYour kid might have absolute pitch. Only a few percent of people have it. https://www.youtube.com/watch?v=t3Cb1qwCUvI https://www.youtube.com/watch?v=t3Cb1qwCUvI
- sjrd 1mo agoPerfect 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.
- dyzone 1mo agoOh right, I misread. GP is talking about reading, not listening.
- altmanaltman 1mo agoI think it gets significantly harder to learn new things as you age. It could make sense though like its significantly easier to learn a new language as a child than an adult, something simillar could apply to sheet music also i guess where they are naturally more intuined with its language vrs you who has to kinda use a dictionary for time to time because the "normal" way for you to speak has been so different for so long. But for your child, its another form of expression almost. Its really good to get kids into music while they are young imo
- lefra 1mo agoI should not have to install a browser plug-in to opt out of Google analytics (that's what's proposed as an opt-out option in the privacy policy). Where's the "reject non-essential cookies" button?
- ergonaught 1mo agoI want to read it, because it’s interesting. And yet. https://bcantrill.dtrace.org/2026/09/05/the-revolt-of-the-reader/ https://bcantrill.dtrace.org/2026/09/05/the-revolt-of-the-re...
- tessierashpool 1mo agoyeah, 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.
- handsome_jack_ 1mo ago[flagged]
- youoy 1mo agoIt looks good at the begining, but at some point it starts saying "half truths", or stating facts/conclusions with confidence as if that was the main reason, but its just half of it (and maybe not the most important half)... I wanted to read it because I like the topic, but i somehow felt it was folluting my brain. I think i will also start joining the club of AI;dr to protect myself from pollution, even though i may miss some iteresting articles.
- yiren 1mo agoI did read it, found it mildly informative/interesting, then saw your comment, read the link, and pasted in two paragraphs into Pangram 4... ouch! I guess I'm not LLM-weary enough? https://www.pangram.com/history/25773627-adfa-4efb-8c10-f4fd9eeb4379?ucc=tEpJJN2KCKd https://www.pangram.com/history/25773627-adfa-4efb-8c10-f4fd...
- alew1 1mo agoWhen you read something like this > Change it to 300 and run it again. You get a different pitch and nothing breaks, because at this level there are no notes yet, just a number. does it make sense? Or perhaps it just seems like something easy enough to skim past without worrying about whether it makes sense? Before LMs, I would have assumed that a person intentionally wrote that sentence, and perhaps spent some time trying to understand what could possibly "break" if there were "notes" rather than "just a number." Now there is a simpler explanation: the sentence actually doesn't mean anything.
- kmoser 1mo agoThis 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.
- arlcode 1mo agoI 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.
- theanonymousone 1mo agoHow come the same article has been posted four times in the past 18 days? https://news.ycombinator.com/from?site=runjs.app https://news.ycombinator.com/from?site=runjs.app Doesn't HN have a temporal deduplication system?
- raincole 1mo agoWhen I tried to post a duplicated link HN will just redirect me to the existing one, but somehow everyone else seems to be able to post the same link multiple times.
- theanonymousone 1mo agoSame. (but of course, you don't see the duplicates when they do accept your post) You can also see duplicates e.g. here: https://news.ycombinator.com/from?site=semianalysis.com https://news.ycombinator.com/from?site=semianalysis.com
- deleted 1mo ago[deleted]
- polotics 1mo agoLet 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 is Spinal Tap" instead, and consider that https://www.reddit.com/r/musictheory/comments/59n3pg/remember_how_in_spinal_tap_they_joke_d_is_the/ https://www.reddit.com/r/musictheory/comments/59n3pg/remembe...
- amingilani 1mo ago> 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”. > mistaking some math for anything that would help `programmers` (?) understand music. Compared to the lessons on https://www.musictheory.net https://www.musictheory.net this is definitely programmer/engineer friendly. It’s better than my old go-to at https://www.lightnote.co https://www.lightnote.co
- deleted 1mo ago[deleted]
- polotics 1mo agoSure. It is a trope amongst gigging musicians that over-intellectualizing the feels is a massive no-no. Hence the joke about Db being the saddest chord... also Phil Collins said that, he would know :-D... ...and C# being the most evil chord. Hilarious. I persist: "before you can be good, you first have to be bad" is more helpful music theory than that whole JavaScript visuals page.
- amingilani 1mo agoI know the trope. My first guitar teacher taught me how to play songs but didn’t know the notes on the fretboard. It’s a bit like being able to drive a car without understand what the clutch and gears actually do. But personally, I couldn’t handle not knowing why the clutch needed to be pressed, or why a chord shapes is the why it is.
- _kb 1mo agoIf this is the sort of thing that interests you, I highly recommend setting aside 90 minutes and strapping yourself in for a listen to https://malwebb.com/notnoi.html https://malwebb.com/notnoi.html.
- dyzone 1mo agoThe gigs page points to "file:///Users/malwebb/Documents/Mal%20Webb%20Site/gigs.html" haha.
- euroderf 1mo agoIf tasked with this, I would start with an image of a piano keyboard and ask: Why the hell does it look so weird ? Black and white keys in some infernally strange layout ? WHY ? Which takes you very quickly to equal temperament and perfect fourths and perfect fifths. This tells us where the notes C and F and G are located on the chromatic scale, but then the rest are pretty arbitrary eh. Semitones from C to C go 2-2-1-2-2-2-1, but there is nothing heavenly ordained by this particular arrangement. E-to-F and B-to-C are a collective choice. If I had been presented with this kind of explanation fifty years ago, I might have been less skeptical of the entire enterprise.
- raulparada 1mo agoIf you’re a programmer interested in music, do check out Strudel, at least the examples at https://strudel.cc/examples https://strudel.cc/examples. If you like those (I love them, so much art in a few lines of code), the docs _will_ get you started. Enjoy!
- aidio 1mo ago[dead]
- maybewhenthesun 1mo ago> Which is a strange way to teach a system that essentially comes out of physics and arithmetic. There are twelve notes for a reason. There is of course a lot of physics involved. But there is at least as much convention at play. So imho this is a very one sided way of looking at it. There is a physical reason the 12 notes are those 12 notes (though the exact frequencies assigned are influenced by culture as well), but lots of different cultures use less notes, or more, or extra notes inbetween. So 'Because that is the convention.' is imho at least a good an explanation as the physics one.
- seanhunter 1mo agoAlso his physics explanation is not the best, and you can see if you just ask the next “why” question. He talks about the harmonic series giving the basic ratios of the Pythagorean scale but why is that the case? When you solve the equations of motion of any sort of harmonic oscillator (including crucially, strings, vibrating columns of air from a wind instrument etc) you see that you can solve them using a Fourier series, so if you solve this in trigonometric form you get a_1 * cos blah_1 + 1/2 * (a_2) * cos blah_2 + 1/3 * (a_3) * cos blah_3 + … + 1/n * (a_n) * cos blah_n [1] …so those fractions end up being the partials of the harmonic series (a_n/n) where a_n is the n_th coefficient, which you find using an integral. Now if you have a normal western musical instrument, the higher overtones (later terms of the Fourier series) are not prominent so those coefficients are small. So the terms that matter have ratios a_1, a_2/2, a_3/3, a_4/4, a_5/5 corresponding to the primary intervals that he’s talking about. In cultures (eg Balinese and Javanese music from Indonesia) where they use a different number of tones and different scale, it’s no coincidence that they play a lot of gongs and bells, which have much more prominent higher overtones, so a different set of Fourier coefficients so different ratios are going to be “congruent”/melodious-sounding. [1] the “blah” terms are a function of pi and the length and stiffness of the string etc. Not really relevant here.
- pierrec 1mo agoFor metallophones used in Gamelan music, I don't think the key difference is emphasis on higher vs. lower overtones. Rather, their overtones don't follow the harmonic series but are still well-defined. Their tuning goes along with that, and it works given that particular non-harmonic timbre, but wouldn't work with western classical instruments, which tend to approximate the harmonic series in their overtones. In all cases the lower overtones remain the most audible and the most important ones for tuning and finding consonance.
- yuumei 1mo ago> Two things fall straight out of that. Hi Claude
- seanhunter 1mo agoThis 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 actually want to learn music theory for the purposes of playing I strongly recommend you just follow whatever tutorials for your instrument and style and if you get to the point where feel you want to learn more and take it seriously in and of itself, buy “The Jazz Theory Book” by Mark Levine[1]. In spite of what it says, there really isn’t any such thing as Jazz theory - it’s just music theory, and this book is a great presentation with lots of good examples. If you like jazz (or the western popular music tradition including rock, pop, funk, etc) you’ll come out understanding how that music works better than most people. If you’re doing a music degree, there will be books recommended by your music programme, but honestly, Levine will cover most of what you need if you’re not doing a straight classical course in which case you’ll want to augment with a more conventional source so you understand the “rules” they want you to follow when writing pastiche counterpoint etc. If you want to get big into composition and/or want to understand late romantic and 20th century music, get Harmonielehre and “Structural Functions of Harmony” by Schoenberg. Together they are by far the best harmony books I have ever seen and go super-deep into why the western classical tradition works the way it does. If you compose there’s a decent chance they will change your life forever as his approach is to not take anything for granted but exhibit everything with examples from masterworks of the western tradition. Amazing books both of them. Harmony is not a spectator sport though - to get full benefit you have to get the books and work through stuff on the piano. It will reward you immensely. If you want something else that will blow your mind, read “The technique of my musical language” by Messiaen. If you read Levine first this will have the additional benefit of showing you where the “diminished” and “augmented” scales and the whole “harmonic major” thing come from. [1] https://www.shermusic.com/products/the-jazz-theory-book https://www.shermusic.com/products/the-jazz-theory-book
- vishalmullur 1mo agoWhen 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? Because I dont think learning music theory is going to be enough for me.
- hypfer 1mo agoThis is clearly interesting and contributing value, but it's also painfully AI prose to the point where it is hard to not dismiss it as likely false information. Fun interactive examples though. With another human pass, this could be great.
- vishalmullur 1mo agoThe first couple of sentences got me hooked because I have had the same difficulty trying to learn music where I dont understand if I am producing the right sound or not. I thought it was fun so tried to push myself to read through but overcoming the dislike of the way AI structures the statements became impossible after a short while.
- hypfer 1mo agoI eventually just started clicking on the examples and thinking "hey that sounds nice". And now I've realized that the page hosting that is for a JS snippet editor embedding thingy. Commercial stuff. So this is just a tech demo created with AI to showcase what can be done with their library, and not someone actually caring about the topic :<
- WindyTree 1mo agoPretty good, could use more on the tonic, how it’s defined for a diatonic set of 7 notes. The chosen I IV V primary chords are key for that, but a precious tidbit I learned is any of the notes can be set as tonic, but the I IV V chords are only for major and minor. Like for the notes in C major, it becomes A minor with I IV V chords starting off A, but to set the tonic to F, it becomes F Lydian mode with primary chords I, II, and VII. (Fmag, Gmaj, Emin) The rule for the primary chords of the modes is you find the note that differentiates it from the major or minor scale, and pick the chords that have it avoiding the diminished. Playing the notes of c major starting at f, it’s the sharp fourth b that is different, so the primary triads are f-a-c e-g-b and g-b-d. Oh, and rhythm is just the same as consonance. Most are octave based, beats on wave peaks of overlaid octaves getting quieter. The 3 based on times like 6/8 are the same but for 5ths and 17ths. (The bottom number 8 is just a BPM hint from old days.) beyond those the intervals get unstable feeling, like 7/4 in Money by Pink Floyd has that cut off feeling, someone took a few from each measure, but maps to a minor 7th interval.
- pianopatrick 1mo agoFor all the programmers reading this who think music theory is complex, just realize that is how programming seems to most people.
- ahmedhossamdev 1mo agoWebsite is down I think..
- nialv7 1mo agoFor programmers and written by AI and mostly wrong... What a combo
- bachbeethovench 1mo agoMusical traditions, of which the western is only one, are cultural conventions based on a subset of physical facts about sound. There is also a psychological and psycho-social component involved. This is all to say, while i like the post, i find the approach technocratic and one sided, as it will give a false feeling of truth and an illusion of having ultimately understood music. It's a quest for absolute scientific truth in a realm where no such truth exists. I have observed similar understanding problems like the ones the post writer reports with other people, esp. those of a more skeptical, inquisitive and scientifically curious nature. For them, it's esp. hard that, while there is a scientific backing to music, there are also cultural conventions on top that you just have to accept. And these conventions are for example different between western and traditional indian, arabic or chinese music.
- PaulDavisThe1st 1mo ago> And these conventions are for example different between western and traditional indian, arabic or chinese music. TFA does acknowledge that it only really covers western music. But on top of that, the other musical cultures you mention are in fact remarkably similar to western musical culture at the level TFA is describing. They differ significantly in terms of what they do with e.g. dividing the octave into 12, but they all make heavy use of the 3/2 ratio and other similar concepts. If you want to get really different, check out Byzantine musical culture. They have no octave equivalence (!) and their notation is 100% relative (i.e. they write melodies down as sequences of intervals, not sequences of absolute notes). Even so, they still use 12 tones per octave ...
- yvdriess 1mo agoI enjoyed the programmer's approach to build it up from first principles. I chuckled at rythm being the binary encoding of the duration's mantissa. Now dispell the "this is just the western tradition": do Klingon music theory https://youtu.be/1LjcBv-OWtQ https://youtu.be/1LjcBv-OWtQ
- larodi 1mo agohttps://news.ycombinator.com/item?id=49376704 https://news.ycombinator.com/item?id=49376704 - 17 days ago https://news.ycombinator.com/item?id=49346025 https://news.ycombinator.com/item?id=49346025 - 19 days ago and there's one more 15 days ago, but really - it seems a link needs to be posted several times to take off. @dang
- rcgy 1mo agoThis is... Not a good article.
- ur-whale 1mo ago> This is... Not a good article. This is... Not a good comment. And unlike you, I don't believe I need to explain why I'm writing this.
- pythonRon 1mo agoI was interested in reading the article but, like so many I find online these days, the white text on black makes my eyes throb to the point of giving me a headache if I don't stop after a few seconds. so I have to give it a miss. I've read that white text on a black background is easier on the eyes, but it's obviously not universal.
- yladiz 1mo agoIt’s not perfect but I’ve just tested and reader mode does work for this website.
- ohcmon 1mo agoThis is super cool! Also reminds me of https://www.languagetransfer.org/music https://www.languagetransfer.org/music
- deleted 1mo ago[deleted]
- chrisjj 1mo agoNice site! > There are twelve notes for a reason Twelve pitches, actually. (Strictly, twelve pitch classes). Note != pitch. A note is a sound having properties of which one is pitch.
- PaulDavisThe1st 1mo agoTell me more about the other properties.
- chrisjj 1mo agoYou really don't know?
- PaulDavisThe1st 1mo agoI really don't know what you're referring to, no.
- chrisjj 1mo agoTry https://en.wikipedia.org/wiki/Musical_note https://en.wikipedia.org/wiki/Musical_note .
- PaulDavisThe1st 1mo agoAh, sure, OK. There are "notes as the name of certain pitches", and "notes as things musicians play". The former is a relatively simple concept, the latter much less so. I do see that the vast majority of the wikipedia article is concerned with "notes as the name of certain pitches".
- chrisjj 1mo ago> There are "notes as the name of certain pitches" The article doesn't say that. If it did, it would be incorrect. Notes aren't pitched. Notes aren't pitch names. Notes have pitch.
- DuneWarm21 1mo ago[dead]
- vaastav 1mo ago"You may have heard a little click at the end of that. That is not a bug in the browser, it is physics being unforgiving." lolwut
- chrisjj 1mo agoIt is true.
- bossyTeacher 1mo ago"The problem was never the practice. It was that every explanation of music theory seemed to miss out the fundamental reasons for how and why things are the way they are. Here is a staff. Here are the notes on it. This is a major scale, memorise the pattern. Why those notes? Why that pattern? Because that is the convention." This has the signature LLM writing style.
- 0815beck 1mo agothat, and also it is very arrogant. typical superior complex of stem people, one of the worst examples, insufferable
- jkahrs595 1mo agoThis is more “synthesizers for programmers” than “music theory for programmers”.
- 0815beck 1mo agoinsufferable and arrogant
- IAmGraydon 1mo ago>I can't play an instrument. I have tried more than once, and each time I got as far as being able to make roughly the right noises without ever understanding why they were the right noises. The problem was never the practice. It was that every explanation of music theory seemed to miss out the fundamental reasons for how and why things are the way they are. You can’t play an instrument because you failed to practice. Playing an instrument doesn’t require knowing theory. It certainly helps with being a musician, however, which is a completely different thing. That aside, the way the author goes about explaining “music theory” here is exactly how one prevents themselves from ever producing an actual piece of music. Yes, it’s good to understand the mechanics of how sounds and chords work under the hood, but one thing I’ve learned in my nearly 30 years of making and recording music is that thinking is the enemy of creating art. This framework introduces far too much cognitive overhead and gets in the way of what we’re really trying to do, which is communicating emotion. What is written in this article is has been known for a very, very long time, but we still use the more common version of music theory because it abstracts much of this away so that it doesn’t get in the way.
- Kuyawa 1mo agoMusicians will cringe, programmers will rejoice, let them 'Intro to audio for programmers' would keep them away and let us have a party in the comments telling the author how interesting the tutorial was. Never use the word 'Music' again and you'll be safe Kudos, every work of creation is a joy on its own, I was fascinated clicking every button
- teiferer 1mo ago>Sound is just air pressure wobbling. Sorry man, if you approach things from that angle then no wonder music is a mystery to you. The issue with "deriving from first principles" is that it very much depends on what you consider "principles" and which you pick. Take two people who want to derive sth "from first principles" and they will arrive at wildly different things. Because they start very differently. That's why this "ignore everything that came before" approach (different name for "from first principles) is so flawed and limited. There is so much insight to gain from the wisdom that came before you that ignoring it isn't going to help. > the simpler the fraction, the better it sounds That's comically wrong. If everything was just an octave, you wouldn't even have music. Sorry, I stopped reading there. It's as if a physics student tries to derive medicine "from first principles" by starting at atoms and thinking hard. It doesn't work and won't fix your appendix.
- PaulDavisThe1st 1mo ago> It's as if a physics student tries to derive medicine "from first principles" by starting at atoms and thinking hard. It doesn't work and won't fix your appendix It might not help develop a cure for your appendix, but it does or can help understanding why certain cures work, or why some are preferred over others. ps. background in biochemistry and biophysics
- ur-whale 1mo ago> It's as if a physics student tries to derive medicine "from first principles" by starting at atoms and thinking hard. It doesn't work and won't fix your appendix. An entire civilization (China) completely missed having a proper scientific awakening and the following industrial revolution about a 1000 year ago exactly because of that kind of dumb thinking. Great idea!
- iainctduncan 1mo agoThis is not an article about music theory, it's an introduction to what is called "acoustics" in educated music circles, along with examples from digital synthesis. It's a decent enough intro to acoustics and digital synthesis, but saying it's music theory is just redefining terms with accepted meanings in their fields.
- low_tech_punk 1mo agoI still enjoyed going through it, for what it is. 1. runjs promoting itself using music REPL as an example 2. author used LLM to fit a few music related ideas into the web audio API 3. they tried it with math two years ago: https://runjs.app/blog/equations-that-changed-the-world-rewritten-in-javascript https://runjs.app/blog/equations-that-changed-the-world-rewr... They are clearly targeting js developers, which is one of the largest coding community 4. "The naming is not arbitrary, and the harmonic series explains why.", stop wasting tokens. Just say what it is please.
- bvan 1mo agoPerfect for me. When you’re raised in a world of science your brain does not rest until you understand some level of ‘why’. Beginner music instruction and theory usually assumes you’re brain-dead and just take in, no questions asked.
- bob1029 1mo ago> The problem was never the practice. Extreme doubt. The theory of music is about as useless as it gets if you aren't in some kind of academic program or collaborating with other musicians on a shared composition. It helps with dead reckoning over things you cannot audition, but that's pretty damn rare. You'll get better a lot faster if you just try to follow along with a YouTube video in the style of Guitar Hero scrolling down your screen.
- Crabber 1mo agoI think music is a good "test" for logically thinking people because it requires you to put away your logical brain and just accept that music sounds good because "it just does" and music theory is the way it is because "it just is". I don't think you can get good at an instrument or enjoy music if you keep trying to force it to make logical sense in your brain all the time. The fact that the author admits straight off the bat that he's never managed to learn an instrument kind of attests to this in my opinion.
- odyssey7 1mo agoFair enough. Models tend to be imperfect, and music theory is definitely no exception to that rule, and we attempt to model music because we care about the underlying phenomenon (music). As someone who enjoys listening to music, creating music, and music theory, I'd characterize the latter as providing a specialized vocabulary; an approach to listening, since words in the vocabulary represent concepts that you can hear; and a toolbox of concepts you can draw from. It's a model, you can use it as much or as little as you like. And there's more than one model, and sometimes the different models overlap more or less, and you can choose any of them or none of them and still make and enjoy music. The other thing it provides is a wildly complex logical system with fascinating philosophical connections. Some people enjoy exploring that more than making music with it, and that's also okay. I've certainly gotten a lot of enjoyment out of that. It's made me a better thinker. In math, formulas can be elegant. In music theory, different constructions induce different experiences.
- Crabber 1mo agoFair points, I should probably disclose that my comment is perhaps one of those "looking like I'm giving advice to other people but really just giving advice to myself" kind of comments :) I have began learning instruments before and fell into the trap of asking too many "why" questions and then just got lost in music theory that a) didn't make too much logical sense and b) didn't help me actually get better at an instrument in any way. I think it's very unlike programming where you could start with a hello world program and keep asking "why does it work like that" questions and keep getting deeper and deeper and actually end up with a very good understanding of computers by the end of it that actually would make you a better programmer. But when you're learning an instrument I think perhaps at the start it's better to just accept that "chords sound good because they just do" rather than going off down a complete rabbit hole.
- ta2112 1mo agoTuning pitches to one another is wildly complicated. The rabbit hole goes unfathomably deeper than this introductory stuff on ratios and equal temperament. High schools physics introduces basic concepts in a way that works in certain situations and can be confirmed somewhat through experimentation. However, when you go deeper into any subject, fluid mechanics and material tolerances come to mind, those simple introductions cease to resemble the complexity of the systems. Music is no exception. I remember being surprised by the many ways this platonic explanation of pitches breaks down when confronted by real instruments in real air heard by real ears. Welcome to beautiful complexity of music! Example 1: Pianos are tuned with stretch tuning, where the high notes are tuned higher than their theoretical pitches, and vice versa for low notes. That's because of a thing called inharmonicity, where the overtones of short piano strings don't form perfect ratios with the fundamental. Maybe that has something to do with short strings vibrating more like metal cylinders than rods? Example 2: French horns have a lot of tubing! The valves let you include different lengths of tube into the air column. With a single valve combination, the player can hit the fundamental and all the partials up until their lips can no longer take it. To play a scale or melody, they switch between different horn lengths, choosing the partial that will sound closest to the pitch they're going for. Really, all brass instruments function this way, I just mention French horns because I like them. Example 3: String quartets tune their chords with each other on the fly. If you listen to a string quartet practice, they'll spend a good amount of time holding and adjusting intonation to each other. So unlike in the equal tempered world of keyboard tuning, strings and most instrumental ensembles are constantly adjusting to make their harmonies sound sweeter. Equal temperament doesn't come into play, unless you add a piano, which sort of forces everybody to uncomfortably conform to the limitations of set it and live with it keyboard tuning.
- deleted 1mo ago[deleted]
- ur-whale 1mo ago> Which is a strange way to teach a system that essentially comes out of physics and arithmetic Oh boy, couldn't agree more, this has been a lifelong frustration for me as well: I've always been completely stumped by the utter lack of curiosity most musicians seem to have about that. There's a convention, just learn it, why IHN would you want to ask questions about this? Who cares about things like first principles anyways.
- handsome_jack_ 1mo agoAs other commenters have said, this is not music theory. This is just a very basic attempt at finding the frequency relationship between notes from a JavaScript script kiddie.
- hn993302 1mo agoThe tension and resolution thing always surprised me. Every major scale has a minor scale with the same exact notes but played in a different order, and other ones like Dorian. It's like oh, you started with this note 8 bars ago, so now it sounds melancholy. Everyone (including this site) just says it feels that way but doesn't explain why.
- SwtCyber 1mo agoI like this less as "music theory from first principles" and more as "why some of the machinery of Western music looks the way it does"
- jancsika 1mo ago> I V vi IV is the four chords that an alarming share of pop music is built from. This is in line with hundreds of years of authors "explaining" music by starting with Pythagoras for their bona fides, then using that credibility to rationalize whatever opinions they hold about musical aesthetics. To counter: these guys[1] play I-IV-V-I for nearly the whole song. They don't even change it between the verse and chorus. Someone here tell me the one important exception and the term from music theory that describes that exception. Primers should start with the music excerpt that the author loves, and work backwards to the theory that helps explain what's going on. Otherwise it gets pretentious fast. 1: https://www.youtube.com/watch?v=tbNlMtqrYS0 https://www.youtube.com/watch?v=tbNlMtqrYS0
- rynn 1mo agoThe most amazing thing about HN comments is watching engineers demand that their expertise be taken seriously completely disregard the expertise of people in other domains because <make up a reason>.
- goekjclo 1mo agoAI slop, "297 points", this fucking site is a joke.
- anshc0 1mo agoThis is kind of random, but really interesting how it took 7 exactly same posts for it to go viral on Hacker News.
- Kye 1mo agoMusic theory is a tool for analyzing music and, optionally, helping make it. Treating analysis and composition as inverse operations is going to mislead you. There are useful analyses in music theory that would be completely alien to the person whose work it's based on.
- IvanK_net 1mo agoI am the creator of https://www.photopea.com https://www.photopea.com (a popular photo editor). Recently, I wrote https://www.jampea.com/learn https://www.jampea.com/learn , which is the music theory for "technical people". I believe it is the fastest way to get to understand the theory behind music (will take you 2 to 5 hours in total, 10% will be reading and 90% will be thinking about what you just read).
- JKCalhoun 1mo agoI've never wanted to learn music theory. I just want to play. I would write songs on my guitar when I was in college. A friend who was a guitar theoretician stopped by and listened. He said something like, "Odd, you went with a G7 instead of an Am. In that triad you should have played the Am." (Or, you know, some kind of foreign language like that.) I mean, it sounded fine my way. Although for a moment I questioned why thew G7 and tried an Am… briefly. I was afraid suddenly though that if I learned music theory I would have to start writing songs the right way.