Hi Stefan,

Probably it's best to create a macro just like you've done, but use \once
\override. Then you can call the macro immediately before each mute spanner.
And your settings will apply to your mute spanners only.

(On the other hand, if your score contained only these mute spanners, then
it would make sense to make all of these settings global and enduring with
\override like you have now, possibly even in the \layout block.)

Trevor.

2008/2/22 Stefan Thomas <[EMAIL PROTECTED]>:

> Dear Trevor,
> many thanks for Your very useful tip and Your excellent explanations! It
> works exactly, how I want to have it.
> One last question: If I use later in the score other text-spanners (like
> e.g. ritardando ) do I have to revert the settings? Or would it maybee
> better to use \once \override instead of \override?
>
> 2008/2/22, Trevor Bača <[EMAIL PROTECTED]>:
>
> > On Fri, Feb 22, 2008 at 6:06 AM, Stefan Thomas <
> > [EMAIL PROTECTED]> wrote:
> >
> > > Dear lilypond users,
> > > in the below quoted file, the end of the text spanner is a little bit
> > > to early, in my opinion. What can I do, to move it a little to the right?
> > > Thanks for Your help
> > > Stefan
> > >
> > > mute = {\textSpannerUp \override TextSpanner #'bound-details #'left
> > > #'text = \markup {\italic "mute" } \override TextSpanner #'style =
> > > #'dashed-line \override TextSpanner #'dash-period = #0.01 \override
> > > TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . 
> > > -1)
> > > } }
> > >
> > >  \relative
> > > { \mute d\startTextSpan e f e d2\stopTextSpan c1 
> > > }<http://lists.gnu.org/mailman/listinfo/lilypond-user>
> >
> >
> >
> > Hi Stefan,
> >
> > There's an #'attach-dir property that's useful for this sort of thing.
> > TextSpanner #'left #'attach-dir defaults to #-1 (meaning the left edge of
> > the parent notehead). This makes sense. Oddly, however, TextSpanner #'right
> > #'attach-dir likewise defaults to #-1. This is weird. It would be better for
> > TextSpanner #'right #'attach-dir to default to #1 (meaning the *RIGHT* edge
> > of the parent notehead).
> >
> > Fortunately, this is easy to override:
> >
> > %%% BEGIN %%%
> >
> > \version "2.11.34"
> >
> > mute = {
> >    \textSpannerUp
> >    \override TextSpanner #'bound-details #'left #'text =
> >       \markup {\italic "mute" } \override TextSpanner #'style =
> >          #'dashed-line
> >    \override TextSpanner #'dash-period = #0.01
> >    \override TextSpanner #'bound-details #'right #'attach-dir = #1
> >    \override TextSpanner #'bound-details #'right #'text =
> >       \markup { \draw-line #'(0 . -1) }
> >    }
> >
> >  \relative
> > { \mute d\startTextSpan e f e d2\stopTextSpan c1 }
> >
> > %%% END %%%
> >
> >
> > Now the spanner nib lines up exactly at the right edge of the final
> > notehead.
> >
> > Personally, I prefer the spanner to be even a bit longer in the X
> > direction. There's a padding attribute that is helpful here:
> >
> >
> > %%% BEGIN %%%
> >
> > \version "2.11.34"
> >
> > mute = {
> >    \textSpannerUp
> >    \override TextSpanner #'bound-details #'left #'text =
> >       \markup {\italic "mute" } \override TextSpanner #'style =
> >          #'dashed-line
> >    \override TextSpanner #'dash-period = #0.01
> >     \override TextSpanner #'bound-details #'right #'attach-dir = #1
> >    \override TextSpanner #'bound-details #'right #'text =
> >       \markup { \draw-line #'(0 . -1) }
> >    \override TextSpanner #'bound-details #'right #'padding = #-0.5
> >    }
> >
> >  \relative
> > { \mute d\startTextSpan e f e d2\stopTextSpan c1 }
> >
> >
> > %%% END %%%
> >
> >
> > Note that you could make all of your adjusts using only #'right
> > #'padding. But it's better to set #'right #'attach-dir first, and then save
> > #'right #'padding for optical tweaks only.
> >
> >
> >
> >
> > --
> > Trevor Bača
> > [EMAIL PROTECTED]
>
>
>


-- 
Trevor Bača
[EMAIL PROTECTED]
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to