I figured out that the starting note is wrong when modes are anything different than Ionian and in certain cases, the sharps/flats parent set is not correctly identified.
The accidentals are most of the time chosen from the correct parent set but the starting note seems to be the 1st degree of the Ionian mode from the given note.
E.g. D aeolian shows flats but starts counting as if it's D ionian, in which case the aeolian mode relative to root D happens to be B minor, so the absolute values of the notes are actually Bm aeolian but shown with enharmonic flat notation:
B, Db, D, E, Gb, G, A is enharmonic to B, C#, D, E, F#, G, A
Incorrectly identifying the sharp/flat set:
B ionian gives B, Db, Eb, E, Gb, Ab, Bb which have correct absolute value but enharmonic flat notation. The correct one should be B, C#, D#, E, F#, G#, A#.
Another important example with both mode offset and wrong accidentals is Bb phrygian. It gives D, Eb, F, G, A, Bb, C which is correctly identified phrygian mode but starts from D, which is the relative of B if we consider D ionian/B aeolian. In this case, the mode formula is correct, the key signature is Bb major (somehow detecting Ionian formula for the accidentals) and then using this note set to render phrygian mode from the relative minor of the rendered starting note. My assumption is that perhaps somehow B and Bb aren't identified properly, causing B to get associated with minor, then logically associating D as the relative major, which would give the wrong starting note.
Mode displacement in clearer form:
- C lydian gives F, G, A, B, C, D, E which is correctly identified mode formula for Lydian but rendered from F, which indicates note set derived from root C.
- C mixolydian gives G, A, B, C, D, E, F which is again correctly identified mode formula but rendered from G, therefore the note set is again derived from root C.
- C aeolian gives A, B, C, D, E, F, G - correct mode formula, wrong root, therefore wrong note set.
I figured out that the starting note is wrong when modes are anything different than Ionian and in certain cases, the sharps/flats parent set is not correctly identified.
The accidentals are most of the time chosen from the correct parent set but the starting note seems to be the 1st degree of the Ionian mode from the given note.
E.g. D aeolian shows flats but starts counting as if it's D ionian, in which case the aeolian mode relative to root D happens to be B minor, so the absolute values of the notes are actually Bm aeolian but shown with enharmonic flat notation:
B, Db, D, E, Gb, G, A is enharmonic to B, C#, D, E, F#, G, A
Incorrectly identifying the sharp/flat set:
B ionian gives B, Db, Eb, E, Gb, Ab, Bb which have correct absolute value but enharmonic flat notation. The correct one should be B, C#, D#, E, F#, G#, A#.
Another important example with both mode offset and wrong accidentals is Bb phrygian. It gives D, Eb, F, G, A, Bb, C which is correctly identified phrygian mode but starts from D, which is the relative of B if we consider D ionian/B aeolian. In this case, the mode formula is correct, the key signature is Bb major (somehow detecting Ionian formula for the accidentals) and then using this note set to render phrygian mode from the relative minor of the rendered starting note. My assumption is that perhaps somehow B and Bb aren't identified properly, causing B to get associated with minor, then logically associating D as the relative major, which would give the wrong starting note.
Mode displacement in clearer form: