I want to provide a pattern (e.g., the C major arpeggio, C E G) and have Lilypond automatically show it transposed (as one score) in all 12 scales.
Here's my current attempt:
music = { c' e' g' s }
\new Staff {
\transpose c c { \music }
\transpose c f { \music }
\transpose c bes { \music }
\transpose c ees { \music }
\transpose c aes { \music }
\transpose c des { \music }
\transpose c fis { \music }
\transpose c b { \music }
\transpose c e { \music }
\transpose c a { \music }
\transpose c d { \music }
\transpose c g { \music }
}
I don't know how to add a text above each pattern indicating the transposition key (e.g., C, F, Bb, etc...). I would like the final product to look something like this:
Note: I would like this code to work regardless of the length of the pattern (which could be longer than one measure).