-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathold_macdonald_had_a_farm-lowlevel.midica
181 lines (144 loc) · 3.52 KB
/
old_macdonald_had_a_farm-lowlevel.midica
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// This example file provides the traditional children's song
// "Old MacDonald had a farm".
//
// This file assumes standard program configuration:
// - Note System: International: c, d, e, ... (lower case)
// - Half Tone Symbols: # / b (c#, cb, d#, db, ...)
// - Octave Naming: +n/-n
// - Syntax: Mixed Case Syntax
META
copyright (c) Mozilla Public License, v. 2.0, author: Jan Trukenmüller
title Old MacDonald had a farm
composer traditional
lyrics traditional
END
INSTRUMENTS
0 LEAD_VOICE Vocals
1 STEEL_GUITAR Guitar
END
// global settings
* tempo 120
* time 4/4
* key g/maj
// initialize channel defaults
0 - - d=75%, v=127
1 - - d=100%, v=40
// execute the verses with different animals and sounds
CALL verse(1, cow, moo)
CALL verse(2, pig, oink)
CALL verse(3, duck, quack)
CALL verse(4, lamb, baa)
CALL verse(5, dog, woof)
FUNCTION verse
CALL vocals($[0], $[1], $[2])
CALL guitar
END
///////////////////////////
// vocals
///////////////////////////
FUNCTION vocals
// Define indefinite article for the animal and its sound.
// The default is "a" but if the word begins with a vowel, we need "an"
VAR $animal_article = a_ // maybe he will have an ape one day...
VAR $sound_article = a_ // we need "an" for the pig's "oink" in the second verse
{ if $[0] in 2
VAR $sound_article = an_
}
0 g /4 l=Old_
0 g /4 l=Mac
0 g /4 l=Don
0 d /4 l=ald_
0 e /4 l=had_
0 e /4 l=a_
0 d /2 l=farm.\r
0 b /4 l=Ee_
0 b /4 l=i_
0 a /4 l=ee_
0 a /4 l=i_
0 g /2. l=oh!\r
0 d /4 l=And_
0 g /4 l=on_
0 g /4 l=his_
0 g /4 l=farm_
0 d /4 l=he_
0 e /4 l=had_
0 e /4 l=$animal_article
0 d /2 l=$[1].\r
0 b /4 l=Ee_
0 b /4 l=i_
0 a /4 l=ee_
0 a /4 l=i_
0 g /2. l=oh!\r
0 d /8 l=With_
0 d /8 l=$sound_article
0 g /4 l=$[2]_
0 g /4 l=$[2]_
0 g /4 l=here\r
0 d /8 l=and_
0 d /8 l=$sound_article
0 g /4 l=$[2]_
0 g /4 l=$[2]_
0 g /4 l=there.\r
0 - /4
0 g /8 l=Here_
0 g /8 l=$sound_article
0 g /4 l=$[2]\c_
0 g /8 l=there_
0 g /8 l=$sound_article
0 g /4 l=$[2]\c\r
0 g /8 l=ev
0 g /8 l=ery
0 g /8 l=where_
0 g /8 l=$sound_article
0 g /4 l=$[2]_
0 g /4 l=$[2].\r
0 g /4 l=Old_
0 g /4 l=Mac
0 g /4 l=Don
0 d /4 l=ald_
0 e /4 l=had_
0 e /4 l=a_
0 d /2 l=farm.\r
0 b /4 l=Ee_
0 b /4 l=i_
0 a /4 l=ee_
0 a /4 l=i_
0 g /1 l=oh!\n
END
///////////////////////////
// guitar
///////////////////////////
// define some chords
CHORD gmaj g- d g b d+ g+
CHORD cmaj c g c+ e+ g+
CHORD dmaj d a d+ f#+ a+
// constants for guitar strokes
CONST $tr_long = /2
CONST $tr_short = /8
FUNCTION guitar
CALL guitar_line q=2
1 gmaj /1 q=2 // moo moo here and a moo moo there
1 gmaj /8 q=2 // here a
1 gmaj /4 // moo
1 gmaj /8 q=2 // there a
1 gmaj /4 // moo
1 gmaj /8 q=4 // everywhere a
1 gmaj /4 q=2 // moo moo
CALL guitar_line
END
// 4 measures: "Old MacDonald..." until "EE i ee i oh"
FUNCTION guitar_line
1 gmaj /4 tr=$tr_long
1 gmaj /2 tr=$tr_short
1 gmaj /4 tr=$tr_long
1 cmaj /4 tr=$tr_short
1 cmaj /4 tr=$tr_long
1 gmaj /2 tr=$tr_long
1 gmaj /4
1 gmaj /4 tr=$tr_short
1 dmaj /4
1 dmaj /4 tr=$tr_short
1 gmaj /4 tr=$tr_long
1 gmaj /2 tr=$tr_short
1 gmaj /4 tr=$tr_long
END