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