Re: Horizontal TupletBrackets?

2014-01-28 Thread Peter Crighton
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 

> Hi Peter,
>
>
> On Fri, Jan 24, 2014 at 8:20 AM, Peter Crighton 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 {
>   4 cymr8 cymr4 cymr8 cymr4 cymr8 cymr4 cymr8
>   \once \offset positions #-0.3 TupletBracket %
>   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


Re: Horizontal TupletBrackets?

2014-01-25 Thread David Nalesnik
Hi Peter,


On Fri, Jan 24, 2014 at 8:20 AM, Peter Crighton 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 {
  4 cymr8 cymr4 cymr8 cymr4 cymr8 cymr4 cymr8
  \once \offset positions #-0.3 TupletBracket %
  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


Horizontal TupletBrackets?

2014-01-24 Thread Peter Crighton
Hi List,

is there a way to have all TupletBrackets in a score be horizontal without
altering every single one?
See this example – first bar is the default, second bar is how I’d like to
have it all through the score, but without overriding every one.


\version "2.19.0"

\new DrumVoice {
  \drummode {
\voiceOne
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\tuplet 3/2 {
  4 cymr8 cymr4 cymr8 cymr4 cymr8 cymr4 cymr8
  \once \override TupletBracket.positions = #'(6.625 . 6.625) 4
cymr8 cymr4 cymr8 cymr4 cymr8 cymr4 cymr8
}
  }
}


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’d appreciate any help!

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user