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