]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/tweaking-clef-properties.ly
Makelsr.py run
[lilypond.git] / Documentation / snippets / tweaking-clef-properties.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.17.18
8 \version "2.17.18"
9
10 \header {
11   lsrtags = "pitches, staff-notation, tweaks-and-overrides"
12
13   texidoc = "
14 Changing the Clef glyph, its position, or the ottavation does not
15 change the position of subsequent notes on the staff.  To get key
16 signatures on their correct staff lines @code{middleCClefPosition}
17 must also be specified, with positive or negative values moving
18 @emph{middle C} up or down respectively, relative to the staff's
19 center line.
20
21 For example, @code{\\clef \"treble_8\"} is equivalent to setting
22 the @code{clefGlyph}, @code{clefPosition} (the vertical position
23 of the clef itself on the staff), @code{middleCPosition} and
24 @code{clefTransposition}. Note that when any of these properties
25 (except @code{middleCPosition}) are changed a new clef symbol is
26 printed.
27
28 The following examples show the possibilities when setting these
29 properties manually. On the first line, the manual changes preserve the
30 standard relative positioning of clefs and notes, whereas on the second
31 line, they do not.
32
33 "
34   doctitle = "Tweaking clef properties"
35 } % begin verbatim
36
37 \layout { ragged-right = ##t } % begin verbatim
38
39 {
40   % The default treble clef
41   \key f \major
42   c'1
43   % The standard bass clef
44   \set Staff.clefGlyph = #"clefs.F"
45   \set Staff.clefPosition = #2
46   \set Staff.middleCPosition = #6
47   \set Staff.middleCClefPosition = #6
48   \key g \major
49   c'1
50   % The baritone clef
51   \set Staff.clefGlyph = #"clefs.C"
52   \set Staff.clefPosition = #4
53   \set Staff.middleCPosition = #4
54   \set Staff.middleCClefPosition = #4
55   \key f \major
56   c'1
57   % The standard choral tenor clef
58   \set Staff.clefGlyph = #"clefs.G"
59   \set Staff.clefPosition = #-2
60   \set Staff.clefTransposition = #-7
61   \set Staff.middleCPosition = #1
62   \set Staff.middleCClefPosition = #1
63   \key f \major
64   c'1
65   % A non-standard clef
66   \set Staff.clefPosition = #0
67   \set Staff.clefTransposition = #0
68   \set Staff.middleCPosition = #-4
69   \set Staff.middleCClefPosition = #-4
70   \key g \major
71   c'1 \break
72
73   % The following clef changes do not preserve
74   % the normal relationship between notes, key signatures
75   % and clefs:
76
77   \set Staff.clefGlyph = #"clefs.F"
78   \set Staff.clefPosition = #2
79   c'1
80   \set Staff.clefGlyph = #"clefs.G"
81   c'1
82   \set Staff.clefGlyph = #"clefs.C"
83   c'1
84   \set Staff.clefTransposition = #7
85   c'1
86   \set Staff.clefTransposition = #0
87   \set Staff.clefPosition = #0
88   c'1
89
90   % Return to the normal clef:
91
92   \set Staff.middleCPosition = #0
93   c'1
94 }