Next: , Previous: Instrument names, Up: Orchestral music



5.15.6 Transpose

A music expression can be transposed with \transpose. The syntax is

\transpose from to musicexpr

This means that musicexpr is transposed by the interval between the pitches from and to: any note with pitch from is changed to to.

For example, consider a piece written in the key of D-major. If this piece is a little too low for its performer, it can be transposed up to E-major with

\transpose d e ...

Consider a part written for violin (a C instrument). If this part is to be played on the A clarinet, the following transposition will produce the appropriate part

\transpose a c ...

\transpose distinguishes between enharmonic pitches: both \transpose c cis or \transpose c des will transpose up half a tone. The first version will print sharps and the second version will print flats

     mus = { \key d \major cis d fis g }
     \context Staff {
       \clef "F" \mus
       \clef "G"
       \transpose c g' \mus
       \transpose c f' \mus
     }

[image of music]

See also

Program reference: TransposedMusic (lilypond-internals) , and UntransposableMusic (lilypond-internals) .

Bugs

If you want to use both \transpose and \relative, you must put \transpose outside of \relative, since \relative will have no effect music that appears inside a \transpose.

Read comments on this page, or add one.

This page is for LilyPond-2.5.11 (development-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.