lilypond-user
[Top][All Lists]
Advanced

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

Re: modular "markup" and arguments


From: Bric
Subject: Re: modular "markup" and arguments
Date: Tue, 05 Nov 2013 19:44:04 -0500
User-agent: PlutoMail 2.0


On 11/05/2013 03:08 PM, David Kastrup wrote:
Paul Morris <address@hidden> writes:

But I think what you really want is a music function:

\version "2.17.29"

boo =
#(define-music-function
      (parser location the-music)
      (ly:music?)
    #{
      \override NoteHead.color = #red
      #the-music
      \revert NoteHead.color
    #})

\relative c' { c4 d e f \boo { g a b } c d e }
For such fixed override/revert pairings you should write
\temporary\override in the music function instead of just \override:
otherwise any previous \override NoteHead.color = #blue will get
overwritten and not get restored afterwards.



You rock!  This forum rocks!  Lilypond rocks!

That said:  how do I parametrize \boo ?

With the color as parameter, for example, for something like:

c4 d e f \boo #'red { g a b } c d e f8 g \boo #'blue { b d a4 d } dis e fis

I realize I'm completely clueless about the syntax






reply via email to

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