2024-05-25 13:14:14 +02:00
|
|
|
TRANSPOSITION = #(cons #f #f)
|
2023-08-07 16:24:43 +02:00
|
|
|
|
|
|
|
transposeGlobal =
|
|
|
|
#(define-void-function (from to) (ly:pitch? ly:pitch?)
|
|
|
|
(set! TRANSPOSITION (cons from to)))
|
|
|
|
|
|
|
|
transposable =
|
2024-05-25 13:14:14 +02:00
|
|
|
#(define-music-function (fromto music) (pair? ly:music?)
|
|
|
|
(if (car fromto)
|
2023-08-07 16:24:43 +02:00
|
|
|
#{
|
2024-05-25 13:14:14 +02:00
|
|
|
\transpose #(car fromto) #(cdr fromto) #music
|
2023-08-07 16:24:43 +02:00
|
|
|
#}
|
|
|
|
music))
|
2024-05-25 13:14:14 +02:00
|
|
|
|
|
|
|
% Akkorde in Strophen transponieren
|
|
|
|
#(define-markup-list-command (transpose layout props from to markuplist)
|
|
|
|
(markup? markup? markup-list?)
|
|
|
|
|
|
|
|
(define (markup->pitch m)
|
|
|
|
(ly:assoc-get (string->symbol (markup->string m)) pitchnames))
|
|
|
|
|
|
|
|
(interpret-markup-list layout (prepend-alist-chain 'transposition (cons (markup->pitch from) (markup->pitch to)) props) markuplist))
|