]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/creating-custom-key-signatures.ly
Doc: NR Pitches.itely - Clef - updated snippets and text
[lilypond.git] / Documentation / snippets / new / creating-custom-key-signatures.ly
1 \version "2.18.0"
2
3 \header {
4   lsrtags = "tweaks-and-overrides, pitches, staff-notation, contexts-and-engravers"
5
6   texidoc = "
7 LilyPond supports custom key signatures.  In this example, print for D
8 minor with an extended range of printed flats.
9 "
10   doctitle = "Creating custom key signatures"
11 }
12
13 \new Staff \with {
14   \override StaffSymbol.line-count = #8
15   \override KeySignature.flat-positions = #'((-7 . 6))
16   \override KeyCancellation.flat-positions = #'((-7 . 6))
17   % presumably sharps are also printed in both octaves
18   \override KeySignature.sharp-positions = #'((-6 . 7))
19   \override KeyCancellation.sharp-positions = #'((-6 . 7))
20
21   \override Clef.stencil = #
22   (lambda (grob)(grob-interpret-markup grob
23   #{ \markup\combine
24     \musicglyph #"clefs.C"
25     \translate #'(-3 . -2)
26     \musicglyph #"clefs.F"
27    #}))
28     clefPosition = #3
29     middleCPosition = #3
30     middleCClefPosition = #3
31 }
32
33 {
34   \key d\minor
35   f bes, f bes,
36 }