lilypond-user
[Top][All Lists]
Advanced

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

Re-using "\with" contexts


From: Alasdair McAndrew
Subject: Re-using "\with" contexts
Date: Sat, 16 Jul 2022 00:11:28 +1000

Hello,

There are examples of changing a staff context in the manual, for example at

https://lilypond.org/doc/v2.21/Documentation/snippets/pitches#pitches-creating-custom-key-signatures

Here a new staff is instantiated; with about 10 lines of "\with"  to change its appearance and behaviour.  

However, if I wish to use several such staves, I don't want to be copying the "\with" material into each one.  Is it possible to create a new context just from such a definition?  What I mean is something like

myStaff = staff \with {
    < lots of lines of definition >
}

so that I can simply create a new staff the way I want it with, for example

\new myStaff {

}

All I want is an example.  There is some information about defining a new context, but in my case all I want is a tweaked version of a current context.

Thanks everybody,
Alasdair

--
Alasdair McAndrew (he/him)
mob: 0432 854 858

https://numbersandshapes.net

reply via email to

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