Recherche…


LilyPond

Le graveur de notation LilyPond peut être utilisé avec LaTeX via la commande lilypond-book . Commençons par créer un document LaTeX (avec l'extension de fichier .lytex ) pour intégrer notre musique dans:

\documentclass[letterpaper,12pt]{article}

\begin{document}

\begin{center}
    {\fontsize{24pt}{24pt}\textbf{Twa Corbies}}\\
\end{center}

\begin{flushright}
    \textsc{Your Name}
\end{flushright}

% We don't need to require anything for this because lilypond-book will process it.
\lilypondfile{TwaCorbies.ly}
\end{document}

Ensuite, nous créons notre fichier LilyPond ( .ly ), y compris le fichier lilypond-book-preamble.ly (que LilyPond saura trouver):

\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 "|."
    }
    \addlyrics{
        As I was wal -- king all a -- lane
        I heard twa cor -- bies make a mane.
    }
>>

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

pour construire, nous lilypond-book ensuite la commande lilypond-book :

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

qui affichera un fichier PDF contenant votre musique gravée LilyPond:

entrer la description de l'image ici



Modified text is an extract of the original Stack Overflow Documentation
Sous licence CC BY-SA 3.0
Non affilié à Stack Overflow