LilyPond beginnershandleiding: 4.6.1 Other uses for tweaks

### 4.6.1 Other uses for tweaks

### Tying notes across voices

The following example demonstrates how to connect notes in different voices using ties. Normally, only two notes in the same voice can be connected with ties. By using two voices, with the tied notes in one of them

and blanking the first up-stem in that voice, the tie appears to cross voices:

>     <<
>       {
>         \once \override Stem #'transparent = ##t
>         b8~ b\noBeam
>       }
>     \\
>       { b8[ g] }
>     >>

To make sure that the just-blanked stem doesn’t squeeze the tie too much, we can lengthen the stem by setting the `length` to `8`,

>     <<
>       {
>         \once \override Stem #'transparent = ##t
>         \once \override Stem #'length = #8
>         b8~ b\noBeam
>       }
>     \\
>       { b8[ g] }
>     >>

### Simulating a fermata in MIDI

For outside-staff objects it is usually better to override the object’s `stencil` property rather than its `transparent` property when you wish to remove it from the printed output. Setting the `stencil` property of an object to `#f` will remove that object entirely from the printed output. This means it has no effect on the placement of other objects placed relative to it.

For example, if we wished to change the metronome setting in order to simulate a fermata in the MIDI output we would not want the metronome markings to appear in the printed output, and we would not want it to influence the spacing between the two systems or the positions of adjacent annotations on the staff. So setting its `stencil` property to `#f` would be the best way. We show here the effect of the two methods:

>     \score {
>       \relative c'' {
>         % Visible tempo marking
>         \tempo 4=120
>         a4 a a
>         \once \override Score.MetronomeMark #'transparent = ##t
>         % Invisible tempo marking to lengthen fermata in MIDI
>         \tempo 4=80
>         a4\fermata |
>         % New tempo for next section
>         \tempo 4=100
>         a4 a a a |
>       }
>       \layout { }
>       \midi { }
>     }

>     \score {
>       \relative c'' {
>         % Visible tempo marking
>         \tempo 4=120
>         a4 a a
>         \once \override Score.MetronomeMark #'stencil = ##f
>         % Invisible tempo marking to lengthen fermata in MIDI
>         \tempo 4=80
>         a4\fermata |
>         % New tempo for next section
>         \tempo 4=100
>         a4 a a a |
>       }
>       \layout { }
>       \midi { }
>     }

Both methods remove the metronome mark which lengthens the fermata from the printed output, and both affect the MIDI timing as required, but the transparent metronome mark in the first line forces the following tempo indication too high while the second (with the stencil removed) does not.

#### Zie ook

Music Glossary: system.

Andere talen: English, česky, deutsch, español, français, italiano, 日本語.

#### LilyPond – Beginnershandleiding