Re: Another parenthesize issue
Am 15.08.2015 um 16:45 schrieb Andrew Bernard: In the following MWE, when a slur is used, the two articulations overlap. I believe they should be stacked, as in the case shown with no slur. \version 2.19.25 { \slurDown c''16^!-\parenthesize ^ d''-\parenthesize ^ ^!( ees'') fis''-\parenthesize ^ ^! } This is not a parenthesize problem but a script order and avoid-slur properties problem. accent has avoid-slur property around and staccatissimo inside. It looks like LilyPond puts the staccatissimo inside of the slur and then tries to put the accent between the NoteHead and the staccatissimo which contradicts its avoid-slur property. I thought that multiple scripts on one note could be entered in arbitrary order and produce the same output but I was obviously wrong: \version 2.19.25 { d'' - -! ( e'' ) % collision d'' -! - ( e'' ) % output correct } ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Enhancement: Implement parenthesizing spanners
2015-08-17 0:18 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Lily is being very honest and makes a kind warning telling us that she doesn’t know how to parenthesize spanners. But it would be really nice if we could teach her that :-) %% \relative { c''-\parenthesize \ c c c c2\! -\parenthesize ~ c } %% https://code.google.com/p/lilypond/issues/detail?id=4565 I once made the attached code. It still compiles. You will observe several warnings, they are intended ;) I never had the time and energy to finish it. May be a good starting point, though Cheers, Harm \version 2.15.39 % The following untouched defs needs to be here, because they aren't public. #(define (make-bezier-sandwich-stencil coords thick xext yext) (let* ((command-list `(moveto ,(car (list-ref coords 3)) ,(cdr (list-ref coords 3)) curveto ,(car (list-ref coords 0)) ,(cdr (list-ref coords 0)) ,(car (list-ref coords 1)) ,(cdr (list-ref coords 1)) ,(car (list-ref coords 2)) ,(cdr (list-ref coords 2)) curveto ,(car (list-ref coords 4)) ,(cdr (list-ref coords 4)) ,(car (list-ref coords 5)) ,(cdr (list-ref coords 5)) ,(car (list-ref coords 6)) ,(cdr (list-ref coords 6)) closepath))) (ly:make-stencil `(path ,thick `(,@' ,command-list) 'round 'round #t) xext yext))) #(define (make-parenthesis-stencil y-extent half-thickness width angularity) Create a parenthesis stencil. @var{y-extent} is the Y extent of the markup inside the parenthesis. @var{half-thickness} is the half thickness of the parenthesis. @var{width} is the width of a parenthesis. The higher the value of number @var{angularity}, the more angular the shape of the parenthesis. (let* ((line-width 0.1) ;; Horizontal position of baseline that end points run through. (base-x (if ( width 0) (- width) 0)) ;; X value farthest from baseline on outside of curve (outer-x (+ base-x width)) ;; X extent of bezier sandwich centerline curves (x-extent (ordered-cons base-x outer-x)) (bottom-y (interval-start y-extent)) (top-y (interval-end y-extent)) (lower-end-point (cons base-x bottom-y)) (upper-end-point (cons base-x top-y)) (outer-control-x (+ base-x (* 4/3 width))) (inner-control-x (+ outer-control-x (if ( width 0) half-thickness (- half-thickness ;; Vertical distance between a control point ;; and the end point it connects to. (offset-index (- (* 0.6 angularity) 0.8)) (lower-control-y (interval-index y-extent offset-index)) (upper-control-y (interval-index y-extent (- offset-index))) (lower-outer-control-point (cons outer-control-x lower-control-y)) (upper-outer-control-point (cons outer-control-x upper-control-y)) (upper-inner-control-point (cons inner-control-x upper-control-y)) (lower-inner-control-point (cons inner-control-x lower-control-y))) (make-bezier-sandwich-stencil (list ;; Step 4: curve through inner control points ;; to lower end point. upper-inner-control-point lower-inner-control-point lower-end-point ;; Step 3: move to upper end point. upper-end-point ;; Step 2: curve through outer control points ;; to upper end point. lower-outer-control-point upper-outer-control-point upper-end-point ;; Step 1: move to lower end point. lower-end-point) line-width (interval-widen x-extent (/ line-width 2)) (interval-widen y-extent (/ line-width 2) #(define (other-axis a) (remainder (+ a 1) 2)) % #(define-public (string-or-music? x) (or (string? x) (ly:music? x))) #(define-public (parenthesize-stencil stencil half-thickness width angularity padding size) Add parentheses around @var{stencil}, returning a new stencil. (let* ((y-extent (interval-widen (ly:stencil-extent stencil Y) size)) (lp (make-parenthesis-stencil y-extent half-thickness (- width) angularity)) (rp (make-parenthesis-stencil y-extent half-thickness width angularity))) (ly:stencil-combine-at-edge
Re: Enhancement: Implement parenthesizing spanners
Am 17.08.2015 um 00:53 schrieb Thomas Morley: 2015-08-17 0:18 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Lily is being very honest and makes a kind warning telling us that she doesn’t know how to parenthesize spanners. But it would be really nice if we could teach her that :-) %% \relative { c''-\parenthesize \ c c c c2\! -\parenthesize ~ c } %% https://code.google.com/p/lilypond/issues/detail?id=4565 I once made the attached code. It still compiles. You will observe several warnings, they are intended ;) I never had the time and energy to finish it. May be a good starting point, though. I made an updated version for 2.19.24 and newer (…), which you find attached. Main differences: – syntax updates, through convert-ly and manual – code reformatting (minor) – Both music functions now take a symbol list instead of a string, which simplifies the code. The only noticeable flaw I found is the interleaving tie parentheses and the collisions with \par Stem or \par Flag. Also, with the first clef, inside padding is too large and outside padding too small in my eyes. But other than that it works very well. Thanks again! Simon \version 2.19.24 % courtesy of Thomas Morley % The following untouched defs need to be here, because they arenât public. #(define (make-bezier-sandwich-stencil coords thick xext yext) (let* ((command-list `(moveto ,(car (list-ref coords 3)) ,(cdr (list-ref coords 3)) curveto ,(car (list-ref coords 0)) ,(cdr (list-ref coords 0)) ,(car (list-ref coords 1)) ,(cdr (list-ref coords 1)) ,(car (list-ref coords 2)) ,(cdr (list-ref coords 2)) curveto ,(car (list-ref coords 4)) ,(cdr (list-ref coords 4)) ,(car (list-ref coords 5)) ,(cdr (list-ref coords 5)) ,(car (list-ref coords 6)) ,(cdr (list-ref coords 6)) closepath))) (ly:make-stencil `(path ,thick `(,@' ,command-list) 'round 'round #t) xext yext))) #(define (make-parenthesis-stencil y-extent half-thickness width angularity) Create a parenthesis stencil. @var{y-extent} is the Y extent of the markup inside the parenthesis. @var{half-thickness} is the half thickness of the parenthesis. @var{width} is the width of a parenthesis. The higher the value of number @var{angularity}, the more angular the shape of the parenthesis. (let* ((line-width 0.1) ;; Horizontal position of baseline that end points run through. (base-x (if ( width 0) (- width) 0)) ;; X value farthest from baseline on outside of curve (outer-x (+ base-x width)) ;; X extent of bezier sandwich centerline curves (x-extent (ordered-cons base-x outer-x)) (bottom-y (interval-start y-extent)) (top-y (interval-end y-extent)) (lower-end-point (cons base-x bottom-y)) (upper-end-point (cons base-x top-y)) (outer-control-x (+ base-x (* 4/3 width))) (inner-control-x (+ outer-control-x (if ( width 0) half-thickness (- half-thickness ;; Vertical distance between a control point ;; and the end point it connects to. (offset-index (- (* 0.6 angularity) 0.8)) (lower-control-y (interval-index y-extent offset-index)) (upper-control-y (interval-index y-extent (- offset-index))) (lower-outer-control-point (cons outer-control-x lower-control-y)) (upper-outer-control-point (cons outer-control-x upper-control-y)) (upper-inner-control-point (cons inner-control-x upper-control-y)) (lower-inner-control-point (cons inner-control-x lower-control-y))) (make-bezier-sandwich-stencil (list ;; Step 4: curve through inner control points ;; to lower end point. upper-inner-control-point lower-inner-control-point lower-end-point ;; Step 3: move to upper end point. upper-end-point ;; Step 2: curve through outer control points ;; to upper end point. lower-outer-control-point upper-outer-control-point upper-end-point ;; Step 1: move to lower end point. lower-end-point) line-width (interval-widen x-extent (/ line-width 2)) (interval-widen y-extent (/ line-width 2) #(define
Re: Enhancement: Implement parenthesizing spanners
2015-08-17 0:53 GMT+02:00 Thomas Morley thomasmorle...@gmail.com: 2015-08-17 0:18 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Lily is being very honest and makes a kind warning telling us that she doesn’t know how to parenthesize spanners. But it would be really nice if we could teach her that :-) %% \relative { c''-\parenthesize \ c c c c2\! -\parenthesize ~ c } %% https://code.google.com/p/lilypond/issues/detail?id=4565 I once made the attached code. It still compiles. You will observe several warnings, they are intended ;) I never had the time and energy to finish it. May be a good starting point, though Cheers, Harm Also, see issue 2646 https://code.google.com/p/lilypond/issues/detail?id=2646 and https://codereview.appspot.com/6397043 ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Enhancement: Implement parenthesizing spanners
Am 17.08.2015 um 00:53 schrieb Thomas Morley: 2015-08-17 0:18 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Lily is being very honest and makes a kind warning telling us that she doesn’t know how to parenthesize spanners. But it would be really nice if we could teach her that :-) %% \relative { c''-\parenthesize \ c c c c2\! -\parenthesize ~ c } %% https://code.google.com/p/lilypond/issues/detail?id=4565 I once made the attached code. It still compiles. You will observe several warnings, they are intended ;) I never had the time and energy to finish it. May be a good starting point, though At least the example is astounding. Thanks a lot! Simon ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Enhancement: Implement parenthesizing spanners
P.S. The string-or-music? definition in lines 102–103 is not used and may be omitted. Am 17.08.2015 um 02:22 schrieb Simon Albrecht: Am 17.08.2015 um 00:53 schrieb Thomas Morley: 2015-08-17 0:18 GMT+02:00 Simon Albrecht simon.albre...@mail.de: Lily is being very honest and makes a kind warning telling us that she doesn’t know how to parenthesize spanners. But it would be really nice if we could teach her that :-) %% \relative { c''-\parenthesize \ c c c c2\! -\parenthesize ~ c } %% https://code.google.com/p/lilypond/issues/detail?id=4565 I once made the attached code. It still compiles. You will observe several warnings, they are intended ;) I never had the time and energy to finish it. May be a good starting point, though. I made an updated version for 2.19.24 and newer (…), which you find attached. Main differences: – syntax updates, through convert-ly and manual – code reformatting (minor) – Both music functions now take a symbol list instead of a string, which simplifies the code. The only noticeable flaw I found is the interleaving tie parentheses and the collisions with \par Stem or \par Flag. Also, with the first clef, inside padding is too large and outside padding too small in my eyes. But other than that it works very well. Thanks again! Simon ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Enhancement: Implement parenthesizing spanners
I made an updated version for 2.19.24 and newer (…), which you find attached. [...] Thanks! I think this should be added to the Lilypond core. The only noticeable flaw I found is the interleaving tie parentheses and the collisions with \par Stem or \par Flag. Also, with the first clef, inside padding is too large and outside padding too small in my eyes. Maybe David can help here... Please add your code to an issue! Werner ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Possible bug with new \partial
Hello Mats, IIUC \partial serves to insert an additional amount of time, however in this example we actually need to skip a beat – thus call \partial with a negative duration, which is impossible :-) So you need to insert \set Timing.measureLength = #(ly:make-moment 3/4) before the second bar in your example. Is this documented differently? Else I wouldn’t consider it a bug, rather an inherent limitation. Yours, Simon Am 16.08.2015 um 21:28 schrieb Mats Bengtsson: Hi, I tried version 2.19.25 to typeset a piece that changes from 4/4 with an upbeat to 3/4 without an upbeat, in the middle of the piece. The new \partial handling worked for all parts, except a part that started with a multimeasure rest. Here's a small example illustrating the problem. Uncommenting the \bar line makes things slightly better but still wrong. \version 2.19.25 \relative c'{ \time 4/4 \partial 4 c | d e f g | f2. %\bar || \partial 4*0 \time 3/4 R2.*3 | f4 ( a f ) | f2. R2.*3 | } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Possible bug with new \partial
Am 16.08.2015 um 22:32 schrieb Mats Bengtsson: On 08/16/2015 10:05 PM, Simon Albrecht wrote: Hello Mats, IIUC \partial serves to insert an additional amount of time, however in this example we actually need to skip a beat – thus call \partial with a negative duration, which is impossible :-) So you need to insert \set Timing.measureLength = #(ly:make-moment 3/4) before the second bar in your example. Is this documented differently? Else I wouldn’t consider it a bug, rather an inherent limitation. Please note that \partial has been changed very recently in the 2.19 versions. The documentation for 2.19.25, http://lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#index-_005cpartial-1 says that the duration specifies the remaining length of the current measure, which in my example is zero. You’re right of course. I should’ve looked there. Note also that my example works fine if I remove the R2*3 line directly below \time 3/4. Not quite: no (default) bar line is drawn. Apparently, the crucial sentence is the last one in the NR section: ‘The |\partial| command sets the |Timing.measurePosition| property, which is a rational number that indicates how much of the measure has passed.’ I had tried to set measurePosition directly, but when used immediately before the new \time, neither 0 nor 4/4 worked as values. What does work as expected is inserting \partial 2. at the beginning of bar 2, so probably we should document that the ‘remaining length of the current measure’ given through \partial can’t be zero. Yours, Simon /Mats Yours, Simon Am 16.08.2015 um 21:28 schrieb Mats Bengtsson: Hi, I tried version 2.19.25 to typeset a piece that changes from 4/4 with an upbeat to 3/4 without an upbeat, in the middle of the piece. The new \partial handling worked for all parts, except a part that started with a multimeasure rest. Here's a small example illustrating the problem. Uncommenting the \bar line makes things slightly better but still wrong. \version 2.19.25 \relative c'{ \time 4/4 \partial 4 c | d e f g | f2. %\bar || \partial 4*0 \time 3/4 R2.*3 | f4 ( a f ) | f2. R2.*3 | } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Possible bug with new \partial
Hi, I tried version 2.19.25 to typeset a piece that changes from 4/4 with an upbeat to 3/4 without an upbeat, in the middle of the piece. The new \partial handling worked for all parts, except a part that started with a multimeasure rest. Here's a small example illustrating the problem. Uncommenting the \bar line makes things slightly better but still wrong. \version 2.19.25 \relative c'{ \time 4/4 \partial 4 c | d e f g | f2. %\bar || \partial 4*0 \time 3/4 R2.*3 | f4 ( a f ) | f2. R2.*3 | } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Enhancement: Implement parenthesizing spanners
Lily is being very honest and makes a kind warning telling us that she doesn’t know how to parenthesize spanners. But it would be really nice if we could teach her that :-) %% \relative { c''-\parenthesize \ c c c c2\! -\parenthesize ~ c } %% https://code.google.com/p/lilypond/issues/detail?id=4565 ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Possible bug with new \partial
On 08/16/2015 10:05 PM, Simon Albrecht wrote: Hello Mats, IIUC \partial serves to insert an additional amount of time, however in this example we actually need to skip a beat – thus call \partial with a negative duration, which is impossible :-) So you need to insert \set Timing.measureLength = #(ly:make-moment 3/4) before the second bar in your example. Is this documented differently? Else I wouldn’t consider it a bug, rather an inherent limitation. Please note that \partial has been changed very recently in the 2.19 versions. The documentation for 2.19.25, http://lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#index-_005cpartial-1 says that the duration specifies the remaining length of the current measure, which in my example is zero. Note also that my example works fine if I remove the R2*3 line directly below \time 3/4. /Mats Yours, Simon Am 16.08.2015 um 21:28 schrieb Mats Bengtsson: Hi, I tried version 2.19.25 to typeset a piece that changes from 4/4 with an upbeat to 3/4 without an upbeat, in the middle of the piece. The new \partial handling worked for all parts, except a part that started with a multimeasure rest. Here's a small example illustrating the problem. Uncommenting the \bar line makes things slightly better but still wrong. \version 2.19.25 \relative c'{ \time 4/4 \partial 4 c | d e f g | f2. %\bar || \partial 4*0 \time 3/4 R2.*3 | f4 ( a f ) | f2. R2.*3 | } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond -- = Mats Bengtsson Signal Processing School of Electrical Engineering Royal Institute of Technology (KTH) SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: mats.bengts...@ee.kth.se WWW: http://www.ee.kth.se/~mabe = ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Possible bug with new \partial
My apologies for spamming the mailing list. After some more trials, I realize that the problem remains even if I write \partial after \time. Still, the problem only appears with multimeasure rests, as the two following examples illustrate: \version 2.19.25 % Working example \relative c'{ \time 2/4 \partial 4 c4 | d8 e f g | f4 \bar || \time 3/4 \partial 4*0 %R2.*3 | f4 ( a f ) | f2. } % Failing example \relative c'{ \time 2/4 \partial 4 c4 | d8 e f g | f4 \bar || \time 3/4 \partial 4*0 R2.*3 | f4 ( a f ) | f2. } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Possible bug with new \partial
I just realized that if i swap \partial and \time, it works as expected, at least if I explicitly specify the bar line: \version 2.19.25 \relative c'{ \time 4/4 \partial 4 c | d e f g | f2. \bar || %Removing this line still gives ugly collisions! \time 3/4 \partial 4*3 R2.*3 | f4 ( a f ) | f2. R2.*3 | } In a way, this is logical, since the \partial relates to the new time signature, not the previous one. Still, I'm confused that the problem only showed up when using a multimeasure rest directly after the \partial. /Mats On 08/16/2015 10:32 PM, Mats Bengtsson wrote: On 08/16/2015 10:05 PM, Simon Albrecht wrote: Hello Mats, IIUC \partial serves to insert an additional amount of time, however in this example we actually need to skip a beat – thus call \partial with a negative duration, which is impossible :-) So you need to insert \set Timing.measureLength = #(ly:make-moment 3/4) before the second bar in your example. Is this documented differently? Else I wouldn’t consider it a bug, rather an inherent limitation. Please note that \partial has been changed very recently in the 2.19 versions. The documentation for 2.19.25, http://lilypond.org/doc/v2.19/Documentation/notation/displaying-rhythms#index-_005cpartial-1 says that the duration specifies the remaining length of the current measure, which in my example is zero. Note also that my example works fine if I remove the R2*3 line directly below \time 3/4. /Mats Yours, Simon Am 16.08.2015 um 21:28 schrieb Mats Bengtsson: Hi, I tried version 2.19.25 to typeset a piece that changes from 4/4 with an upbeat to 3/4 without an upbeat, in the middle of the piece. The new \partial handling worked for all parts, except a part that started with a multimeasure rest. Here's a small example illustrating the problem. Uncommenting the \bar line makes things slightly better but still wrong. \version 2.19.25 \relative c'{ \time 4/4 \partial 4 c | d e f g | f2. %\bar || \partial 4*0 \time 3/4 R2.*3 | f4 ( a f ) | f2. R2.*3 | } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond -- = Mats Bengtsson Signal Processing School of Electrical Engineering Royal Institute of Technology (KTH) SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: mats.bengts...@ee.kth.se WWW: http://www.ee.kth.se/~mabe = ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond