> There is something I do not like about the fret diagrams in > Lilypond: > > The diagrams are "open" on the side pointing towards the bridge of > the instrument, with the strings "sticking out" on that side. How > could I achieve closed rectangles in Lilypond like e.g. the > "MusFrets" font does? > > www.notationcentral.com/product/musfrets/ > > It is simply about a line drawn at the bottom (in the default > direction) of the fret diagram, but I do not know enough scheme to > do it.This sounds like a reasonable request, please file an issue at gitlab.com/lilypond/lilypond/-/issues/ together with some images. > It would be great if someone could show how to do that and that > might as well be an option that could become standard in a future > version. The complete fret diagram code is in Scheme file `scm/fret-diagrams.com`. Werner
For learning purposes, I tried to solve this request. See attached file fret-diagrams.scm (lines 283 and 449). (Keep a copy of the original file! There will be a warning "source file ... newer than compiled ...) Closed Diagram is default. Example: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \version "2.24.0" { \clef "treble_8" <c e g c' e'>1^\markup { \fret-diagram "6-x;5-3;4-2;3-o;2-1;1-o;" } <c e g c' e'>1^\markup { \override #'(fret-diagram-details . ((close-diagram . #f))) \fret-diagram "6-x;5-3;4-2;3-o;2-1;1-o;" } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HTH, Juergen.
fret-diagrams.scm
Description: Binary data