[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Un
From: |
Richard Shann |
Subject: |
Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Unknown marking in Roman print (1710)) |
Date: |
Tue, 24 May 2016 19:30:42 +0100 |
On Mon, 2016-05-23 at 23:02 +0200, Thomas Morley wrote:
> 2016-05-23 16:27 GMT+02:00 Richard Shann <address@hidden>:
> > On Mon, 2016-05-23 at 10:13 +0200, Simon Albrecht wrote:
> >> On 22.05.2016 23:29, Richard Shann wrote:
> >> > I wonder did my email "Switching
> >> > the direction of slurs in tupletBracketToSlur" get overlooked or is
> >> > there no way that a direction can be set to be the opposite to the stems
> >> > and beams direction?
> >>
> >> Certainly it hasn’t been overlooked, and there is a way to do it.
> >
> > Spurred on by your confidence that it can be done I dug into it
> >
> > #(define (invert-direction x) (if (eq? UP
> > (ly:tuplet-bracket::calc-direction x)) DOWN UP))
> > \override TupletBracket.direction = #invert-direction
> >
> > seems to do the trick.
>
> Even more concise:
>
> #(define (invert-direction grob)
> (* -1 (ly:tuplet-bracket::calc-direction grob)))
This hinges on UP and DOWN never getting assigned different values. In
which case I see that
#(define (invert-direction grob)
(- (ly:tuplet-bracket::calc-direction grob)))
will work too.
>
> > If anyone knows of a problem with this code,
> > please say,
>
> Well, as soon as polyphonic happens it will produce strange output, see:
>
> mus = {
> \override TupletBracket.bracket-visibility = ##t
> \override TupletBracket.direction = #invert-direction
> \tuplet 3/2 { a'8 b c }
> \tuplet 3/2 { r8 d e }
> \tuplet 3/2 { r8 r f, }
> \tuplet 3/2 { g, a'' r }
> \tuplet 3/2 { c,,8 c c }
> \tuplet 3/2 { r8 c c }
> \tuplet 3/2 { r8 r c }
> \tuplet 3/2 { c c'' r }
> }
>
> \new Staff
> <<
> \new Voice \relative c'' { \voiceOne \mus }
> \new Voice \relative c { \voiceTwo \mus }
> >>
Thankfully my personal use-case doesn't stretch to that sort of
thing ...
Richard
- Re: Unknown marking in Roman print (1710), (continued)
- Re: Unknown marking in Roman print (1710), Simon Albrecht, 2016/05/22
- Re: Unknown marking in Roman print (1710), Andrew Bernard, 2016/05/22
- Re: Unknown marking in Roman print (1710), Richard Shann, 2016/05/22
- Re: Unknown marking in Roman print (1710), Andrew Bernard, 2016/05/22
- Re: Unknown marking in Roman print (1710), Simon Albrecht, 2016/05/22
- Re: Unknown marking in Roman print (1710), Richard Shann, 2016/05/22
- Re: Unknown marking in Roman print (1710), Richard Shann, 2016/05/22
- Re: Unknown marking in Roman print (1710), Simon Albrecht, 2016/05/23
- Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Unknown marking in Roman print (1710)), Richard Shann, 2016/05/23
- Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Unknown marking in Roman print (1710)), Thomas Morley, 2016/05/23
- Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Unknown marking in Roman print (1710)),
Richard Shann <=