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.
Back to your example...
[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.