]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/fretboards-alternate-tables.ly
LSR: Update.
[lilypond.git] / Documentation / snippets / fretboards-alternate-tables.ly
1 % Do not edit this file; it is automatically
2 % generated from Documentation/snippets/new
3 % This file is in the public domain.
4 %% Note: this file works from version 2.13.36
5 \version "2.13.39"
6
7 \header {
8   lsrtags = "fretted-strings"
9
10   texidoc = "
11 Alternate fretboard tables can be created.  These would be used in
12 order to have alternate fretboards for a given chord.
13
14 In order to use an alternate fretboard table, the table must first
15 be created.  Fretboards are then added to the table.
16
17 The created fretboard table can be blank, or it can be copied
18 from an existing table.
19
20 The table to be used in displaying predefined fretboards is selected
21 by the property @code{\\predefinedDiagramTable}.
22 "
23
24   doctitle = "Alternate fretboard tables"
25 } % begin verbatim
26
27
28 \include "predefined-guitar-fretboards.ly"
29
30 % Make a blank new fretboard table
31 #(define custom-fretboard-table-one (make-fretboard-table))
32
33 % Make a new fretboard table as a copy of default-fret-table
34 #(define custom-fretboard-table-two (make-fretboard-table default-fret-table))
35
36 % Add a chord to custom-fretboard-table-one
37 \storePredefinedDiagram #custom-fretboard-table-one
38                         \chordmode{c}
39                         #guitar-tuning
40                         "3-(;3;5;5;5;3-);"
41
42 % Add a chord to custom-fretboard-table-two
43 \storePredefinedDiagram #custom-fretboard-table-two
44                         \chordmode{c}
45                         #guitar-tuning
46                         "x;3;5;5;5;o;"
47
48 <<
49   \chords {
50     c1 | d1 |
51     c1 | d1 |
52     c1 | d1 |
53   }
54   \new FretBoards {
55     \chordmode {
56       \set predefinedDiagramTable = #default-fret-table
57       c1 | d1 |
58       \set predefinedDiagramTable = #custom-fretboard-table-one
59       c1 | d1 |
60       \set predefinedDiagramTable = #custom-fretboard-table-two
61       c1 | d1 |
62     }
63   }
64   \new Staff {
65     \clef "treble_8"
66     <<
67       \chordmode {
68         c1 | d1 |
69         c1 | d1 |
70         c1 | d1 |
71       }
72       {
73         s1_\markup "Default table" | s1 |
74         s1_\markup \column {"New table" "from empty"} | s1 |
75         s1_\markup \column {"New table" "from default"} | s1 |
76       }
77     >>
78   }
79 >>
80