Mats Bengtsson <[EMAIL PROTECTED]> writes:

> yota moteuchi wrote:
>> [...]
>> displayBarNum = #(define-music-function (parser location) ()
>>  #{
>>    \once \override Score.BarNumber #'break-visibility = ##f
>>  #})
>> [...]
>> I hope the syntax is not too bad (the result is correct though)
>> If I'm wrong or if there is easier way to do this "pure text"
>> substitution, please correct me
>>
> In this situation, there is no need for a music function, just use a
> normal identifier
Yota,

Mats is right. But just for the record: music functions with no argument
still have their use, for instance:

displayBarNum =
#(define-music-function (parser location) ()
   (if (eq? #t (ly:get-option display-bar-numbers))
       #{ \once \override Score.BarNumber #'break-visibility = ##f #}
       #{#}))

Then, having used \displayBarNum inside the score, the actual displaying
of bar numbers is triggered by a command line option:

  lilypond -d display-bar-numbers foo.ly

It's valuable when you make different editions of the same score to
enable or disable some features that way (using different clefs,
transposing parts, etc).

nicolas


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to