summaryrefslogtreecommitdiff
path: root/Documentation/snippets/adding-an-ottava-marking-to-a-single-voice.ly
blob: 99971e914a09552065968d3a3e25c352f9e97e94 (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
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.di.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.18.0"

\header {
  lsrtags = "pitches, tweaks-and-overrides"

  texidoc = "
If you have more than one voice on the staff, setting octavation in one
voice will transpose the position of notes in all voices for the
duration of the ottava bracket. If the ottavation is only intended to
apply to one voice, the middleCPosition and ottava bracket may be set
explicitly.  In this snippet, the bass clef usually has middleCPosition
set to 6, six positions above the center  line, so in the 8va portion
middleCPosition is 7 positions (one octave) higher still.

"
  doctitle = "Adding an ottava marking to a single voice"
} % begin verbatim

{
  \clef bass
  << { <g d'>1~ q2 <c' e'> }
  \\
    {
      r2.
      \set Staff.ottavation = #"8vb"
      \once \override Staff.OttavaBracket.direction = #DOWN
      \set Voice.middleCPosition = #(+ 6 7)
      <b,,, b,,>4 ~ |
      q2
      \unset Staff.ottavation
      \unset Voice.middleCPosition
      <c e>2
    }
  >>
}