Enharmonic spelling issue

There’s been a lot of talk about Dorico’s choice of enharmonic spellings, but I can’t see that this has been covered:

If, in C major, I play semitones from G to A, I get G, then a G#, which then becomes an A flat when I play the A.

If I play the middle note TWICE: it gives me A flat twice, followed by A natural.

Is this intentional? Would it be better if Dorico could consider repeated notes in the same way as a single note? Or am I missing a reason for the behaviour?

Thanks
Screenshot 7.png

There are two conflicting “rules” here. (1) Use sharps in ascending chromatic scales and flats in descending scales. (2) The “standard” spelling for the chromatic note in C major is A flat not G sharp, because A flat is a “borrowed note” from C minor.

I have no idea how Dorico chooses which rule to follow in any particular situation, though.

Michael, the developer who designed and implemented these algorithms, is away for a few days while builders do some major internal works on his home. When he’s back next week I can ask him about this.

I’m reasonably indifferent, as whatever the algorithm or rule, 50% of the time, I want the other one. :wink:

My hopefully not off-topic 5 cents:
In common with (still!) quite a lot of composers, my idiom is incorrigibly tonal. If, for instance, I am in C Major, I’m more likely–maybe 3/4 of the time?–to find myself wandering to the relative minor which likes G#s, than to the parallel minor that needs A-flats (except quite recently, but that’s not my point). No simple algorithm is going to please me all of the time; but one that can recognize from context whether my modulations are into one or the other doesn’t seem too far-fetched, nor one that can apply such awareness retroactively if need be, especially since I often neglect to actually apply a key signature until I’ve written pages and pages.j