From: Keith OHara Date: Sat, 19 Oct 2013 16:54:56 +0000 (-0700) Subject: key-signature: restore function for LilyJAZZ.ily; issue 3606 X-Git-Tag: release/2.17.29-1~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=83460541644c33c1f0647868cc9096078f735681;p=lilypond.git key-signature: restore function for LilyJAZZ.ily; issue 3606 key-signature-interface::alteration-position --- diff --git a/scm/output-lib.scm b/scm/output-lib.scm index dc88b4387a..02170918a1 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -673,6 +673,20 @@ and duration-log @var{log}." (prepend (+ x 7) (cons x l)))) (prepend first-position '()))))) +(define-public (key-signature-interface::alteration-position + step alter c0-position) +;; Deprecated. Not a documented interface, and no longer used in LilyPond, +;; but needed for a popular file, LilyJAZZ.ily for version 2.16 + (if (pair? step) + (+ (cdr step) (* (car step) 7) c0-position) + (let* ((c-pos (modulo c0-position 7)) + (hi (list-ref + (if (< alter 0) + '(2 3 4 2 1 2 1) ; position of highest flat + '(4 5 4 2 3 2 3)); position of highest sharp + c-pos))) + (- hi (modulo (- hi (+ c-pos step)) 7))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; annotations