Hi,
based on the idea of http://lsr.dsi.unimi.it/LSR/Item?id=372 I created this
small function that creates a filtering function to remove certain event types
from a music expression:
#(define-public (define-music-event-filter names)
(define-music-function (parser location music) (ly:music?)
(music-filter
(lambda (event) (not (member (ly:music-property event 'name) names)))
music)))
This function can then be used to create a custom filtering function like
this:
filterdynamics = #(define-music-event-filter
'(AbsoluteDynamicEvent CrescendoEvent DecrescendoEvent TextScriptEvent))
music = \relative c' {
c\p\< d e f g\ff
}
\score { \new Staff \filterdynamics \music }
This makes using this idea easier: you don't have to copy and re-edit the
filterOneEvent function each time. Filtering music expressions is useful to
e.g. create a piano reduction from orchestral parts.
best regards,
Wilbert Berendsen
--
Frescobaldi, LilyPond editor for KDE: http://www.frescobaldi.org/
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user