Dealing with defaults
After yesterday's coding victory, today I came back down to earth, realising that while I had successfully constructed a unique process track, I wasn't taking into account default tracks.
That may seem minor, but the routine as it stood had a major drawback: it only worked with power-of-2 option counts (i.e. 2, 4, 8, 16, and doubling thereon). This limitation came baked in with a pretty cool bit-shifting system, designed to handle arbitrary process and option counts. And it worked! Until the default tracks feature came in.
With defaults tracks enabled, one option from each process is set aside for exclusive use by the 'default track'. This meant that all my option counts, which were power-of-2, were no longer compatible with my unique process construction system.
I thought really hard about the solution, and decided that if I could build a full list of option 'combos' using power-of-2 numbers, and then filter out the combos whose options are beyond the actual option counts, I would be able to keep my bit-shifting system.
And it works! What a cool solution.
But the system comes with a future issue: it won't scale well. It's fine for Prism Exhilarated's 50 cassettes, but for digital unique process records the number of possible renditions for a record could top billions, trillions or quadrillions easily. So that's something to keep in mind.