On Mon, 2016-05-23 at 23:02 +0200, Thomas Morley wrote: > 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)))
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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user