-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMidiPercussion.cpp
More file actions
77 lines (70 loc) · 1.93 KB
/
MidiPercussion.cpp
File metadata and controls
77 lines (70 loc) · 1.93 KB
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
#include "MidiPercussion.h"
namespace MidiPercussion
{
struct MidiPercussion
{
int value;
const char* name;
};
const static struct MidiPercussion PERCUSSION_LIST [] = {
{35,"Acoustic Bass Drum"},
{36,"Bass Drum 1"},
{37,"Side Stick"},
{38,"Acoustic Snare"},
{39,"Hand Clap"},
{40,"Electric Snare"},
{41,"Low Floor Tom"},
{42,"Closed Hi Hat"},
{43,"High Floor Tom"},
{44,"Pedal Hi-Hat"},
{45,"Low Tom"},
{46,"Open Hi-Hat"},
{47,"Low-Mid Tom"},
{48,"Hi-Mid Tom"},
{49,"Crash Cymbal 1"},
{50,"High Tom"},
{51,"Ride Cymbal 1"},
{52,"Chinese Cymbal"},
{53,"Ride Bell"},
{54,"Tambourine"},
{55,"Splash Cymbal"},
{56,"Cowbell"},
{57,"Crash Cymbal 2"},
{58,"Vibraslap"},
{59,"Ride Cymbal 2"},
{60,"Hi Bongo"},
{61,"Low Bongo"},
{62,"Mute Hi Conga"},
{63,"Open Hi Conga"},
{64,"Low Conga"},
{65,"High Timbale"},
{66,"Low Timbale"},
{67,"High Agogo"},
{68,"Low Agogo"},
{69,"Cabasa"},
{70,"Maracas"},
{71,"Short Whistle"},
{72,"Long Whistle"},
{73,"Short Guiro"},
{74,"Long Guiro"},
{75,"Claves"},
{76,"Hi Wood Block"},
{77,"Low Wood Block"},
{78,"Mute Cuica"},
{79,"Open Cuica"},
{80,"Mute Triangle"},
{81,"Open Triangle"},
};
int PercussionListValue(int index)
{
if (index < 0 || index >= (int)(sizeof(PERCUSSION_LIST)/sizeof(struct MidiPercussion)))
return -1;
return PERCUSSION_LIST[index].value;
}
const char* PercussionListName(int index)
{
if (index < 0 || index >= (int)(sizeof(PERCUSSION_LIST)/sizeof(struct MidiPercussion)))
return 0;
return PERCUSSION_LIST[index].name;
}
}