LilyPond Templates for TwinNote

LilyPond offers a nice set of templates to help you get started.  Sheet music for piano with lyrics?  There’s a template for that.  Single staff with chord names printed above it?  There’s a template for that.  And now… Sheet music in TwinNote music notation?  There are now templates for that as well.

Just go to TwinNote.org’s LilyPond page, download a template file, enter your music into it as with any regular LilyPond template, and sit back and be amazed as it automatically displays your music in TwinNote notation.  (Don’t forget to download the “twinnote-scripts.ly” file and put it in the same directory as your template file.)

These template files are based on the official LilyPond templates.  Currently all of the single staff and piano templates are available for TwinNote.  If anyone wants to create TwinNote scores for orchestra, vocal ensemble, string quartet, or something else please let me know.

In addition to creating the template files themselves, several improvements have been made to the code for typesetting TwinNote notation with LilyPond.  First, some improvements that directly impact the appearance of the music:

  • The custom TwinNote note heads will now be resized properly when you increase or decrease the size of a given staff.  This lets you print music at a larger size if you want to.
  • The new note head resizing code allows grace notes, appoggiaturas, and acciaccaturas to also be correctly resized.  Before these changes they would be the same size as regular notes rather than smaller.
  • TwinNote’s alternative accidental signs are now shown by default. They are still a work in progress, and they can always be turned off so that they are not shown by making a simple change to the template file.
  • Currently key signatures are not shown, but a workaround is to indicate the key signature and any key changes by using text.
  • Update, Nov. 8: the note head shapes have been revised and are now a slightly rounded triangle shape.  They should be somewhat easier to read and are more aesthetically pleasing.  Basically this is like a different “font” for TwinNote (although no actual font files are used since the note head shapes are defined directly in the scripts). A future post will discuss this in more detail, with illustrations.

Second, some changes to the way the TwinNote customizations are implemented:

  • The custom TwinNote scripts are now contained in an external “twinnote-scripts.ly” file.  This file is then “included” in the template files.  This means you can update the scripts file in one place without also having to update every single piece of music that you have typeset. You just have to put the scripts file in the same directory as your music/template files for it to work.
  • All of the “overrides” that need to be applied to each staff are now grouped together in a single variable in the “twinnote-scripts.ly” file and are applied to the staff by using that variable.
  • Update, Nov. 8: the twinnote-scripts.ly file now defines a custom “TwinNoteStaff” “StaffTwinNote” context that includes all of the “overrides” that are needed to convert a traditional staff into a TwinNote staff.  That way all you have to do is use “TwinNoteStaff” “StaffTwinNote” instead of “Staff” which is much easier and quicker than having to alter the staff with all of the necessary overrides.  This step is already done in the template files, but you would need to do this to convert an existing .ly sheet music file to TwinNote.

Third, some “under the hood” changes that you probably do not need to know about:

  • The custom note heads and accidental glyphs are now drawn using internal LilyPond stencil code, rather than using embedded postscript code.  This is better for various reasons, including making it possible to render to an SVG image in addition to postscript, which might come in handy some day.
  • A few of the more complex scripts in the “twinnote-scripts.ly” file have been rewritten to make them more clear and efficient.

Many thanks to the kind folks on the LilyPond user mailing list who provided invaluable help with the Scheme code for resizing custom note heads and advice on switching away from using embedded postscript for the note head glyphs.

If you give these templates a try please let us know what you think!

Update, Nov 9: here is an illustration of TwinNote’s alternative accidental signs, automatically rendered by LilyPond in place of traditional accidental signs.  They are optional and are still a work in progress. You can read more about them on the accidental signs page.

Illustration of TwinNote's alternative accidental signs rendered by LilyPond

 

Posted on by Paul Morris | Permalink.

One thought on “LilyPond Templates for TwinNote

  1. Pingback: New TwinNote Note Head "Font" | Blog | TwinNote Music Notation

Comments are closed.