2016-05-23 16:27 GMT+02:00 Richard Shann <rich...@rshann.plus.com>: > 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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user