Hi Jay, This doesn't Do The Right Thing™ when the key signatures are abstracted, e.g.,
\version "2.17.10" #(define (adjust-note mus key currkey) (cond ((or (eq? (ly:music-property mus 'name) 'NoteEvent) (eq? (ly:music-property mus 'name) 'KeyChangeEvent)) (ly:music-transpose mus (car currkey))) ((and (eq? (ly:music-property mus 'name) 'PropertySet) (eq? (ly:music-property mus 'symbol) 'instrumentTransposition)) (set-car! currkey (ly:pitch-negate (ly:music-property mus 'value))) (ly:music-set-property! mus 'value (ly:make-pitch 0 0 0)) mus) (else mus))) normalizeTransposition = #(define-music-function (parser location key music) (ly:pitch? ly:music?) (ly:music-transpose (let ((currkey (list (ly:make-pitch 0 0 0)))) (music-map (lambda (x) (adjust-note x key currkey)) music)) (ly:pitch-negate key))) global = { \time 4/4 \key c \major s1 \key d \major s1 \key e \major s1 } music = \relative c' { \transposition f c4 e g c | \transposition ees c, e g c | \transposition g c, e g c | } \score { << \new Staff << \global \music >> \new Staff \normalizeTransposition c' << \global \music >> >> } Any way to easily fix that? If so, this would be a killer solution to my multi-instrumentalist problem. Thanks! Kieren. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user