lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spanner and epsfile


From: Thomas Morley
Subject: Re: spanner and epsfile
Date: Thu, 2 Nov 2017 00:28:01 +0100

2017-11-01 23:30 GMT+01:00 Bernardo Barros <address@hidden>:
> On 11/1/17 18:11, David Nalesnik wrote:
>>
>> Attached to the following is some code which will allow you to have
>> multiple TextSpanners per voice.  I haven't tried to apply it to your
>> use case, though.
>>
>> http://lists.gnu.org/archive/html/lilypond-user/2015-10/msg00551.html
>
>
> I see only one Spanner in the output [see image]
>
>

There was a change in type-predicate for spanner-id. It's now 'key?'.

In process-music of he engraver do

      ((process-music trans)
       ;; Move begun spanners from 'spanners' to 'finished'.  We do this
       ;; on the basis of 'spanner-id.  If we find a match--either
       ;; the strings are the same, or both are unset--a transfer
       ;; can be made.  Return a warning if we find no match: spanner
       ;; hasn't been properly begun.
       (for-each
        (lambda (es)
          (let ((es-id (ly:event-property es 'spanner-id)))
            (let loop ((sp spanners))
              (if (null? sp)
                  (ly:warning "No spanner to end!!")
                  (let ((sp-id (ly:event-property
                                (event-cause (cdar sp)) 'spanner-id)))
                    (cond
                     ((or
                       ;;(and
                       ;; (string? sp-id)
                       ;; (string? es-id)
                       ;; (string=? sp-id es-id))
                       (and
                        (index? sp-id)
                        (index? es-id)
                        (eqv? sp-id es-id))
                       (and
                        (null? sp-id)
                        (null? es-id)))
                      (set! finished (cons (cdar sp) finished))
                      (set! spanners (remove (lambda (s) (eq? s (car
sp))) spanners)))
                     (else (loop (cdr sp)))))))))
        stop-events)

Not sure if it's the best fix, but I need to find my bed, have to get
up at silly o'clock ...
At least it works now for 2.19.65 and 2.21.0 from master

Best,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]