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.

Dec 8, 2015

A Small Holiday Gift

So, I've not been able to keep this blog as up-to-date as I'd like to. To remedy that a little, here's a small holiday gift to you. This gift was originally given by Mark Adler on the Finale Blog, but since he offered it freely, I decided to pass it along, with a little extra for all the LilyPond users out there.


Sep 10, 2015

Gorgeous Plate Engraving Pics

In a Facebook post today from Bärenreiter-Verlag, they shared some images of the good-ol'-days of real plate engraving that I think any modern computer music engraver/copyist/etc. will appreciate. I know I do. This comes from the golden-era of music publishing, folks! I share them here for long-term enjoyment just in case the above post/pictures disappear from Facebook.

Jul 6, 2015

Quick Summer 2015 Update

It seems like I've been out of the loop for too long, so I thought I'd post a quick update with info about what I've been up to.

Jun 2, 2015

New LilyPond Templates (part 2)

As promised, here is the second installment of templates. I've created templates for Rock and Pop, Jazz, and Latin style scores.

May 27, 2015

New LilyPond Templates (part 1)

Greetings, everyone!

It feels strange to (once again) not have put up a post before another month passed, but, alas, it has happened again. Let's remedy the situation!

I've decided to take it upon myself to create a small library of LilyPond 2.18.2 template files that are inspired by those found in the latest version of Sibelius (7.5). When all is said and done, I plan on replicating ALL of its templates in the following categories:
  1. No Category
  2. Solo Instruments
  3. Band
  4. Chamber Groups
  5. Choral and Song
  6. Handbells
  7. Jazz
  8. Latin
  9. Marching Band and Percussion
  10. Orchestral
  11. Orff Instruments
  12. Rock and Pop
So far, I've got #1 and 2 done, but hopefully will be able to pick up the pace and get the others cranked out. I've tried to follow Sibelius' designs as faithfully as possible in hopes that Sibelius users who are familiar with them will find the change over to LilyPond that much easier.

Apr 20, 2015

Recent Developments

Wow, over a whole month has gone by without a post. Well, I've been busy working on myriad of (mostly font-related) projects. I'm still not quite done with most of them, but here are some highlights of my latest adventures that will hopefully be released soon:

Mar 5, 2015

Different Staff Sizes

I've seen a lot of discussion as to how to deal with staves of different heights, either within the same score or elsewhere. I don't propose to have a great solution for this, but I'd like to share something I discovered (accidentally) while preparing some LilyPond tutorials.

Feb 18, 2015

Panorama Mode

Do you come from a notation program that has a "Panarama" mode for viewing your score? Well, fear not! Such a feature exists even in LilyPond to make you feel right at home, but it's not called "Panorama". It's a layout algorithm called ly:one-line-breaking.

To have your score print on a single sheet that adjusts to the length of the score, use the following code:
\paper {
  page-breaking = #ly:one-line-breaking
}
For example, here are the first two pages from a 3-page score in "normal paper" mode:


And here's how it looks when we use the one-line-breaking algorithm (cropped slightly):


That's it! Now, there are some things to remember about using this mode (from the official docs):
  1. Each score gets its own line, but everything is on a single page.
  2. All text in the \header block is NOT typeset, which is fine since this is really more of a preview mode anyway.
  3. The width of the page will be adjusted so the longest score fits on one page.
  4. Some variables in the \paper block will be ignored (like paper-width, indent, line-width) while others will be honored (like left-margin, right-margin, etc.).
  5. The height of the page is un-changed, but honored to whatever you set it to be.
Personally, I wish the height of the page automatically fit to the scores, but oh-well.

Do you miss this mode? Do you find it useful? Let me know in the comments!

Feb 7, 2015

Font Update (Improviso, Ross, Profondo)

Another set of updates have been applied and are now available on my font site: fonts.openlilylib.org. Here are the highlights:
  • Improviso (v1.1)
    • Fixed a bad contour in the clefs.C_change glyph.
    • Packaged three hand-written text fonts (one of my own creation) to compliment the font style.
  • Ross (v1.1)
    • Thickened up the scripts.tenuto articulation (which also updated the up and down portato).
    • Added information about the IM FELL text fonts.
  • Profondo (no version change)
    • Packaged my tuplet number font so the style is more consistent (the glyphs come from Bravura). The \override is now part of the default profondo.ily stylesheet.
If you haven't been over there in a while, go check them out and let me know if something is not working correctly!

Do you have a score that uses one of your favorite music fonts? Let me know so I can add it as an example on the respective font page!

Happy Engraving!

Feb 4, 2015

Engraver Spotlight: David Stephen Grant

I was recently introduced to the composer/engraver David Stephen Grant, who shared with me a very lovely score he had composed and engraved using LilyPond. The score is done with my Ross music font (and accompanying stylesheet), complimented perfectly by the IM Fell English text font.


David shared with me some background to the score:
... "Overture to Bérénice" was actually used as an Overture to a modern theatre production of Racine's "Bérénice" that I composed and contributed sound design for. The music quickly moved from this "Baroque" atmosphere into more noisy electronic sound design, ...
Great job, David, and thanks for sharing this with us!



Have you engraved something you'd like to feature here that shows off one of my music fonts? Let me know or provide a link in the comment section!

Jan 23, 2015

Update to fonts website!

I'm proud to announce a few nice updates to fonts.openlilylib.org today! I had wanted to make some changes and add a few things since the last major update and I finally got around to it. Here are the changes:
  • Updated fonts: A few fonts had "hole" artifacts from overlapping contours when using certain programs to view the glyphs (such as Inkscape, Adobe Acrobat PDF, etc.). These have now been fixed and any future use of these glyphs should result in the proper forms. Specifically, the fonts affected by this update are: Beethoven, Improviso, LilyJAZZ, Ross, and Scorlatti. If you notice any others, let me know!

  • Font stylesheets: A few minor additions to the stylesheets have been included and on each page there is now a direct link to the respective stylesheet itself for easier viewing and downloading.

  • Font viewer: I've added a convenient way to quickly look through the main glyphs in each font and compare them to others. This is what I'd wanted to do for some time and now it's finally here. Go check it out!

  • Documentation: All documentation about installation and usage that used to be on the main page has been moved to a dedicated page to keep the landing page simpler. As always, if a link is broken, I want to hear about it.
I always am trying to improve the look-and-feel of the page, so you may see some minor changes there too. Are things working on your machine/browser? Do you like the changes? Let me know in the comments!

Jan 20, 2015

Advanced Staff Grouping

Man, I love the LSR! There are so many interesting snippets there. I had to write a quick post about this one, too:

To be honest, the big orchestral brace looks a bit ugly to me (no offense to the original creators). It uses postscript code (and that's probably the point of the snippet) and requires a bunch of unnecessary \overrides. Let's clean it (and the code) up a bit!

In this snippet, a handful of useful new contexts are created to assist in grouping things together. The main contexts that already exist are: Score, GrandStaff, StaffGroup, Staff, Voice, etc. We can create new contexts by aliasing the appropriate default contexts. For example, if we want to create a "ViolinGroup", because we'd like to give a staff to the 1st and 2nd violin groups, we can do so like this:
\layout {
  \context {
    \StaffGroup
    \name ViolinGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBrace
  }
}
The ViolinGroup now behaves like a StaffGroup, but with a system brace as its group indicator. The snippet goes on to similarly create a WindGroup, but uses the default system bracket as the group indicator, inheriting from StaffGroup.

Going further, we now create a StringGroup, intended for including the ViolinGroup as well as the normal Staff for the violas, cellos, and contrabasses:
\layout {
  \context {
    \StaffGroup
    \name StringGroup
    \alias StaffGroup
    \accepts ViolinGroup
    systemStartDelimiter = #'SystemStartBracket
  }
}
Since StaffGroup already \accepts the Staff context, there is no need to repeat that here, but we do need to explicitly say "\accepts ViolinGroup" since that's a custom context. The StringGroup would then need to be accepted by the context containing it (if necessary, which it is here):
\layout {
  \context {
    \StaffGroup
    \name OrchestraGroup
    \accepts WindGroup
    \accepts StringGroup
    \remove "System_start_delimiter_engraver"
  }
}
We remove the "System_start_delimiter_engraver" because we don't want it to show up right by the system itself, so we will customize this in the instrumentName variable. For this, we're going to rotate the text "Orchestra" vertically and add a large brace to show the correct grouping:
\markup { 
  \lower #0.75 \rotate #90 "Orchestra" \hspace #1
  \left-brace #175 \hspace #5
}
The extra "\hspace" commands are just to give each element a good amount of space. The last little bit of \override-ing we need to do is for the regular instrument names:
\layout {
  \context {
    \Staff
    \override InstrumentName.font-size = #-1
    \override InstrumentName.extra-offset = #'(6 . 0)
  }
}
If we didn't do these, they will show up too far-away to the system (depending on the value of "indent", of course) and to help with spacing we decrease the font-size slightly.

Those are the main building blocks we need. Here's the full updated snippet:
\version "2.18.2"
%% http://lsr.di.unimi.it/LSR/Item?id=906

% by Kieren MacMillan and P.P.Schneider.
% => http://lists.gnu.org/archive/html/lilypond-user/2013-03/msg00260.html

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LSR workaround:
#(set! paper-alist (cons '("snippet" . (cons (* 90 mm) (* 120 mm))) paper-alist))
\paper {
  #(set-paper-size "snippet")
  tagline = ##f
}

\markup \vspace #1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%here starts the snippet:

someMusic = { 
  \tempo "Andante."
  \time 3/4
  \key c \minor
  c'2. r8 
}

\paper { 
  indent = 40 
}

\layout {
  \context {
    \Staff
    \override InstrumentName.font-size = #-1
    \override InstrumentName.extra-offset = #'(6 . 0)
  }
  \context {
    \StaffGroup
    \name ViolinGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBrace
  }
  \context {
    \StaffGroup
    \name WindGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBracket
    \override SystemStartBracket.collapse-height = #1
  }
  \context {
    \StaffGroup
    \name StringGroup
    \alias StaffGroup
    \accepts ViolinGroup
    systemStartDelimiter = #'SystemStartBracket
  }
  \context {
    \StaffGroup
    \name OrchestraGroup
    \accepts WindGroup
    \accepts StringGroup
    \remove "System_start_delimiter_engraver"
    instrumentName = \markup { 
      \lower #0.75 \rotate #90 "Orchestra" \hspace #1
      \left-brace #175 \hspace #5
    }
  }
  \context {
    \GrandStaff
    \remove "System_start_delimiter_engraver"
    \accepts OrchestraGroup
    \accepts StaffGroup
    \accepts VocalGroup
  }
  \context {
    \StaffGroup
    \name VocalGroup
    \alias StaffGroup
    systemStartDelimiter = #'SystemStartBracket
  }
}

\score {
  \new GrandStaff <<
    \new OrchestraGroup <<
      \new WindGroup <<
        \new Staff \with { 
          instrumentName = "Oboe" 
        } \someMusic
      >>
      \new StringGroup <<
        \new ViolinGroup <<
          \new Staff \with { 
            instrumentName = "Violino I" 
          } \someMusic
          \new Staff \with { 
            instrumentName = "Violino II" 
          } \someMusic
        >>
        \new Staff \with { 
            instrumentName = "Viola" 
          } { \clef C \someMusic }
      >>
    >>
    \new VocalGroup <<
      \new Staff \with { 
       instrumentName = "Soprano" 
      } \someMusic
      \new Staff \with { 
       instrumentName = "Alto" 
      } { \clef C \someMusic }
    >>
  >>
}
What do you think? Let me know in the comments. What other contexts have you used/created before? How have you shown grouped instruments? I'd love to hear your experiences.

Jan 5, 2015

Increasing the horizontal size of a single measure

So, I couldn't help but make a small post about this when I saw it, since I've heard numerous people ask about it. In programs like Musescore, to increase/decrease the size of a measure, there's a keyboard shortcut for that. In LilyPond, since the horizontal spacing engine makes the whitespace "springy" and compressible, it's a less straightforward process. The documented ways of adjusting the horizontal spacing are found in the Notation Reference (NR), so I won't go over them here (well, maybe later).

As I was browsing through the LilyPond Snippet Repository (LSR), looking for something completely different, I stumbled upon this little trick for adjusting measure width. Unfortunately, it is only helpful for increasing the width. Let's start with a simple score:
\new Voice \relative c' {
  \dynamicUp
  << { c1 } { s2\f s2\p } >> | \noBreak
  f4 e d c | \noBreak
  << { c1 } { s2\f s2\p } >> | \noBreak
  d2 e | \break
}
The issue we'd like to remedy is the horizontal spacing given to the dynamics in the first measure, which we will adjust in the third measure for comparison. The real trick here is to use a parallel voice that contains basically no musical information, but allows us to override some dimensions. Using a MultiMeasureRest (MMR) gives us access to a property called "minimum-length". This is what we will use to force the measure to extend in length, thus creating more space for the second dynamic marking. To make it more useful, I wrapped the code within a music function that we can reuse.
extender = #(define-music-function (parser location length music) 
            (number? ly:music?)
            #{
               <<
                 { $music }
                 \new Voice {
                   \override MultiMeasureRest.transparent = ##t
                   \override MultiMeasureRest.minimum-length = #length
                   R1
                 }
               >>
             #})
This function takes two arguments. The first sets the value for "minimum-length". By definition, if the measure is already as long or longer than this value, then nothing changes. The second argument is the music expression that the spacing should apply to. There are two things to remember with this:
  1. The above code assumes the largest duration is a whole note, so you will need to change the duration of the MMR if you are using a different time signature ("R2." for 3/4 time, etc.).
  2. It's designed to extend the length of ONE measure only. Repeat as necessary.
Now, let's put it to use:
\version "2.18.2"

\paper {
  line-width = 9\cm
  indent = 0
}

extender = #(define-music-function (parser location length music) 
            (number? ly:music?)
            #{
               <<
                 { $music }
                 \new Voice {
                   \override MultiMeasureRest.transparent = ##t
                   \override MultiMeasureRest.minimum-length = #length
                   R1
                 }
               >>
             #})

\markup "Before"
\new Voice \relative c' {
  \dynamicUp
  << { c1 } { s2\f s2\p } >> | \noBreak
  f4 e d c | \noBreak
  << { c1 } { s2\f s2\p } >> | \noBreak
  d2 e | \break
}

\markup "After"
\new Voice \relative c' {
  \dynamicUp
  << { c1 } { s2\f s2\p } >> | \noBreak
  f4 e d c | \noBreak
  \extender #12 << { c1 } { s2\f s2\p } >> | \noBreak
  d2 e | \break
}


That looks better (focus is on the third measure, of course) and certainly could be adjusted further, but we'll stop there for now, having accomplished our goal.

I'm still on the lookout for a more convenient solution for "shrinking" a measure, but some of the methods in the NR (above) can help with this.

Got any other great ideas for shrinking or expanding measures to make the page look better? Share them in the comments!