blob: 9bf2f121392d141e0628876aceccc0388ff104e2 (
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
|
#ifndef __DRUMGIZMO_MESSAGE_H__
#define __DRUMGIZMO_MESSAGE_H__
class Message {
public:
typedef enum {
LoadStatus,
LoadDrumKit,
LoadMidimap,
EngineSettingsMessage,
ChangeSettingMessage,
} type_t;
virtual ~Message() {}
virtual type_t type() = 0;
};
class LoadStatusMessage : public Message {
public:
type_t type() { return Message::LoadStatus; }
unsigned int number_of_files;
unsigned int numer_of_files_loaded;
std::string current_file;
};
class LoadDrumKitMessage : public Message {
public:
type_t type() { return Message::LoadDrumKit; }
std::string drumkitfile;
};
class LoadMidimapMessage : public Message {
public:
type_t type() { return Message::LoadMidimap; }
std::string midimapfile;
};
class EngineSettingsMessage : public Message {
public:
type_t type() { return Message::EngineSettingsMessage; }
std::string midimapfile;
bool midimap_loaded;
std::string drumkitfile;
bool drumkit_loaded;
float enable_velocity_modifier;
float velocity_modifier_falloff;
float velocity_modifier_weight;
float enable_velocity_randomiser;
float velocity_randomiser_weight;
};
class ChangeSettingMessage : public Message {
public:
typedef enum {
enable_velocity_modifier,
velocity_modifier_weight,
velocity_modifier_falloff,
} setting_name_t;
ChangeSettingMessage(setting_name_t n, float v) {
name = n;
value = v;
}
type_t type() { return Message::ChangeSettingMessage; }
setting_name_t name;
float value;
};
#endif
|