This is useful but sometimes whats called 'Music Theory' is actually more like 'Music Notation' or 'Music Naming Conventions' and thats what most of this site is. IMHO for historical reasons the western naming conventions we've come up with for the 12 semitones (A, A#/B♭, B, C, C#/D♭, D, D#/E♭, E, F, F#/G♭, G, G#/A♭) actually obscure the underlying relationships between the notes rather then elucidating them. The same conventions get carried across to sheet music, where the overriding concern historically seemed to be saving ink rather than clarity.
The real 'theory' boils down to why the pattern of the major and minor scales is the pattern that it is (which is the same question as 'why are the black/white keys on the piano arranged that way?'). And the related question of why are there 12 of them in the octave.
And that underlying theory is much better explained in this page that was posted to HN some years ago:
I agree regarding most 'music theory' in actuality being 'music notation', but disagree that 'real theory' is about the construction of major and minor scales and the relationship between notes.
I'd argue that one is only doing music theory if they're using the notation to analyze a piece of music.
E.g. taking apart a Bach Fugue to understand - or hypothesize - about a larger structure, uncover motivic developments, etc. Or analyzing a Bird solo to get at how he's interpreting the chord changes, how certain changes work together to form larger structures, where/how he's using enclosures, where and whether or not he's quoting other players, etc.
Yeah I'd agree with that. I think of 'Music Theory' as being that which distinguishes between 'music' as commonly understood vs random plinky plonk notes with random percussion. Which can also be stated as 'why does music sound good?'. So that starts with the stuff about frequency ratios which then leads to chords and keys and scales, and then at a deeper level yes you start looking at song structure and the balance between repetition and progression, the different types of progression like key changes and the overall art of the balance between meeting expectations and subverting them.
One of the deepest issues I see with music theory as it stands is simply that harmony is "overworked". It has a lot of baggage that is of some use conversationally to discuss different eras and genres and to play polyphonically, but also not really needed to write interesting music or make sense of an existing piece.
Most harmonic structure can be described very well just in terms of scale degree emphasis, and overlapping scales where the structure is complex. And it's quite easy to stumble into "spicy" yet listenable results by setting yourself up with two scales, playing monophonic arpeggiations that interchange them, and then condensing those into chord progressions. It's much harder to reach those chords by starting with a list of block chords, because that medium works in one scale at a time, so the notation quickly gets unwieldy.
Music theory is the theory behind music the same way grammar is the theory behind sentence construction in natural languages. It is descriptive - it is not necessarily searching from some universal "laws of nature" and nor is it axiomatic like math. It is just studying and describing the structure of music. Some parts of theory seem to be universal, some are genre specific.
Music notation is used for communication among musicians and is optimized for clarity in expressing real-world music. Real world music is based around scales (except for 12-tone music which is a really obscure niche), so notation is based around scales. (Although different genres may use different notations, like chord notation instead of notes.)
The underlying relationships of wavelength ratios is interesting part of theory but you don't really need to know about that to play music. But you do need to know about notes and scales, so this is what the notation is based on.
Were you implying that a different kind of everyday notation exists that could be a significant improvement on the traditional system? I understand that various alternative notations can give a clearer presentation of single aspects of music, and I know of some in use for specific instruments and genres/styles, but overall, as a general purpose encoding, standard notation seems to be a well-optimized compromise arrived at by real working musicians over the centuries. Notation has to convey a lot of musical information beyond pitch specifications and relationships. Speaking as someone with good sight reading ability at the piano, and who's heard better pianists sight-reducing orchestral scores even, sheet music doesn't lack clarity, and saving just the right amount of ink also means having a readable format.
I'm a double bassist, and even as an amateur, my ability to function in ensembles and get hired by bands over the past decades owes a lot fluent sight reading ability.
Musical notation provides a kind of symbiosis between composers / arrangers, and players. If you want to work, you have to read standard notation. If you want your material to get played, you have to write it in standard notation. And learning any notation to the point of sight-reading it is prohibitively difficult for most people, including good musicians who learned without reading.
Experiments with developing new notation tend to involve a cooperation between the composer and willing players, often in an academic setting. It's also a wide open field for electronic and computer aided music, where sight-reading might not be an issue at all.
I find the 'piano roll' visualisation, as used by most major sequencers/DAWs is a much more intuitive way of showing how chords and intervals work, precisely because it is proportionally spaced.
I'm not saying traditional notation isn't useful, I'm saying it's unhelpful if you're trying to understand how music actually works.
A piano roll visualization gives a somewhat more immediate depiction of intervallic information. But it isn't absolutely proportionately spaced, it's mapped to keyboard topology. Two neighboring white keys could be a major or minor second apart, etc. (And if real piano topology is shown, asymmetric positioning of black keys mean that identical intervals with one white key and one black key are different in span.)
In relation to the staff, pitches in standard notation are just as "proportionally spaced". Instead of squeezing in black keys, you have to squeeze in accidentals, but then accidentals are an extremely useful way of "showing how chords work", especially in the context of progressions in tonal harmony, which a piano roll gives you no meta-information about. It's less intuitive only in that you need some study to parse it fluently, at which point you gain the advantage of being untied to the layout of a particular physical instrument.
In any quest to "understand how music actually works", as soon as you take some baby steps beyond the basic alphabet of intervals, a piano roll visualization is going to hold you back.
In all the software I've used, it is proportionally spaced. You're just used to thinking the old way. Trust me, the whole thing is a lot simpler if you just accept 12 equally spaced semitones, with 7 of them in play for any particular key.
I don't trust you. You're just used to thinking in terms of the piano keyboard. As I said before, the distance between two adjacent white keys on a piano roll could be a major second, or it could be a minor second. In other words the same distance encodes different intervals. You don't know which it is until you also examine the position of the black keys. A keyboard where the twelve semitones were actually equally spaced would not have groupings of two vs. three black keys. Looking at the adjacency of the keys trivial to do, but so is reading an accidental, which gives you additional information about the functional role of the pitch it alters.
OK, I looked at some piano roll layouts in DAWs, and found examples with equal spacing between semitones, you're right.
I looked at some music mapped onto this layout. The layout allowed for speedy recognition of lone intervals and simple chords, but no more so than standard notation, and it was far worse than standard notation at showing any higher level musical content (the harmonic function of those intervals and chords in the context of the whole piece or local progression, polyphony and independent voices in general, counterpoint, organization of rhythms and cross rhythms, phrasing, larger compositional structures...). Also, because it's just a homogenous field of repeating piano octaves there is much less to positionally anchor the eye on as it reads through, like a staff with ledger and bar lines and key signature would provide to a fluent sight reader. All this musical meaning is stripped away and to reinstate it would be a case of painstakingly decoding the piano roll rather than just fluently reading the music.
I can see how this layout is really useful in a DAW for MIDI input and editing. As for learning the absolute basics of harmony, yeah it's accessible, if you can't be bothered to learn the basics of standard notation. After which point it's a dead end.
Thanks. The piano roll helped me to look at things from first principles - to see how, say, progressing chords towards a change of key you can pivot into the 'allowed' semitones of the new key. Learning about music, the jargon is quite dense, epsecially with the naming of chords and intervals. Thinking of a fifth as seven semitones (and a 2/3 frequency ratio) and so on made it more digestible for me. But perhaps it is a dead end, I might have to take your word for that. Maybe its something like how in chemistry, learning the Bohr modelof electron shells helps you grasp the structure of the periodic table, but then to really get further you have to forget all that and start again with the valence electron model.
Those same relationships are apparent when reading a traditional score. Once you reach a certain level of proficiency reading music it's easy to spot the intervals which make up a chord as written. I don't think the same amount of proficiency isn't needed to interpret a piano roll, it's just proficiency in seeing the same relationships notated differently.
All that to say I think they're both conveying similar pitch information and take a similar amount of effort to ready correctly. Piano roll doesn't convey rhythmic information and that's where I think piano roll falls short as a method of straight notation.
Imagine you are composing a piece of music that will move through a series of key changes (as most pieces of music do). On a piano roll you can see exactly which semitones are shared in common by the different major and minor keys. You can map your way through the transitions visually. A major triad uses 4 and 7 semitone gap, a minor triad uses 3 and 7. It's all so much simpler and clearer if you are starting from scratch.
Traditional notations are obsessed with pretending there are only 7 notes when there are in fact 12. Accidentals and key changes are obfuscated.
How are accidentals obfuscated on a traditional score? They are explicitly marked. It's on a piano roll that they would be easy to miss -- they appear the same as any other note.
Similarly, key changes are explicit in sheet music but hard to see on a piano roll without careful inspection.
What's obfuscated is the _actual_ semitone interval between the accidental and the other notes around it. And the actual semitone interval is the most important bit of information - it's what our ears hear.
I think what you're missing is that a big part of the design of traditional music notation is that it is intended to be read easily and efficiently, even sight-read. The musician reading the score knows the intervals that apply in the given key, down to muscle memory. The fact that a note lies outside the key is important, and that is why an accidental is marked explicitly.
Likewise, when a musician sees a run of adjacent notes without accidentals, they immediately know what to play. They don't need to inspect each one in turn to determine how many semitones it lies from the previous note. Likewise, when a composer wants to write such a run, they can just draw some black dots in a row. They don't need to squint at a grid and select the correct rows each time.
To sum up, traditional notation is uses a form of compression that makes reading and writing diatonic music easier.
Taking this even farther, some systems of music notation compress things even further and don't explicitly list all of the notes to be played. For example: figured bass, basso continuo, or even just chords that accompany lyrics. In fact, even regular sheet music doesn't usually precisely represent of duration of all of the notes. Some notes are sustained and bleed into others, some are meant to be played strictly in time. Human interpretation is an important part of the process.
On the other hand, the piano roll is a MIDI editor. It is a great way to tell a computer exactly what to play, but it is not easy to read quickly and it is impractical to print or write by hand. Both forms of notation have advantages and disadvantages but it seems to me you haven't spent enough time with the standard notation to fully appreciate its advantages. In other words, the piano roll notation might be your blub language for music. [1]
Fine. But I'm saying if you want to actually understand how music works (rather than play an instrument) the standard notation IMHO
actually gets in the way.
Because the most important thing is the actual semitone intervals, and the standard notation hides them and gives them weird names like augmented fourth (it's just six semitones, just call it that). And it names the 12 semitones based on the c major mode even though that's only one of about 50 modes/scales/keys you might want to use.
Realistically all music theory is a joke - an incredibly useful joke if you want to make music, but it's not a theory in any sense of the word: all music theory is, is a group of notations and conventions for characterising sound and how to get a certain sound.
You could regard the period and origin of a given theory as a set of axioms, e.g. African classical music has almost nothing to do with Bach, but you'd be missing the point.
20th century and Levine's books are a good introduction to applying music theory to do bizarre and twisted things when improvising.
Ideas about ratios between note frequencies, overtones of different notes co-inciding, and how those overtones affect the cilia in the inner ear and hence our perception of sound could perhaps be called a theory proper. e.g. Octaves are fairly universal in world music, so there might be a physiological basis for that.
Octaves have a very straightforward mathematical basis. Double the pitch, you get an octave.
What is pitch? It is defined in hertz, the number of times the underlying vibration repeats per second.
If you have an octave, you take one pitch like 220, then you double it to 440. That is the next octave. It's clear that if you define the "underlying vibration" as a sound that oscillates twice (2hz) then the 440hz sound is also in a way a 220hz sound. Thus the octave is really just a recognition of that mathematical relationship between the two pitches.
The 5th too is very simple. It is 1.5x the root. So the the 8th of 440Hz is 880Hz, and the 5th is 660Hz. Western musical theory is amazingly fractional
Actually, most music produced on physical instruments in the west doesn't have such nice ratios. I suggest reading about equal temperament (or watching some Adam Neely videos) if you're interested in learning more about how our tuning system diverges from the Pythagorean ideal.
I'd disagree with it being entertaining. I like a lot of his videos, but saying that it equates to white supremacy is an unhelpful and simplistic viewpoint which perpetuates a rather tiring rhetoric of self - loathing against western society. Music theory was simply codified by people using Western classical music as a yardstick, and taking the common ideas expressed in it as the music to analyse using it.
Is definitely somewhat out of date, and in need of improvement to encompass not only the music created in other cultures but also textural and sonic expression which makes up interesting music which could otherwise be under - analysed using WCM as the baseline, but equating this to white supremacy is to me incorrect, and missing the point of what's actually needed - an update.
Did you watch it? He's not calling music theory itself white supremacist but the current culture that refers to it as "music theory" per se as in "the" music theory opposed to "a" music theory/theory of music. That it is seen as the yard stick and the only thing that taught is the problem, as that's clearly exclusionary, not the existence of the theory which can be no more racist than any other. I see nothing self-loathing about that. It's a useful criticism that might help get music education to broaden its horizons, which it already has started to do it seems.
>Did you watch it? He's not calling music theory itself white supremacist but the current culture that refers to it as "music theory" per se as in "the" music theory opposed to "a" music theory/theory of music
And he is still wrong. Every culture refers to its own music theory (or most any other kind of theory) as THE theory, not "A" theory. That's not because of supermacist tendencies, it's just familiarity and closeness.
It's usually not useful, nor are we get any special benefit from, to take into account 2000 other traditions (even our own past ones, or some niche traditions in our midst) when we talk of the kind of music we do 95% of the time.
It would be like saying "I am hungry - and this is my personal feeling", "This artist is fire - and I say this speaking on behalf of myself alone", "Macaroni and cheese is the best comfort food, for me that is".
A useless and tiresome clarification.
Even more so when everybody else (e.g. every other culture) doesn't reciprocate the same, and speaks of its own stuff as THE stuff.
So, yeah, this is just a fad, and a very US-centric 2010-20x0 at that. No Italian would give two fucks if they refer to regular western music theory as THE music theory.
I think it's pretty blind to teach people that "this is music" rather than "this is how we've done music here and other people over there do it differently." We live in a global civilization now and there's no reason not to reap the benefits or to be exclusionary. Ignoring Indian and Chinese theories today is just sticking your head in the sand and promoting some weird type of conservatism. It'd be like ignoring the non-Western parts of math just because. That's completely irrational.
> Even more so when everybody else (e.g. every other culture) doesn't reciprocate the same, and speaks of its own stuff as THE stuff.
I've never seen this to be true in Indian music discussion. They know Western music too. I can only assume the same is true in China being that America and Europe export so much.
>I think it's pretty blind to teach people that "this is music" rather than "this is how we've done music here and other people over there do it differently." We live in a global civilization now and there's no reason not to reap the benefits or to be exclusionary.
Maybe start american people actually listening to music outside of the US and UK? (And I'm not referring to latin americans listening to latin music).
They're some of the most chauvinistic peoples when it comes to consumption of music, movies, tv series, books, etc.
Then we can worry about some jazz player at Berklee or some high schooler at a school band learning western music theory as "this is music" vs learning about the gamelan or classical indian ragas...
>I've never seen this to be true in Indian music discussion. They know Western music too. I can only assume the same is true in China being that America and Europe export so much.
That's only because they have to play this too, as it has become popular in the 20th century.
Historically however there was no mention or need to mention western music theory though.
>Ignoring Indian and Chinese theories today is just sticking your head in the sand and promoting some weird type of conservatism.
Well, Indian and Chinese theories you're never gonna use in 99% of the music you play in the US, so you might as well ignore it.
The same way Indians are not taught Bluegrass and the Chinese don't study ragas.
Indians and Chinese in India and China do study western music theory, but that's because it has become a global francize and thus they need it (e.g. to play a pop gig). They don't do it in order to merely be inclusive.
I'd reverse the charge, that only westerners (at least some modern ones) think of themselves as some engligtened all-inclusive superset of humanity, that they feel like they should be studying western + Indian + Chinese + whatever music theory, and not just the theories they need as working musicians (plus a la cart study if someone is interested in particular ethnic styles).
Chinese musicians don't feel any great urge to study Indian classical music, and Indian musicians don't particularly care/call for studing Chinese music...
Worse, if western musicians are made to study Indian/Chinese music, and start producing works in said formats, the end result will be the watering down of said musical traditions.
There is Indian and Chinese music, because it's tied to those peoples' history, tradition, artistic development, sentiments, and so on.
Without that, it's just "ethnic fusion" BS - which we shouldn't be encouraging more of...
If a westerner wants to learn that music, they shall go to a special Indian/Chinese music school (preferably in the respective countries), study it with reverance, understand it, live like the peoples who made it do, and so on, until they can actually feel it. Not have someone teach it to them at Berklee and then start producing works based on them....
> Well, Indian and Chinese theories you're never gonna use in 99% of the music you play in the US, so you might as well ignore it.
You don't see how this comes across at least "racist-adjacent"? "Whatever, all that other stuff isn't relevant to what we do here in the US. It isn't worth learning."
That's obviously false. There's been a centuries long tradition of mixing of musical approaches to create great stuff. The most uniquely american musics (blues, jazz, hiphop) all have roots in western african music brought over via slavery. This isn't just "ethnic fusion" but truly deep exploration of the breadth of human music.
I did watch it when it originally came out - on the day it came out, I think. It has White Supremacy in the title, and that means that the vast majority won't spend 45 minutes watching a video, they'll just take a headline and go with it. I have seen a number of people say that music theory is white supremacist (both before the release of the video and after it), and I think that someone who has as many subscribers as Adam Neely should be a little more careful and a little less clickbaity with video titles. I felt at the time he was trying to ride on the wave of a movement to decry music theory as something that was explicitly White Supremacist, and I don't agree with that sentiment. I appreciate that there are plenty of people who will say that I've been brainwashed by the establishment, or that I'm a White Supremacist for holding that view, but I'd say that's not the case.
Saying that it doesn't encompass some traditions of music is one thing (and broadly correct, as I already said), but that's not the same as saying that it's white supremacist. Saying 'music theory is incomplete', or that 'music theory ignores other cultures', etc. would be fair enough, although again I think it would be one-sided. I'd be interested to see if the teaching in other cultures (such as, for instance Indian) encompasses Western Classical tradition (i.e. based around a 12-note octave instead of a 22 note one) in a similar manner - I would imagine that it doesn't, as it concentrates on the idiom that it describes. And I'm certainly not a music theory specialist, but I believe that attempts have been made to make a standard method of incorporating microtonality into western music notation.
For the record, I spent nearly 20 years teaching in UK schools, and the music curriculum is most definitely not exclusionary - a wide range of traditions are covered in detail, and the roots of popular music in 'The West' are traced back to their origins, often leading pupils to make some interesting wider discoveries about culture and history. Music is not taught in a way that the Western Classical tradition is an exclusionary yardstick (although at A-level some elements of it are covered in some detail) And this has been the case since I was at school in the 80s, so this isn't down to any current changes.
But it doesn't just ignore culture. The final sting in the video is the discussion of Schenker, whose analysis methods form the basis for much of what is taught as music theory today. And he was explicitly developing methods to demonstrate the superiority of german culture. It is more than just being incomplete.
I would disagree that "it's not a theory in any sense of the word". There is an established sense of the word "theory" in which its meaning is derived from how it contrasts with "practice". Theory vs Practice is a fairly common dichotomy. In music of course, the practice part is just playing. The fact that this sense of the word has less precise boundaries than the notion of theory in math/logic/science doesn't render it totally useless IMO.
I think you have it backwards. It's nothing like a mathematical theorem, since you can't really prove anything about the subjective human experience of listening to music.
Physics on the other hand, though it relies on mathematical models, can't really explain why the universe exists in the particular way that it does. The best we can do is use the scientific method to make very educated guesses at an accurate mathematical model that might help us accurately explain the behavior of some physical system we're interested in. Physics is full of inconsistencies and unexplained phenomena, but we're slowly getting better at making predictions.
Music theory is the same way. Music sounds good to humans, and there doesn't really need to be a deeper reason than that for me to listen to a song over and over. Music theorists will study the music that people tend to like / dislike, and do their best to come up with an explanation for why -- often by pulling it apart into its core components, comparing it to other works, analyzing chord structure, voicing, instrumentation, etc.. In the end, just as with physics, composers have slowly built up a reliable foundation of knowledge to help them compose music that will reliably sound "good". But every so often someone comes along with an earworm that can't fully be explained.
>I think you have it backwards. It's nothing like a mathematical theorem, since you can't really prove anything about the subjective human experience of listening to music.
That's exactly what makes it like a mathematical theorem.
Mathematical theorems are not about proving anything about "subjective human experience".
The axioms of western music theory just prove that X chord is the dominant under these conditions, or Y plays this role in that context, or Z scale/mode/whatever should be constructed as such, or M and Y form a K together, and so on.
Similar to how a (quite simple) algebra would work.
> But it's more like a mathematical theory, a set of axioms, and an algebra of relationships and properties that derive from them.
That's what I take issue with. I vaguely agree with the notion that music theory does have some kind of axiomatic form hidden deep within, but what can you prove? There is no fundamental theorem of Counterpoint, or that 12-tone rows are the work of the devil etc.
While it can be a good idea to supplement with material like the links you provided, at the end of the day you have to understand and internalize the canonical approach to music 'theory'. Why? Because the main point of it all is that you can communicate with other musicians and it doesn't do you any good if you create your own secret language that no one else understands.
When you get into how music editing works these two things are actually very much related. I’ve built a multi platform Flutter app that basically uses the “music theory” concepts of keys and chords to automate solving the “what note names should we pick for these notes (ie, Db or C#): https://beatscratch.io
I'd like to highlight Adam Neely's video on the subject [1] (also pointed out by user guerilla), where he argues quite convincingly that 'music theory' is not the theory behind music but theory behind the particular subset of Western music.
That doesn't make it any less useful for creating this type of music, but it's in no way a universal theory, or arguably, a theory at all. More a collection of rules and conventions used in Western music.
I've got a degree in classical performance (and deeply love and respect that tradition), but more often collaborate musically with people who don't come from that background. Most will say with a little embarrassment that they wish they knew more "music theory". It's difficult to communicate to, say, and indie songwriter how I think theory might help them (to communicate, or analyze their own or others' music), and ways it's probably totally irrelevant (depending on genre, functional harmony is really not very useful).
And that's still just western music traditions. Study Indonesian music and you can see how many ideas about music are encoded even into the notation of western art music.
If there were aliens physiologically equal to us, I'd bet they'd come to a similar set of conventions and it (their copy of our western tradition) would be the most popular musical tradition in their planet: 12 intervals separated by the equivalent frequency distances, etc. They'd probably have different (saner) names for the notes, but it would be the same kind of music.
This is the least useful way to explain music theory IMO: listing a set of rules and conventions that are used in music theory. If you know nothing about music, you won't be able to make music after learning all of this.
It does not actually EXPLAIN anything. Where do these rules come from, and how to use them? Why are there white and black keys? Why does some notes have several names? What are modes for and how to use them?
When I started learning music a few years ago, stumbling upon this kind of content made me so frustrated it inspired me to start https://www.mamie-note.fr, a website to actually explain music theory.
It's in french but I'm considering releasing an english translation. Shoot me a message if you'r curious or interested.
I think it's worthwhile perhaps asking some random musicians what they think music "theory" consists of. They will probably be the first to agree that it's not the same as "theory" in the sciences or "theory" in the humanities.
I'm a jazz musician, and have learned very little theory myself beyond basic notation, scales, and chords. I can hold my own on the bandstand.
But without exception, the musicians who are capable of composing and arranging new material of any quality have all studied theory. I think it expands your creative vocabulary in ways that I can't really explain.
In my opinion, it expands your creative vocabulary via analysis and synthesis.
If you can analyze a riff or a progression, take it apart and identify its melodic, harmonic, rhythmic, and tonal components, then you can use the combos you like to synthesis new stuff later with improv and audia-tion. Theory just gives you a catalog and process for naming things.
I think many musicians learn a lot of this implicitly through their ears, never learning the names and patterns. It works, but its probably slower.
It's certainly been slower for me. Thanks to being a bassist, I was able to function in ensembles long before learning to improvise melodic solos. Today, soloing is a major part of my playing, but I struggle with difficult, modern changes.
It amazes me that Chick Corea had limited formal education, given his wizardry at both composition and improvisation. Nobody could thread a melodic line through complex changes, with such grace.
They really could have done with having someone with no knowledge read it and ask questions.
Nowhere does it explain what a flat or a sharp note is, for instance.
I've been teaching myself classical piano from scratch (with a very good human teacher and weekly lessons) throughout the pandemic and this book has been a huge help for supplemental information and just getting me in the habit of marking up staff paper.
It makes sense in the context of tonal harmony. An octave is the interval between the 1st and 8th notes of a major or minor scale. I.e. a major or minor scale repeats itself (at double the frequency) every eight notes. A major third is the interval between the first and third notes of a major scale, and so on.
Put your right hand fingers on a piano, on C-D-E-F-G, thumb on C. Now your 2nd finger is on the 2nd, 3rd is on the 3rd, 4th is on the 4th, 5th is on the 5th. I wouldn't say that makes "no sense" exactly.
The real 'theory' boils down to why the pattern of the major and minor scales is the pattern that it is (which is the same question as 'why are the black/white keys on the piano arranged that way?'). And the related question of why are there 12 of them in the octave.
And that underlying theory is much better explained in this page that was posted to HN some years ago:
'How Music Works'
https://www.lightnote.co/
Previous discussion: https://news.ycombinator.com/item?id=12792063 (2016)
Also see 'Music Theory for Nerds' https://news.ycombinator.com/item?id=12528144 (2016)