# How to determine the names of the notes in any given scale

Are there any rules for naming the notes in a scale that can apply to any given scale? I know it's straightforward for diatonic. You just use each of the first 7 letters of the alphabet and [double]flat/sharp where necessary. But I'm looking for more of an algorithm than an educated feeling of what the notes should be called. Does such a system exist?

For example, what if I give you a scale that's made of the following:

1. root + 0 semitones
2. root + 3 semitones
3. root + 5 semitones
4. root + 7 semitones
5. root + 10 semitones

If the root is C, would it be [C,Eb,F,G,Bb]? [C,D#,F,G,A#]? [C,D#,E#,Abb,Bb]? All of these sets describe the same pitches. How would a computer know which makes more sense?

What about a scale less common than minor pentatonic (yeah that was the example)? What about 8-tone bebop scales? Or the chromatic scale? What about a scale no one has named?

Is there a system in music theory that can reliably determine the names of notes in a scale, or is there always room for interpretation?

• In general you want to have one of each letter name. For example take c# major scale. C#, D#, E#, F# etc. even though E# is enharmonicaly F it would be incorrect to say c#, D#, F, F#.
– b3ko
Feb 7, 2019 at 21:10
• @b3ko one of each letter name is about right for diatonic, but if I read the question right it's focusing on non-diatonic scales..? Feb 7, 2019 at 21:21
• I think a whole tone scale is a good example of what this question is about. Starting from C, is it better to notate a whole tone scale as [C D E F# G# A#] or [C D E Gb Ab Bb]? Or perhaps some mix? Perhaps it depends on the exact musical situation, like if you wanted to add in a B natural as a leading tone to C, perhaps you would use A# for the sixth scale degree in the C whole tone scale. Feb 7, 2019 at 21:30
• @ToddWilcox en.wikipedia.org/wiki/Whole_tone_scale i'd lean toward a whole tone scale as [C D E F# G# A#]
– b3ko
Feb 7, 2019 at 21:51
• @b3ko That link only muddies the waters to me. The Debussy example (excerpt from Voiles) shows him spelling a whole tone scale [C D E F# G# Bb]. Feb 7, 2019 at 21:55

I've written a few algorithms to do this kind of thing - generate chord or scale spellings.

Is there a system in music theory that can reliably determine the names of notes in a scale, or is there always room for interpretation?

My feeling is spellings get reinterpreted (enharmonically respelled) to suggest their function in a different key, or some other similar harmonic reason. But that's different than spelling out a scale. The former is sort of tonality in flux, the latter is more fixed.

Either way an unambiguous method is to use proper interval names instead of counting semi-tones. When you do that - define by intervals - you also have to bring in the letters for pitch classes.

You could write the program many ways. I don't remember exactly how I did it, but I used a combination of arrays: chromatic and letter classes, and interval sizes. In plain English, I think it worked like this:

• input: start at `C`
• input: ascend a m3
• 3 up the pitch class series is an `E`, so I want some spelling of `E` this is my target
• a m3 is 3 semitones
• moving up the chromatic series by 3 semitones I get an object with choices `D# Eb Fbb` those three are spelling objects with both pitch class and accidental properties
• I match my target `E` by pitch class to the spelling object and according to the accidental property it's an `E` flat.
• by contrast, if I asked for an A2 - augmented 2nd - the semitone count is still 3, but the target letter is different, going up 2 I target a `D` of some spelling, this time when I match the pitch class letters, I get the `D` object and its accidental property is a sharp, so the spelling for an A2 above `C` is `D#`

To keep things simple I only had three spellings for each chromatic step on the piano white key notes and two for the black keys. Obviously, not all possible interval names could be used as input. I think I just implemented this list https://en.wikipedia.org/wiki/Interval_(music)#Latin_nomenclature.

The main point here is that I had to use a combination of identifiers. And that is really how it works in music theory. Intervals are a combination of pitch classes, interval numbers and qualities.

[C,Eb,F,G,Bb]? [C,D#,F,G,A#]? [C,D#,E#,Abb,Bb]?

With my algorithm I would define the scale `R, m3, P4, P5, m7` and get `C,Eb,F,G,Bb` any other spelling would be wrong! That how I wanted it to work. Loosey-goosey spelling weren't allowed! If I wanted the spelling `C,D#,F,G,A#` I needed to input `R, A2, P4, P5, A6`.

is there always room for interpretation?

In my program: no.

How would a computer know which makes more sense?

The computer won't know. You have to tell it what to do.

The point in my program was to avoid something like this: a `D` major scale spelled as `D E Gb G♮ A B Db D♮`. That can be annoying to a human who can read music so I created a method to avoid it.

• Thanks Michael! That's exactly the kind of answer I was looking for. I was hoping it could be done with no more user input than toggling any of 12 buttons (and therefore knowing semitones alone), but it seems in order to avoid ambiguity the user needs to provide a little more. Maybe I'll default to the more common (for example) m3 but give the option to change that to A2 if desired. More work on UI, less on algorithm than I anticipated. Feb 8, 2019 at 14:30

In an 7-note scale, one of each letter. And that's about all we can say. Major scales don't mix flats and sharps. But the F# leading note in the two-flats G harmonic minor scale is well-known, and similar things can happen in other modes.

Chromatic scales for performance are normally notated 'sharps going up, flats coming down'. But there's a thing called the 'Harmonic Chromatic Scale' which - well, look it up.

https://www.dolmetsch.com/musictheory11.htm

It might be 'correct' to notate a whole-tone scale C, D, E, F#, G#, A# to make the intervals as clear as possible, but plenty of composers don't.

And plenty stick to 'correct' spellings until the double sharps and double flats get just too much, then throw in the towel and go for 'easy' spellings.

Yes, there'll be room for interpretation according to context. Not that I'm counting out a computer being able to analyse the context...

• But the leading-tone seventh is not notated in the key signature but rather as an accidental every time it's used. So far as setting the key signature, then, no minor key mixes sharps and flats either. Feb 8, 2019 at 12:43

As for the octatonic scale which divides the octave into 8 intervals, alternating semitone and tone: Messiaen used this scale a lot -- he termed it "mode 2" -- and his preferred notation used the 3rd degree twice. For example:

``` F# G A A# B# C# D# E F# A Bb C C# D# E F# G A C Db Eb E F# G A Bb C ```

• That's a half/whole diminished scale isn't it? Aug 20, 2019 at 12:35
• "Mode of limited transposition 2" to give it its full name. Aug 20, 2019 at 13:39