It's all about the integers modulo 12. Classical notation obscures that (while making it easier to figure out which of the integers modulo 12 you're using, minus being able to assign them to integers in an obvious way).

I fun little exercise is to work out what would be different if we found aliens that also used 12 tone equal temperament, and also used a subset of 7 of those 12 notes to make their major scale, and also followed the same convention that we do of naming the notes of the major scale C, D, E, F, G, A, B like we do and naming the other 5 by naming a major scale note and adding modifier to tell how far away the not is from that like our # and b modifiers, and we both have the convention that when naming the notes of a transposed major scale we use each letter exactly once--except they picked a different 7 notes to be their major scale.

Our 12 tone scale with the major scale note names and notes not in the major scale marked with dots looks like this:

  C.D.EF.G.A.B
Suppose the aliens have a very different idea of what makes a good sounding major scale, and their system is:

  CDE.FGAB....
Suppose we transpose ours up 7 tones. We can represent this graphically by drawing out major pattern for two octaves, and below that drawing our major scale pattern with names replaced by X (X.X.XX.X.X.X) shifted over by 7, then look above to see how to name the notes (remembering we can only use each letter once):

  C.D.EF.G.A.BC.D.EF.G.A.B
         X.X.XX.X.X.X
Our major scale transposed up 7 is G A B C D E F#.

Let's do the same 7 tone transposition for the aliens. Their major scale pattern is XXX.XXXX..., so we get

  CDE.FGAB....CDE.FGAB....
         XXX.XXXX...
That's B Cbbbb Dbbbb Ebbb Fbbbb Gbbbb Abbbb.

At first that seems very different from our 7 tone transposition. We only need one sharp and they need 23 flats! But wait...mod 12 we have -23 = 1.

It turns out for all transpositions if you count sharps in your key signature as +1 and flats as -1, the key signature for a transposition by N tones will have 7N sharps or flats mod 12 in both our systems.

In general if you have a T note equal temperament scale with an M note subset major scale, transposing the major scale up N tones gives a key signature with NM mod T sharps/flats.

I'll leave it as an exercise to prove that. Hint: you can think of a transposition as a two step operation: (1) a shift that keeps the same letters and just adds sharps or flats to move the notes, and (2) a renaming that changed the name you use to name the first note of the transposed scale. Think about what each of those operations does to the number of sharps and flats needed.

> It's all about the integers modulo 12.

Only in 12TET.

24, 128, approach infinity -- I know there are microtonal systems, but if you want to understand them, choose the nearest multiple-of-twelve (or really, choose whatever TET contains the closest approximations to the exact notes) TET and look where their intervals land with respect to the symmetries (factors) within that TET, and where those symmetries are broken by a note moving by a perceptual 'slide' (one note 'moves' into the other position) rather than sounding like a new distinct voice.

More like, only if you're playing Schoenberg it's about modulo 12.

Almost all sheet music that you play uses 5 or 7 unequal subdivisions of the octave, and occasionally the rest. Sure, sometimes you'll have one or two of the rest on a regular basis (blues, harmonic/melodic minor), but still most music won't use all twelve.

Isn't modulo-twelve (if we ignore microtonal) the core underlying structure, and then you pick scale (like 2 2 1 2 2 2 1) and a key as a mapping, and then use degree as an 1-based index into the scale?

I don't really know a thing about music, so I could be wrong here - but that mental model at least made some sense to me when I tried to map all the concepts I've heard about into some sort of a mental system.

The point is that to a player the mapping is more important than the core 12-note structure, because highly chromatic (12-note) passages happen but they are the exception.

At least in western music you pick the seven basic notes on the scale, and that gives you the sharps and flats you place at the beginning of each line. That choice, from the point of view of notation, is even more important than the exact scale. And the choice is constrained to 15 sets of sharps and flats because it implicitly tells the player (veeeery roughly) to expect some patterns that probably will occur.

It doesn't always work great, for example if you want to write the Simpsons theme the set of notes in the scale doesn't fit any of those 15 sets. But it uses an unfamiliar scale in any case, so there's not much to gain and as a player you just deal with it.

See around 32:30 in https://youtu.be/Eq3bUFgEcb4?t=1950

[deleted]