[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:Invisible grobs, Next:, Previous:Text markup, Up:Tuning output



Invisible grobs

You can imagine a number of situations where you would want to make certain grobs not show up in the output. There may be aesthetic reasons, to make the output resemble an (old) manuscript as close as possible, or to make lessons or exercises for students.

Grobs can be made invisible in a number of ways:

Here's an example with blanked-out notes and stems:

blanknotes = {
  \property Voice.NoteHead \override
    #'transparent = ##t
  \property Voice.Stem \override
    #'transparent = ##t }

unblanknotes = {
  \property Voice.NoteHead \revert #'transparent
  \property Voice.Stem \revert #'transparent }

\score {
  \notes\relative c'' {
    \time 6/4
    a b c b \blanknotes c \unblanknotes d
  }
}

[picture of music] This method makes the grobs invisible but they still take the normal space. To remove all traces of the grob, you can redefine the function typesetting them:

\score {
  \notes\relative c'' {
    \key c \minor
    \time 6/4
    as bes c bes c d \break
    \property Staff.KeySignature \override #'molecule-callback = #'()
    as bes c bes c d
  }
  \paper{linewidth=5.0\cm indent=0}
}

[picture of music]

A very rigorous way of removing grobs from the whole score is to remove the engraver that creates them. For example,

\score {\notes { c'4 d'8 e'8 g2 }
  \paper { \translator {
     \VoiceContext
     \remove Stem_engraver
  } }
}

[picture of music]

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.