non-triplet tuplets collide with staff
Lilypond by default seems to place all tuplet numbers/brackets so that they collide with the staff, with the exception of triplets, which it places outside the staff. I would like all tuplets outside of the staff like triplets. \override Staff.TupletNumber #'outside-staff-priority = #1 fixes tuplets with no bracket, but for tuplets with a bracket only the number appears outside the staff; the bracket still collides with the staff. \override Staff.TupletBracket #'outside-staff-priority = #1 fixes tuplets with a bracket, but for tuplets with no bracket the number still collides with the staff. If I do both \override Staff.TupletNumber #'outside-staff-priority = #1 \override Staff.TupletBracket #'outside-staff-priority = #1 I get an error: "warning: Cannot set outside-staff-priority for element and elements' Y parent." How can I avoid collisions with the staff for all tuplets, whether or not they have a bracket? Thanks, Mason ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: non-triplet tuplets collide with staff
On 10/28/2017 5:38 PM, Mason Hock wrote: Lilypond by default seems to place all tuplet numbers/brackets so that they collide with the staff, with the exception of triplets, which it places outside the staff. I would like all tuplets outside of the staff like triplets. /\override Staff.TupletNumber #'outside-staff-priority = #1/ /\override Staff.TupletBracket #'outside-staff-priority = #1/ I get an error: "warning: Cannot set outside-staff-priority for element and elements' Y parent." How can I avoid collisions with the staff for all tuplets, whether or not they have a bracket? Thanks, Mason Mason, Have you tried first deciding how to control bracket *visibility *in general? It sounds like you have a very specific preference for this, maybe you could begin there and then do an outside staff priority override as needed for only the number? That should avoid the error you're seeing due to the 'double' overrides. http://lilypond.org/doc/v2.19/Documentation/snippets/rhythms#rhythms-controlling-tuplet-bracket-visibility Just an idea... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: non-triplet tuplets collide with staff
Hi Mason, please always state the version you use and a tiny example. Maybe you would have spotted that 2017-10-28 23:38 GMT+02:00 Mason Hock : > Lilypond by default seems to place all tuplet numbers/brackets so that they > collide with the staff, with the exception of triplets, which it places > outside the staff. isn't true. See { \cadenzaOn \tuplet 2/1 { a4 a } \tuplet 3/2 { a a a } \tuplet 4/3 { a a a a } \tuplet 5/4 { a a a a a } \tuplet 6/5 { a a a a a a } \tuplet 7/6 { a a a a a a a } } and { \tuplet 2/1 { a8 a } \tuplet 3/2 { a a a } \tuplet 4/3 { a a a a } \tuplet 5/4 { a a a a a } \tuplet 6/5 { a a a a a a } \tuplet 7/6 { a a a a a a a } } Where the TupletBracket is printed depends on whether a Beam is present or not, presence of other maybe colliding objects etc. Has nothing to do if being a triplet or anything else. Btw, what you call collisions is common practice in printed editions. > I would like all tuplets outside of the staff like > triplets. > If I do both > > \override Staff.TupletNumber #'outside-staff-priority = #1 > \override Staff.TupletBracket #'outside-staff-priority = #1 > > I get an error: "warning: Cannot set outside-staff-priority for element and > elements' Y parent." I agree it would be better to set outside-staff-priority for both, Number and Bracket, and let LilyPond sort it out. Alas, it doesn't work. You may write a feature-request to the bug-list. For now you could do: \override TupletBracket.after-line-breaking = #(lambda (grob) (ly:grob-set-property! (if (and (ly:stencil-empty? (ly:grob-property grob 'stencil)) (ly:grob? (ly:grob-object grob 'tuplet-number))) (ly:grob-object grob 'tuplet-number) grob) 'outside-staff-priority 100)) Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: non-triplet tuplets collide with staff
Thanks for clarifying. My score only uses triplets for unbeamed notes, and I mistakenly misattributed the number and bracket placement to the ratio rather than the presence of beams. Next time I'll test with a simpler example like the one you include. Your solution works well in 2.18.2. Thanks! Mason On Sun, Oct 29, 2017 at 2:03 AM, Thomas Morley wrote: Hi Mason, please always state the version you use and a tiny example. Maybe you would have spotted that 2017-10-28 23:38 GMT+02:00 Mason Hock : Lilypond by default seems to place all tuplet numbers/brackets so that they collide with the staff, with the exception of triplets, which it places outside the staff. isn't true. See { \cadenzaOn \tuplet 2/1 { a4 a } \tuplet 3/2 { a a a } \tuplet 4/3 { a a a a } \tuplet 5/4 { a a a a a } \tuplet 6/5 { a a a a a a } \tuplet 7/6 { a a a a a a a } } and { \tuplet 2/1 { a8 a } \tuplet 3/2 { a a a } \tuplet 4/3 { a a a a } \tuplet 5/4 { a a a a a } \tuplet 6/5 { a a a a a a } \tuplet 7/6 { a a a a a a a } } Where the TupletBracket is printed depends on whether a Beam is present or not, presence of other maybe colliding objects etc. Has nothing to do if being a triplet or anything else. Btw, what you call collisions is common practice in printed editions. I would like all tuplets outside of the staff like triplets. If I do both \override Staff.TupletNumber #'outside-staff-priority = #1 \override Staff.TupletBracket #'outside-staff-priority = #1 I get an error: "warning: Cannot set outside-staff-priority for element and elements' Y parent." I agree it would be better to set outside-staff-priority for both, Number and Bracket, and let LilyPond sort it out. Alas, it doesn't work. You may write a feature-request to the bug-list. For now you could do: \override TupletBracket.after-line-breaking = #(lambda (grob) (ly:grob-set-property! (if (and (ly:stencil-empty? (ly:grob-property grob 'stencil)) (ly:grob? (ly:grob-object grob 'tuplet-number))) (ly:grob-object grob 'tuplet-number) grob) 'outside-staff-priority 100)) Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user