]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/defining-predefined-fretboards-for-other-instruments.ly
Change stringTunings from list of semitones to list of pitches
[lilypond.git] / Documentation / snippets / new / defining-predefined-fretboards-for-other-instruments.ly
1 \version "2.13.46"
2
3 \header {
4   lsrtags = "fretted-strings"
5
6 %% Translation of GIT committish: cde045f4e833aa491fb63f2222e14bef49507577
7   texidoces = "
8
9 Se pueden añadir diagramas de posiciones predefinidas para
10 instrumentos nuevos además de los estándar que se usan para la
11 guitarra.  Este archivo muestra cómo se hace, definiendo una afinación
12 nueva y unas cuantas posiciones para el cuatro venezolano.
13
14 Este archivo también muestra cómo se pueden incluir las digitaciones
15 en los acordes que se usan como puntos de referencia para la búsqueda
16 de acordes en la tabla, y mostrarse en el diagrama de posiciones y la
17 tablatura @code{TabStaff}, pero no en la música.
18
19 Estas posiciones no se pueden transportar porque contienen información
20 de las cuerdas.  Hay planes para corregir esto en un futuro.
21
22 "
23   doctitlees = "Definición de posiciones predefinidas para otros instrumentos"
24
25
26 %% Translation of GIT committish: f23429bc5cfa9d141ef7b4509afc46c140308a1e
27   texidocde = "
28 Vordefinierte Bunddiagramme können für neue Instrumente hinzugefügt werden
29 neben denen, die schon für die Gitarre definiert sind.  Dieses Schnipsel
30 zeigt, wie man eine neue Saitenstimmung definiert und dann eigene vordefinierte
31 Bunddiagramme bestimmt.  Das Beispiel ist für das venezualische Cuatro.
32
33 Dieses Schnipsel zeigt auch, wie Fingersatz in die Akkorde eingebunden
34 werden kann, um als Referenzpunkt für die Akkordauswahl benutzt werden
35 kann.  Dieser Fingersatz wird im Bunddiagramm und in der Tabulatur,
36 aber nicht in den Noten angezeigt.
37
38 Diese Bunddiagramme sind nicht transponierbar, weil sie Saiteninformationen
39 enthalten.  Das soll in der Zukunft verbessert werden.
40
41 "
42   doctitlede = "Eigene vordefinierte Bunddiagramme für andere Instrumente erstellen"
43
44 %% Translation of GIT committish: 4ab2514496ac3d88a9f3121a76f890c97cedcf4e
45
46   texidocfr = "
47 La liste des diagrammes standards prédéfinis pour la guitare peut être
48 augmentée d'autres définitions spécifiques à d'autres instruments.
49 Voici comment définir un nouvel accordage ainsi que quelques diagrammes
50 prédéfinis pour le @qq{cuatro vénézuélien}.
51
52 Cet exemple illustre aussi la manière d'ajouter des doigtés aux
53 accords ; ils serviront de référence pour la boucle d'accord et seront
54 indiqués dans les diagrammes et le @code{TabStaff}, mais pas dans la musique.
55
56 Ces diagrammes ne peuvent pas être transposés, dans la mesure où ils
57 contiennent des informations sur les cordes.  Ceci est amené à évoluer.
58
59 "
60   doctitlefr = "Création de diagrammes de fret prédéfinis pour d'autres instruments"
61
62
63   texidoc = "
64 Predefined fret diagrams can be added for new instruments in addition
65 to the standards used for guitar.  This file shows how this is done by
66 defining a new string-tuning and a few predefined fretboards for the
67 Venezuelan cuatro.
68
69 This file also shows how fingerings can be included in the chords used
70 as reference points for the chord lookup, and displayed in  the fret
71 diagram and the @code{TabStaff}, but not the music.
72
73
74 These fretboards are not transposable because they contain string
75 information.  This is planned to be corrected in the future.
76
77 "
78   doctitle = "Defining predefined fretboards for other instruments"
79 }
80
81 % add FretBoards for the Cuatro
82 %   Note: This section could be put into a separate file
83 %      predefined-cuatro-fretboards.ly
84 %      and \included into each of your compositions
85
86 cuatroTuning = #`(,(ly:make-pitch 0 6 0)
87                   ,(ly:make-pitch 1 3 SHARP)
88                   ,(ly:make-pitch 1 1 0)
89                   ,(ly:make-pitch 0 5 0))
90
91 dSix = { <a\4 b\1 d\3 fis\2> }
92 dMajor = { <a\4 d\1 d\3 fis \2> }
93 aMajSeven = { <a\4 cis\1 e\3 g\2> }
94 dMajSeven = { <a\4 c\1 d\3 fis\2> }
95 gMajor = { <b\4 b\1 d\3 g\2> }
96
97 \storePredefinedDiagram #default-fret-table \dSix
98                         #cuatroTuning
99                         #"o;o;o;o;"
100 \storePredefinedDiagram #default-fret-table \dMajor
101                         #cuatroTuning
102                         #"o;o;o;3-3;"
103 \storePredefinedDiagram #default-fret-table \aMajSeven
104                         #cuatroTuning
105                         #"o;2-2;1-1;2-3;"
106 \storePredefinedDiagram #default-fret-table \dMajSeven
107                         #cuatroTuning
108                         #"o;o;o;1-1;"
109 \storePredefinedDiagram #default-fret-table \gMajor
110                         #cuatroTuning
111                         #"2-2;o;1-1;o;"
112
113 % end of potential include file /predefined-cuatro-fretboards.ly
114
115
116 #(set-global-staff-size 16)
117
118 primerosNames = \chordmode {
119   d:6 d a:maj7 d:maj7
120   g
121 }
122 primeros = {
123   \dSix \dMajor \aMajSeven \dMajSeven
124   \gMajor
125 }
126
127 \score {
128   <<
129     \new ChordNames {
130       \set chordChanges = ##t
131       \primerosNames
132     }
133
134     \new Staff {
135       \new Voice \with {
136         \remove "New_fingering_engraver"
137       }
138       \relative c'' {
139         \primeros
140       }
141     }
142
143     \new FretBoards {
144       \set stringTunings = #cuatroTuning
145 %      \override FretBoard
146 %        #'(fret-diagram-details string-count) = #'4
147       \override FretBoard
148         #'(fret-diagram-details finger-code) = #'in-dot
149       \primeros
150     }
151
152     \new TabStaff \relative c'' {
153       \set TabStaff.stringTunings = #cuatroTuning
154       \primeros
155     }
156
157   >>
158
159   \layout {
160     \context {
161       \Score
162       \override SpacingSpanner
163         #'base-shortest-duration = #(ly:make-moment 1 16)
164     }
165   }
166   \midi { }
167 }