[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: map-some-music question
From: |
Gilles THIBAULT |
Subject: |
Re: map-some-music question |
Date: |
Sat, 11 Oct 2014 03:12:04 +0200 |
User-agent: |
KMail/4.11.4 (Linux/3.14.18-desktop-3.mga4; KDE/4.11.4; x86_64; ; ) |
> So the following does what you want because the lambda returns #f
> You may also want to look at "music-map", also defined in
> music-functions.scm.
+1 but music-map will not show the tied event, because music-map doesn't care
of 'articulation property (in my memory, in the past, it does). So you have to
make it by hand.
%%%%%%%
\version "2.18.2"
#(define (name-of music) (display-scheme-music (ly:music-property music
'name)))
#(define (show-names music)
(let ((elts (ly:music-property music 'elements))
(elt (ly:music-property music 'elements))
(arti (ly:music-property music 'articulations)))
(name-of music)
(if (ly:music? elt) (show-names elt))
(if (pair? elts)(map show-names elts))
(if (pair? arti) (map show-names arti))
music))
musNam = #(define-music-function (parser location myx ) (ly:music?)
(show-names myx))
music = {c ~ c}
\musNam #music
%%%%%%%
NB
Reading "music-function.scm", you can see that music-filter does care of
'articulation property, but i don't really understand why music-map doesn't.
--
Gilles