Re: SustainPedal on shifted notes (possible bug?)
Thanks Thomas and Kieran, That work-around works perfectly, without uncommenting the " %\override Dynamics.PianoPedalBracket #'shorten-pair = #'(0 . -1) " line (then, there's no need of the trial-and-error method mentioned by Kieran). I tested it on 2.21.0 I don't understand yet if the default behaviour should be reported as bug in the ml, though... 2018-03-24 22:38 GMT+01:00 Thomas Morley : > 2018-03-24 17:19 GMT+01:00 paolo prete : > > Hello, > > > > as you can see from the below snippet, the bracket of the sustain pedal > is > > not properly extended when the last note is shifted. > > Is this a bug? Is there a way to fix it or a work-around ? > > Iiuc, the PianoPedalBracket is left/right bound by PaperColumns. > If you move NoteColumn, then you move it relative to it's PaperColumn, > but PaperColumn is _not_ changed. > Thus the PianoPedalBracket doesn't move along. > Not a bug but a consequencee of the current implementation. > > Btw, this was changed between 2.14 and 2.16. > Most likely with > https://sourceforge.net/p/testlilyissues/issues/2153/ > > I did some more research/comparison with Hairpins, which may be > bounded by PaperColumns as well. > Obviously there is some more fine-grained hierarchy coded how to bound > Hairpins. > Something like: DynamicText present? -> NoteColumn? ->PaperColumn > Nevertheless this does not explain the behaviour of the Hairpin in the > last Dynamics-context below. > Or probably I don't fully understand what's going. > > Make that a 'likely' lol > > > The code prints a lot of info, visible in pdf/readable in terminal. > You may try to uncomment the commands in the first Dynamics-context, > might be a work-around. > How to do final adjustments Kieren already demonstrated by using > 'shorten-pair. > > Old syntax is used and some definitions added to make it work even with > 2.14. > > #(use-modules (ice-9 pretty-print)) > > #(define-public (grob::name grob) > "Return the name of the grob @var{grob} as a symbol." > (assq-ref (ly:grob-property grob 'meta) 'name)) > > #(define print-info > (lambda (grob) > (format #t "\ncurrent default-bounds:\n~y" > (list > (grob::name grob) > (ly:spanner-bound grob LEFT) > (ly:spanner-bound grob RIGHT) > > #(define nc-bounds! > (lambda (grob) > (let* ((left-b (ly:spanner-bound grob LEFT)) > (left-elts (ly:grob-object left-b 'elements)) > (left-elts-ls > (if (ly:grob-array? left-elts) > (ly:grob-array->list left-elts) > '())) > (left-nc > (filter > (lambda (g) > (grob::has-interface g 'note-column-interface)) > left-elts-ls)) > (right-b (ly:spanner-bound grob RIGHT)) > (right-elts (ly:grob-object right-b 'elements)) > (right-elts-ls > (if (ly:grob-array? right-elts) > (ly:grob-array->list right-elts) > '())) > (right-nc > (filter > (lambda (g) > (grob::has-interface g 'note-column-interface)) > right-elts-ls))) > ;(print-info grob) > (if (pair? left-nc) (ly:spanner-set-bound! grob LEFT (car > left-nc))) > (if (pair? right-nc) (ly:spanner-set-bound! grob RIGHT (car > right-nc)) > > \score { > << > \new Staff \with { instrumentName = "Staff 1 " } { > > c'2\sustainOn > f' > \once \override Score.NoteColumn #'X-offset = 10 > c''\sustainOff > } > \new Staff \with { instrumentName = "Staff 2 " } { > c'\< > f' > c''\mf > } > \new Staff \with { instrumentName = "Staff 3 " } { > c'\< > f' > c''\! > } > \new Dynamics \with { instrumentName = "Dyn 1 " } { > %\override Dynamics.PianoPedalBracket #'after-line-breaking = > #nc-bounds! > %\override Dynamics.PianoPedalBracket #'shorten-pair = #'(0 . -1) > s\sustainOn > s > s\sustainOff > } > \new Dynamics \with { instrumentName = "Dyn 2 " } { > s\< > s > s\mf > } > \new Dynamics \with { instrumentName = "Dyn 3 " } { > s\< > s > s\! > } > >> > > \layout { > \context { > \Dynamics > \consists "Instrument_name_engraver" > \override VerticalAxisGroup #'nonstaff-nonstaff-spacing = > #'((padding . 2)) > \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = > #'((padding . 4)) > \override Hairpin #'after-line-breaking = #print-info > \override PianoPedalBracket #'after-line-breaking = #print-info > } > \context { > \Voice > \override Hairpin #'after-line-breaking = #print-info > } > \context { > \Staff > \override PianoPedalBracket #'after-l
Re: SustainPedal on shifted notes (possible bug?)
Hello Kieren, sorry to insist again but IMHO this is a bug. Look at the snippet below: all the objects are aligned to the shifted NoteColumn. Only the pedal is not aligned. There's no reason for which it has not to be aligned, and this forces to apply work-arounds in order to put the end of the bracket below the wanted note. % \score { \tuplet 3/2 { c'\sustainOn\<\startTextSpan c' \once \override Score.NoteColumn #'X-offset = 15 c'\!\mf\sustainOff\stopTextSpan } \layout { \context { \Score pedalSustainStyle = #'mixed } } } A possible better work-around could be overriding the TextSpanner properties so that it draws a pedal, like the snippet below, but I can't find a good way to emulate the \sustainOn\sustainOff sequence which draws " /\ " for the sustan pedal... In addition, I have to override the TextSpanner properties BEFORE it is attached to a note, and not "on the fly"... Any help is greatly appreciated. %%% pedOn = \startTextSpan pedOff = \stopTextSpan { \override TextSpanner.style = #'line \override TextSpanner.bound-details.left.text = \markup { "ped." } \override TextSpanner.style = #'line \override TextSpanner.bound-details.right.text = \markup { \path #0 #'( (lineto 0 2) ) } a'4_\pedOn b'4 c'' \once \override Score.NoteColumn #'X-offset = 10 a'4 \pedOff } %%% > I would say it’s expected behaviour, since that’s the way that pedals are > traditionally marked. > > That being said, it would be nice to have an easier way to pin the end to > the note — analogous to the Hairpin.to-barline property — since the method > I show (above) is trial-and-error. Maybe you should submit a feature > request? > > Hope this helps! > Kieren. > > > Kieren MacMillan, composer > ‣ website: www.kierenmacmillan.info > ‣ email: i...@kierenmacmillan.info > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
2018-03-24 17:19 GMT+01:00 paolo prete : > Hello, > > as you can see from the below snippet, the bracket of the sustain pedal is > not properly extended when the last note is shifted. > Is this a bug? Is there a way to fix it or a work-around ? Iiuc, the PianoPedalBracket is left/right bound by PaperColumns. If you move NoteColumn, then you move it relative to it's PaperColumn, but PaperColumn is _not_ changed. Thus the PianoPedalBracket doesn't move along. Not a bug but a consequencee of the current implementation. Btw, this was changed between 2.14 and 2.16. Most likely with https://sourceforge.net/p/testlilyissues/issues/2153/ I did some more research/comparison with Hairpins, which may be bounded by PaperColumns as well. Obviously there is some more fine-grained hierarchy coded how to bound Hairpins. Something like: DynamicText present? -> NoteColumn? ->PaperColumn Nevertheless this does not explain the behaviour of the Hairpin in the last Dynamics-context below. Or probably I don't fully understand what's going. Make that a 'likely' lol The code prints a lot of info, visible in pdf/readable in terminal. You may try to uncomment the commands in the first Dynamics-context, might be a work-around. How to do final adjustments Kieren already demonstrated by using 'shorten-pair. Old syntax is used and some definitions added to make it work even with 2.14. #(use-modules (ice-9 pretty-print)) #(define-public (grob::name grob) "Return the name of the grob @var{grob} as a symbol." (assq-ref (ly:grob-property grob 'meta) 'name)) #(define print-info (lambda (grob) (format #t "\ncurrent default-bounds:\n~y" (list (grob::name grob) (ly:spanner-bound grob LEFT) (ly:spanner-bound grob RIGHT) #(define nc-bounds! (lambda (grob) (let* ((left-b (ly:spanner-bound grob LEFT)) (left-elts (ly:grob-object left-b 'elements)) (left-elts-ls (if (ly:grob-array? left-elts) (ly:grob-array->list left-elts) '())) (left-nc (filter (lambda (g) (grob::has-interface g 'note-column-interface)) left-elts-ls)) (right-b (ly:spanner-bound grob RIGHT)) (right-elts (ly:grob-object right-b 'elements)) (right-elts-ls (if (ly:grob-array? right-elts) (ly:grob-array->list right-elts) '())) (right-nc (filter (lambda (g) (grob::has-interface g 'note-column-interface)) right-elts-ls))) ;(print-info grob) (if (pair? left-nc) (ly:spanner-set-bound! grob LEFT (car left-nc))) (if (pair? right-nc) (ly:spanner-set-bound! grob RIGHT (car right-nc)) \score { << \new Staff \with { instrumentName = "Staff 1 " } { c'2\sustainOn f' \once \override Score.NoteColumn #'X-offset = 10 c''\sustainOff } \new Staff \with { instrumentName = "Staff 2 " } { c'\< f' c''\mf } \new Staff \with { instrumentName = "Staff 3 " } { c'\< f' c''\! } \new Dynamics \with { instrumentName = "Dyn 1 " } { %\override Dynamics.PianoPedalBracket #'after-line-breaking = #nc-bounds! %\override Dynamics.PianoPedalBracket #'shorten-pair = #'(0 . -1) s\sustainOn s s\sustainOff } \new Dynamics \with { instrumentName = "Dyn 2 " } { s\< s s\mf } \new Dynamics \with { instrumentName = "Dyn 3 " } { s\< s s\! } >> \layout { \context { \Dynamics \consists "Instrument_name_engraver" \override VerticalAxisGroup #'nonstaff-nonstaff-spacing = #'((padding . 2)) \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing = #'((padding . 4)) \override Hairpin #'after-line-breaking = #print-info \override PianoPedalBracket #'after-line-breaking = #print-info } \context { \Voice \override Hairpin #'after-line-breaking = #print-info } \context { \Staff \override PianoPedalBracket #'after-line-breaking = #print-info } \context { \Score timing = ##f pedalSustainStyle = #'mixed \override PaperColumn #'stencil = #ly:paper-column::print } } } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
Hi Paolo, > IMHO this is a bug. Feel free to submit it to the bug list! Best regards, Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
Hi Paolo, > Sorry to insist: there's no way to put the end of the bracket at the wanted > note. %%% SNIPPET BEGINS \version "2.19.80" \language "english" \score { { \once \override Score.PianoPedalBracket.shorten-pair = #'(0 . -11.1) c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f'\sustainOff r4\break \once \override Score.PianoPedalBracket.shorten-pair = #'(0 . 22) c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f' r4\sustainOff } \layout { \context { \Score pedalSustainStyle = #'mixed } } } %%% SNIPPET ENDS > Is this a bug? I would say it’s expected behaviour, since that’s the way that pedals are traditionally marked. That being said, it would be nice to have an easier way to pin the end to the note — analogous to the Hairpin.to-barline property — since the method I show (above) is trial-and-error. Maybe you should submit a feature request? Hope this helps! Kieren. Kieren MacMillan, composer ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: SustainPedal on shifted notes (possible bug?)
Paolo, Nothing ventured, nothing gained. Shall be looking on the list for a resolution. Mark From: paolo prete [mailto:paoloprete...@gmail.com] Sent: Saturday, March 24, 2018 11:07 AM To: Mark Stephen Mrotek Cc: lilypond-user Mailinglist Subject: Re: SustainPedal on shifted notes (possible bug?) Mark, unfortunately, using \new Dynamics for the pedal line doesn't seem to solve the issue... 2018-03-24 18:37 GMT+01:00 Mark Stephen Mrotek mailto:carsonm...@ca.rr.com> >: Paolo, It is possible to input pedal markings with \new Dynamics. This is what I do for my piano scores. I am trying to see how it would work with you example. Mark From: paolo prete [mailto:paoloprete...@gmail.com <mailto:paoloprete...@gmail.com> ] Sent: Saturday, March 24, 2018 10:25 AM To: Mark Stephen Mrotek mailto:carsonm...@ca.rr.com> > Cc: lilypond-user Mailinglist mailto:lilypond-user@gnu.org> > Subject: Re: SustainPedal on shifted notes (possible bug?) Sorry to insist: there's no way to put the end of the bracket at the wanted note. In the snippet below, I want to end the bracket at the note " f' " Is this a bug? %% \score { { c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f'\sustainOff r4\break c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f' r4\sustainOff } \layout { \context { \Score pedalSustainStyle = #'mixed } } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
Mark, unfortunately, using \new Dynamics for the pedal line doesn't seem to solve the issue... 2018-03-24 18:37 GMT+01:00 Mark Stephen Mrotek : > Paolo, > > > > It is possible to input pedal markings with \new Dynamics. This is what I > do for my piano scores. > > I am trying to see how it would work with you example. > > > > Mark > > > > *From:* paolo prete [mailto:paoloprete...@gmail.com] > *Sent:* Saturday, March 24, 2018 10:25 AM > *To:* Mark Stephen Mrotek > *Cc:* lilypond-user Mailinglist > *Subject:* Re: SustainPedal on shifted notes (possible bug?) > > > > Sorry to insist: there's no way to put the end of the bracket at the > wanted note. > > In the snippet below, I want to end the bracket at the note " f' " > > Is this a bug? > > > > %% > > > > \score { > > > > { > > c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 > f'\sustainOff > > r4\break > > > > c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f' > > r4\sustainOff > > } > > > > \layout { > > \context { > > \Score > > pedalSustainStyle = #'mixed > > } > > } > > > > } > > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: SustainPedal on shifted notes (possible bug?)
Paolo, It is possible to input pedal markings with \new Dynamics. This is what I do for my piano scores. I am trying to see how it would work with you example. Mark From: paolo prete [mailto:paoloprete...@gmail.com] Sent: Saturday, March 24, 2018 10:25 AM To: Mark Stephen Mrotek Cc: lilypond-user Mailinglist Subject: Re: SustainPedal on shifted notes (possible bug?) Sorry to insist: there's no way to put the end of the bracket at the wanted note. In the snippet below, I want to end the bracket at the note " f' " Is this a bug? %% \score { { c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f'\sustainOff r4\break c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f' r4\sustainOff } \layout { \context { \Score pedalSustainStyle = #'mixed } } } 2018-03-24 17:32 GMT+01:00 Mark Stephen Mrotek mailto:carsonm...@ca.rr.com> >: Paolo, Put the \sustainOff outside of the tuplet { } and put it on the next pitch. Mark ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
Sorry to insist: there's no way to put the end of the bracket at the wanted note. In the snippet below, I want to end the bracket at the note " f' " Is this a bug? %% \score { { c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f'\sustainOff r4\break c'\sustainOn c' \once \override NoteColumn #'X-offset = 10 f' r4\sustainOff } \layout { \context { \Score pedalSustainStyle = #'mixed } } } > > 2018-03-24 17:32 GMT+01:00 Mark Stephen Mrotek : > >> Paolo, >> >> >> >> Put the \sustainOff outside of the tuplet { } and put it on the next >> pitch. >> >> >> >> Mark >> >> >> > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
I suspect this is a bug. Please see my previous snippet... 2018-03-24 18:22 GMT+01:00 Mark Stephen Mrotek : > Welcome, Paolo > > > > “overriding” is out of my knowledge. > > Someone else might. > > > > Mark > > > > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: SustainPedal on shifted notes (possible bug?)
Welcome, Paolo “overriding” is out of my knowledge. Someone else might. Mark From: paolo prete [mailto:paoloprete...@gmail.com] Sent: Saturday, March 24, 2018 10:06 AM To: Mark Stephen Mrotek Cc: lilypond-user Mailinglist Subject: Re: SustainPedal on shifted notes (possible bug?) Mark, I would like to override the default behviour of the pedal bracket. is it possible to end that bracket at the position of the note's column, instead of extending it for the whole note's duration? Thanks. 2018-03-24 17:32 GMT+01:00 Mark Stephen Mrotek mailto:carsonm...@ca.rr.com> >: Paolo, Put the \sustainOff outside of the tuplet { } and put it on the next pitch. Mark ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: SustainPedal on shifted notes (possible bug?)
Mark, I would like to override the default behviour of the pedal bracket. is it possible to end that bracket at the position of the note's column, instead of extending it for the whole note's duration? Thanks. 2018-03-24 17:32 GMT+01:00 Mark Stephen Mrotek : > Paolo, > > > > Put the \sustainOff outside of the tuplet { } and put it on the next pitch. > > > > Mark > > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: SustainPedal on shifted notes (possible bug?)
Paolo, Put the \sustainOff outside of the tuplet { } and put it on the next pitch. Mark From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of paolo prete Sent: Saturday, March 24, 2018 9:20 AM To: lilypond-user Mailinglist Subject: SustainPedal on shifted notes (possible bug?) Hello, as you can see from the below snippet, the bracket of the sustain pedal is not properly extended when the last note is shifted. Is this a bug? Is there a way to fix it or a work-around ? Thanks % \score { \tuplet 3/2 {c'\sustainOn f' \once \override NoteColumn #'X-offset = 10 c''\mf\sustainOff } \layout { \context { \Score pedalSustainStyle = #'mixed } } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user