-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmandolin-chord-chart-standard-tuning.ly
145 lines (133 loc) · 3.96 KB
/
mandolin-chord-chart-standard-tuning.ly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
\version "2.21.80"
\include "predefined-mandolin-fretboards.ly"
\header {
title = "Mandolin Chord Chart"
subtitle = "G–D–A–E Tuning"
pdftitle = \markup \concat { \fromproperty #'header:title " (" \fromproperty #'header:subtitle ")" }
subject = "Chart for the most common chords for the mandolin (G–D–A–E tuning)."
source = "https://lilypond.org/doc/stable/Documentation/notation/predefined-fretboard-diagrams"
enteredby = "Alexis Jeandeau"
author = \enteredby
keywords = #(string-join '(
"music"
"mandolin"
"chords"
) ", ")
tagline = ##f
}
\paper {
% See https://github.com/lilypond/lilypond/blob/stable/2.22/scm/paper.scm#L141
#(define paper-size
(cond ((and (= (/ paper-width mm) 210)
(= (/ paper-height mm) 297))
"A4")
((and (= (/ paper-width mm) 297)
(= (/ paper-height mm) 420))
"A3")
((and (= (/ paper-width in) 8.5)
(= (/ paper-height in) 11))
"Letter")
((and (= (/ paper-width in) 11)
(= (/ paper-height in) 17))
"Tabloid")
(else
"")))
#(define markup-system-spacing
(cond ((or (equal? paper-size "A3") (equal? paper-size "Tabloid"))
'((basic-distance . 0)
(minimum-distance . 0)
(padding . 5)
(stretchability . 0)))
(else
'((basic-distance . 0)
(minimum-distance . 0)
(padding . 3)
(stretchability . 0)))))
#(define system-system-spacing
(cond ((or (equal? paper-size "Letter") (equal? paper-size "Tabloid"))
'((basic-distance . 0)
(minimum-distance . 0)
(padding . 2)
(stretchability . 0)))
(else
'((basic-distance . 0)
(minimum-distance . 0)
(padding . 1.5)
(stretchability . 0)))))
left-margin = 18\mm
bottom-margin = 0\mm
}
chordTypes = \chordmode {
c1
c:m
c:aug
c:dim7
c:7
c:maj7
c:m7
c:m7.5-
c:6
c:sus2
c:sus4
c:9
\break
}
chordSequence = {
\chordTypes
\transpose c cis \chordTypes
\transpose c d \chordTypes
\transpose c dis \chordTypes
\transpose c e \chordTypes
\transpose c f \chordTypes
\transpose c fis \chordTypes
\transpose c g \chordTypes
\transpose c gis \chordTypes
\transpose c a \chordTypes
\transpose c ais \chordTypes
\transpose c b \chordTypes
}
chordNames = {
\override ChordName.font-size = #(let ((paper-size (ly:output-def-lookup $defaultpaper 'paper-size)))
(cond ((or (equal? paper-size "A3") (equal? paper-size "Tabloid"))
4)
(else
1.5)))
\chordSequence
}
fretBoards = {
\set Staff.stringTunings = #mandolin-tuning
\override FretBoard.fret-diagram-details.finger-code = #'in-dot
\override FretBoard.size = #(let ((paper-size (ly:output-def-lookup $defaultpaper 'paper-size)))
(cond ((or (equal? paper-size "A3") (equal? paper-size "Tabloid"))
1.7)
((equal? paper-size "Letter")
1)
(else
1.1)))
\chordSequence
}
\layout {
indent = 0\mm
\context {
\Score
\remove "Bar_number_engraver"
}
}
\book {
<<
\new ChordNames \chordNames
\new FretBoards \fretBoards
>>
}
\book {
\bookOutputSuffix "fr"
\header {
title = "Accords de mandoline"
subtitle = "Accordage Sol–Ré–La–Mi"
subject = "Doigtés d’accords communs pour mandoline (accordage Sol–Ré–La–Mi)."
}
<<
\new ChordNames \with { \frenchChords } \chordNames
\new FretBoards \fretBoards
>>
}