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