Lilypond Template

With Lilypond each time I start a new project I start with a template file….here is the code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Headers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version “2.10.33″
\header {
title = “”
subtitle = “”
tagline = “Eugene Cormier – 2008″
}
\paper {
print-page-number = ##f
ragged-last-bottom = ##t
ragged-right = ##f
indent = 0\in
}
#(set-global-staff-size 20)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Variables
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Time
notimesig = { \override Staff.TimeSignature #’transparent = ##t }
numbertimesig = { \override Staff.TimeSignature #’style = #’() }

% Key
nokeysig = { \override Staff.KeySignature #’transparent = ##t }
nokeycancel = { \set Staff.printKeyCancellation = ##f }

% Barlines
nobarlines = { \override Staff.BarLine #’transparent = ##t }
nobarlinenumbers = { \override Score.BarNumber #’transparent = ##t }

% Clefs
noclefresize = { \override Staff.Clef #’full-size-change = ##t }
noclef = { \override Staff.Clef #’transparent = ##t }

% notes
nonoteheads = { \override NoteHead #’transparent = ##t }
nostems = { \override Stem #’transparent = ##t }
nobeams = { \override Beam #’transparent = ##t }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Body
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

After this all I need to do is put in the code for the music I want to enter and I have variables defined for most of the most common changes I need to make.

Note: before using this code you should:

  • change the \version # to match whichever version of lilypond you are using….remember this number is very important for down the road when new versions of Lilypond are released….if some of the code is different in newer versions, this number will help Lilypond automatically update your code to work with the new version
  • change the tagline to your own name

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>