Thanks for the suggestion, David!
I find it to be easier, though, to override the positions manually instead
of generally overriding them with your code and then having to offset
almost every position again.
It might be useful in another use case, though, so I’m saving your code for
future use. Thanks!


--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de


2014-01-25 David Nalesnik <david.nales...@gmail.com>

> Hi Peter,
>
>
> On Fri, Jan 24, 2014 at 8:20 AM, Peter Crighton <petecrigh...@gmail.com>wrote:
>
>> Hi List,
>>
>> is there a way to have all TupletBrackets in a score be horizontal
>> without altering every single one?
>>
>
> [...]
>
> In a drum score I think it’s preferable to have all Beams and
>> TupletBrackets horizontal as this helps with reading. For Beams there is
>> the possibility of \override Beam.damping = #+inf.0, but I can’t find
>> anything similar for TupletBrackets.
>>
>
> I also don't find a convenient way to ask for horizontal tuplet brackets.
>
> Rather than setting 'positions for each bracket, you could do the
> following:
>
>  \version "2.18.0"
>
> #(define flat-brackets
>    (lambda (grob)
>      (let* ((pos (ly:tuplet-bracket::calc-positions grob))
>              (dir (ly:grob-property grob 'direction))
>              (y (if (= UP dir)
>                     (max (car pos) (cdr pos))
>                     (min (car pos) (cdr pos)))))
>        (cons y y))))
>
> \new DrumVoice {
>   \drummode {
>     \voiceOne
>     \set tupletSpannerDuration = #(ly:make-moment 1 4)
>     %\override TupletBracket.direction = #DOWN
>     \override TupletBracket.positions = #flat-brackets
>      \tuplet 3/2 {
>       <hh sn>4 cymr8 cymr4 cymr8 cymr4 cymr8 cymr4 cymr8
>       \once \offset positions #-0.3 TupletBracket %%%%%
>       <hh sn>4 cymr8 cymr4 cymr8 cymr4 cymr8 cymr4 cymr8
>     }
>   }
> }
>
> %%%%%%%%%%%
> This uses the default value of 'positions, and simply selects one of the
> left/right values to use for both left and right.
>
> Of course, you then can't override positions again for fine-tuning of the
> flattened brackets.  (I notice that the first bracket could be lower, for
> example).
>
> Here you can use \once \offset, which will take effect on the values from
> the flat-brackets override, displacing them from where they are.  It must
> be \once to get this accumulating effect.  (I do this in the example above.)
>
> HTH,
> David
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to