[icon]

GNU LilyPond

-- --

What is LilyPond
Home
Examples
Templates
Download
GNU/Linux binaries
Windows binaries
Source code
Documentation
Tutorial
Manual
Glossary
Index

Support
Mailing lists
Search
WikiWiki

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

Default contexts

Most music expressions don't need an explicit \context declaration: they inherit the notation context from their parent. Each note is a music expression, and as you can see in the following example, only the sequential music enclosing the three notes has an explicit context.

     \score { \notes \context Voice = goUp { c'4 d' e' } }
     
[picture of music]

There are some quirks that you must keep in mind when dealing with defaults:

First, every top level music is interpreted by the Score context; in other words, you may think of \score working like

     \score {
       \context Score music
     }
     

Second, contexts are created automatically to be able to interpret the music expressions. Consider the following example.

     \score { \context Score \notes { c'4-( d' e'-) } }
     
[picture of music]

The sequential music is interpreted by the Score context initially (notice that the \context specification is redundant), but when a note is encountered, contexts are setup to accept that note. In this case, a Thread, Voice, and Staff context are created. The rest of the sequential music is also interpreted with the same Thread, Voice, and Staff context, putting the notes on the same staff, in the same voice.

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 (address unknown)

Copyright (c) 1997--2002 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.7.14 (development-branch) by

Buchan Milne <(address unknown)>, Thu Mar 6 21:11:35 2003 CET.