SVG Images, Rests, LilyPond 2.17

I recently re-created most of the images on the site so that they have TwinNote’s newer “rounded-triangle” note heads.  This lead me to improve the positioning of rests (when using LilyPond to create sheet music in TwinNote), and upgrade to LilyPond 2.17 as well.

The new images were all created with LilyPond by rendering to SVG images and then making some minor edits in Inkscape.  A big advantage of the SVG images is that they will scale to any resolution without degrading in quality.  This makes them much more flexible and “future proof,” especially with different screens and resolutions.

Since IE8 does not support SVG images and apparently there are still people using IE8, I even made PNG fallback images (exported from Inkscape) for IE8 to use instead.  Some javascript detects when the PNG images are needed and swaps them in.  This is more than IE8 deserves…

In the process I remembered that the default vertical placement of rests (on the custom TwinNote staff created with LilyPond) could use some adjustment.  So I created a new function to add to the twinnote-scripts.ly file that adjusts the position of rests.  In the process I upgraded to LilyPond 2.17 (the development branch) which handles rest positioning on custom staves better than LilyPond 2.16 (the stable branch).  So the new version of the twinnote-scripts.ly file provides better rest placement and requires using LilyPond 2.17.  All the template files on the Software page and the music on the Sheet Music page have been updated to the new version.

Here is an image illustrating the improvements:

Improvements to position of rests in TwinNote music notation

Another small change when using the twinnote-scripts.ly file is that instead of using \new TwinNoteStaff you now use \new StaffTwinNote.  This matches the naming pattern used in the MNP-scripts.ly file for better consistency.  Finally, the formatting of this new version of the twinnote-scripts.ly file is better, making it easier to navigate.

It is encouraging that when it comes to the work of making it possible to produce TwinNote sheet music with LilyPond, at this point what has already been accomplished seems much greater than what there is left to do.

Posted on by Paul Morris | Permalink.