Maximum number of accidentals in a Tonality System

Wondering if anyone with technical knowledge of the software knows what the upper limit to the number of possible accidentals is in a Tonality System?

User objects in Dorico projects are created as items in an array, so you can have as many as you’ve got RAM for. The Help pages say “as many accidentals as required”.

I doubt there’s an arbitrary limit, but if there is, I suspect it will be “more than you can distinguish/perform”. :grin:

1 Like

Thanks @benwiggy that makes sense, sometimes can’t be sure.

Technically, I actually only need about 400 unique ones, but due to the nature of the script I’m using to automate accidental generation and application to notes in a Dorico file, I need to be able to make slightly more than 4,600 (basically a new accidental for every note in a piece). That’s still a tiny number for today’s computers though, so hopefully won’t run into any issues.

1 Like

That script sounds intriguing! When I engraved the third movement of Johnston 7 into HEJI, it took a little more than 260 accidentals.

Johnston-Quartet7-HEJI-Dor5.dorico (2.3 MB)

1 Like

@Stephen_Taylor : After writing my comment above I realized I needed a more efficient approach anyway. So I made a Python program to generate a diatonic-only MusicXML file as well as a Doricolib Tonality System file with the minimum number of accidentals required (413 rather than 4,600!). After bringing the XML file as well as the Tonality System into Dorico, I programmed Keyboard Maestro to cycle through all of the notes and apply the correct accidental by using the Shift-I pop-over and applying the appropriate “transposition” from diatonic.

So didn’t make much headway on my initial question, but I know Dorico can handle at least 413 accidentals! I suppose I could use my Python program to create an arbitrarily large Tonality system and see if I can import and use it successfully…

1 Like