From 423deeb9913f9ded5aebac5223fdea1db59a0254 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 6 Apr 2014 19:59:25 +0200 Subject: [PATCH] Issue 3894: accidental rule 'teaching' broke Revert part of "Issue 2745: more fun with accidental rules." This reverts the part of commit bbca17061fbc7a25ca4050e6d031b3e9562b658e that deals with the teaching accidental rule. --- scm/music-functions.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 9f919b0861..b0c98769ae 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -1610,10 +1610,10 @@ look at bar lines nor different accidentals at the same note name." (and (equal? entrybn barnum) (equal? entrymp measurepos))))))))) (define-public (dodecaphonic-no-repeat-rule context pitch barnum measurepos) - "An accidental rule that typesets an accidental before every note -(just as in the dodecaphonic accidental style) @emph{except} if the note -is immediately preceded by a note with the same pitch. This is a common -accidental style in contemporary notation." + "An accidental rule that typesets an accidental before every +note (just as in the dodecaphonic accidental style) @emph{except} if +the note is immediately preceded by a note with the same pitch. This +is a common accidental style in contemporary notation." (let* ((keysig (ly:context-property context 'localKeySignature)) (entry (find-pitch-entry keysig pitch #t #t))) (if (not entry) @@ -1632,9 +1632,13 @@ on the same staff line." (entry (find-pitch-entry keysig pitch #t #t))) (if (not entry) (cons #f #f) - (let* ((entrymp (key-entry-measure-position entry)) + (let* ((global-entry (find-pitch-entry keysig pitch #f #f)) + (key-acc (key-entry-alteration global-entry)) + (acc (ly:pitch-alteration pitch)) + (entrymp (key-entry-measure-position entry)) (entrybn (key-entry-bar-number entry))) - (cons #f (not (and (equal? entrybn barnum) (equal? entrymp measurepos)))))))) + (cons #f (not (or (equal? acc key-acc) + (and (equal? entrybn barnum) (equal? entrymp measurepos))))))))) (define-public (set-accidentals-properties extra-natural auto-accs auto-cauts -- 2.39.2