[ ... struggling with giving this a better title ]
I'm working out the algorithmic bases for generation of a tone-net (tonnetz) in preparation for programming the presentation layer.
The problem is primarily with a keyed tone-net (Key of Db or Gb), but it extends to showing degrees as well (I,II,III, etc.).
Basically as the spectrum of the tone net expands away from its arbitrary tonic center, the notation shifts into flats, then double-flats, then triple-. Or (as with the current state of my spreadsheet algorithms) I see things like B# displayed as C, or the scale becomes like this: D E Gb G A B Db D (the keys of Db or Gb are going to be of particular concern... ).
I could select the most-correct notation from a hash table, but I still need to know when to pivot into another key. If I follow the Circle of Fifths rules, adding flats & sharps as it radiates away from "C". But then there's the problem of starting with Gb Major, where in the Co5ths we find it at a zone of enharmonic phase transition (at the bottom of the Co5ths).
I know it's arbitrary to pick a center, but following the rectilinear circle-of-fifths on a tone-net, when's the most opportune point to start shifting the key signature?
(I can adjust the algorithm so it shifts into sharps in the positive-Y axis, & flats in the bottom quadrant, but the key signatures are still going to float , esp. with the placement of bb or ## adjectives )
Another presentation-layer scenario: