summaryrefslogtreecommitdiff
path: root/Documentation/snippets/creating-slurs-across-voices.ly
blob: 74e82c55e22b194a7d1900f07d7529ec30b707c2 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.dsi.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.16.0"

\header {
  lsrtags = "connecting-notes, expressive-marks, keyboards, real-music, unfretted-strings"

  texidoc = "
In some situations, it may be necessary to create slurs between notes
from different voices.

The solution is to add invisible notes to one of the voices, using
@code{\\hideNotes}.

This example is measure 235 of the Ciaconna from Bach's 2nd Partita for
solo violin, BWV 1004.

"
  doctitle = "Creating slurs across voices"
} % begin verbatim


\relative c' {
  <<
    {
      d16( a') s a s a[ s a] s a[ s a]
    }
    \\
    {
      \slurUp
      bes,16[ s e](
      \hideNotes a)
      \unHideNotes f[(
      \hideNotes a)
      \unHideNotes fis](
      \hideNotes a)
      \unHideNotes g[(
      \hideNotes a)
      \unHideNotes gis](
      \hideNotes a)
    }
  >>
}