[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to evaluate 'articulations entries?
From: |
Marc Hohl |
Subject: |
How to evaluate 'articulations entries? |
Date: |
Mon, 29 Aug 2011 18:07:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110805 Thunderbird/3.1.12 |
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
- How to evaluate 'articulations entries?,
Marc Hohl <=