Tone library music mode/key explorer...

one alternative option I think may be something like this:

int OctaveKeys[] = {C, CS, D, DS, E, F, FS, G, GS, A, AS, B };
int Major[] = {1,0,1,0,1,1,0,1,0,1,0,1};

a '1' in the bottom array decides a note is playable from the top array, via a logical NAND operation; add the value KeySig (0-11) to transpose... wraparound values, so if they go past B, they begin at C... no ringbuffer etc required and I think I can figure this out.