|
From: | Urs Liska |
Subject: | Discern single note-event from one in a chord |
Date: | Sun, 1 Jul 2018 09:49:59 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Hi, is there a way to discern whether the ly:music? passed into a music function is a single note-event or a note within a chord? \version "2.19.80" testType = #(define-music-function (music)(ly:music?) (ly:message "Music type(s): ~a" (ly:music-property music 'types)) music) { \clef bass \testType c <c \testType e g> } prints `Music type(s): (event note-event rhythmic-event melodic-event)` in both cases.
Is there anything else besides the 'types music-property I can check for in this context? I hope there is because there are many respects in which the two would have to be treated differently. Is there maybe a way to get to a music's "parent" in order to check what type that is?
Thanks |
[Prev in Thread] | Current Thread | [Next in Thread] |