[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RhythmicStaff issues in a snippet
From: |
David Kastrup |
Subject: |
Re: RhythmicStaff issues in a snippet |
Date: |
Fri, 20 Jul 2012 21:52:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Reedmace Star <address@hidden> writes:
> * 2012-07-20 17:39 +0200 David Kastrup:
>> Dominique Faure <address@hidden> writes:
>> > Despite the RhythmicStaff is simplifying the process, how
>> > could I make it display chord of dotted notes as single dotted
>> > notes?
>> > Dots are kept unmerged. Is it a bug?
>>
>> Calling it a bug seems like a reasonable interpretation of the
>> behavior.
>
> Sounds like issue #185.
>
> <http://code.google.com/p/lilypond/issues/detail?id=185>
>
> (Last time I checked, this was the eleventh-oldest open issue in the
> tracker.)
>
>> You might want to pass your music through the following
>> music function. It goes to a bit of effort to make sure that accents
>> survive.
>>
>> thinout =
>> #(define-music-function (parser location music) (ly:music?)
>> (for-some-music
>> (lambda (m)
>> (and (music-is-of-type? m 'event-chord)
>> (let ((elts (ly:music-property m 'elements)))
>> (if (pair? elts)
>> (set-cdr!
>> elts
>> (filter!
>> (lambda (m) (not (ly:music-property m 'duration #f)))
>> (cdr elts))))
>> #t)))
>> music)
>> music)
>>
>> \new RhythmicStaff
>> \thinout
>> \relative c { <d, g d'>4 e f8 g a4 <d b g>2. c4 d4. e8 f4 g }
>
> Similar workarounds have been posted on this list before, but I think
> this is the most compact one I have seen so far. I'm adding a comment to
> the report to document it.
Well, my first version was
thinout =
#(define-music-function (parser location music) (ly:music?)
(map-some-music
(lambda (m)
(and (music-is-of-type? m 'event-chord)
#{ c$(duration-of-note m) #}))
music))
which is quite funnier but loses accents on chords.
--
David Kastrup