Hi, I'm trying to make a function to add a glissando to the last note of a music expression. I've got to a version which works with simple music expressions. However, I need to use it with transposed and relative music where the actual notes may be nested within other lists.
How do I recurse into the music to find the SequentialMusic elements? \version "2.18.2" addGliss = #(define-music-function (parser location music) (ly:music?) "Add a GlissandoEvent to the last element of music" (let* ((gliss-note (last (ly:music-property music 'elements)))) (set! (ly:music-property gliss-note 'articulations) (cons (make-music 'GlissandoEvent) (ly:music-property gliss-note 'articulations))) music)) mynotes = { c' d' e' } { % works with above function \addGliss { c' d' e' } c' \addGliss \mynotes c' % doesn't work with more complex music %\addGliss \relative c' { c d e } c %\addGliss \transpose c e \relative c' { c d e } c } -- Mark Knoop _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user