-
Notifications
You must be signed in to change notification settings - Fork 0
/
general_def.ly
141 lines (131 loc) · 3.87 KB
/
general_def.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
\version "2.24.0"
%% ***************************************************************************
%% ** notes, \swing, \ghost sn ***********************************************
%% ***************************************************************************
% ====== Drum notations customized
#(define md '(
(ridecymbal cross #f 6)
(ridebell triangle #f 5)
(crashcymbal xcircle #f 6)
(splashcymbal harmonic #f 6)
(pedalhihat cross #f -5)
(hihat cross #f 5)
(halfopenhihat cross halfopen 5)
(closedhihat cross stopped 5)
(openhihat cross open 5)
(snare default #f 1)
(sidestick cross #f 1)
(cowbell triangle #f 6)
(himidtom diamond #f 2)
(lowmidtom diamond #f 0)
(highfloortom diamond #f -1)
(lowfloortom diamond #f -2)
(bassdrum default #f -4)
(oneup default #f 5)
(longwhistle slash #t 0)
))
allheads = \drummode {
\stemUp
sn4
\override NoteHead.style = #'cross sn4
\override NoteHead.style = #'xcircle sn4
\override NoteHead.style = #'diamond sn4
\override NoteHead.style = #'slash sn4
\override NoteHead.style = #'harmonic sn4
\override NoteHead.style = #'triangle sn4
}
defnote = \drummode {
sn4^"snare" ss s2 |
bd4^"feet" s hhp s |
hh4^"hat" hho hhho hhc
cymr4^"ride" s rb s |
tommh4^"tom" tomml tomfh tomfl |
cymc4^"crash" cb s2 |
}
defname = \lyricmode {
sn ss |
bd hhp |
hh hho hhho hhc |
cymr rb |
tommh tomml tomfh tomfl |
cymc cb
}
%% function to add an accent
%% usage sn^\act
act = \markup { \left-align \musicglyph "scripts.sforzato" }
%% function to add right or left (open or filled circle) below notes
%% usage sn_\left
left = \markup {\center-column {\draw-circle #0.5 #0.1 ##t }}
right= \markup {\center-column {\draw-circle #0.5 #0.1 ##f }}
%% function to add a ghost note
%% usage \ghost sn
ghost = #(define-music-function
(note)
(ly:music?)
#{
\parenthesize \tweak font-size -4 #note
#})
%% Function to add a single Percent
%% usage \makePercent note
makePercent =
#(define-music-function
(note) (ly:music?)
"Make a percent repeat the same length as NOTE."
(make-music 'PercentEvent
'length (ly:music-length note)))
%% Function that display Percent with repeat
%% usage \makePercentRepeat " x2" s1
makePercentRepeat =
#(define-music-function
(txt note) (string? ly:music?)
"Make a percent repeat the same length as NOTE."
#{
\mark \markup { #txt }
\makePercent #note
#}
)
% ======= Swing ======================================
swing = \mark \markup {
\line \general-align #Y #DOWN { \score {
\new Staff \with {
fontSize = #-2
\override StaffSymbol.line-count = #0
\override VerticalAxisGroup.Y-extent = #'(0 . 0)
}
\relative {
\stemUp
\override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3 16)
\override Beam.positions = #'(2.5 . 2.5)
b'8[ b8]
}
\layout {
ragged-right= ##t
indent = 0
\context {
\Staff \remove "Clef_engraver"
\remove "Time_signature_engraver" }
}} " ="
\score { \new Staff \with {
fontSize = #-2
\override StaffSymbol.line-count = #0
\override VerticalAxisGroup.Y-extent = #'(0 . 0)
}
\relative {
\stemUp
\override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3 16)
\override Beam.positions = #'(2.5 . 2.5)
\times 2/3 { b'8[ r b8] }
}
\layout {
ragged-right= ##t
indent = 0
\context {
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver" }
}}
\fontsize #-2
\italic { " swing" }
}
}
%% ***************************************************************************