]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/tweaking-clef-properties.ly
080ce14b741ea7bf3b23ce8e9add41a34a3cb35e
[lilypond.git] / input / lsr / tweaking-clef-properties.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.11.38"
4
5 \header {
6   lsrtags = "pitches, staff-notation, tweaks-and-overrides"
7
8   texidoc = "
9 The command @code{\\clef \"treble_8\"} is equivalent to setting
10 @code{clefGlyph}, @code{clefPosition} (which controls the vertical
11 position of the clef), @code{middleCPosition} and
12 @code{clefOctavation}. A clef is printed when any of the properties
13 except @code{middleCPosition} are changed.
14
15
16 Note that changing the glyph, the position of the clef, or the
17 octavation does not in itself change the position of subsequent notes
18 on the staff: the position of middle C must also be specified to do
19 this. The positional parameters are relative to the staff center line,
20 positive numbers displacing upwards, counting one for each line and
21 space. The @code{clefOctavation} value would normally be set to 7, -7,
22 15 or -15, but other values are valid.
23
24
25 When a clef change takes place at a line break the new clef symbol is
26 printed at both the end of the previous line and the beginning of the
27 new line by default. If the warning clef at the end of the previous
28 line is not required it can be suppressed by setting the @code{Staff}
29 property @code{explicitClefVisibility} to the value
30 @code{end-of-line-invisible}. The default behavior can be recovered
31 with  @code{\\unset Staff.explicitClefVisibility}.
32
33 The following examples show the possibilities when setting these
34 properties manually. On the first line, the manual changes preserve the
35 standard relative positioning of clefs and notes, whereas on the second
36 line, they do not. 
37
38 "
39   doctitle = "Tweaking clef properties"
40 } % begin verbatim
41 {
42   % The default treble clef
43   c'1
44   % The standard bass clef
45   \set Staff.clefGlyph = #"clefs.F"
46   \set Staff.clefPosition = #2
47   \set Staff.middleCPosition = #6
48   c'
49   % The baritone clef
50   \set Staff.clefGlyph = #"clefs.C"
51   \set Staff.clefPosition = #4
52   \set Staff.middleCPosition = #4
53   c'
54   % The standard choral tenor clef
55   \set Staff.clefGlyph = #"clefs.G"
56   \set Staff.clefPosition = #-2
57   \set Staff.clefOctavation = #-7
58   \set Staff.middleCPosition = #1
59   c'
60   % A non-standard clef
61   \set Staff.clefPosition = #0
62   \set Staff.clefOctavation = #0
63   \set Staff.middleCPosition = #-4
64   c' \break
65
66   % The following clef changes do not preserve
67   % the normal relationship between notes and clefs:
68
69   \set Staff.clefGlyph = #"clefs.F"
70   \set Staff.clefPosition = #2
71   c'
72   \set Staff.clefGlyph = #"clefs.G"
73   c'
74   \set Staff.clefGlyph = #"clefs.C"
75   c'
76   \set Staff.clefOctavation = #7
77   c'
78   \set Staff.clefOctavation = #0
79   \set Staff.clefPosition = #0
80   c'
81   
82   % Here we go back to the normal clef:
83
84   \set Staff.middleCPosition = #0
85   c'
86 }