lilypond-user
[Top][All Lists]
Advanced

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

Re: markup on ambitus?


From: Michael Werner
Subject: Re: markup on ambitus?
Date: Sat, 21 Oct 2023 10:17:31 -0400

Hi Graham,

On Sat, Oct 21, 2023 at 9:48 AM Graham King <lilypond@tremagi.org.uk> wrote:
In the following MWE, is it possible to put a small markup above each
ambitus to signify the voice to which the ambitus belongs?

I'm just failing to see where to attach ^\markup { foo }

I couldn't find a place to directly attach a markup either. But I did come up with a somewhat hack-ish workaround that seems to sorta kinda work, in a somewhat roundabout way. I found that the Balloon_engraver can be pressed into service to (more or less) do what you're looking for. By setting the BalloonText.annotation-balloon to false the box that normally is drawn around the target grob is removed. If you want the pointer line to be removed, uncomment the marked line. For more details, 
https://lilypond.org/doc/v2.25/Documentation/internals/balloontext
and
http://lilypond.org/doc/v2.25/Documentation/notation/balloon-help
contain all the gory details.

\version "2.25.9"

\new Staff <<
  \new Voice = "c_Instr" \with {
    \consists "Ambitus_engraver"
    \consists "Balloon_engraver"
  }
  \relative {
    \override BalloonText.annotation-balloon = ##f
    %\override BalloonText.annotation-line = ##f % Uncomment to remove the pointer line
    \balloonGrobText Ambitus #'(-2 . 4) \markup { \tiny "C Instr" }
    c' d e f
  }
 
  \new Voice = "c_Singer" \with {
    \consists "Ambitus_engraver"
    \consists "Balloon_engraver"
  }
  \relative {
    \override BalloonText.annotation-balloon = ##f
    %\override BalloonText.annotation-line = ##f % Uncomment to remove the pointer line
    \balloonGrobText Ambitus #'(2 . 4) \markup { \tiny "C Sing" }
    \override Ambitus.X-offset = #2.5
    s1 a'4 b c d
  }
>>
--
Michael


reply via email to

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