summaryrefslogtreecommitdiff
path: root/tools/mid2agb/tables.cpp
blob: f254664a42a13e3099ef7dd991dd9b5350ca78df (plain)
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
// Copyright(c) 2016 YamaArashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#include "tables.h"

const int g_noteDurationLUT[] =
{
    0, // 0
    1, // 1
    2, // 2
    3, // 3
    4, // 4
    5, // 5
    6, // 6
    7, // 7
    8, // 8
    9, // 9
    10, // 10
    11, // 11
    12, // 12
    13, // 13
    14, // 14
    15, // 15
    16, // 16
    17, // 17
    18, // 18
    19, // 19
    20, // 20
    21, // 21
    22, // 22
    23, // 23
    24, // 24
    24, // 25
    24, // 26
    24, // 27
    28, // 28
    28, // 29
    30, // 30
    30, // 31
    32, // 32
    32, // 33
    32, // 34
    32, // 35
    36, // 36
    36, // 37
    36, // 38
    36, // 39
    40, // 40
    40, // 41
    42, // 42
    42, // 43
    44, // 44
    44, // 45
    44, // 46
    44, // 47
    48, // 48
    48, // 49
    48, // 50
    48, // 51
    52, // 52
    52, // 53
    54, // 54
    54, // 55
    56, // 56
    56, // 57
    56, // 58
    56, // 59
    60, // 60
    60, // 61
    60, // 62
    60, // 63
    64, // 64
    64, // 65
    66, // 66
    66, // 67
    68, // 68
    68, // 69
    68, // 70
    68, // 71
    72, // 72
    72, // 73
    72, // 74
    72, // 75
    76, // 76
    76, // 77
    78, // 78
    78, // 79
    80, // 80
    80, // 81
    80, // 82
    80, // 83
    84, // 84
    84, // 85
    84, // 86
    84, // 87
    88, // 88
    88, // 89
    90, // 90
    90, // 91
    92, // 92
    92, // 93
    92, // 94
    92, // 95
    96, // 96
};

const int g_noteVelocityLUT[] =
{
    0, // 0
    4, // 1
    4, // 2
    4, // 3
    4, // 4
    8, // 5
    8, // 6
    8, // 7
    8, // 8
    12, // 9
    12, // 10
    12, // 11
    12, // 12
    16, // 13
    16, // 14
    16, // 15
    16, // 16
    20, // 17
    20, // 18
    20, // 19
    20, // 20
    24, // 21
    24, // 22
    24, // 23
    24, // 24
    28, // 25
    28, // 26
    28, // 27
    28, // 28
    32, // 29
    32, // 30
    32, // 31
    32, // 32
    36, // 33
    36, // 34
    36, // 35
    36, // 36
    40, // 37
    40, // 38
    40, // 39
    40, // 40
    44, // 41
    44, // 42
    44, // 43
    44, // 44
    48, // 45
    48, // 46
    48, // 47
    48, // 48
    52, // 49
    52, // 50
    52, // 51
    52, // 52
    56, // 53
    56, // 54
    56, // 55
    56, // 56
    60, // 57
    60, // 58
    60, // 59
    60, // 60
    64, // 61
    64, // 62
    64, // 63
    64, // 64
    68, // 65
    68, // 66
    68, // 67
    68, // 68
    72, // 69
    72, // 70
    72, // 71
    72, // 72
    76, // 73
    76, // 74
    76, // 75
    76, // 76
    80, // 77
    80, // 78
    80, // 79
    80, // 80
    84, // 81
    84, // 82
    84, // 83
    84, // 84
    88, // 85
    88, // 86
    88, // 87
    88, // 88
    92, // 89
    92, // 90
    92, // 91
    92, // 92
    96, // 93
    96, // 94
    96, // 95
    96, // 96
    100, // 97
    100, // 98
    100, // 99
    100, // 100
    104, // 101
    104, // 102
    104, // 103
    104, // 104
    108, // 105
    108, // 106
    108, // 107
    108, // 108
    112, // 109
    112, // 110
    112, // 111
    112, // 112
    116, // 113
    116, // 114
    116, // 115
    116, // 116
    120, // 117
    120, // 118
    120, // 119
    120, // 120
    124, // 121
    124, // 122
    124, // 123
    124, // 124
    127, // 125
    127, // 126
    127, // 127
};

const char* g_noteTable[] =
{
    "Cn%01u ",
    "Cs%01u ",
    "Dn%01u ",
    "Ds%01u ",
    "En%01u ",
    "Fn%01u ",
    "Fs%01u ",
    "Gn%01u ",
    "Gs%01u ",
    "An%01u ",
    "As%01u ",
    "Bn%01u ",
};

const char* g_minusNoteTable[] =
{
    "CnM%01u",
    "CsM%01u",
    "DnM%01u",
    "DsM%01u",
    "EnM%01u",
    "FnM%01u",
    "FsM%01u",
    "GnM%01u",
    "GsM%01u",
    "AnM%01u",
    "AsM%01u",
    "BnM%01u",
};