On 1/28/2026 2:14 PM, Neil W wrote:
However, is there an override that will allow me to set the circle
size, thickness, and position of the circles to match the 5th string?
For example:
If I add " (dot-position . -.4)” to the " \override
#'(fret-diagram-details . ((finger-code . below-string)” command it
will move all the circles/dots, whereas I would only like to change
the first and sixth string dots appearance and position.
Neil,
Here is a hack that preserves the original open-string circle. It
combines the (open 1) that you had originally with the (place-fret 1 0
"E") that I added, but this time, instead of "inverted", it uses "white"
to hide that dot completely, leaving only the normal (open 1) dot.
\markup {
\vspace #1
\override #'(fret-diagram-details . ((finger-code . below-string)
(dot-radius . 0.3)
(orientation . landscape)
(string-thickness-factor . 0.3)
(top-fret-thickness . 7)
(string-label-font-mag . 0.3))
)
\override #'(size . 2)
\center-column {
"B7#9/E"
\fret-diagram-verbose #'(
(place-fret 6 0 "E" white)(open 6)
(place-fret 5 2 "B")
(place-fret 4 1 "D#")
(place-fret 3 2 "A")
(place-fret 2 3 "Caug")
(place-fret 1 0 "E" white)(open 1)
)
}
}
You'll also notice in the attached image that this time I kept your
string-thickness-factor but added a large top-fret-thickness so you
could see what it does.
Using "white" as argument in place-fret is a trick by Hsin-Hao Yu [1].
Thanks!
Hope the above hack works for you, Neil.
..........................
Werner,
On the subject of making this easier for others, there were pluses and
minuses in our documentation.
The NR link you gave is very good, especially the last two examples,
which have the only documentation of inverted and markup as args to
place-fret.
But those examples are not part of the snippets link [3] that the NR
describes as "exhaustive". Neither is the use of "white" as an arg of
place-fret. It only shows white as an override to dot-color, where it
appears to have an effect more like "inverted" (a circle with white fill
as opposed to a complete white out).
Trying to find some authoritative definition of place-fret, I first
tried the index (no hits) then, in case it was a function, I looked in
the IR function list (no hits).
Finally I guessed it might be in the scheme source, so I looked at
scm/fret-diagrams.scm and did find mention of place-fret. Indeed, it had
what looked to be complete documentation, though a bit hard to read:
@item (place-fret @var{string-number} @var{fret-number}
[@var{finger-value}] [@var{color-modifier}] [@var{color}]
['parenthesized ['default-paren-color]])
Place a fret playing indication on string @var{string-number} at fret
@var{fret-number} with an optional fingering label @var{finger-value},
an optional color modifier @var{color-modifier}, an optional color
@var{color}, an optional parenthesis @code{'parenthesized} and an
optional paranthesis color @code{'default-paren-color}.
By default, the fret playing indicator is a solid dot. This can be
globally changed by setting the value of the variable @var{dot-color}
or for a single dot by setting the value of @var{color}. The dot can
be parenthesized by adding @code{'parenthesized}. By default the
color for the parenthesis is taken from the dot. Adding
@code{'default-paren-color} will take the parenthesis-color from the
global @var{dot-color}, as a fall-back black will be used.
Setting @var{color-modifier} to @code{inverted} inverts the dot color
for a specific fingering.
The values for @var{string-number}, @var{fret-number}, and the optional
@var{finger} should be entered first in that order.
The order of the other optional arguments does not matter.
If the @var{finger} part of the @code{place-fret} element is present,
@var{finger-value} will be displayed according to the setting of the
variable @var{finger-code}. There is no limit to the number of fret
indications per string.
@end table"
I thought documentation written in this format was meant to be included
in our formal docs, but I never found it.
Maybe the above text can be exposed better.
Maybe the snippets examples can be expanded so that they really are
exhaustive.
Lilypond's fret diagram code appears to be well-thought-out but still
with hidden/implicit capabilities. More examples and index entries
would help show off all that great work.
Jeff
[1] https://www.hhyu.org/posts/lilypond_first/
"Mixing code and markups in LilyPond (or, coding for guitarists)"
[2]
https://lilypond.org/doc/v2.25/Documentation/notation/common-notation-for-fretted-strings#fret-diagram-markups
[3]
https://lilypond.org/doc/v2.25/Documentation/snippets/fretted-string-instruments-_002d-fret-diagrams-explained-and-developed