lilypond-common-includes/transposition.ly

14 lines
306 B
Plaintext
Raw Permalink Normal View History

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))