lilypond-user
[Top][All Lists]
Advanced

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

Re: Getting the name of the context a scheme function was called from


From: Marc Hohl
Subject: Re: Getting the name of the context a scheme function was called from
Date: Sat, 12 Jan 2013 16:42:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Am 12.01.2013 16:28, schrieb Paul Morris:
On Jan 12, 2013, at 2:47 AM, David Kastrup <address@hidden> wrote:

Uh, if you have a _custom_ staff context for which you want particular
overrides, you just do

\layout {
  \context {
    \Staff
    \name "MyStaff"
    \alias "Staff"
    \override ...
    \override ...
  }
}

at the bottom, and then in the music you use

\new MyStaff { ... }

and, of course, the overrides will be in every staff of that type, and
not anywhere else.
Right, I have been using this custom staff approach and it works great for 
"global" overrides that should _always_ happen on the custom staff.  (I omitted 
those overrides in my previous tiny example to make it tiny, with a comment saying so, 
but in the process I may not have communicated clearly enough that I was trying to 
achieve something else.)

My question now is about when say, a particular chord needs a manual 
("non-global") override added _within_ the music (using \once), for it to look 
right on the custom staff (as a by-product of the global overrides of the custom staff).  
However, these same manual one-time overrides are not needed on a standard staff, and 
look wrong there.  (For example, needing to move note heads to a different side of the 
stem to avoid collisions with other note heads on the custom staff, but not on the 
standard staff.)

So once you've added these one-time overrides within the music you can only use 
the music for the custom staff and not a standard staff.  (Unless... there's 
some way for a function that's called to do these one-time overrides to know 
whether its being called from the custom staff context or a standard staff 
context.)
Would the use of tags be helpful here?

http://lilypond.org/doc/v2.16/Documentation/notation/different-editions-from-one-source#using-tags

Regards,

Marc





reply via email to

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