Hello users,
I bet this is a simple one. How do I read the value of an object property
for use in a markup string? For example, how do I get the value of
'currentBarNumber' and use in place of 'x' in the following code?
===== ex 1 ==========
\version "2.6.3"
\score {
\relative c'{
c1
\mark \markup {"<" x ">"}
c
}
\layout{ raggedright = ##t }
}
====================
Obviously, I am trying to tweak how bar numbers are generated. I am
interested, in general, in the syntax for using an object property/value in
a markup string. I am not simply looking for ways to format bar numbers
(e.g. <>, boxes, circles). I have the regular BarNumber and RehearsalMark
stuff working, and the following snippit works as it should.
===== ex 2 ===========
\set Score.markFormatter = #(lambda (mark context)
(make-bold-markup
(make-box-markup
(number->string (ly:context-property context
'currentBarNumber)))))
\mark \default
====================
I can not, however, figure out how to translate the use of
'currentBarNumber' in ex. 2 for use in ex. 1.
Lily is great!
Thanks,
Pete
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user