Hi, all.
This is a working example that I got from the LSR. It is used with
\applyOutput:
#(define (mc-squared grob grob-origin context)
(let*
(
(ifs (ly:grob-interfaces grob))
(sp (ly:grob-property grob 'staff-position))
)
(if (memq 'note-head-interface ifs)
(begin
(ly:grob-set-property! grob 'stencil ly:text-interface::print)
(ly:grob-set-property! grob 'font-family 'roman)
(ly:grob-set-property! grob 'text
(make-raise-markup -0.5
(case sp
((-5) (make-simple-markup "m"))
((-3) (make-simple-markup "c "))
((-2) (make-smaller-markup (make-bold-markup "2")))
(else (make-simple-markup "bla"))
))))
)))
In this line:
(sp (ly:grob-property grob 'staff-position))
The staff position of the note is assigned to the variable sp. How
could I get the fingering digit of the note? For example:
c''-3
I want to programmatically get the "3" as a number or text.
Also, the \applyOutput command only seems to run once. I was expecting
to apply to all occurrences in the Voice when used like this:
\context Voice \relative c' {
\applyOutput #'Voice #mc-squared
{
<d f g b>2
<d f g b>
<d f g b>
<d f g b>
<c e g>1 |
c2-1 c'-2 |
b4 \displayMusic {g8} a b4-3 c |
c,2 a'-4 |
g1 |
}
}
Thanks,
-Eric
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user