]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/making-an-object-invisible-with-the-transparent-property.ly
984690e6a7bce2313432c1901caff4907a699fe3
[lilypond.git] / Documentation / snippets / making-an-object-invisible-with-the-transparent-property.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.12.2"
8
9 \header {
10   lsrtags = "rhythms, simultaneous-notes, tweaks-and-overrides"
11
12   texidoc = "
13 Setting the @code{transparent} property will cause an object to be
14 printed in @qq{invisible ink}: the object is not printed, but all its
15 other behavior is retained.  The object still takes up space, it takes
16 part in collisions, and slurs, ties and beams can be attached to it.
17
18
19 This snippet demonstrates how to connect different voices using ties.
20 Normally, ties only connect two notes in the same voice.  By
21 introducing a tie in a different voice, and blanking the first up-stem
22 in that voice, the tie appears to cross voices.
23
24 "
25   doctitle = "Making an object invisible with the 'transparent property"
26 } % begin verbatim
27
28 \relative c'' {
29   \time 2/4
30   <<
31     {
32       \once \override Stem #'transparent = ##t
33       \once \override Stem #'length = #8
34       b8 ~ b\noBeam
35       \once \override Stem #'transparent = ##t
36       \once \override Stem #'length = #8
37       g8 ~ g\noBeam
38     }
39     \\
40     {
41       b8 g g e
42     }
43   >>
44 }