Marc Hohl schrieb:
[...]
Meanwhile, it tried to expand your function by adapting some lsr
snippets,
http://lsr.dsi.unimi.it/LSR/Item?id=82
http://lsr.dsi.unimi.it/LSR/Item?id=696
Playing (or struggling?) with the latter, I came up with the following:
---8<---
\version "2.13.32"
#(define (make-harmonic music)
(let (
(eventname (ly:music-property music 'name))
(elts (ly:music-property music 'elements))
(elt (ly:music-property music 'element))
)
(if (pair? elts)
(begin
(if (and (eq? eventname 'EventChord)
(eq? (ly:music-property (car elts) 'name) 'NoteEvent))
(set! (ly:music-property music 'elements)
(append elts (list 'articulations (list (make-music
'HarmonicEvent))))))
(map make-harmonic elts)))
(if (ly:music? elt)
(make-harmonic elt))
music
))
makeHarmonic = #(define-music-function (parser location music) (ly:music?)
(make-harmonic music)
)
\relative c' {
\displayMusic <a\harmonic >4
\displayMusic { \makeHarmonic { g f < c e > } }
}
---8<---
but as you can see in the output on the console, the 'articulations is still
at the same lavel as 'elements, not inside the 'elements list.
How can I place the 'articulations entry in the appropriate hierarchy level?
but all I can achieve so far is either an unchanged note head or a
segfault :-(
The segfault disappeared, but the note heads are (of course) still
unchanged.
TIA
Marc
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user