-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathold_macdonald_had_a_farm.midica
107 lines (87 loc) · 3.38 KB
/
old_macdonald_had_a_farm.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
// 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: | (l=Old_) g:4 (l=Mac) g (l=Don) g (l=ald_) d | (l=had_) e (l=a_) e (l=farm.\r) d:2
0: | (l=Ee_) b:4 (l=i_) b (l=ee_) a (l=i_) a | (l=oh!\r) g:2. (l=And_) d:4
0: | (l=on_) g (l=his_) g (l=farm_) g (l=he_) d | (l=had_) e (l=$animal_article) e (l=$[1].\r) d:2
0: | (l=Ee_) b:4 (l=i_) b (l=ee_) a (l=i_) a | (l=oh!\r) g:2. (l=With_) d:8 (l=$sound_article) d
0: | (l=$[2]_) g:4 (l=$[2]_) g (l=here\r) g (l=and_) d:8 (l=$sound_article) d
0: | (l=$[2]_) g:4 (l=$[2]_) g (l=there.\r) g -
0: | (l=Here_) g:8 (l=$sound_article) g (l=$[2]\c_) g:4 (l=there_) g:8 (l=$sound_article) g (l=$[2]\c\r) g:4
0: | (l=ev) g:8 (l=ery) g (l=where_) g (l=$sound_article) g (l=$[2]_) g:4 (l=$[2].\r) g
0: | (l=Old_) g:4 (l=Mac) g (l=Don) g (l=ald_) d | (l=had_) e (l=a_) e (l=farm.\r) d:2
0: | (l=Ee_) b:4 (l=i_) b (l=ee_) a (l=i_) a | (l=oh!\n) g:1 |
END
///////////////////////////
// guitar
///////////////////////////
// define some chords
CHORD gmaj g-2 d- g- b- d g
CHORD cmaj c- g- c e g
CHORD dmaj d- a- d f# a
// constants for guitar strokes (two different tremolos)
CONST $tr_long = /2
CONST $tr_short = /8
FUNCTION guitar
CALL guitar_line q=2
// moo moo here and a moo moo there here a moo there a moo
1: | gmaj:1 | gmaj | gmaj:8 gmaj gmaj:4 gmaj:8 gmaj gmaj:4 |
// ev- ery- where a moo moo
1: | gmaj:8 gmaj gmaj gmaj gmaj:4 gmaj:4 |
CALL guitar_line
END
// 4 measures: "Old MacDonald..." until "EE i ee i oh"
//
// This function uses tremolos.
// In compact syntax, a tremolo must be split into several notes.
// I don't want to do that, so I must use lowlevel syntax here.
// Compact syntax is only used for the (optional) bar lines.
FUNCTION guitar_line
1: | (tr=$tr_long) gmaj:4 (tr=$tr_short) gmaj:2 (tr=$tr_long) gmaj:4 |
1: | (tr=$tr_short) cmaj (tr=$tr_long) cmaj (tr=$tr_long) gmaj:2 |
1: | gmaj:4 (tr=$tr_short) gmaj:4 dmaj:4 (tr=$tr_short) dmaj:4 |
1: | (tr=$tr_long) gmaj:4 (tr=$tr_short) gmaj:2 (tr=$tr_long) gmaj:4 |
END