lilypond-user
[Top][All Lists]
Advanced

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

Re: printKeyCancellation, a way to never show key cancellations?


From: Paul Morris
Subject: Re: printKeyCancellation, a way to never show key cancellations?
Date: Sun, 2 Dec 2012 16:56:17 -0500

On Dec 2, 2012, at 3:01 PM, Keith OHara <address@hidden> wrote:

> Paul Morris <paul <at> paulwmorris.com> writes:
> 
>> For greater flexibility, would it make sense for PrintKeyCancellation to 
>> have 3 options instead of 2?
>>  1. show key cancellations
>>  2. hide key cancellations, except C major / A minor
>>  3. hide all key cancellations
>> 
> Maybe it would have, but we have gotten used to the simple true/false, which
> does the right thing for most situations.  
> 
> Option number 3 can be had most simply with
> 
>>  \override Staff.KeyCancellation #'stencil = ##f
> 
> but it looks like you wrote code that restores the 'stencil for 
> anything that answers to the "key-signature-interface" 
> 
>> ((key-signature-interface engraver grob source-engraver)
>>   (ly:grob-set-property! grob 'stencil 
>>                          (make-circle-stencil .7 .3 #f))))))
> 
> You can stop the key cancellation by some other means as Harm suggested, 
> or change your code to stencil KeySignatures only.

That makes sense.  Reading through the docs I haven't been able to figure out 
how to do this.  If anyone has suggestions or pointers, I would appreciate it.  

From what I could tell the Key_engraver engraves both signatures and their 
cancellations, and I couldn't see how (or whether) it knows which one it's 
engraving, or how one might replicate that with custom Scheme code.  Maybe one 
would need to hook into the code at a higher step in the order of operations, 
where the difference between signatures and cancellations was still accessible?

In any case I can use \override Staff.KeyCancellation #'break-visibility = 
##(#f #f #f)   but it would be nice to know the better way to do it.

Thanks again,
-Paul


reply via email to

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