-
Notifications
You must be signed in to change notification settings - Fork 0
/
xiaoruan.ly
120 lines (103 loc) · 2.54 KB
/
xiaoruan.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
% Boilerplate for Fingerstyle Performance.
%
% Copyright (c) 2024 Four-String Mate. Licensed under MIT
% Set compatible LilyPond version.
\version "2.22.1"
% Adjust the size of a sheet music.
#(set-global-staff-size 22)
% Set the tuning of the lute-family instrument.
tuning = \stringTuning <d a d' a'>
% The parameters used by a piece.
piece-title = "The Title"
piece-composer = "The Composer"
piece-parameter = {
% Set the clef.
\clef "G_8"
% Set the key signature.
\key c \major
% Set the time signature.
\numericTimeSignature
\time 4/4
% Set the tempo.
\tempo "Moderato"
}
% A baritone ukulele is not supported as a MIDI instrument.
% A nylon guitar is used instead.
piece-instrument = "acoustic guitar (nylon)"
% Record the chords of a piece.
% \chords is a builtin command in LilyPond.
% Don't use chords as a variable name.
chord = \chordmode {
% Don't show any text when no chord set.
% Replace the default "N.C." to save space.
\set noChordSymbol = ""
% Write your chord names here.
s1 s1
\bar "|." % The end of a piece.
}
% Record the melody of a piece.
melody = {
% Write your melody here.
d4 a d' a' <d a d' a'>1
\bar "|."
}
% Record the piece.
piece = {
<<
% Create the chord name part.
\tag #'chord \new ChordNames {
\piece-parameter
\chord
}
% Create the sheet music.
\new Staff \with {
midiInstrument = \piece-instrument
} {
\piece-parameter
\melody
}
% Create the tablature.
\new TabStaff \with {
stringTunings = #tuning
} {
\melody
}
>>
}
\book {
\header {
title = \piece-title
composer = \piece-composer
% Remove the default footer.
tagline = ##f
}
\markup { \vspace #2.5 }
% Create the MIDI for a piece.
% We can explore a piece freely before your ensemble play it.
\score {
% Keep the chord names from the MIDI output.
\removeWithTag #'chord
\piece
\midi {}
}
% Create the sheet music.
\score {
\piece
\layout {
% Remove the indentation.
indent = #0
% Disable line filling.
ragged-right = ##t
% Disable line filling on the last line.
ragged-last = ##t
% Disable unneeded fingering engraving.
\context {
\Voice
\remove New_fingering_engraver
}
}
}
\paper {
score-markup-spacing.basic-distance = #5
}
}