Node: Music expressions, Next: , Up: Music storage format



Music expressions

Notes, rests, lyric syllables are music expressions. Small music expressions may be combined to form larger ones, for example, by enclosing a list of expressions in \sequential { } or << >>. In the following example, a compound expression is formed out of the quarter note c and a quarter note d:

     \sequential { c4 d4 }
     

The two basic compound music expressions are simultaneous and sequential music:

     \sequential { musicexprlist }
     \simultaneous { musicexprlist }
     

For both, there is a shorthand:

     { musicexprlist }
     

for sequential and

     << musicexprlist >>
     

for simultaneous music. In principle, the way in which you nest sequential and simultaneous to produce music is not relevant. In the following example, three chords are expressed in two different ways:

     \notes \context Voice {
       <<a c'>> <<b d'>> <<c' e'>>
       << { a b c' } { c' d' e' } >>
     }
     

[picture of music]

However, using << and >> for entering chords leads to various peculiarities. For this reason, a special syntax for chords was introduced in version 1.7: < >.

Other compound music expressions include:

     \repeat expr
     \transpose from to expr
     \apply func expr
     \context type = id expr
     \times fraction expr
     

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

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