Product SiteDocumentation Site

12.6.5.3. Make some Elements Transparent

This involves some more advanced tweaking. Explain this sort of command.
Every layout object has a "stencil" property. By default, this is set to whatever function draws the object. If you set that property to #f, which means "false", then the drawing function is not called, and the object will not appear on the score.
Every layout object also has a "transparent" property. By default, this is set to #f ("false"). Setting it to #t ("true") will make the object transparent.
You can use "\once \override ..." or \revert ..." too
  1. Find the "global" section
  2. After \key and \time, put " \override Score.BarLine #'stencil = ##f "
  3. Preview the file, and see that this doesn't work quite as intended.
  4. It so happens that, while measure lines within a staff are handled by Staff.BarLine, measure lines between staves are handled by Staff.SpanBar; so you'll need to set its 'transparent symbol to #t also
  5. But there's still no measure-line at the end! You want a barline at the end, so pick one of the staves (right, left, figBass - it doesn't matter in this case) and use the \revert command (don't know if I should put this in, but: "\revert Score.BarLine #'transparent and \revert Score.SpanBar #'transparent")
  6. But even this isn't quite right. You want a double-barline at the end. So, put the cursor after the \revert lines, and then from the menu, 'LilyPond > Bar Lines > Ending Bar Line' . It knows what you want, remembers the symbol for you, so you don't have to!
  • explain in there the difference between a Staff.* and Score.* override
  • Unlike with some other elements, if you simply remove the "\time 4/4" indicator, it will still print the default 4/4 time signature.
  • This example is musically simple, but it includes some advanced concepts, and importantly helps to get over a couple of common (and understandable) fears, especially for beginners, and especially for musically-simple things like this