-
Notifications
You must be signed in to change notification settings - Fork 2
/
midiinfo.bi
530 lines (510 loc) · 13.6 KB
/
midiinfo.bi
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
''
''
'' midiinfo -- header translated with help of SWIG FB wrapper
''
'' NOTICE: This file is part of the FreeBASIC Compiler package and can't
'' be included in other distributions without authorization.
''
''
#ifndef __midiinfo_bi__
#define __midiinfo_bi__
enum tMIDI_MSG
msgNoteOff = &h80
msgNoteOn = &h90
msgNoteKeyPressure = &ha0
msgSetParameter = &hb0
msgSetProgram = &hc0
msgChangePressure = &hd0
msgSetPitchWheel = &he0
msgMetaEvent = &hff
msgSysEx1 = &hf0
msgSysEx2 = &hf7
msgPatchChange = msgSetProgram
msgControlChange = msgSetParameter
msgSysMask = &hf0
end enum
enum tMIDI_CC
ccBankSelect = 0
ccModulation = 1
ccBreathControl = 2
ccUndefined3 = 3
ccFootControl = 4
ccPortamentoTime = 5
ccDateEntry = 6
ccVolume = 7
ccBalance = 8
ccUndefined9 = 9
ccPan = 10
ccExpression = 11
ccEffectControl1 = 12
ccEffectControl2 = 13
ccUndefined14 = 14
ccUndefined15 = 15
ccGeneralPurpose1 = 16
ccGeneralPurpose2 = 17
ccGeneralPurpose3 = 18
ccGeneralPurpose4 = 19
ccUndefined20 = 20
ccUndefined21 = 21
ccUndefined22 = 22
ccUndefined23 = 23
ccUndefined24 = 24
ccUndefined25 = 25
ccUndefined26 = 26
ccUndefined27 = 27
ccUndefined28 = 28
ccUndefined29 = 29
ccUndefined30 = 30
ccUndefined31 = 31
ccBankSelectLSB = 32
ccModulationLSB = 33
ccBreathControlLSB = 34
ccUndefined35 = 35
ccFootControlLSB = 36
ccPortamentoTimeLSB = 37
ccDateEntryLSB = 38
ccVolumeLSB = 39
ccBalanceLSB = 40
ccUndefined41 = 41
ccPanLSB = 42
ccExpressionLSB = 43
ccEffectControl1LSB = 44
ccEffectControl2LSB = 45
ccUndefined46 = 46
ccUndefined47 = 47
ccGeneralPurpose1LSB = 48
ccGeneralPurpose2LSB = 49
ccGeneralPurpose3LSB = 50
ccGeneralPurpose4LSB = 51
ccUndefined52 = 52
ccUndefined53 = 53
ccUndefined54 = 54
ccUndefined55 = 55
ccUndefined56 = 56
ccUndefined57 = 57
ccUndefined58 = 58
ccUndefined59 = 59
ccUndefined60 = 60
ccUndefined61 = 61
ccUndefined62 = 62
ccUndefined63 = 63
ccSustainPedal = 64
ccPortamento = 65
ccPedalSustenuto = 66
ccPedalSoft = 67
ccLegatoFootSwitch = 68
ccHold2 = 69
ccSoundVariation = 70
ccTimbre = 71
ccReleaseTime = 72
ccAttackTime = 73
ccBrightness = 74
ccReverb = 75
ccDelay = 76
ccPitchTranspose = 77
ccFlange = 78
ccSpecialFX = 79
ccGeneralPurpose5 = 80
ccGeneralPurpose6 = 81
ccGeneralPurpose7 = 82
ccGeneralPurpose8 = 83
ccPortamentoControl = 84
ccUndefined85 = 85
ccUndefined86 = 86
ccUndefined87 = 87
ccUndefined88 = 88
ccUndefined89 = 89
ccUndefined90 = 90
ccFXDepth = 91
ccTremeloDepth = 92
ccChorusDepth = 93
ccCelestaDepth = 94
ccPhaserDepth = 95
ccDataInc = 96
ccDataDec = 97
ccNonRegParamLSB = 98
ccNonRefParamMSB = 99
ccRegParamLSB = 100
ccRegParamMSB = 101
ccUndefined102 = 102
ccUndefined103 = 103
ccUndefined104 = 104
ccUndefined105 = 105
ccUndefined106 = 106
ccUndefined107 = 107
ccUndefined108 = 108
ccUndefined109 = 109
ccUndefined110 = 110
ccUndefined111 = 111
ccUndefined112 = 112
ccUndefined113 = 113
ccUndefined114 = 114
ccUndefined115 = 115
ccUndefined116 = 116
ccUndefined117 = 117
ccUndefined118 = 118
ccUndefined119 = 119
ccAllSoundOff = 120
ccResetAllControllers = 121
ccLocalControl = 122
ccAllNotesOff = 123
ccOmniModeOff = 124
ccOmniModeOn = 125
ccMonoModeOn = 126
ccPolyModeOn = 127
ccModWheel = 1
ccHarmContent = 71
ccSoundController1 = 70
ccSoundController2 = 71
ccSoundController3 = 72
ccSoundController4 = 73
ccSoundController5 = 74
ccSoundController6 = 75
ccSoundController7 = 76
ccSoundController8 = 77
ccSoundController9 = 78
ccSoundController10 = 79
ccEffect1Depth = 91
ccEffect2Depth = 92
ccEffect3Depth = 93
ccEffect4Depth = 94
ccEffect5Depth = 95
ccDetuneDepth = 94
end enum
enum tMIDI_SYSCOMMON
sysUndefinedF1 = &hf1
sysSongPosition = &hf2
sysSongSelect = &hf3
sysUndefinedF4 = &hf4
sysUndefinedF5 = &hf5
sysTuneRequest = &hf6
sysEOX = &hf7
end enum
enum tMIDI_REALTIME
srtTimingClock = &hf8
srtUndefinedF9 = &hf9
srtStart = &hfa
srtContinue = &hfb
srtStop = &hfc
srtUndefinedFD = &hfd
srtActiveSensing = &hfe
srtSystemReset = &hff
end enum
enum tMIDI_SYSEX
sexEOX = &hf7
end enum
enum tMIDI_KEYSIG
keyCFlatMaj = &h87
keyGFlatMaj = &h86
keyDFlatMaj = &h85
keyAFlatMaj = &h84
keyEFlatMaj = &h83
keyBFlatMaj = &h82
keyFMaj = &h81
keyCMaj = &h00
keyGMaj = &h01
keyDMaj = &h02
keyAMaj = &h03
keyEMaj = &h04
keyBMaj = &h05
keyFSharpMaj = &h06
keyCSharpMaj = &h07
keyCFlatMin = &hc7
keyGFlatMin = &hc6
keyDFlatMin = &hc5
keyAFlatMin = &hc4
keyEFlatMin = &hc3
keyBFlatMin = &hc2
keyFMin = &hc1
keyCMin = &h40
keyGMin = &h41
keyDMin = &h42
keyAMin = &h43
keyEMin = &h44
keyBMin = &h45
keyFSharpMin = &h46
keyCSharpMin = &h47
keyMaskNeg = &h80
keyMaskFlatKeys = &h80
keyMaskMin = &h40
keyMaskKey = &h07
end enum
enum tMIDI_META
metaSequenceNumber = 0
metaTextEvent = 1
metaCopyright = 2
metaTrackName = 3
metaInstrument = 4
metaLyric = 5
metaMarker = 6
metaCuePoint = 7
metaMIDIPort = &h21
metaEndSequence = &h2f
metaSetTempo = &h51
metaSMPTEOffset = &h54
metaTimeSig = &h58
metaKeySig = &h59
metaSequencerSpecific = &h7f
end enum
enum tMIDI_TEXT
textTextEvent = 1
textCopyright = 2
textTrackName = 3
textInstrument = 4
textLyric = 5
textMarker = 6
textCuePoint = 7
end enum
#define MIDI_WHEEL_CENTRE 8192
#define MIDI_CHANNEL_1 1
#define MIDI_CHANNEL_2 2
#define MIDI_CHANNEL_3 3
#define MIDI_CHANNEL_4 4
#define MIDI_CHANNEL_5 5
#define MIDI_CHANNEL_6 6
#define MIDI_CHANNEL_7 7
#define MIDI_CHANNEL_8 8
#define MIDI_CHANNEL_9 9
#define MIDI_CHANNEL_10 10
#define MIDI_CHANNEL_11 11
#define MIDI_CHANNEL_12 12
#define MIDI_CHANNEL_13 13
#define MIDI_CHANNEL_14 14
#define MIDI_CHANNEL_15 15
#define MIDI_CHANNEL_16 16
#define MIDI_CHANNEL_DRUMS 10
#define MIDI_OCTAVE 12
#define MIDI_NOTE_C 0
#define MIDI_NOTE_C_SHARP 1
#define MIDI_NOTE_C_FLAT -11
#define MIDI_NOTE_D 2
#define MIDI_NOTE_D_SHARP 3
#define MIDI_NOTE_D_FLAT 1
#define MIDI_NOTE_E 4
#define MIDI_NOTE_E_SHARP 5
#define MIDI_NOTE_E_FLAT 3
#define MIDI_NOTE_F 5
#define MIDI_NOTE_F_SHARP 6
#define MIDI_NOTE_F_FLAT 5
#define MIDI_NOTE_G 7
#define MIDI_NOTE_G_SHARP 8
#define MIDI_NOTE_G_FLAT 6
#define MIDI_NOTE_A 9
#define MIDI_NOTE_A_SHARP 10
#define MIDI_NOTE_A_FLAT 8
#define MIDI_NOTE_B 11
#define MIDI_NOTE_B_SHARP 12
#define MIDI_NOTE_B_FLAT 10
#define MIDI_NOTE_C0 0
#define MIDI_NOTE_C1 12
#define MIDI_NOTE_C2 24
#define MIDI_NOTE_C3 36
#define MIDI_NOTE_C4 48
#define MIDI_NOTE_C5 60
#define MIDI_NOTE_C6 72
#define MIDI_NOTE_C7 84
#define MIDI_NOTE_C8 96
#define MIDI_NOTE_C9 108
#define MIDI_NOTE_C10 120
#define MIDI_OCTAVE_0 0
#define MIDI_OCTAVE_1 12
#define MIDI_OCTAVE_2 24
#define MIDI_OCTAVE_3 36
#define MIDI_OCTAVE_4 48
#define MIDI_OCTAVE_5 60
#define MIDI_OCTAVE_6 72
#define MIDI_OCTAVE_7 84
#define MIDI_OCTAVE_8 96
#define MIDI_OCTAVE_9 108
#define MIDI_OCTAVE_10 120
#define MIDI_NOTE_BREVE 1536
#define MIDI_NOTE_MINIM 768
#define MIDI_NOTE_CROCHET 384
#define MIDI_NOTE_QUAVER 192
#define MIDI_NOTE_SEMIQUAVER 96
#define MIDI_NOTE_SEMIDEMIQUAVER 48
#define MIDI_NOTE_DOTTED_MINIM (768+384)
#define MIDI_NOTE_DOTTED_CROCHET (384+192)
#define MIDI_NOTE_DOTTED_QUAVER (192+96)
#define MIDI_NOTE_DOTTED_SEMIQUAVER (96+48)
#define MIDI_NOTE_DOTTED_SEMIDEMIQUAVER (48+24)
#define MIDI_NOTE_TRIPLE_CROCHET 256
#define MIDI_VOL_FULL 127
#define MIDI_VOL_HALF 64
#define MIDI_VOL_OFF 0
#define MIDI_PATCH_ACOUSTIC_GRAND_PIANO 0
#define MIDI_PATCH_BRIGHT_ACOUSTIC_PIANO 1
#define MIDI_PATCH_ELECTRIC_GRAND_PIANO 2
#define MIDI_PATCH_HONKY_TONK_PIANO 3
#define MIDI_PATCH_ELECTRIC_PIANO_1 4
#define MIDI_PATCH_ELECTRIC_PIANO_2 5
#define MIDI_PATCH_HARPSICHORD 6
#define MIDI_PATCH_CLAVI 7
#define MIDI_PATCH_CELESTA 8
#define MIDI_PATCH_GLOCKENSPIEL 9
#define MIDI_PATCH_MUSIC_BOX 10
#define MIDI_PATCH_VIBRAPHONE 11
#define MIDI_PATCH_MARIMBA 12
#define MIDI_PATCH_XYLOPHONE 13
#define MIDI_PATCH_TUBULAR_BELLS 14
#define MIDI_PATCH_DULCIMER 15
#define MIDI_PATCH_DRAWBAR_ORGAN 16
#define MIDI_PATCH_PERCUSSIVE_ORGAN 17
#define MIDI_PATCH_ROCK_ORGAN 18
#define MIDI_PATCH_CHURCH_ORGAN 19
#define MIDI_PATCH_REED_ORGAN 20
#define MIDI_PATCH_ACCORDION 21
#define MIDI_PATCH_HARMONICA 22
#define MIDI_PATCH_TANGO_ACCORDION 23
#define MIDI_PATCH_ACOUSTIC_GUITAR_NYLON 24
#define MIDI_PATCH_ACOUSTIC_GUITAR_STEEL 25
#define MIDI_PATCH_ELECTRIC_GUITAR_JAZZ 26
#define MIDI_PATCH_ELECTRIC_GUITAR_CLEAN 27
#define MIDI_PATCH_ELECTRIC_GUITAR_MUTED 28
#define MIDI_PATCH_OVERDRIVEN_GUITAR 29
#define MIDI_PATCH_DISTORTION_GUITAR 30
#define MIDI_PATCH_GUITAR_HARMONICS 31
#define MIDI_PATCH_ACOUSTIC_BASS 32
#define MIDI_PATCH_ELECTRIC_BASS_FINGER 33
#define MIDI_PATCH_ELECTRIC_BASS_PICK 34
#define MIDI_PATCH_FRETLESS_BASS 35
#define MIDI_PATCH_SLAP_BASS_1 36
#define MIDI_PATCH_SLAP_BASS_2 37
#define MIDI_PATCH_SYNTH_BASS_1 38
#define MIDI_PATCH_SYNTH_BASS_2 39
#define MIDI_PATCH_VIOLIN 40
#define MIDI_PATCH_VIOLA 41
#define MIDI_PATCH_CELLO 42
#define MIDI_PATCH_CONTRABASS 43
#define MIDI_PATCH_TREMOLO_STRINGS 44
#define MIDI_PATCH_PIZZICATO_STRINGS 45
#define MIDI_PATCH_ORCHESTRAL_HARP 46
#define MIDI_PATCH_TIMPANI 47
#define MIDI_PATCH_STRING_ENSEMBLE_1 48
#define MIDI_PATCH_STRING_ENSEMBLE_2 49
#define MIDI_PATCH_SYNTHSTRINGS_1 50
#define MIDI_PATCH_SYNTHSTRINGS_2 51
#define MIDI_PATCH_CHOIR_AAHS 52
#define MIDI_PATCH_VOICE_OOHS 53
#define MIDI_PATCH_SYNTH_VOICE 54
#define MIDI_PATCH_ORCHESTRA_HIT 55
#define MIDI_PATCH_TRUMPET 56
#define MIDI_PATCH_TROMBONE 57
#define MIDI_PATCH_TUBA 58
#define MIDI_PATCH_MUTED_TRUMPET 59
#define MIDI_PATCH_FRENCH_HORN 60
#define MIDI_PATCH_BRASS_SECTION 61
#define MIDI_PATCH_SYNTHBRASS_1 62
#define MIDI_PATCH_SYNTHBRASS_2 63
#define MIDI_PATCH_SOPRANO_SAX 64
#define MIDI_PATCH_ALTO_SAX 65
#define MIDI_PATCH_TENOR_SAX 66
#define MIDI_PATCH_BARITONE_SAX 67
#define MIDI_PATCH_OBOE 68
#define MIDI_PATCH_ENGLISH_HORN 69
#define MIDI_PATCH_BASSOON 70
#define MIDI_PATCH_CLARINET 71
#define MIDI_PATCH_PICCOLO 72
#define MIDI_PATCH_FLUTE 73
#define MIDI_PATCH_RECORDER 74
#define MIDI_PATCH_PAN_FLUTE 75
#define MIDI_PATCH_BLOWN_BOTTLE 76
#define MIDI_PATCH_SHAKUHACHI 77
#define MIDI_PATCH_WHISTLE 78
#define MIDI_PATCH_OCARINA 79
#define MIDI_PATCH_LEAD_1_SQUARE 80
#define MIDI_PATCH_LEAD_2_SAWTOOTH 81
#define MIDI_PATCH_LEAD_3_CALLIOPE 82
#define MIDI_PATCH_LEAD_4_CHIFF 83
#define MIDI_PATCH_LEAD_5_CHARANG 84
#define MIDI_PATCH_LEAD_6_VOICE 85
#define MIDI_PATCH_LEAD_7_FIFTHS 86
#define MIDI_PATCH_LEAD_8_BASS_AND_LEAD 87
#define MIDI_PATCH_PAD_1_NEW_AGE 88
#define MIDI_PATCH_PAD_2_WARM 89
#define MIDI_PATCH_PAD_3_POLYSYNTH 90
#define MIDI_PATCH_PAD_4_CHOIR 91
#define MIDI_PATCH_PAD_5_BOWED 92
#define MIDI_PATCH_PAD_6_METALLIC 93
#define MIDI_PATCH_PAD_7_HALO 94
#define MIDI_PATCH_PAD_8_SWEEP 95
#define MIDI_PATCH_FX_1_RAIN 96
#define MIDI_PATCH_FX_2_SOUNDTRACK 97
#define MIDI_PATCH_FX_3_CRYSTAL 98
#define MIDI_PATCH_FX_4_ATMOSPHERE 99
#define MIDI_PATCH_FX_5_BRIGHTNESS 100
#define MIDI_PATCH_FX_6_GOBLINS 101
#define MIDI_PATCH_FX_7_ECHOES 102
#define MIDI_PATCH_FX_8_SCIFI 103
#define MIDI_PATCH_SITAR 104
#define MIDI_PATCH_BANJO 105
#define MIDI_PATCH_SHAMISEN 106
#define MIDI_PATCH_KOTO 107
#define MIDI_PATCH_KALIMBA 108
#define MIDI_PATCH_BAG_PIPE 109
#define MIDI_PATCH_FIDDLE 110
#define MIDI_PATCH_SHANAI 111
#define MIDI_PATCH_TINKLE_BELL 112
#define MIDI_PATCH_AGOGO 113
#define MIDI_PATCH_STEEL_DRUMS 114
#define MIDI_PATCH_WOODBLOCK 115
#define MIDI_PATCH_TAIKO_DRUM 116
#define MIDI_PATCH_MELODIC_TOM 117
#define MIDI_PATCH_SYNTH_DRUM 118
#define MIDI_PATCH_REVERSE_CYMBAL 119
#Define MIDI_PATCH_Guitar_Fret_Noise 120 ' ARREGLADO NO EXISTIA
#define MIDI_PATCH_BREATH_NOISE 121
#define MIDI_PATCH_SEASHORE 122
#define MIDI_PATCH_BIRD_TWEET 123
#define MIDI_PATCH_TELEPHONE_RING 124
#define MIDI_PATCH_HELICOPTER 125
#define MIDI_PATCH_APPLAUSE 126
#define MIDI_PATCH_GUNSHOT 127
#define MIDI_DRUM_ACOUSTIC_BASS_DRUM 35
#define MIDI_DRUM_BASS_DRUM 36
#define MIDI_DRUM_SIDE_STICK 37
#define MIDI_DRUM_ACOUSTIC_SNARE 38
#define MIDI_DRUM_HAND_CLAP 39
#define MIDI_DRUM_ELECTRIC_SNARE 40
#define MIDI_DRUM_LOW_FLOOR_TOM 41
#define MIDI_DRUM_CLOSED_HI_HAT 42
#define MIDI_DRUM_HIGH_FLOOR_TOM 43
#define MIDI_DRUM_PEDAL_HI_HAT 44
#define MIDI_DRUM_LOW_TOM 45
#define MIDI_DRUM_OPEN_HI_HAT 46
#define MIDI_DRUM_LOW_MID_TOM 47
#define MIDI_DRUM_HI_MID_TOM 48
#define MIDI_DRUM_CRASH_CYMBAL_1 49
#define MIDI_DRUM_HIGH_TOM 50
#define MIDI_DRUM_RIDE_CYMBAL_1 51
#define MIDI_DRUM_CHINESE_CYMBAL 52
#define MIDI_DRUM_RIDE_BELL 53
#define MIDI_DRUM_TAMBOURINE 54
#define MIDI_DRUM_SPLASH_CYMBAL 55
#define MIDI_DRUM_COWBELL 56
#define MIDI_DRUM_CRASH_CYMBAL_2 57
#define MIDI_DRUM_VIBRA_SLAP 58
#define MIDI_DRUM_RIDE_CYMBAL_2 59
#define MIDI_DRUM_HI_BONGO 60
#define MIDI_DRUM_LOW_BONGO 61
#define MIDI_DRUM_MUTE_HI_CONGA 62
#define MIDI_DRUM_OPEN_HI_CONGA 63
#define MIDI_DRUM_LOW_CONGA 64
#define MIDI_DRUM_HIGH_TIMBALE 65
#define MIDI_DRUM_LOW_TIMBALE 66
#define MIDI_DRUM_HIGH_AGOGO 67
#define MIDI_DRUM_LOW_AGOGO 68
#define MIDI_DRUM_CABASA 69
#define MIDI_DRUM_MARACAS 70
#define MIDI_DRUM_SHORT_WHISTLE 71
#define MIDI_DRUM_LONG_WHISTLE 72
#define MIDI_DRUM_SHORT_GUIRO 73
#define MIDI_DRUM_LONG_GUIRO 74
#define MIDI_DRUM_CLAVES 75
#define MIDI_DRUM_HI_WOOD_BLOCK 76
#define MIDI_DRUM_LOW_WOOD_BLOCK 77
#define MIDI_DRUM_MUTE_CUICA 78
#define MIDI_DRUM_OPEN_CUICA 79
#define MIDI_DRUM_MUTE_TRIANGLE 80
#define MIDI_DRUM_OPEN_TRIANGLE 81
#endif