]> git.donarmstrong.com Git - lilypond.git/blob - input/new/non-traditional-key-signatures.ly
b0f2a629b35cf96d1706fb962d8d2d8459d48145
[lilypond.git] / input / new / non-traditional-key-signatures.ly
1 \version "2.13.0"
2
3 \header {
4   lsrtags = "pitches, staff-notation"
5   texidoc = "
6 The commonly used @code{\\key} command sets the @code{keySignature}
7 property, in the @code{Staff} context.
8
9 To create non-standard key signatures, set this property directly.  The
10 format of this command is a list:
11
12 @code{\\set Staff.keySignature = #`(((octave . step) . alter) ((octave
13 . step) . alter) ...)} where, for each element in the list,
14 @code{octave} specifies the octave (0@tie{}being the octave from
15 middle@tie{}C to the B above), @code{step} specifies the note within the
16 octave (0@tie{}means@tie{}C and 6@tie{}means@tie{}B), and @code{alter} is
17 @code{,SHARP ,FLAT ,DOUBLE-SHARP} etc.  (Note the leading comma.)
18
19 Alternatively, for each item in the list, using the more concise format
20 @code{(step . alter)} specifies that the same alteration should hold in all
21 octaves.
22
23 Here is an example of a possible key signature for generating a whole-tone
24 scale:
25 "
26   doctitle = "Non-traditional key signatures"
27 }
28
29 \relative c' {
30   \set Staff.keySignature = #`(((0 . 6) . ,FLAT)
31                                ((0 . 5) . ,FLAT)
32                                ((0 . 3) . ,SHARP))
33   c4 d e fis
34   aes4 bes c2
35 }
36