Hello list,
I think I have asked a similar question long time ago, but I didn't
find the answer.
Currently, I am working on a little scheme engraver which should read the
'string-number, if given, and should do some calculations, depending on
other articulations, like 'HarmonicEvent.
This is what I got so far:
[snip]
\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))
;;(type (ly:music-property art 'string-number)) <-
this does not work
)
(display "The event: ")
(display "ev")
(display " has pitch: ")
(display pitch)
(display " and articulation: ")
(display art)
(display " and type: ")
(display type)
(display " \n")
)
) ;; end lambda (note)
notes)))
(stop-translation-timestep
. ,(lambda (trans) (set! notes '()))))))
\layout {
\context {
\Voice
\consists \test_engraver
}
}
test = \relative c' {
c4 d\2 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 }
[snip]
How can I proceed?
Thanks in advance,
Marc
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user