File structure (introduction) - GNU LilyPond
Description: GNU LilyPond

Next: File structure, Up: Input files

#### 10.1.1 File structure (introduction)

A basic example of a lilypond input file is

    \version "2.8.0"
    \score {
      { }     % this is a single music expression;
                % all the music goes in here.
      \header { }
      \layout { }
      \midi { }
    }

There are many variations of this basic pattern, but this example serves as a useful starting place.

The major part of this manual is concerned with entering various forms of music in LilyPond. However, many music expressions are not valid input on their own, for example, a `.ly` file containing only a note

    c'4

will result in a parsing error. Instead, music should be inside other expressions, which may be put in a file by themselves. Such expressions are called toplevel expressions. The next section enumerates them all.

This page is for LilyPond-2.8.8 (stable-branch).

Other languages: English.
Using automatic language selection.