]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/examples.itely
Deleted some accidentally double-pasted lines in lilypond-book.itely; began
[lilypond.git] / Documentation / user / examples.itely
1 @node Example templates
2 @chapter Example templates
3
4 This section of the manual contains templates with the LilyPond score
5 already set up for you.  Just add notes, run LilyPond, and enjoy
6 beautiful printed scores!
7
8 @menu
9 * Single staff::
10 @end menu
11
12 @c   more sections to come soon.
13
14
15 @node Single staff
16 @section Single staff
17
18 The first example gives you a staff with notes, suitable for a solo
19 instrument or a melodic fragment.  Cut and paste this into a file,
20 add notes, and you're finished!
21
22 @lilypond[verbatim]
23
24 melody = \relative c' {
25 \clef treble
26 \key c \major
27 \time 4/4
28
29   a4 b c d
30 }
31
32 \score{
33   \new Staff \melody
34   \paper { }
35   \midi { \tempo 4=60 }
36 }
37
38 @end lilypond
39
40 @*
41
42 The next example demonstrates a simple melody with lyrics.  Cut and
43 paste, add notes, then words for the lyrics.  This example turns off
44 automatic beaming, which is common for vocal parts.  If you want to use
45 automatic beaming, you'll have to change or comment out the relevant
46 line.
47
48 @lilypond[verbatim]
49
50 melody = \relative c' {
51 \clef treble
52 \key c \major
53 \time 4/4
54
55   a4 b c d
56 }
57
58 text = \lyrics {
59   Aaa Bee Cee Dee
60 }
61
62 \score{
63   <<
64     \context Voice = one {
65       \set Staff.autoBeaming = ##f
66       \melody
67       }
68     \lyricsto "one" \new Lyrics \text
69   >>
70   \paper { }
71   \midi { \tempo 4=60 }
72 }
73
74 @end lilypond
75
76
77
78
79