lilypond-devel
[Top][All Lists]
Advanced

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

Re: shortcut for creating new Staff "subclass" context?


From: Kieren MacMillan
Subject: Re: shortcut for creating new Staff "subclass" context?
Date: Fri, 11 Sep 2009 06:44:36 -0400

Hi Dan,

it looks like "\Voice" starts you off with a copy of the previously defined
Voice settings.  If "\Voice" is absent, you start from scratch.
The context settings are saved by name. If you do not change the name, the modified settings replace the previous settings of the \Voice context.
If you change the name, a new kind of context is created.

That is a pretty clear explanation of what \Voice [\Staff, etc.] and \name "Foo" do — thank you!

I haven't looked into \alias.

On the doc page

<http://lilypond.org/doc/v2.13/Documentation/user/lilypond/ Defining-new-contexts#Defining-new-contexts>

it says

  “Since it is similar to the Voice, we want commands that work on
  (existing) Voices to remain working. This is achieved by
  giving the new context an alias Voice:
  \alias Voice”

Though not completely descriptive — for example, how would you define a context that accepts a brand new command (that isn't in some other existing context)? — at least we know we have to \alias if we want to duplicate the behaviour (as differentiated from the settings) of another context.

Now my question is... does the order of the lines matter at all? I'm assuming they do — e.g., if you don't change the \name until after changing some \override, there'll be confusion — but does anyone know for certain what the precedence must be?

Thanks,
Kieren.



reply via email to

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