|
From: | lilypond |
Subject: | RE: Identifying non-chord notes in Scheme |
Date: | Wed, 27 Nov 2019 18:43:24 +0100 |
Steve, I’m not familiar with music-map, but I know you can modify music using music-map. How about doing it twice: First time you add a (ly:music-set-property! note ‘my-chord ‘yes) to the notes inside the EventChord, and the second time you can identify the notes from the chords using the music property my-chord Jaap Van: lilypond-user <lilypond-user-bounces+lilypond=address@hidden> Namens Steve Cummings Jaap, thank you for taking this up but I'm not sure whether your answer helps--yes, I can find notes within chords because they are branches of EventChord, but those same notes also occur as individual NoteEvent events *before* the EventChord event. If I'm trying to extract or otherwise process only notes that *don't* belong to any chord, waiting for the ChordEvent that follows and then backtracking would be complicated. I should think I could check some property of a NoteEvent ("parent" or "chord" would be nice). So is there any way to tell that a note is *not* a branch (a leaf?) on any EventChord event? Notice that I'm using "music-map" to get a list of the events, and the list it generates includes chord notes twice: first as separate NoteEvents and then again as members of the Chord of which they are branches/members. If there's no simple way to look at a NoteEvent and tell whether it is part of a chord, maybe there's a different way to get a list of music events that doesn't have this duplication of chord notes. Or maybe there's a different way entirely to approach the problem of processing/extracting non-chord notes. Thanks for pointing out ContextSpeccedMusic. address@hidden wrote on 11/27/2019 8:45 AM:
|
[Prev in Thread] | Current Thread | [Next in Thread] |