-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmusicMaps.js
224 lines (219 loc) · 7.31 KB
/
musicMaps.js
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
const nbsToInstr = [
"HARP",
"BASS",
"BASEDRUM",
"SNARE",
"HAT",
"GUITAR",
"FLUTE",
"BELL",
"CHIME",
"XYLOPHONE",
"IRON_XYLOPHONE",
"COW_BELL",
"DIDGERIDOO",
"BIT",
"BANJO",
"PLING"
];
const Instrument = {
HARP: 54,
BASEDRUM: 0,
SNARE: 0,
HAT: 0,
BASS: 30,
FLUTE: 66,
BELL: 78,
GUITAR: 42,
CHIME: 78,
XYLOPHONE: 78,
IRON_XYLOPHONE: 54,
COW_BELL: 66,
DIDGERIDOO: 30,
BIT: 54,
BANJO: 54,
PLING: 54
};
const InstrumentIds = Object.keys(Instrument);
const instrumentMap = [
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "GUITAR", "HARP", "BASS", "BELL" ],
[ "GUITAR", "HARP", "BASS", "BELL" ],
[ "GUITAR", "HARP", "BASS", "BELL" ],
[ "GUITAR", "HARP", "BASS", "BELL" ],
[ "GUITAR", "HARP", "BASS", "BELL" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "GUITAR", "HARP", "BASS", "BELL" ],
[ "BASS", "HARP", "BELL" ],
[ "BASS", "HARP", "BELL" ],
[ "BASS", "HARP", "BELL" ],
[ "BASS", "HARP", "BELL" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "DIDGERIDOO", "BIT", "XYLOPHONE" ],
[ "FLUTE", "GUITAR", "BASS", "BELL" ],
[ "FLUTE", "GUITAR", "BASS", "BELL" ],
[ "FLUTE", "GUITAR", "BASS", "BELL" ],
[ "FLUTE", "GUITAR", "BASS", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "CHIME" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "FLUTE", "DIDGERIDOO", "IRON_XYLOPHONE", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "BIT", "DIDGERIDOO", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "HARP", "BASS", "BELL" ],
[ "BANJO", "BASS", "BELL" ],
[ "BANJO", "BASS", "BELL" ],
[ "BANJO", "BASS", "BELL" ],
[ "BANJO", "BASS", "BELL" ],
[ "BANJO", "BASS", "BELL" ],
[ "HARP", "DIDGERIDOO", "BELL" ],
[ "HARP", "DIDGERIDOO", "BELL" ],
[ "HARP", "DIDGERIDOO", "BELL" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ],
[ "IRON_XYLOPHONE", "BASS", "XYLOPHONE" ]
];
const percussionMap = {
35: 10 + 25 * InstrumentIds.indexOf("BASEDRUM"),
36: 6 + 25 * InstrumentIds.indexOf("BASEDRUM"),
37: 6 + 25 * InstrumentIds.indexOf("HAT"),
38: 8 + 25 * InstrumentIds.indexOf("SNARE"),
39: 6 + 25 * InstrumentIds.indexOf("HAT"),
40: 4 + 25 * InstrumentIds.indexOf("SNARE"),
41: 6 + 25 * InstrumentIds.indexOf("BASEDRUM"),
42: 22 + 25 * InstrumentIds.indexOf("SNARE"),
43: 13 + 25 * InstrumentIds.indexOf("BASEDRUM"),
44: 22 + 25 * InstrumentIds.indexOf("SNARE"),
45: 15 + 25 * InstrumentIds.indexOf("BASEDRUM"),
46: 18 + 25 * InstrumentIds.indexOf("SNARE"),
47: 20 + 25 * InstrumentIds.indexOf("BASEDRUM"),
48: 23 + 25 * InstrumentIds.indexOf("BASEDRUM"),
49: 17 + 25 * InstrumentIds.indexOf("SNARE"),
50: 23 + 25 * InstrumentIds.indexOf("BASEDRUM"),
51: 24 + 25 * InstrumentIds.indexOf("SNARE"),
52: 8 + 25 * InstrumentIds.indexOf("SNARE"),
53: 13 + 25 * InstrumentIds.indexOf("SNARE"),
54: 18 + 25 * InstrumentIds.indexOf("HAT"),
55: 18 + 25 * InstrumentIds.indexOf("SNARE"),
56: 1 + 25 * InstrumentIds.indexOf("HAT"),
57: 13 + 25 * InstrumentIds.indexOf("SNARE"),
58: 2 + 25 * InstrumentIds.indexOf("HAT"),
59: 13 + 25 * InstrumentIds.indexOf("SNARE"),
60: 9 + 25 * InstrumentIds.indexOf("HAT"),
61: 2 + 25 * InstrumentIds.indexOf("HAT"),
62: 8 + 25 * InstrumentIds.indexOf("HAT"),
63: 22 + 25 * InstrumentIds.indexOf("BASEDRUM"),
64: 15 + 25 * InstrumentIds.indexOf("BASEDRUM"),
65: 13 + 25 * InstrumentIds.indexOf("SNARE"),
66: 8 + 25 * InstrumentIds.indexOf("SNARE"),
67: 8 + 25 * InstrumentIds.indexOf("HAT"),
68: 3 + 25 * InstrumentIds.indexOf("HAT"),
69: 20 + 25 * InstrumentIds.indexOf("HAT"),
70: 23 + 25 * InstrumentIds.indexOf("HAT"),
71: 24 + 25 * InstrumentIds.indexOf("HAT"),
72: 24 + 25 * InstrumentIds.indexOf("HAT"),
73: 17 + 25 * InstrumentIds.indexOf("HAT"),
74: 11 + 25 * InstrumentIds.indexOf("HAT"),
75: 18 + 25 * InstrumentIds.indexOf("HAT"),
76: 9 + 25 * InstrumentIds.indexOf("HAT"),
77: 5 + 25 * InstrumentIds.indexOf("HAT"),
78: 22 + 25 * InstrumentIds.indexOf("HAT"),
79: 19 + 25 * InstrumentIds.indexOf("SNARE"),
80: 17 + 25 * InstrumentIds.indexOf("HAT"),
81: 22 + 25 * InstrumentIds.indexOf("HAT"),
82: 22 + 25 * InstrumentIds.indexOf("SNARE"),
83: 24 + 25 * InstrumentIds.indexOf("CHIME"),
84: 24 + 25 * InstrumentIds.indexOf("CHIME"),
85: 21 + 25 * InstrumentIds.indexOf("HAT"),
86: 14 + 25 * InstrumentIds.indexOf("BASEDRUM"),
87: 7 + 25 * InstrumentIds.indexOf("BASEDRUM")
};
module.exports = {
Instrument,
InstrumentIds,
instrumentMap,
percussionMap,
nbsToInstr
};