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!

Dec 23, 2014

Merry Christmas!

To everyone out there, firstly, I want to wish the happiest of holidays, in whatever form you choose to celebrate. I truly hope these holidays are wonderful for each of you. It's a time to remember those that we love and the friendships we cherish. Hope the new year brings lots of great opportunities to each of you.

Last Sunday I performed my own arrangement of Oh, Come, All Ye Faithful for my local congregation. It turned out wonderfully and I certainly felt the spirit of Christmas as I sang it. My little brother, a very talented pianist, composer, arranger, improvisor, etc., accompanied me on the piano, though I wish we could have done it with the organ. If you're interested, here's the sheet music for your enjoyment. Feel free to download and use!


Dec 14, 2014

New Music Font: Sebastiano

So, I've actually had this done for a little while, but just hadn't released it yet. This new font is a OFL derivative of a (basically) non-public OFL-licensed font designed by engraver/composer Florian Kretlow (github source). It follows what I call the "inky" look, where internal corners (at least some of them) get "rounded" by what would have been caused by the capillary action of the liquid ink. Here's a sample (click to see a full-size PDF).



I think the font itself is quite nice. It has some inconsistencies that bother me a little, though. For example, the default flat symbol is thicker in the stem than inside the eyelet. The second f in the "sffz" ligature is different from the first. Having these inconsistencies doesn't make the font BAD, per se, just not to my taste.



Fortunately, in the source files, there were a bunch of other variants in his source files that were more to my liking. Here's the same score as above, but with my selected variants, as done in LilyPond.


The new font is available at fonts.openlilylib.org. Go get it! Here's a more extensive example: Grieg's Piano Concerto in A-minor, Second Movement.