lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stupid substitution


From: Nicolas Sceaux
Subject: Re: stupid substitution
Date: Thu, 16 Nov 2006 20:31:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Mats Bengtsson <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]