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: Graham Percival
Subject: Re: Text/markup attached to bracket
Date: Sat, 21 Mar 2009 00:32:59 +0800
User-agent: Mutt/1.5.18 (2008-05-17)

Of course!  Duh!

\version "2.12.0"
\paper { ragged-right = ##f }
\relative c'' {
  \override TupletNumber #'text = "M2"
  \times 2/2 { c4 d }
}

As you can see, you need to abuse the layout a bit to make sure
the bracket gets printed.  TupletBracket supports
#'minimum-length, though, so you don't need to make it as silly as
I did.

Cheers,
- Graham


On Fri, Mar 20, 2009 at 04:37:53PM +0100, Mats Bengtsson wrote:
> 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]