[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text/markup attached to bracket
From: |
Graham Percival |
Subject: |
Re: Text/markup attached to bracket |
Date: |
Fri, 20 Mar 2009 22:56:15 +0800 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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
}
- Text/markup attached to bracket, Stuart Pullinger, 2009/03/19
- Re: Text/markup attached to bracket,
Graham Percival <=
- Re: Text/markup attached to bracket, Mats Bengtsson, 2009/03/20
- Re: Text/markup attached to bracket, Graham Percival, 2009/03/20
- Re: Text/markup attached to bracket, Stuart Pullinger, 2009/03/20
- Re: Text/markup attached to bracket, Stuart Pullinger, 2009/03/24
- Re: Text/markup attached to bracket, Graham Percival, 2009/03/24
- Re: Text/markup attached to bracket, Jonathan Kulp, 2009/03/24
- Re: Text/markup attached to bracket, Stuart Pullinger, 2009/03/24