[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LSR 507 (ghost voice) broken since 2.15.28
From: |
Eluze |
Subject: |
Re: LSR 507 (ghost voice) broken since 2.15.28 |
Date: |
Thu, 16 May 2013 07:08:18 -0700 (PDT) |
dak wrote
> David Kastrup <
> dak@
> > writes:
>
>> David Kastrup <
> dak@
> > writes:
>>
>>> Eluze <
> eluzew@
> > 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
>> (flatten-alist
>> (ly:music-mutable-properties x)))
>> x)))
>> music))
>>
>>
>> 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.
>
> And here is a version that should work both with 2.14 as well as 2.16
> and be fine with chord repetitions.
thanks, David, this works perfect!
to avoid warnings and errors I have removed a few engravers - in my case
these were
\layout {
\context {
\Voice
\remove Arpeggio_engraver
\remove Beam_engraver
\remove Grace_beam_engraver
\remove Slur_engraver
\remove Tie_engraver
\remove Tuplet_engraver
…
and others in other contexts
}}
maybe the snippet should point to this?!
Eluze
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/LSR-507-ghost-voice-broken-since-2-15-28-tp146000p146006.html
Sent from the Bugs mailing list archive at Nabble.com.