[Top][All Lists]

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

Re: LSR 507 (ghost voice) broken since 2.15.28

From: David Kastrup
Subject: Re: LSR 507 (ghost voice) broken since 2.15.28
Date: Thu, 16 May 2013 13:17:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Eluze <address@hidden> writes:
>> LSR 507 <http://lsr.dsi.unimi.it/LSR/Item?id=507> produces erroneous
>> code since version 2.15.28:
>> mus = { c4 d e f |}
>> \displayLilyMusic \ghostMusic \mus
> That's fallout from issue 2240, Patch: Don't wrap EventChord around
> rhythmic events by default.  It won't be the only affected item.
> The basic question is when should we be migrating the LSR to 2.16.
> In this particular case, only the first of several "adjacent" spacers is
> retained.  The reason for that apparently is to avoid <c e> getting
> turned into what amounts to <s s>.  I don't think that this
> simple-minded approach is all too likely to lead to sane results without
> more effort, even pre-2.15.28.  So my take on this would be to just junk
> the music-filter expression.  This is going to lead to constructs
> occasionally that one can't actually enter, but which should at least
> compile reasonably well.

In a nutshell:

ghostMusic =
#(define-music-function (parser location music) (ly:music? )
  (music-map (lambda (x)
              (let ((dur (ly:music-property x 'duration)))
               (if (ly:duration? dur)
                (apply make-music 'SkipEvent
                  (ly:music-mutable-properties x)))

notes = { a2-"hello" b4 r b2 a-"bye" <c e g c' e' g'>1-"oho ;-)" }

\ghostMusic \notes

This is not going to work out of the box with chord repetitions.

David Kastrup

reply via email to

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