tst =
#(define-music-function (parser location music) (ly:music?)
(music-map
(lambda (m) (if (music-is-of-type? m 'note-event) m))
music))
\tst { b-2 }
da die procedure die music-map über music laufen lässt, unspecified zurückgibt sobald kein note-event vorliegt.
music = \relative c' {
c4 c c
\tag #'atemz { c \breathe }
\tag #'pausez { c8 r }
c4 c c c
}
\score {
\keepWithTag #'atemz
\music
\layout {}
}
\score {
\keepWithTag #'pausez
\music
\midi {}
}