\documentclass{article}
\thispagestyle{empty}

\begin{document}

This is a LilyPond snippet \begin{lilypond} {c' e' g'}
\end{lilypond} embedded in the \LaTeX{} source.

This is another LilyPond excerpt that uses the \texttt{lilypond}
environment:

\medskip

\begin{lilypond}
  \score {
    \relative c' {
      \time 4/4
      \clef treble
      c4 d8 e f8 g a b | c4 b8 a g8 f e d |
      c8 g' e g c,8 g' e g | c,4 e c r \bar "|."
    }
  } % end of  score
\end{lilypond}

\medskip

End of document.

\end{document}
