[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Un
From: |
Thomas Morley |
Subject: |
Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Unknown marking in Roman print (1710)) |
Date: |
Mon, 23 May 2016 23:02:58 +0200 |
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)))
> 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 }
>>
> otherwise could it be a simpler replacement for
>
> http://lsr.di.unimi.it/LSR/Snippet?id=860
>
> which seems to be trying to achieve the same thing?
Indeed.
860 was one of my early codings, far too complicated thinking.
Actually it redefines parts of `ly:tuplet-bracket::calc-direction' ...
Otoh, it is aware of kneed-beams, sort of.
Though, it has the same problem as mentioned above and I'm not sure
how to avoid it.
Cheers,
Harm
- Re: Unknown marking in Roman print (1710), (continued)
- 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 <=
- Re: Switching the direction of slurs in tupletBracketToSlur (from Re: Unknown marking in Roman print (1710)), Richard Shann, 2016/05/24