On Thu, Jan 16, 2020 at 3:15 AM Aaron Hill <lilyp...@hillvisions.com> wrote:

> On 2020-01-15 5:15 pm, Paolo Prete wrote:
> > Hello,
> >
> > is it possible to override a property of StaffSymbol outside a
> >  \new Staff \with { ... }
> > context?
> >
> > I would like to obtain something like:
> >
> > %%%%%%%%%%%%%%%%%%%
> >
> > #scheme-code-for-overriding-staffsymbol-for-all-the-staves-in-the-score
> > {
> >   c' c' c' c'
> > }
> >
> > %%%%%%%%%%%%%%%%%%%
>
> Without needing to mess with Scheme, you can do this using the \layout
> block providing you want to change all staves:
>
> %%%%
> \version "2.19.83"
>
> \layout {
>    \context {
>      \Staff
>      \override StaffSymbol.color = #red
>    }
> }
>
> \new Staff { b'4 }
> \new Staff { b'4 }
> \new Staff { b'4 }
> %%%%
>
> (That is a top-level \layout block, but the same can be done within a
> \score to scope the effect.)
>      \name RedStaff
>      \alias Staff
>      \override StaffSymbol.color = #red
>    }
>    \inherit-acceptability RedStaff Staff
> }
>
>
Sorry Aaron, I was not precise in my question.
I need to override a property of StaffSymbol, for every staff, outside any
music expression/block context. Probably I'm not using the right words even
now.
But what I need is a sort of a "global" variable which is set for any staff
without having to put it into some music expression (like \layout {\context
{...}} , or \new Staff \with { ... } etc.).
This is why I asked if is there a Scheme solution

thanks!
Paolo

Reply via email to