[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modular "markup" and arguments
From: |
Paul Morris |
Subject: |
Re: modular "markup" and arguments |
Date: |
Tue, 5 Nov 2013 11:28:52 -0800 (PST) |
Bric wrote
> I want the ability to distribute the effect of "\boo" to a SET of notes.
>
> Such as \boo { dis' e' fis' g' }
>
> where all the four notes are affected by boo.
>
> I tried using
>
> boo = { \override NoteHead.color = #red }
>
> and then \boo dis' e' fis' g \revert
>
> but that, of course, is incorrect syntax.
I think to get this to work you have to say what it is you want to revert?
You could do it like this:
\version "2.17.29"
boo = { \override NoteHead.color = #red }
revertboo = { \revert NoteHead.color }
{ a' \boo dis' e' fis' g \revertboo b }
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 more about music functions, see the docs:
http://lilypond.org/doc/v2.17/Documentation/extending/music-functions
HTH,
-Paul
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/modular-markup-and-arguments-tp153423p153425.html
Sent from the User mailing list archive at Nabble.com.
- modular "markup" and arguments, Bric, 2013/11/05
- Re: modular "markup" and arguments, Urs Liska, 2013/11/05
- Re: modular "markup" and arguments,
Paul Morris <=
- Re: modular "markup" and arguments, David Kastrup, 2013/11/05
- Re: modular "markup" and arguments, Johan Vromans, 2013/11/05
- Re: modular "markup" and arguments, David Kastrup, 2013/11/05
- Re: modular "markup" and arguments, Johan Vromans, 2013/11/06
- Re: modular "markup" and arguments, David Kastrup, 2013/11/06
- Re: modular "markup" and arguments, David Kastrup, 2013/11/06
- Re: modular "markup" and arguments, David Kastrup, 2013/11/06