lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to circle around tab numbers?


From: Thomas Morley
Subject: Re: Is there a way to circle around tab numbers?
Date: Sun, 10 Sep 2017 18:13:53 +0200

2017-09-09 16:41 GMT+02:00 Devin Ulibarri <address@hidden>:
> Stephen MacNeil:
>> you could just change it to tab
>
> Thanks, this is helpful.
>
> If possible, I would like some more information about how to tweak the
> output.
>
> * Is it possible to make the space within the circle opaque, but without
> hiding the number (just hiding the tab line)? If so, how is this done?
>
> (I could do this in Inkscape, but would rather automate it if possible)
>
> Thanks!
> Devin



How about below?

The first code simplifies the one you've found already and works as
you want, but the circle has a variable radius depending on the
stencil.
If you're fine with it, great. Otherwise use the second coding where
the circle has a static radius.

circle =
  \once \override TabNoteHead.stencil =
    #(lambda (grob)
      (circle-stencil (tab-note-head::print grob) 0.1 0.3))

\new TabStaff { \circle c'' \circle e'' }

circleH =
  \once \override TabNoteHead.stencil =
    #(lambda (grob)
      (let ((note (tab-note-head::print grob)))
      (ly:stencil-add
        note
        (ly:stencil-translate-axis
          ;; 1.5 is the default staff-space in TabStaff, use a little less
          ;; for the circle-radius
          (make-circle-stencil 1.3 0.1 #f)
          (interval-center (ly:stencil-extent note X))
          X))))

\new TabStaff { \circleH c'' \circleH e'' }



HTH,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]