|
From: | lilypond |
Subject: | RE: Identifying non-chord notes in Scheme |
Date: | Wed, 27 Nov 2019 17:45:46 +0100 |
Steve, When you see the music _expression_ as a tree, then the NoteEvent’s belonging to a chord are branches of an EventChord. This is for all chords including <a c>4 etc. And as an extra bonus: When you have chords like “c:7+” the EventChord’s are branches (or sub-branches) of an ContextSpeccedMusic event with the music-attribute ‘context-type’ = “ChordsName” Jaap Van: lilypond-user <lilypond-user-bounces+lilypond=address@hidden> Namens Steve Cummings What's the test for differentiating between non-chord notes and notes within a chord, when iterating through events in music? I can examine the notes within a chord individually, but I can't been able to find the way to capture notes that don't belong to a chord (or alternatively, to discard note events do belong to a chord). Leaning heavily on code from Giles T, here's a simple routine that displays pitches of note events when they are encountered as such, and also when they occur within a chord. If the goal is to process non-chord notes only, how can I pick them out? In the listing below I've marked relevant places with "<<--" Thanks, \version "2.19" #(use-modules (ice-9 receive)) %% so 'receive' can be used #(define (noteEvent? music) |
[Prev in Thread] | Current Thread | [Next in Thread] |