David Sumbler <da...@aeolia.co.uk> writes: > I have a piece which is in D-flat major, with a middle section which is > in C-sharp minor. Both of these keys are more easily written a > semitone lower so I have tried to use \transposition, but I can't get > this to work. > > For instance, with the following code, Lilypond throws out a "Spurious > expression in \score" error message when it meets the 2nd > \transposition line: > > \version "2.24.3" > \language "english" > > \score { > \transpose c df { > \relative c'' { > \key c \major > c > } > } > \transpose c cs { > \relative c'' { > \key c \minor > c > } > } > } > > What am I doing wrong?
Putting two music expressions in one \score. \score only accepts a single music expression. This has nothing to do with transpositions. You are missing an enclosing { ... } around both of your parts in order to form a single sequential music expression from them. -- David Kastrup