]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/fretboards-alternate-tables.ly
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond into...
[lilypond.git] / Documentation / snippets / new / fretboards-alternate-tables.ly
1 \version "2.13.36"
2
3 \header {
4   lsrtags = "fretted-strings"
5
6   texidoc = "
7 Alternate fretboard tables can be created.  These would be used in
8 order to have alternate fretboards for a given chord.
9
10 In order to use an alternate fretboard table, the table must first
11 be created.  Fretboards are then added to the table.
12
13 The table to be used in displaying predefined fretboards is selected
14 by the property @code{\predefinedDiagramTable}.
15 "
16
17   doctitle = "Alternate fretboard tables"
18 }
19
20 \include "predefined-guitar-fretboards.ly"
21
22 #(define custom-fretboard-table-one (make-hash-table 101))
23
24 #(define custom-fretboard-table-two (make-hash-table 101))
25
26 \storePredefinedDiagram #custom-fretboard-table-one
27                         \chordmode{c}
28                         #guitar-tuning
29                         "3-(;3;5;5;5;3-);"
30
31 \storePredefinedDiagram #custom-fretboard-table-two
32                         \chordmode{c}
33                         #guitar-tuning
34                         "x;3;5;5;5;o;"
35
36 <<
37   \chords {
38     c1 |
39     c1 |
40     c1
41   }
42   \new FretBoards {
43     \chordmode {
44       \set predefinedDiagramTable = #default-fret-table
45       c1
46       \set predefinedDiagramTable = #custom-fretboard-table-one
47       c1
48       \set predefinedDiagramTable = #custom-fretboard-table-two
49       c1
50     }
51   }
52   \new Staff {
53     \clef "treble_8"
54     \chordmode {
55       c1 |
56       c1 |
57       c1
58     }
59   }
60 >>
61