Making an object invisible using \hide: Difference between revisions
Appearance
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
Applying <code>\hide</code> to a grob causes objects of this type to be printed with “invisible ink”. They are not printed, but all of their other behavior is retained: | |||
* the objects still take up space, | |||
* they take part in collision resolution, and | |||
* slurs, ties, and beams can be attached to them as usual. | |||
This snippet demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice, and blanking the first up-stem in that voice, the tie appears to cross voices. | This snippet demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice, and blanking the first up-stem in that voice, the tie appears to cross voices. | ||
Revision as of 15:19, 12 January 2026
Applying \hide to a grob causes objects of this type to be printed with “invisible ink”. They are not printed, but all of their other behavior is retained:
- the objects still take up space,
- they take part in collision resolution, and
- slurs, ties, and beams can be attached to them as usual.
This snippet demonstrates how to connect different voices using ties. Normally, ties only connect two notes in the same voice. By introducing a tie in a different voice, and blanking the first up-stem in that voice, the tie appears to cross voices.
\version "2.24"
\relative {
\time 2/4
<<
{
\once \hide Stem
\once \override Stem.length = #8
b'8 ~ 8\noBeam
\once \hide Stem
\once \override Stem.length = #8
g8 ~ 8\noBeam
}
\\
{
b8 g g e
}
>>
}
\paper {
line-width = 40\mm
ragged-right = ##f
}