Here is what I think is happening for the missing notes. When determining the horizontal spacing, the layout calculation wraps on octaves. That way, if you have enough pixels for, say, 2 octaves but the notes/cues file spans 5 octaves, then the notes for the higher octaves will still be displayed in their correct relative position within the octave (ie, A is always on the left, G is always the right end of the octave, etc, so they are more recognizable).
The default width for keys is 3 pixels, so a matrix that is 50 pixels wide would be enough for 16.7 white keys (~ 2.4 octaves). Rather than only displaying 2 octaves and then leaving a blank spot on the right where the 3rd octave would start (which would be ~ 30% of the width in this case), it displays and clips partial octaves. This results in the first 2 octaves being completely visible, and then the first ~ 5 notes of the 3rd octave being visible with the last 7 notes of that 3rd octave being clipped. That seemed like reasonable behavior when I wrote it, but in this case it throws away the upper 7 notes of every third octave, which is significant.
What would be the best way to change it? I think the octave wrapping is desirable so equivalent notes don't move around within one octave to another. The default key width could be changed to 4 in this case (to show 2 octaves with only 2 pixels wasted at the end), or 2 (to show 4 octaves). I had picked 3 originally because it gave reasonably proportional key shapes. 2 or 4 pixels wide will make the keys look a little disfigured, but I suppose that is preferable over just not displaying ~20% of them. Yet another possibility would be to transpose any clipped keys to the next octave up - however, this might be confusing to show, say, C4 at the right of the matrix and then D4 in the middle of the left-most octave (after it wrapped). Are there any other options, or do any of these sound preferable?
For the problem with white, I will take another look at that. (might be related to transparent background in the Shapes file).
don