lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying Stencil for Clef


From: Richard Shann
Subject: Re: Modifying Stencil for Clef
Date: Fri, 22 Feb 2019 16:51:52 +0000

On Fri, 2019-02-22 at 13:35 +0100, David Kastrup wrote:
> Richard Shann <address@hidden> writes:
> 
> > On Fri, 2019-02-22 at 23:00 +1100, Andrew Bernard wrote:
> > > Hi Richard,
> > > This came up in relation to something I was doing only a week or
> > > so
> > > ago. Have a look here:
> > > 
> > > https://lists.gnu.org/archive/html/lilypond-user/2019-02/msg00297
> > > .htm
> > 
> > Thank you!
> > It seems I have to prefix the layout object Clef with Staff. So 
> > 
> > \version "2.18.2"
> > { 
> >   c'
> >   \once \override Staff.Clef.stencil = #ly:text-interface::print 
> >   \once \override Staff.Clef.text = \markup{T}
> >   \clef bass 
> >   c'
> > }
> > 
> > works as expected. As I'm trying to make a general tool here, could
> > someone explain why this is needed - I see I can prefix Dots with
> > Staff
> > and Staff.Accidental is ok too, though not needed.
> 
> The default override is done at Bottom level (which typically
> resolves
> to Voice).  Overrides change the defaults for grobs created by
> engravers
> in the given contexts and all subordinate contexts.
> 
> Grobs like noteheads are created by engravers in Voice contexts, so
> you
> can override in a given Voice, or at Staff level (assuming that no
> override at Voice level takes priority).  Grobs like Clef and
> TimeSignature however are created by engravers in Staff contexts
> which
> don't consult the defaults for Voice contexts.

Thank you very much for this explanation - I can now go from the entry
in the list of layout objects (via the links at the top of the entry)
back to the engravers that create them and then from there (via the
link at the end) to the context that the engraver is part of, and know
that I should prefix the layout object name with that.
I'm still left with a puzzle for the ClefModifier layout object:

\version "2.18.2"
{ 
  c'
 \override Staff.ClefModifier.stencil = #ly:text-interface::print 
 \once \override Staff.ClefModifier.text = \markup{T}
 \clef "bass_8"
  c'
}

which I was expecting to find the italic 8 replaced by the character T
(I see that there is no need to replace the stencil in this case as it
is by default ly:text-interface::print)

Richard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]