bug-lilypond
[Top][All Lists]
Advanced

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

Re: automatic accidental style voice: too many written accidentals


From: Frédéric Bron
Subject: Re: automatic accidental style voice: too many written accidentals
Date: Tue, 20 Oct 2009 22:54:11 +0200

>> Hmm, forget this, since it doesn't make any sense.  It seems the new
>> voice behaves as if there's no key signature, so there's still a
>> problem.

The patch below makes it work but breaks default style. I would like
to replace (ly:context-parent context) by something that always
returns the current Staff context but the only thing I can do is to
get the string "Staff", not a context Staff object. Any idea?

Frédéric

diff --git a/scm/music-functions.scm b/scm/music-functions.scm
index 324e5aa..b5ad273 100644
--- a/scm/music-functions.scm
+++ b/scm/music-functions.scm
@@ -1065,8 +1065,8 @@ specifies whether accidentals should be canceled
in different octaves."
                               (ly:warning (_ "Unknown octaveness
type: ~S ") octaveness)
                               (ly:warning (_ "Defaulting to 'any-octave."))
                               #t)))
-        (key-sig (ly:context-property context 'keySignature))
-        (local-key-sig (ly:context-property context 'localKeySignature))
+        (key-sig (ly:context-property (ly:context-parent context)
'keySignature))
+        (local-key-sig (ly:context-property (ly:context-parent
context) 'localKeySignature))
         (notename (ly:pitch-notename pitch))
         (octave (ly:pitch-octave pitch))
         (pitch-handle (cons octave notename))




reply via email to

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