]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/fretboards-alternate-tables.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / new / fretboards-alternate-tables.ly
1 \version "2.14.0"
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 created fretboard table can be blank, or it can be copied
14 from an existing table.
15
16 The table to be used in displaying predefined fretboards is selected
17 by the property @code{\predefinedDiagramTable}.
18 "
19
20   doctitle = "Alternate fretboard tables"
21 }
22
23 \include "predefined-guitar-fretboards.ly"
24
25 % Make a blank new fretboard table
26 #(define custom-fretboard-table-one (make-fretboard-table))
27
28 % Make a new fretboard table as a copy of default-fret-table
29 #(define custom-fretboard-table-two (make-fretboard-table default-fret-table))
30
31 % Add a chord to custom-fretboard-table-one
32 \storePredefinedDiagram #custom-fretboard-table-one
33                         \chordmode{c}
34                         #guitar-tuning
35                         "3-(;3;5;5;5;3-);"
36
37 % Add a chord to custom-fretboard-table-two
38 \storePredefinedDiagram #custom-fretboard-table-two
39                         \chordmode{c}
40                         #guitar-tuning
41                         "x;3;5;5;5;o;"
42
43 <<
44   \chords {
45     c1 | d1 |
46     c1 | d1 |
47     c1 | d1 |
48   }
49   \new FretBoards {
50     \chordmode {
51       \set predefinedDiagramTable = #default-fret-table
52       c1 | d1 |
53       \set predefinedDiagramTable = #custom-fretboard-table-one
54       c1 | d1 |
55       \set predefinedDiagramTable = #custom-fretboard-table-two
56       c1 | d1 |
57     }
58   }
59   \new Staff {
60     \clef "treble_8"
61     <<
62       \chordmode {
63         c1 | d1 |
64         c1 | d1 |
65         c1 | d1 |
66       }
67       {
68         s1_\markup "Default table" | s1 |
69         s1_\markup \column {"New table" "from empty"} | s1 |
70         s1_\markup \column {"New table" "from default"} | s1 |
71       }
72     >>
73   }
74 >>
75