[icon]

GNU LilyPond

Welcome to the home of the GNU Music Typesetter

What is LilyPond
General information
Simple examples
Complex examples
Download
GNU/Linux binaries
Windows
Source code
Documentation
Tutorial
Manual
Glossary
other ...

Support
Mailing lists
Search
WikiWiki
FAQs

External sites
lilypond.org/development
lilypond.org/stable
ftp.lilypond.org
Mutopia
Other music online

Node:Grace notes, Next:, Previous:Text scripts, Up:Ornaments



Grace notes

Grace notes are ornaments that are written out, but do not take up any logical time in a measure. LilyPond has limited support for grace notes. The syntax is as follows.

  \grace musicexpr

When grace music is interpreted, a score-within-a-score is set up: musicexpr has its own time bookkeeping, and you could (for example) have a separate time signature within the grace notes. While in this score-within-a-score, you can create notes, beams, slurs, etc. Unbeamed eighth notes and shorter by default have a slash through the stem.

\relative c'' {
  \grace c8 c4 \grace { [c16 c16] } c4
  \grace { \property Grace.Stem \override #'flag-style = #'() c16 } c4
}

[picture of music]

A grace note expression has duration 0; the next real note is assumed to be the main note. If you want the note to appear after the main note, set Voice.graceAlignPosition to 1.

BUGS

At present, slurs or ties from the grace notes to the following notes are not supported. Also, nesting \grace notes is not supported. The following may cause run-time errors:

  \grace { \grace c32 c16 } c4
Since the meaning of such a construct is unclear, we don't consider this a loss. Similarly, juxtaposing two \grace sections is syntactically valid, but makes no sense and may cause runtime errors. Ending a staff or score with grace notes may also generate a run-time error, since there will be no main note to attach the grace notes to.

The present implementation of grace notes is not robust and generally kludgey. We expect it to change after LilyPond 1.4. Syntax changes might also be implemented.

Go back to index of LilyPond.

Please send GNU LilyPond questions and comments to lilypond-user@gnu.org.

Please send comments on these web pages to lilypond@packages.debian.org

Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.


This page was built from LilyPond-1.4.12 (stable-branch) by

Anthony Fok <lilypond@packages.debian.org>, Tue Mar 12 01:35:39 2002 HKT.