[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing parameter
From: |
David Kastrup |
Subject: |
Re: passing parameter |
Date: |
Sat, 22 Mar 2014 13:30:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> nS =
> #(define-music-function (parser location color)(color?)
> #{
> \override NoteHead #'layer = #2
> \override NoteHead.color = $color
> \override Stem.color = #blue
> \override Beam.color = #blue
> \override Tie #'color = #blue
> \override Slur.color = #blue
> \override Dots #'layer = #2
> \override Dots #'color = #blue
> \override Rest.color = #blue
> #})
>
> \relative c' {
> c d \nS #red e( f) \nS #blue g1
> }
>
> You may consider using \temporary \override (rather new syntax)
\temporary \override basically only makes sense when you are doing a
corresponding \revert in the same command.
Note that you can with the above definition still write
\temporary \nS #red c d e f \undo \nS #red
in order to make a temporary change.
> And you should add another function that \revert-s the properties.
nSrevert = \undo \nS #red
It's not even cheesy but rather the main purpose of \undo.
--
David Kastrup