[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

Context properties

Notation contexts have properties. These properties are from the .ly file using the following expression:

     \property contextname.propname = value
     

Sets the propname property of the context contextname to the specified Scheme expression value. All propname and contextname are strings, which are typically unquoted.

Properties that are set in one context are inherited by all of the contained contexts. This means that a property valid for the Voice context can be set in the Score context (for example) and thus take effect in all Voice contexts.

If you don't wish to specify the name of the context in the \property-expression itself, you can refer to the abstract context name, Current. The Current context is the latest used context. This will typically mean the Thread

context, but you can force another context with the \property-command. Hence the expressions

     \property contextname.propname = value
     

and

     \context contextname
     \property Current.propname = value
     

do the same thing. The main use for this is in macros - allowing the specification of a property-setting without restriction to a specific context.

Properties can be unset using the following expression:

     \property contextname.propname \unset
     

This removes the definition of propname in contextname. If propname was not defined in contextname (but was inherited from a higher context), then this has no effect.

BUGS

The syntax of \unset is asymmetric: \property \unset is not the inverse of \property \set.

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.