lilypond-user
[Top][All Lists]
Advanced

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

Re: Text/markup attached to bracket


From: Mats Bengtsson
Subject: Re: Text/markup attached to bracket
Date: Fri, 20 Mar 2009 16:37:53 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

Would it be possible to use tuplet spanners for this purpose? I don't really have the time to work out the details right now, but perhaps somebody else could give it a try.

   /Mats

Graham Percival wrote:
On Thu, Mar 19, 2009 at 06:30:21PM +0000, Stuart Pullinger wrote:
Could anyone point me towards a snippet/documentation which could help
me to attach markup to a bracket?  I'd like to mark up a score with
melodic intervals and potentially add other markup such as drawing
commands. A mockup edited in Inkscape is attached.

Tricky!  I considered faking it with a text spanner, but those
only do (bound-details left ...) or (bound-details right ...).
You really want a "center" (although I guess that wouldn't be a
*bound* detail any more.  :)

It's relatively easy to fake such things with #'extra-offset, but
that requires manual tweaking, of course.  I've added an example
to the end.  What you really want is an automatically-placed
markup, though.

... you /might/ get good results with spacer rests.  Add a
s8*0^"M2" between every pair of notes.  This gets messy, but if
you're generating the score algorithmically (which you might be
doing?) then it shouldn't increase the complexity of the program
too much.


I guess it depends on how many of these you want.  If it's one
page of instructions, then I'd just do extra-offsets.  You might
also want to turn off collision avoidance, so that the initial
placement of the text script would be more predictable.  (if you
do this, then probably 95% of the text scripts can use the same
#'extra-offset values)

If you want more than a page or two, especially if you have a
score with real music and expressive marks, then I'd start looking
at adding (bound-detail center text) capabilities to lilypond.

Cheers,
- Graham


\version "2.12.0"

\layout {
  \context {
    \Voice
    \consists "Horizontal_bracket_engraver"
  }
}
\relative c'' {
  \override HorizontalBracket #'direction = #UP
  c4\startGroup\startGroup
    -\tweak #'extra-offset #'(1.8 . -2.5) ^\markup{ M2 }
  d4\stopGroup
  e4\startGroup
  f4\stopGroup\stopGroup
}




_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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