Thanks all,

I figured out last night where to put the overrides to make them work. 

r4 d4 \p d d  \repeat "unfold" 3 {d1~}  \once \override Hairpin #'color = 
#blue d1 \<  d1  d1  d1 
                \once \override DynamicText #'color = #blue d4 \f d d d \p 
d \once \override DynamicTextSpanner #'color = #blue \cresc d d \f d |

So the override goes immediately before the note which a \f or \< is 
connected to, and it goes immediately before a \cresc 
(DynamicTextSpanner).

Now, Mats' solution I don't get. Why does the override go *after* the \cr?

My last question is where to put the variable definition

blueDyn = \once \override Hairpin #'color = #blue

When I put it at the top of the file, it gives errors:

Parsing...
c:/Program Files/LilyPond/usr/share/lilypond/current/ly/english.ly:15:0: 
error: syntax error, unexpected STRING

pitchnamesEnglish = #`(
c:/Program Files/LilyPond/usr/share/lilypond/current/ly/english.ly:130:13: 
error: unknown escaped string: `\pitchnamesEnglish'
pitchnames = 
             \pitchnamesEnglish

etc.



Tim Reeves



"Trevor Daniels" <[EMAIL PROTECTED]> wrote on 04/09/2008 02:44:21 AM:

> 
> Tim Reeves wrote
> > Well, it helps some, but why do I get an error when I try the same 
thing 
> > with hairpins?
> > 
> > error: syntax error, unexpected EVENT_IDENTIFIER
> > 
> >                r4 d4 \p d d | \repeat "unfold" 4 {d1~} | d1 \once 
> > \override Hairpin #'color = #blue   \cr | d1 | d1 \f
> 
> The error is due to the \cr not being attached to a note, not the 
override.
> 
> It sometimes helps to attach dynamics to a zero-length spacer note - 
s1*0.
> 
> > and where can I put the variable redDyn in my .ly file? Everywhere I 
try 
> > seems to give me errors, which is why I just put the \override right 
in 
> > with the music.
> 
> Here's your example adjusted to work:
> 
> blueDyn = \once \override Hairpin #'color = #blue
> \relative c'' {
>   r4 d4 \p d d |
>  \blueDyn s1*0 \cr
>   \repeat "unfold" 4 {d1~} | d1  | d1 | d1 \f
> }
> 
> > Finally, when does one have to include the context, like \once 
\override 
> > Voice.DynamicText #'color = #blue?
> 
> For this, read the Learning Manual ... :)
> 
> > Thanks for your help.
> > 
> > Tim Reeves
> >
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to