lilypond-user
[Top][All Lists]
Advanced

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

Re: Horizontal TupletBrackets?


From: David Nalesnik
Subject: Re: Horizontal TupletBrackets?
Date: Sat, 25 Jan 2014 09:01:09 -0600

Hi Peter,


On Fri, Jan 24, 2014 at 8:20 AM, Peter Crighton <address@hidden> 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

reply via email to

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