\version "2.15.9" #(define-public (test_engraver context) (let ((string-pitch-list '()) ;; actually not used (notes '())) `((acknowledgers (note-head-interface . ,(lambda (trans grob source) (set! notes (cons grob notes))))) (process-acknowledged . ,(lambda (trans) (for-each (lambda (note) (let* ((event (event-cause note)) (pitch (ly:event-property event 'pitch)) (art (ly:event-property event 'articulations)) ;; art is a LIST of events, so you have to filter out ;; all string-number events (nrs (filter (lambda (s) (not (null? s))) (map (lambda (a) (ly:event-property a 'string-number)) art))) ;;(type (ly:music-property art 'string-number)) <- this does not work ) (display (extract-named-music art "ArticulationEvent")) (display "The event: ") ;;(display event) (display " has pitch: ") ;;(display pitch) (display " and articulation: ") (display art) (display " and string numbers: ") (display nrs) (display " \n") ) ) ;; end lambda (note) notes))) (stop-translation-timestep . ,(lambda (trans) (set! notes '())))))) \layout { \context { \Voice \consists \test_engraver } } test = \relative c' { % c4 %e\2 % f g\4 a\4 b\4 < g\4\harmonic > % c4\3 < d\3 g\2> c\3 r } %\displayMusic { \test } \new Voice { \test }