Next: , Up: Tutorial


2.1 First steps

The first example demonstrates how to enter the most elementary piece of music, a scale. A note can be entered by typing its name, from `a' through `g'. So, if you enter

c d e f g a b

the result looks like this

[image of music]

The duration of a note is specified by a number after the note name. `1' for a whole note, `2' for a half note, `4' for a quarter note and so on

a1 a2 a4 a16 a32

[image of music]

If you do not specify a duration, the duration last entered is used for the next notes. The duration of the first note in input defaults to a quarter

a a8 a a2 a

[image of music]

A rest is entered just like a note, but with the name `r'

r2 r4 r8 r16

[image of music]

Add a dot `.' after the duration to get a dotted note

a2. a4 a8. a16

[image of music]

The (or time signature) can be set with the \time command

\time 3/4
\time 6/8
\time 4/4

[image of music]

The clef can be set using the \clef command

\clef treble
\clef bass
\clef alto
\clef tenor

[image of music]

Remember to enclose the notes and commands in curly braces ... } to convert it to printable output.

[image of music]

For more elaborate information on

Entering pitches and durations
see Pitches, and Durations.
Clefs
see Clef.
Rests
see Rests.
Time signatures and other timing commands
see Time signature.

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

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.