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