]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/non-traditional-key-signatures.ly
Merge remote-tracking branch 'origin/translation' into staging
[lilypond.git] / Documentation / snippets / new / non-traditional-key-signatures.ly
1 \version "2.19.7"
2
3 \header {
4   lsrtags = "contemporary-notation, pitches, really-cool, staff-notation, version-specific"
5
6   texidoc = "
7 The commonly used @code{\\key} command sets the @code{keyAlterations}
8 property, in the @code{Staff} context.
9
10 To create non-standard key signatures, set this property directly. The
11 format of this command is a list:
12
13 @code{ \\set Staff.keyAlterations = #`(((octave . step) . alter) ((octave
14 . step) . alter) ...) } where, for each element in the list,
15 @code{octave} specifies the octave (0 being the octave from middle C to
16 the B above), @code{step} specifies the note within the octave (0 means
17 C and 6 means B), and @code{alter} is @code{,SHARP ,FLAT ,DOUBLE-SHARP}
18 etc. (Note the leading comma.)
19
20
21 Alternatively, for each item in the list, using the more concise format
22 @code{(step . alter)} specifies that the same alteration should hold in
23 all octaves.
24
25
26 For microtonal scales where a @qq{sharp} is not 100 cents, @code{alter}
27 refers to the alteration as a proportion of a 200-cent whole tone.
28
29
30 Here is an example of a possible key signature for generating a
31 whole-tone scale:
32
33 "
34   doctitle = "Non-traditional key signatures"
35 }
36
37
38 \relative c' {
39   \set Staff.keyAlterations = #`((6 . ,FLAT)
40                                  (5 . ,FLAT)
41                                  (3 . ,SHARP))
42   c4 d e fis
43   aes4 bes c2
44 }