How do I transpose a LilyPond part?

By using the appropriate form of “\transpose” in the source code.

Still looking at “King Arthur”, the trumpets play a few movements in Act 1, and few more in Act 5.  It would be dreadful to let them get bored, so let’s give them the violin 1 and 2 parts for some of the bombastic movements.

This post discusses the mechanics of duplicating parts for different instruments, not the art of orchestration.  Doubling parts like this is better than nothing, but a good arrangement will make better use of individual instruments.

The first movement of Act 1 looks like a good start. So, open “Act1/Trumpet.ily”. In the original arrangement it contains four tacet movements before any staffs, clefs or notes appear.

%% ACT I

\tocItem \markup { \AWodenFirst " " \italic {(\Ltacet)}}

\tocItem \markup { \ALotIsCast " " \italic {(\Ltacet)}}

\tocItem \markup { \ABraveSouls " " \italic {(\Ltacet)}}

\tocItem \markup { \AWodensHall " " \italic {(\Ltacet)}}

\tocItem \AMSymphony
\score  { % MILITARY SYMPHONY
  \keepWithTag #'Part
  \new StaffGroup = "Vents" \with {
    systemStartDelimiter = #'SystemStartBrace }
  <<
    \new Staff = "Vents 1" \transpose c d <<
      \clef treble \MAC
      \include "F/global.ily" \include "F/trumpetI.ily"
    >>
    \new Staff = "Vents 2" \transpose c d <<
      \clef treble \MAC
      \include "F/global.ily" \include "F/trumpetII.ily"
    >>
  >>

  \header {
    piece = \AMSymphony
  }
  \layout {
    \context { \StaffGroup
      \consists "Instrument_name_engraver"
    }
  }
} %ends AF military symphony

First, we can replace the “Tacet” line for “\AWodenFirst” with the relevant part of “Act1/Violins.ily”.

\tocItem \AWodenFirst
\score  { % "We have sacrificed" & "To Woden thanks we render"
  \keepWithTag #'Part
  \new StaffGroup = "Violons" \with {
    systemStartDelimiter = #'SystemStartBrace }
  <<
    \new Staff = "Violon 1" <<
      \clef treble \MAC
      \include "A/global.ily" \include "A/indication.ily"
      \include "A/violonI.ily" \include "A/instrumental.ily"
    >>
    \new Staff = "Violon 2" <<
      \clef treble \MAC
      \include "A/global.ily" \include "A/instrumental.ily"
      \include "A/violonII.ily"
    >>
  >>

  \header {
  }
  \layout {
  }
} % ends A "We have sacrificed" & "To Woden thanks we render"

However, this just drops a non-transposing violin part into the piece.  We want it transposed for a B♭ trumpet.  The existing trumpet parts use “\transpose c d” after the “\new Staff” line, and we can use it here.  For more details on using “\transpose”, see the GNU LilyPond Notation Reference – Transpose.

What’s this “C D” in the transpose line?  Don’t trumpets read B♭?

The copyist here chose to represent transposition as the key transposed into – a trumpet that reads in C major will play in D major.  If you find it easier to remember that a trumpet that reads in B♭ will play in C major, you can also use “\transpose bf c”.  This only works if the current language is English, as described in the GNU LilyPond Notation Reference – Note names in other languages.  If you are writing pitches in some other language, use the appropriate name for B♭.

What else changes?

While making this change, it’s also good to rename the staffs to suit.  However, the “\include” lines must continue to refer to the existing violin files for the moment.

\tocItem \AWodenFirst
\score  { % "We have sacrificed" & "To Woden thanks we render"
  \keepWithTag #'Part
  \new StaffGroup = "Vents" \with {
    systemStartDelimiter = #'SystemStartBrace }
  <<
    \new Staff = "Vents 1" \transpose c d <<
      \clef treble \MAC
      \include "A/global.ily" \include "A/indication.ily"
      \include "A/violonI.ily" \include "A/instrumental.ily"
    >>
    \new Staff = "Vents 2" \transpose c d <<
      \clef treble \MAC
      \include "A/global.ily" \include "A/instrumental.ily"
      \include "A/violonII.ily"
    >>
  >>

  \header {
  }
  \layout {
    \context { \StaffGroup
      \consists "Instrument_name_engraver"
    }
  }
} % ends A "We have sacrificed" & "To Woden thanks we render"

You should be able to typeset the trumpet part and see the new music.  The original key was F major, so it should be transposed into G major – and it is.

Sheet music in G major
“King Arthur” Act 1 Movement 1, transposed for trumpet.

What if I don’t want an exact duplicate?

Maybe we only want the loud bits doubled on trumpet part.  If we don’t want every note from the violin parts, we can’t continue including “A/violonI.ily” and “A/violonII.ily”.  Instead, duplicate those files and rename them to “A/trumpetI.ily” and “A/trumpetII.ily”.  Change the “\include” statements to suit.

Now open up the new “A/trumpetI.ily” and find the quiet bits.  The dynamics are already there, marked with “\p” and “\f”.  The first lies within this block:

%% 5
  r4 g g r  |
  r4 f f r  |
  r4 f f r  |
  r4 f f4. e8  |
  f4\p c' c r  |
%% 10
  r4 c bf r  |
  r4 bf a8\f a bf c  |

Replace the bits starting with a “\p” and before the next “\f” with rests.  Remember to use an upper-case R for whole-bar rests, as described in the GNU LilyPond Notation Reference – Full measure rests.

%% 5
  r4 g g r  |
  r4 f f r  |
  r4 f f r  |
  r4 f f4. e8  |
  R1  |
%% 10
  R1  |
  r2 a8\f a bf c  |

If relative pitches are in use, the music after the rests may end up in the wrong octave.  In the second trumpet part, the F (transposing to G) after the rests had to be moved up an octave.

Sheet music for trumpet containing two and a half bars marked "piano" (soft).
Trumpet part before turning soft section into rests.
Sheet music for trumpet with two and a half bars of rests.
Trumpet part after turning soft section into rests.

This is quite fiddly if there are many sections to remove or otherwise edit.  With LilyPond, it is often easier to duplicate a part in its entirety, then print it out and manually cross out the sections you don’t want.

What about the overture?

Anyone adding trumpets to “King Arthur” probably wants them in the oveture as well.  The same principles apply, but the “Act0” folder is slightly odd because it contains both the Overture and the Appendix.  The same principles apply, however:

  1. Duplicate “Act0/A_Violins.ily” and call it “Act1/A_Trumpets.ily”.
  2. Edit “Trumpet.ly” to include a “\bookpart” labelled “Overture” that includes “Act0/A_Trumpets.ily”.
  3. Edit “Act1/A_Trumpets.ily” to transpose into B♭.
  4. If you want to make changes to the notes, duplicate “Act1/A/violonI.ily” and “Act1/A/violonII.ily” and modify the notes appropriately.

How can I see my new parts in the score?

The conductor files group together the individual parts.  For example, if you open “Act1/Conducteur.ily”, you find this near the top:

\tocItem \AWodenFirst
\score  { % "We have sacrificed" & "To Woden thanks we render"
  \keepWithTag #'Full
  <<
    \new StaffGroup = "Violons" \with {
      systemStartDelimiter = #'SystemStartBrace }
    << \XViolins
      \new Staff = "Violon 1" <<
    \clef treble
    \include "A/global.ily" \include "A/indication.ily"
    \include "A/violonI.ily" \include "A/instrumental.ily"
      >>
      \new Staff = "Violon 2" <<
    \clef treble
    \include "A/global.ily" \include "A/instrumental.ily"
    \include "A/violonII.ily"
      >>
    >> %ends violons

Many other parts follow, to the end of the movement.

    \new Staff = "Continuo" <<
      \clef bass \XBasso
      \new Voice <<
    \include "A/global.ily" \include "A/instrumental.ily"
    \include "A/continuo.ily" >>
      \new FiguredBass { \include "A/chiffrage.ily" }
    >>
  >>

  \header {
  }
  \layout { 
    \context { \Staff
      \RemoveEmptyStaves
      \override VerticalAxisGroup #'remove-first = ##t
    }
  }
} % ends A "We have sacrificed" & "To Woden thanks we render"

To add the new trumpet parts for this movement, add them above the violins:

\tocItem \AWodenFirst
\score  { % "We have sacrificed" & "To Woden thanks we render"
  \keepWithTag #'Full
  <<
    \new StaffGroup = "Trompettes" \with {
      systemStartDelimiter = #'SystemStartBrace }
    << \XTrumpet
      \new Staff = "Trumpet 1" <<
    \clef treble
    \include "A/global.ily" \include "A/trumpetI.ily"
      >>
      \new Staff = "Trumpet 2" <<
    \clef treble
    \include "A/global.ily" \include "A/trumpetII.ily"
      >>
    >>

    \new StaffGroup = "Violons" \with {
      systemStartDelimiter = #'SystemStartBrace }
    << \XViolins
      \new Staff = "Violon 1" <<
    \clef treble
    \include "A/global.ily" \include "A/indication.ily"
    \include "A/violonI.ily" \include "A/instrumental.ily"
      >>
      \new Staff = "Violon 2" <<
    \clef treble
    \include "A/global.ily" \include "A/instrumental.ily"
    \include "A/violonII.ily"
      >>
    >> %ends violons

Typeset “Arthur-Conducteur.ly”, and you should see the new parts in the first movement.

Trumpet 1, Trumpet 2, Violin 1, Violin 2, Viola, Bass, Continuo
Act 1, Movement 1 with new trumpet parts.

All of the trumpet parts in this score are displayed in concert pitch.  If you want them transposed (which is the common way to format orchestra scores), you can add “\transpose c d” to each trumpet staff in the conductor files.

More LilyPond

  1. What is a LilyPond file?
  2. How do I read this LilyPond file?
  3. How do I edit a LilyPond file?
  4. How do I transpose a LilyPond part?
  5. Can I import a LilyPond file into my graphical notation editor?

Leave a Reply

Your e-mail address will not be published or shared with third parties.

First comments from new name/e-mail combinations will be held in moderation.