Dec 15, 2015

Mimicking the Real Book Look


Stop! If you have never heard of "Real Book" or "Fake Book", go look it up and then come back.

(no really, go ahead... I'll wait for you...)

Done? Good. Now, hopefully you are more familiar with what a Real Book score looks like, so let's move forward.

Basically, a "Real Book" is a compilation of any number of leadsheets of popular jazz tunes (see more details on the related Wikipedia page). I've been able to acquire a handful of these Real Book volumes over the years and have always been fascinated with their fun hand-written style. Some of you are familiar with my rendition of the score "All Of Me", done in (mostly) authentic Real Book style, including the title bar. I've received numerous requests to see the source code for this score. If you aren't familiar with this particular score, click on the image below to see what all the fuss is about.


For those of you who haven't tried to do a leadsheet or, more importantly, a Real Book leadsheet, I'm going to divulge the source code for this score so you can see how I've chosen to do it. You should notice immediately a few features that are common to Real Book scores. Here's a short list:
  • In-staff title bar - This is a historical artifact. The arrangers wrote down these scores by hand on regular staff paper, so they usually just used the top-most staff to show the score title, tempo, and composer.
  • Only one clef and time signature - Unless there's a really good reason to show a clef change or change in time signature, why show it more than once? In this score, these two are only shown at the very beginning of the first system and nowhere else.
  • A single melody line with lyrics and chord progressions - This is standard leadsheet material.
Let's work backward through these points to see how these features are accomplished.

The last bullet point is the easy part. You just input the music.

The second bullet point is accomplished with a couple of overrides:
% make only the first clef visible
\override Score.Clef #'break-visibility = #'#(#f #f #f)
% make only the first time signature visible
\override Score.KeySignature #'break-visibility = #'#(#f #f #f)
% allow single-staff system bars
\override Score.SystemStartBar #'collapse-height = #1
These overrides can go in the score's \layout block, or in the global \layout block--it doesn't matter.

The initial bullet point is the trickiest, but also the most fun. Rather than use a real system and force the header text inside it (because that would make a mess with bar numbers and lots of other things), we're going to use a powerful feature in LilyPond: inserting a \score in \markup mode. These markup scores behave just like a normal \score, but are really intended for short snippets. In our case, a single staff that spans the full width of the page. To make the usage easier, I'm going to combine a little bit of Scheme in with the \markup code. That way I can define the title, tempo, and composer text outside the \markup in a place that I can see right off. Here's the header markup definition:
realBookTitle = \markup {
  \score {
    {
      \override TextScript.extra-offset = #'(0 . -4.5)
      s4
      s^\markup {
        \fill-line {
          \fontsize #1 \lower #1 \rotate #7 \concat { " " #meter }
          \fontsize #8
          \override #'(offset . 7)
          \override #'(thickness . 6)
          \underline \sans #title
          \fontsize #1 \lower #1 \concat { #composer " " }
        }
      }
      s
    }
    \layout {
      \once \override Staff.Clef.stencil = ##f
      \once \override Staff.TimeSignature.stencil = ##f
      \once \override Staff.KeySignature.stencil = ##f
      ragged-right = ##f
      \override TextScript.font-name = #"Pea Missy with a Marker"
    }
  }
}
This realBookTitle markup can be used directly in the normal \header block, assigned to the main title variable. You'll also notice that I've used a non-standard main text font called "Pea Missy with a Marker", just for fun. You can download it for free (just do a search on the name). To re-create the image above, you'll need the lilyjazz and lilyjazz-chord fonts and corresponding stylesheets mentioned below. I manually tuned the space between the title staff and the first real staff using the markup-system-spacing variable in the \paper block. Here is the full input source:
\version "2.19.31"
#(set-global-staff-size 18)
\include "jazzchords.ily"
\include "lilyjazz.ily"

\paper {
  #(define fonts
     (set-global-fonts
      #:music "lilyjazz"
      #:roman "Pea Missy with a Marker"
      #:sans "Pea Missy with a Marker"
      #:factor (/ staff-height pt 20)))
}

\paper {
  #(set-paper-size "letter")
  indent = 0\mm
  between-system-space = 2.5\cm
  between-system-padding = #0
  %%set to ##t if your score is less than one page:
  ragged-last-bottom = ##f
  ragged-bottom = ##f
  markup-system-spacing = #'((basic-distance . 23)
                             (minimum-distance . 8)
                             (padding . 1))
}

title = #"All Of Me"
composer = #"-Simons & Marks"
meter = #"(Med. Swing)"

realBookTitle = \markup {
  \score {
    {
      \override TextScript.extra-offset = #'(0 . -4.5)
      s4
      s^\markup {
        \fill-line {
          \fontsize #1 \lower #1 \rotate #7 \concat { " " #meter }
          \fontsize #8
          \override #'(offset . 7)
          \override #'(thickness . 6)
          \underline \sans #title
          \fontsize #1 \lower #1 \concat { #composer " " }
        }
      }
      s
    }
    \layout {
      \once \override Staff.Clef.stencil = ##f
      \once \override Staff.TimeSignature.stencil = ##f
      \once \override Staff.KeySignature.stencil = ##f
      ragged-right = ##f
      \override TextScript.font-name = #"Pea Missy with a Marker"
    }
  }
}

\header {
  title = \realBookTitle
  tagline = ##f
}

theNotes = \relative c' {
  \set Staff.midiInstrument = "flute"
  \key c \major
  \showStartRepeatBar \bar "[|:"
  \repeat volta 2 {
    c'4 g8 e ~ e2 ~ |
    e2 \tuplet 3/2 { c'4 d c } |
    b4 gis8 e ~ e2 ~ |
    e1 |\break
    a4. g8 e2 ~ |
    e4 dis e8 bes' a4 |
    g2 f2 ~ |
    f1 |\break
    e4. ees8 d2 ~ |
    d2 e8 gis c4 |
    d2 c2 ~ |
    c1 | \break
    b4. bes8 a2 ~ |
    a2 a8 d b4 |
    a1 |
    b1 \bar "||" \break
    c4 g8 e ~ e2 ~ |
    e2 \tuplet 3/2 { c'4 d c } |
    b4 gis8 e ~ e2 ~ |
    e1 | \break
    a4. g8 e2 ~ |
    e4 dis e8 bes' a4 |
    g2 f2 ~ |
    f1 | \break
  }
  \alternative {
    {
      d'2 c4 b |
      d2. c4 |
      b2 e,4 g4 |
      b2. a4 | \break
      c2 a4 c |
      e2 e2 |
      c1 ~ |
      c1 \bar ":|][|:" \break
    }
    {
      d2 c4 b |
      d2. c4 |
      b2 e,4 g4 |
      b2. a4 | \break
      c2 a4 c |
      e2 e2 |
      c1 ~ |
      c1 \bar ":|]"
    }
  }
}

theChords = \chordmode {
  \repeat volta 2 {
    c1:maj c1:maj e:7 e:7 |
    a:7 a:7 d:m7 d:m7 |
    e:7 e:7 a:m7 a:m7 |
    d:7 d:7 d:m7 g:7 |
    c1:maj c1:maj e:7 e:7 |
    a:7 a:7 d:m7 d:m7 |
  }
  \alternative {
    {
      f1 f:m c2:maj e:m7 a1:7 |
      d:m7 g:7 c2:6 ees:dim d2:m7 g:7 |
    }
    {
      f1 f:m c2:maj e:m7 a1:7 |
      d:m7 g:7 c1:6 c1:6 |
    }
  }
}

theWords = \lyricmode {
  \repeat "volta" 2 {
    All of me
    Why not take all of me
    Can't you see
    I'm no good with -- out you

    Take my lips
    I want to lose them
    Take my arms
    I ne -- ver use them

    Your Good -- bye
    Left me with eyes that cry
    How can I go on dear with -- out you
  }
  \alternative {
    {
      You took the part
      That once was my heart
      So why not take all of me
    }
    {
      You took the best
      So why not take the rest
      Ba -- by take all of me.
    }
  }
}

\score {
  <<
    \new ChordNames \theChords
    \new Voice = vocals \theNotes
    \new Lyrics \lyricsto vocals \theWords
  >>
  \layout {
    % make only the first clef visible
    \override Score.Clef #'break-visibility = #'#(#f #f #f)
    % make only the first time signature visible
    \override Score.KeySignature #'break-visibility = #'#(#f #f #f)
    % allow single-staff system bars
    \override Score.SystemStartBar #'collapse-height = #1
    \override LyricHyphen.thickness = #4
    \override Score.VoltaBracket.font-name = #"Pea Missy with a Marker"
  }
  \midi {
    \tempo 4 = 88
  }
}
That's it for today! Let me know if I left anything out. Hopefully this tutorial brings lots of inspiration to you. If you happen to create your own leadsheet in the "Real Book" fashion, please let me know in the comments below! I'm sure others would be interested to see them too. Happy Engraving!

9 comments:

  1. Nicely done !
    Here is a solution for Finale with a plug-in: https://www.youtube.com/watch?v=IbWvnVJ5e4s

    To mimic the original New Real Book and Real Book chord symbols and titles Jochen Pietsch created some fonts which still can be found on his site in the web archive: http://tinyurl.com/otuzcqq

    ReplyDelete
    Replies
    1. Thanks for sharing, Jan! That looks like a great plugin! And just in case Jochen's website disappears forever, here's a backup download link to get his great text fonts.

      Delete
  2. Yess and cudos, but, where can I download the fonts?
    https://fonts.openlilylib.org/
    tells me they are moving, but where?

    ReplyDelete
    Replies
    1. I'm not prepared to tell you where just yet, but you will find out soon.

      Delete
    2. can't wait to see some new fonts .. i am new to Lilypond .. a monster app
      i hope the fonts will be free

      Delete
  3. Hi,
    I started a project applying a realbook layout to many scores instead of one, i.e. separating content from layout: https://github.com/941design/realbook
    Thanks for the inspiration.

    ReplyDelete
  4. hello abraham. Any updates for LilyPond 2.24 ?

    ReplyDelete