On 2020-04-08 1:50 pm, Jake Whitton wrote:
I'm trying to use lilypond to create some guitar neck diagrams for
memorizing intervals and scale patterns. I can use
fretboard-diagram-verbose to place it in landscape orientation, extend
it
to as many frets as I need, etc. I now have some charts which are very
nice, but I notice that the fretboard engraver renders each fret as the
same size, and I'm trying to figure out if it would be possible to
instruct
lilypond to render the leftmost frets to be wider than the rightmost
frets
(as it actually appears visually on a guitar neck).
I don't see any attributes in fret-diagram-details that would enable
that
functionality. I see in the internals reference that I can customize
the
stencil, which is fret-board::calc-stencil by default. Would writing a
custom stencil be the best way to accomplish this? If so, is there any
guidance as to how one actually writes a custom stencil. I can see
that
the notation reference manual has a section on modifying stencils, but
the
example given only substitutes one stencil in place of another. Is
there
any documentation on how to actually go about writing a stencil from
scratch?
In this case, you would be modifying and/or replacing the markup command
make-fret-diagram, which can be found in fret-diagrams.scm.
Unfortunately, fret-distance is referenced in a number of places, and a
fair bit of refactoring would be needed as there are current assumptions
that all frets are equidistant. But it should be possible to introduce
a fret-distance-factor property to expand or contract fret spacing the
further along the diagram you go.
-- Aaron Hill