[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TextSpanner listener text scheme
From: |
Graham Percival |
Subject: |
TextSpanner listener text scheme |
Date: |
Sat, 19 Feb 2011 19:58:54 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Where does TextSpanner hide its text? I'm trying to extract the
text (i.e. "II" or "IV") from a TextSpanner. I've realized that
it isn't part of the text-spanner-event (sob), but as far as I can
tell, it's not in the TextSpanner context either!
What am I missing? example attached and inline (it's a bit too
big for my tastes with inline, but you can skim it quickly that
way)
Cheers,
- Graham
\version "2.13.40"
\relative c' {
\override TextSpanner #'(bound-details left text) = "II"
d4 fis\startTextSpan a b\stopTextSpan
}
#(define (format-textspan engraver event)
(let* ((context (ly:translator-context engraver))
(moment (ly:context-current-moment context)))
(display event)
(display "\n")
; (display (ly:event-property event 'bound-details))
; (display "\n")
(display
(ly:context-property context 'TextSpanner )
)
(display "\n")
(display "\n")
))
\layout {
\context {
\Staff
\consists
#(list
(cons 'listeners
(list
(cons 'text-span-event format-textspan)
)))
}
}
foo.ly
Description: Text document
- TextSpanner listener text scheme,
Graham Percival <=