]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/defining-predefined-fretboards-for-other-instruments.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / defining-predefined-fretboards-for-other-instruments.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 Predefined fret diagrams can be added for new instruments in addition
14 to the standards used for guitar.  This file shows how this is done by
15 defining a new string-tuning and a few predefined fretboards for the
16 Venezuelan cuatro.
17
18 This file also shows how fingerings can be included in the chords used
19 as reference points for the chord lookup, and displayed in  the fret
20 diagram and the @code{TabStaff}, but not the music.
21
22
23 These fretboards are not transposable because they contain string
24 information.  This is planned to be corrected in the future.
25
26 "
27   doctitle = "Defining predefined fretboards for other instruments"
28 } % begin verbatim
29
30 % add FretBoards for the Cuatro
31 %   Note: This section could be put into a separate file
32 %      predefined-cuatro-fretboards.ly
33 %      and \included into each of your compositions
34
35 cuatroTuning = #`(,(ly:make-pitch 0 6 0)
36                   ,(ly:make-pitch 1 3 SHARP)
37                   ,(ly:make-pitch 1 1 0)
38                   ,(ly:make-pitch 0 5 0))
39
40 dSix = { <a\4 b\1 d\3 fis\2> }
41 dMajor = { <a\4 d\1 d\3 fis \2> }
42 aMajSeven = { <a\4 cis\1 e\3 g\2> }
43 dMajSeven = { <a\4 c\1 d\3 fis\2> }
44 gMajor = { <b\4 b\1 d\3 g\2> }
45
46 \storePredefinedDiagram #default-fret-table \dSix
47                         #cuatroTuning
48                         #"o;o;o;o;"
49 \storePredefinedDiagram #default-fret-table \dMajor
50                         #cuatroTuning
51                         #"o;o;o;3-3;"
52 \storePredefinedDiagram #default-fret-table \aMajSeven
53                         #cuatroTuning
54                         #"o;2-2;1-1;2-3;"
55 \storePredefinedDiagram #default-fret-table \dMajSeven
56                         #cuatroTuning
57                         #"o;o;o;1-1;"
58 \storePredefinedDiagram #default-fret-table \gMajor
59                         #cuatroTuning
60                         #"2-2;o;1-1;o;"
61
62 % end of potential include file /predefined-cuatro-fretboards.ly
63
64
65 #(set-global-staff-size 16)
66
67 primerosNames = \chordmode {
68   d:6 d a:maj7 d:maj7
69   g
70 }
71 primeros = {
72   \dSix \dMajor \aMajSeven \dMajSeven
73   \gMajor
74 }
75
76 \score {
77   <<
78     \new ChordNames {
79       \set chordChanges = ##t
80       \primerosNames
81     }
82
83     \new Staff {
84       \new Voice \with {
85         \remove "New_fingering_engraver"
86       }
87       \relative c'' {
88         \primeros
89       }
90     }
91
92     \new FretBoards {
93       \set Staff.stringTunings = #cuatroTuning
94 %      \override FretBoard
95 %        #'(fret-diagram-details string-count) = #'4
96       \override FretBoard.fret-diagram-details.finger-code = #'in-dot
97       \primeros
98     }
99
100     \new TabStaff \relative c'' {
101       \set TabStaff.stringTunings = #cuatroTuning
102       \primeros
103     }
104
105   >>
106
107   \layout {
108     \context {
109       \Score
110       \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1 16)
111     }
112   }
113   \midi { }
114 }