Transpose - GNU LilyPond
Description: GNU LilyPond

Next: Bar check, Previous: Octave check, Up: Alternate music entry

#### 6.2.3 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 (for which an A is notated as a C, and which sounds a minor third lower than notated), 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 }
>          \new Staff {
>            \clef "F" \mus
>            \clef "G"
>            \transpose c g' \mus
>            \transpose c f' \mus
>          }

`\transpose` may also be used to input written notes for a transposing instrument. Pitches are normally entered into LilyPond in C (or “concert pitch”), but they may be entered in another key. For example, when entering music for a B-flat trumpet which begins on concert D, one would write

    \transpose c bes { e4 ... }

To print this music in B-flat again (i.e. producing a trumpet part, instead of a concert pitch conductor's score) you would wrap the existing music with another `transpose`

    \transpose bes c { \transpose c bes { e4 ... } }

##### See also

Program reference: TransposedMusic.

##### 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`.

This page is for LilyPond-2.8.8 (stable-branch).

Other languages: English.
Using automatic language selection.