Fix transposeGlobal: Make additional transpositions possible

This commit was merged in pull request #1487.
This commit is contained in:
2026-04-22 11:14:51 +02:00
parent 997f757cd6
commit bb940b2a3b

View File

@@ -2,7 +2,12 @@ TRANSPOSITION = #(cons #f #f)
transposeGlobal =
#(define-void-function (from to) (ly:pitch? ly:pitch?)
(set! TRANSPOSITION (cons from to)))
(if (not (car TRANSPOSITION))
(set! TRANSPOSITION (cons from to))
(let ((current_to (cdr TRANSPOSITION))
(interval (ly:pitch-diff to from)))
(set! TRANSPOSITION (cons (car TRANSPOSITION)
(ly:pitch-transpose current_to interval))))))
transposable =
#(define-music-function (fromto music) (pair? ly:music?)