transposeGlobal kann ganzen Song transponieren

This commit is contained in:
tux
2023-08-07 16:24:43 +02:00
parent 8e6eff1cad
commit 19b5fe2d94
5 changed files with 23 additions and 1 deletions

13
transposition.ly Normal file
View File

@ -0,0 +1,13 @@
TRANSPOSITION = ##f
transposeGlobal =
#(define-void-function (from to) (ly:pitch? ly:pitch?)
(set! TRANSPOSITION (cons from to)))
transposable =
#(define-music-function (music) (ly:music?)
(if TRANSPOSITION
#{
\transpose #(car TRANSPOSITION) #(cdr TRANSPOSITION) #music
#}
music))