Could/did you add this to the LSR?
Why not, but not before 1 or 2 days, I have to finish a score before
tomorow. (Working on this snippet was already not very reasonable ...).
I have however change a bit the snippet. It is now cleaner because it
deletes all tie events.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tiedNoteToSkip = #(define-music-function (parser location music) (ly:music?)
(let ((prev-was-tie? #f))
(define (tied-note->skip evt)
(let ((elt (ly:music-property evt 'element))
(elts (ly:music-property evt 'elements))
(name (ly:music-property evt 'name)))
(cond ((and prev-was-tie? (eq? name 'EventChord))
(set! prev-was-tie? #f)
(skip-of-length evt))
((eq? name 'TieEvent)
(set! prev-was-tie? #t)
#f) ;; all tie events will be deleted
(else
(if (ly:music? elt) (ly:music-set-property! evt 'element
(tied-note->skip elt)))
(if (pair? elts) (ly:music-set-property! evt 'elements
(filter-map tied-note->skip elts)))
evt))))
(tied-note->skip music)))
mymusic = { c'4 c' ~ c'2 }
\score {
<<
\new Voice \mymusic
\context NoteNames \displayMusic \tiedNoteToSkip \mymusic
>>
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
It should be the default behaviour IMHO (or at least a possible tunable
option).
Well, i never use the NoteNames context, so i have no ideas how it should
behaves.
Gilles, going back at work ...
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user