How can I explicitly control placement of note heads in a chord, as to the left or to the right of the stem, in Lilypond? I am using version 2.22.0.
My application is engraving music for the Steirische Harmonika, or "button box" accordion. Roughly speaking, in the widely used Griffschrift notation, different node head shapes are used to help identify which button row contains the designated note, round note heads for the outer two rows, "X" heads for the inner two rows. Because a played chord may draw buttons from any of the four rows, chords in Griffschrift notation tend to cluster some notes tightly, sometimes even placing two instances of a note head on the same staff line in a chord, but with different head shapes. Obviously, one head has to go on the left and the other on the right.
I've noticed, in music scores that I play from, that the better engraved scores tend to encode notes for the buttons in the outer rows of the instrument on the right side of the stem, and buttons in the inner rows on the left side of the stem. This actually contributes to legibility, since the left/right position of the note heads corresponds physically to the position of the button rows on the keyboard.
The Lilypond note placement and collision resolution algorithm, of course, knows nothing about this, and automatically makes good decisions for traditional instruments and voices, but has no builtin way of accommodating the eccentricities of notating for this instrument.
Can anyone recommend how I might address this level of fine-tuning in Lilypond?
A little background: I am working on engraving a polka that I've made quite a few personalization alterations to. This is my first effort at engraving in Lilypond for this instrument. I had some experience with Lilypond a dozen years ago, doing about 20 or so pieces, but solely for choral music and piano accompaniment. I've looked quite a bit through the Lilypond documentation: Learning, Notation, Internals, and to lesser degree Extending reference manuals. They're rather inscrutable. They do describe things rather nicely, for the particular features they do describe, and they are very rich in examples. But it is extremely difficult to find or distill constructive guidance on how to "roll your own" features, as it were.