Hi David, On Sun, May 20, 2012 at 2:42 PM, David Nalesnik <david.nales...@gmail.com> wrote: > > On Sun, May 20, 2012 at 2:34 AM, Janek Warchoł <janek.lilyp...@gmail.com> > wrote: >> That's the true LilyPond way: instead of fixing the same thing all the >> time, write one fix once and for all - kudos! I wish everyone >> operated this way. > > Thanks! But with the time it took me to write it (and with the things that > keep happening to it), I think I should specialize in cross-staff tuplets as > a composer :)
:) > It looks for several conditions: if the beam isn't kneed, or if there is a > visible tuplet bracket (you've forced one, or there is no beam attached to > the first stem of the group), the functions will return the default values > of 'X-offset and 'Y-offset. Originally these properties were unset by > default, so I simply left them unset if no adjustment to the number was > needed. At some point after 2.14, both 'X and 'Y-offset of TupletNumber > were set to procedures. The original LSR functions, applied in this > circumstances, clear the default values and all horizontal and vertical > positioning is lost! (The number appears on the midline of the staff at the > first stem of the beam.) ah! this explains everything. >> On Sun, May 20, 2012 at 1:45 AM, David Nalesnik > Here I noticed something interesting, which might actually be a bug. Try > the example without any overrides. So: > > \version "2.15.38" > > \paper { > indent = 0 > } > > top = \change Staff = "1" > bottom = \change Staff = "2" > > music = \relative c { > \override Beam #'auto-knee-gap = #1 > \override TupletBracket #'bracket-visibility = ##t > \set tupletSpannerDuration = #(ly:make-moment 1 4) > \times 2/3 { > c8 b c > g a' f % autobeaming necessary here when example doubled > f f,4 > e c'8 > } > \times 2/3 { > \bottom c8[ g' \top e'] > c'[ e, \bottom g,] > \top e''[ \bottom c,, \top g''] > } > \times 4/5 { > \bottom c,,16[ \top g'' e' \bottom g,, \top c'] > } > } > > \score { > \new PianoStaff << > \new Staff = "1" { > s1 s > s s > } > \new Staff = "2" { > \clef bass > \music > \bar "||" > \music % no problem when commented out > } > >> > } > > You get different results for the second tuplet depending on whether the > example is doubled. I wouldn't say that - it seems that second tuplet is completely random. Try repeating \music 6 times (see attached "very strange") - 1st and 3rd occurence is correct, remaining ones are wrong. Now delete the definition of your function (which isn't used at all!) and the 3rd occurence goes bad. Actually, as i'm trying various combinations, i cannot reproduce previous behavior! And another weird example: try "manual beaming" with 2.15.38. At one moment, deleting any of 3 manual beam definitions present changed last tuplet from good to bad - but i cannot reproduce it anymore! > Thank you for looking at this in such depth! (Don't know how long it would > have been otherwise since I "fixed" that score I was updating...) You're welcome! I like analyzing things like that. Since i'm going to try your function on the project i'm working on with Urs, i may have more feedback in some time. > [I've] found this as the > "Snippet of the Month"! Wow, I'm really honored by this. Your function deserves this! > I'm inspired to > look at this in more depth. (One thing is to be able to move the number > along the beam when there's a collision. This would have to be a user > tweak, though. Someday maybe a kneed-triplet-with-no-bracket engraver that > acknowledges beams, accidentals to left and right, etc...) that would be awesome! cheers, Janek
manual beaming.ly
Description: Binary data
very strange.ly
Description: Binary data
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user