# Engraving Sheet Music

# LilyPond

The LilyPond notation engraver can be used with LaTeX via the lilypond-book command. First lets create a LaTeX document (with the file extension .lytex) to embed our music in:



    {\fontsize{24pt}{24pt}\textbf{Twa Corbies}}\\

    \textsc{Your Name}

% We don't need to require anything for this because lilypond-book will process it.

Then we create our LilyPond file (.ly), including the lilypond-book-preamble.ly file (which LilyPond will know how to find):

\version "2.16.2"

\include "lilypond-book-preamble.ly"

voice = <<
    \relative c' {
        \tempo "con affetto"
        \clef bass
        \key e \minor
        \time 3/4

        a a b | c a a | g a2 |
        a4 a b | c2 ~ c8 a8 | a8 g a2 |
        \bar "|."
        As I was wal -- king all a -- lane
        I heard twa cor -- bies make a mane.

\score {
        \new Staff = "voice" {
    \layout { }
    \midi {
        \context {
            tempoWholesPerMinute = #(ly:make-moment 90 4)

to build, we then run the lilypond-book command:

lilypond-book --include=mymusicsourcedirectory/ --pdf TwaCorbies.lytex

which will output a PDF containing your LilyPond engraved music:

enter image description here (opens new window)