On Sat, 2024-11-02 at 19:22 +0100, David Kastrup wrote:
> David Sumbler <[email protected]> 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.

Ah - I wasn't aware of this rule, although now that I have been told I
can see that it makes sense.   And I have now found it in the NR.

Thanks for your swift and clear reply.  Problem solved!

David

Reply via email to