Jump to content

Jazz combo template: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is quite an advanced template, for a jazz ensemble. Note that all instruments are notated in <code>\key c \major</code>. This refers to the key in concert pitch; the key will be automatically transposed if the music is within a <code>\transpose</code> section.
This is quite an advanced template, for a jazz ensemble. Note that all instruments use <code>\key c \major</code>. This refers to the key in concert pitch; the key will be automatically transposed if the music is within a <code>\transpose</code> section.


<lilypond version="2.24" full>
<lilypond version="2.24" full>
Line 8: Line 8:
   meter = "moderato"
   meter = "moderato"
   piece = "Swing"
   piece = "Swing"
   tagline = \markup {
   tagline = \markup \column {
    \column {
              "LilyPond example file by Amelie Zapf,"
      "LilyPond example file by Amelie Zapf,"
              "Berlin 07/07/2003" }
      "Berlin 07/07/2003"
    }
  }
}
}
% To make the example display in the documentation
 
% To make the example display properly in the documentation.
\paper {
\paper {
   paper-width = 130
   paper-width = 130\mm
  paper-height = 205\mm
}
}
%#(set-global-staff-size 16)
 
% #(set-global-staff-size 16)
 
\include "english.ly"
\include "english.ly"


%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%


sl = {
sl = { \override NoteHead.style = #'slash
  \override NoteHead.style = #'slash
      \hide Stem }
  \hide Stem
nsl = { \revert NoteHead.style
}
        \undo \hide Stem }
nsl = {
  \revert NoteHead.style
  \undo \hide Stem
}
crOn = \override NoteHead.style = #'cross
crOn = \override NoteHead.style = #'cross
crOff = \revert NoteHead.style
crOff = \revert NoteHead.style


%% insert chord name style stuff here.
% Insert chord name style stuff here.


jazzChords = { }
jazzChords = { }


%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
Line 58: Line 57:
   \global
   \global
   \clef treble
   \clef treble
   <<
   \trpt
    \trpt
  >>
}
}


Line 74: Line 71:
   \global
   \global
   \clef treble
   \clef treble
   <<
   \alto
    \alto
  >>
}
}


Line 82: Line 77:
bari = \transpose c a' \relative c {
bari = \transpose c a' \relative c {
   \Key
   \Key
   c1
   c1 | c1 |
  c1
   \sl d4^"Solo" d d d \nsl |
   \sl
  d4^"Solo" d d d
  \nsl
}
}
bariHarmony = \transpose c' a \chordmode {
bariHarmony = \transpose c' a \chordmode {
   \jazzChords s1 s d2:maj e:m7
   \jazzChords  
  s1 | s |
  d2:maj e:m7 |
}
}
bariSax = {
bariSax = {
   \global
   \global
   \clef treble
   \clef treble
   <<
   \bari
    \bari
  >>
}
}


Line 102: Line 94:
tbone = \relative c {
tbone = \relative c {
   \Key
   \Key
   c1 | c | c
   c1 | c | c |
}
}
tboneHarmony = \chordmode {
tboneHarmony = \chordmode {
Line 110: Line 102:
   \global
   \global
   \clef bass
   \clef bass
   <<
   \tbone
    \tbone
  >>
}
}


Line 120: Line 110:
gtr = \relative c'' {
gtr = \relative c'' {
   \Key
   \Key
   c1
   c1 |
   \sl
   \sl b4 b b b \nsl |
  b4 b b b
   c1 |
  \nsl
   c1
}
}
gtrHarmony = \chordmode {
gtrHarmony = \chordmode {
   \jazzChords
   \jazzChords
   s1 c2:min7+ d2:maj9
   s1 | c2:min7+ d2:maj9 | s1 |
}
}
guitar = {
guitar = {
   \global
   \global
   \clef treble
   \clef treble
   <<
   \gtr
    \gtr
  >>
}
}


Line 142: Line 128:
   \voiceOne
   \voiceOne
   \Key
   \Key
   c1 | c | c
   c1 | c | c |
}
}
rhLower = \relative c' {
rhLower = \relative c' {
   \voiceTwo
   \voiceTwo
   \Key
   \Key
   e1 | e | e
   e1 | e | e |
}
}


Line 153: Line 139:
   \voiceOne
   \voiceOne
   \Key
   \Key
   g1 | g | g
   g1 | g | g |
}
}
lhLower = \relative c {
lhLower = \relative c {
   \voiceTwo
   \voiceTwo
   \Key
   \Key
   c1 | c | c
   c1 | c | c |
}
}


Line 178: Line 164:
}
}


piano = {
piano = <<
  <<
  \new Staff = "upper" \PianoRH
    \new Staff = "upper" \PianoRH
  \new Staff = "lower" \PianoLH
    \new Staff = "lower" \PianoLH
>>
  >>
 
}


% ------ Bass Guitar ------
% ------ Bass Guitar ------
Bass = \relative c {
Bass = \relative c {
   \Key
   \Key
   c1 | c | c
   c1 | c | c |
}
}
bass = {
bass = {
   \global
   \global
   \clef bass
   \clef bass
   <<
   \Bass
    \Bass
  >>
}
}


Line 201: Line 184:
up = \drummode {
up = \drummode {
   \voiceOne
   \voiceOne
   hh4 <hh sn> hh <hh sn>
   hh4 <hh sn> hh <hh sn> |
   hh4 <hh sn> hh <hh sn>
   hh4 <hh sn> hh <hh sn> |
   hh4 <hh sn> hh <hh sn>
   hh4 <hh sn> hh <hh sn> |
}
}
down = \drummode {
down = \drummode {
   \voiceTwo
   \voiceTwo
   bd4 s bd s
   bd4 s bd s |
   bd4 s bd s
   bd4 s bd s |
   bd4 s bd s
   bd4 s bd s |
}
}


Line 222: Line 205:
%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%


\score {
\book { % For the LilyPond documentation.
  <<
  \score {
    \new StaffGroup = "horns" <<
    <<
      \new Staff = "trumpet" \with { instrumentName = "Trumpet" }
      \new StaffGroup = "horns" <<
      \trumpet
        \new Staff = "trumpet" \with { instrumentName = "Trumpet" }
      \new Staff = "altosax" \with { instrumentName = "Alto Sax" }
          \trumpet
      \altoSax
        \new Staff = "altosax" \with { instrumentName = "Alto Sax" }
      \new ChordNames = "barichords" \with { instrumentName = "Trumpet" }
          \altoSax
      \bariHarmony
        \new ChordNames = "barichords" \with { instrumentName = "Bari Sax" }
      \new Staff = "barisax" \with { instrumentName = "Bari Sax" }
          \bariHarmony
      \bariSax
        \new Staff = "barisax" \with { instrumentName = "Bari Sax" }
      \new Staff = "trombone" \with { instrumentName = "Trombone" }
          \bariSax
       \trombone
        \new Staff = "trombone" \with { instrumentName = "Trombone" }
          \trombone
      >>
 
       \new StaffGroup = "rhythm" <<
        \new ChordNames = "chords" \with { instrumentName = "Guitar" }
          \gtrHarmony
        \new Staff = "guitar" \with { instrumentName = "Guitar" }
          \guitar
        \new PianoStaff = "piano" \with {
          instrumentName = "Piano"
          midiInstrument = "acoustic grand"
        } \piano
        \new Staff = "bass" \with { instrumentName = "Bass" }
          \bass
        \new DrumStaff \with { instrumentName = "Drums" }
          \drumContents
      >>
     >>
     >>


     \new StaffGroup = "rhythm" <<
     \layout {
       \new ChordNames = "chords" \gtrHarmony
       \context {
      \new Staff = "guitar" \with { instrumentName = "Guitar" }
        \Staff
       \guitar
        \RemoveEmptyStaves
      \new PianoStaff = "piano" \with {
      }
         instrumentName = "Piano"
       \context {
         midiInstrument = "acoustic grand"
        \Score
        \override BarNumber.padding = 3
         \override RehearsalMark.padding = 2
         skipBars = ##t
       }
       }
      \piano
      \new Staff = "bass" \with { instrumentName = "Bass" }
      \bass
      \new DrumStaff \with { instrumentName = "Drums" }
      \drumContents
    >>
  >>
  \layout {
    \context { \Staff \RemoveEmptyStaves }
    \context {
      \Score
      \override BarNumber.padding = 3
      \override RehearsalMark.padding = 2
      skipBars = ##t
     }
     }
    \midi { }
   }
   }
  \midi { }
}
}
</lilypond>
</lilypond>


[[Category:Template]]
[[Category:Fretted strings]]
[[Category:Keyboards]]
[[Category:Keyboards]]
[[Category:Percussion]]
[[Category:Percussion]]
[[Category:Fretted strings]]
[[Category:Template]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Real music]]
[[Category:Snippet]]

Latest revision as of 06:40, 14 December 2025

This is quite an advanced template, for a jazz ensemble. Note that all instruments use \key c \major. This refers to the key in concert pitch; the key will be automatically transposed if the music is within a \transpose section.

\version "2.24"

\header {
  title = "Song"
  subtitle = "(tune)"
  composer = "Me"
  meter = "moderato"
  piece = "Swing"
  tagline = \markup \column {
              "LilyPond example file by Amelie Zapf,"
              "Berlin 07/07/2003" }
}

% To make the example display properly in the documentation.
\paper {
  paper-width = 130\mm
  paper-height = 205\mm
}

% #(set-global-staff-size 16)

\include "english.ly"


%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%

sl = { \override NoteHead.style = #'slash
       \hide Stem }
nsl = { \revert NoteHead.style
        \undo \hide Stem }
crOn = \override NoteHead.style = #'cross
crOff = \revert NoteHead.style

% Insert chord name style stuff here.

jazzChords = { }


%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%

global = { \time 4/4 }

Key = { \key c \major }

% ############ Horns ############

% ------ Trumpet ------
trpt = \transpose c d \relative c'' {
  \Key
  c1 | c | c |
}
trpHarmony = \transpose c' d {
  \jazzChords
}
trumpet = {
  \global
  \clef treble
  \trpt
}

% ------ Alto Saxophone ------
alto = \transpose c a \relative c' {
  \Key
  c1 | c | c |
}
altoHarmony = \transpose c' a {
  \jazzChords
}
altoSax = {
  \global
  \clef treble
  \alto
}

% ------ Baritone Saxophone ------
bari = \transpose c a' \relative c {
  \Key
  c1 | c1 |
  \sl d4^"Solo" d d d \nsl |
}
bariHarmony = \transpose c' a \chordmode {
  \jazzChords 
  s1 | s |
  d2:maj e:m7 |
}
bariSax = {
  \global
  \clef treble
  \bari
}

% ------ Trombone ------
tbone = \relative c {
  \Key
  c1 | c | c |
}
tboneHarmony = \chordmode {
  \jazzChords
}
trombone = {
  \global
  \clef bass
  \tbone
}

% ############ Rhythm Section #############

% ------ Guitar ------
gtr = \relative c'' {
  \Key
  c1 |
  \sl b4 b b b \nsl |
  c1 |
}
gtrHarmony = \chordmode {
  \jazzChords
  s1 | c2:min7+ d2:maj9 | s1 |
}
guitar = {
  \global
  \clef treble
  \gtr
}

%% ------ Piano ------
rhUpper = \relative c'' {
  \voiceOne
  \Key
  c1 | c | c |
}
rhLower = \relative c' {
  \voiceTwo
  \Key
  e1 | e | e |
}

lhUpper = \relative c' {
  \voiceOne
  \Key
  g1 | g | g |
}
lhLower = \relative c {
  \voiceTwo
  \Key
  c1 | c | c |
}

PianoRH = {
  \clef treble
  \global
  <<
    \new Voice = "one" \rhUpper
    \new Voice = "two" \rhLower
  >>
}
PianoLH = {
  \clef bass
  \global
  <<
    \new Voice = "one" \lhUpper
    \new Voice = "two" \lhLower
  >>
}

piano = <<
  \new Staff = "upper" \PianoRH
  \new Staff = "lower" \PianoLH
>>


% ------ Bass Guitar ------
Bass = \relative c {
  \Key
  c1 | c | c |
}
bass = {
  \global
  \clef bass
  \Bass
}

% ------ Drums ------
up = \drummode {
  \voiceOne
  hh4 <hh sn> hh <hh sn> |
  hh4 <hh sn> hh <hh sn> |
  hh4 <hh sn> hh <hh sn> |
}
down = \drummode {
  \voiceTwo
  bd4 s bd s |
  bd4 s bd s |
  bd4 s bd s |
}

drumContents = {
  \global
  <<
    \new DrumVoice \up
    \new DrumVoice \down
  >>
}

%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%

\book { % For the LilyPond documentation.
  \score {
    <<
      \new StaffGroup = "horns" <<
        \new Staff = "trumpet" \with { instrumentName = "Trumpet" }
          \trumpet
        \new Staff = "altosax" \with { instrumentName = "Alto Sax" }
          \altoSax
        \new ChordNames = "barichords" \with { instrumentName = "Bari Sax" }
          \bariHarmony
        \new Staff = "barisax" \with { instrumentName = "Bari Sax" }
          \bariSax
        \new Staff = "trombone" \with { instrumentName = "Trombone" }
          \trombone
      >>

      \new StaffGroup = "rhythm" <<
        \new ChordNames = "chords" \with { instrumentName = "Guitar" }
          \gtrHarmony
        \new Staff = "guitar" \with { instrumentName = "Guitar" }
          \guitar
        \new PianoStaff = "piano" \with {
          instrumentName = "Piano"
          midiInstrument = "acoustic grand"
        } \piano
        \new Staff = "bass" \with { instrumentName = "Bass" }
          \bass
        \new DrumStaff \with { instrumentName = "Drums" }
          \drumContents
      >>
    >>

    \layout {
      \context {
        \Staff
        \RemoveEmptyStaves
      }
      \context {
        \Score
        \override BarNumber.padding = 3
        \override RehearsalMark.padding = 2
        skipBars = ##t
      }
    }
    \midi { }
  }
}