forked from cgestes/multifxvst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ControleurLst.h
225 lines (214 loc) · 7.74 KB
/
ControleurLst.h
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
#pragma once
class CControleurParam
{
public:
CControleurParam(){value = 0;};
void Set(int value127);
int Get(){
return value;
}
void AddParam(int nbeffstk,int nparam);
void SupprParam(int nbeffstk,int nparam);
CArray <DWORD,DWORD> m_param;//liste des params associés (nbeffstk,paramnb)
int value; //parametre associé
};
class CParameterLst
{
public:
CParameterLst(){nb_controleur = 32;controleur_value = NULL;}
virtual ~CParameterLst();
void Init(int nbcontroleur);
void DeleteAllItems();
//suppr un parametre d'un effet a un controleur
void ParamSupprParam(int nbcontroleur,int nbeffstk,int nparam);
//ajoute un parametre d'un effet a un controleur
void ParamAddParam(int nbcontroleur,int nbeffstk,int nparam);
void Set_APP(CAppPointer * mapp){APP = mapp;}
void setParameter(long index, float value);
float getParameter(long index);
int GetCount(){return nb_controleur;}
protected:
CAppPointer * APP;
int nb_controleur;
CControleurParam ** controleur_value;/*CArray <CControleurParam *,CControleurParam *>*/
};
//####################################################################
//####################################################################
//####################################################################
enum{ACTION_C_SET =0,ACTION_C_PM,ACTION_C_TOGGLE, ACTION_N_SET, ACTION_N_PM, ACTION_N_TOGGLE,ACTION_PGCH};
class CControleurStk
{
public:
CControleurStk();
CControleurStk(CControleurStk & controleur){
midi_channel =controleur.midi_channel; //cannal midi
midi_controleur =controleur.midi_controleur;//controleur ou note
action =controleur.action;
value1 =controleur.value1; //depend de action
invert =controleur.invert; //inverse les valeurs en entrée
controleurnb =controleur.controleurnb; //numero du controleur
};
//void operator=(CControleurStk & controleur);
void ViewControleur(CListCtrl & lst,int pos = 0);
long midi_channel; //cannal midi
long midi_controleur; //controleur ou note
long action;
long value1; //depend de action
BOOL invert; //inverse les valeurs en entrée
long controleurnb; //numero du controleur
};
//####################################################################
//####################################################################
//####################################################################
struct VstEvent;
class CAppPointer;
class CControleurLst
{
public:
CControleurLst(void);
~CControleurLst(void);
void Init(int nbcontroleur);
void Load();
void Set_APP(CAppPointer * m_app){APP = m_app;}
void Save();
CControleurStk * Get(int n);
void ProcessEvent(VstEvent * event);
void ViewControleur(CListCtrl & lst,int nbsel = 0);
int Add(CControleurStk & CParam);
void Suppr(int index);
CArray <CControleurStk, CControleurStk& > m_lstcontroleur;
protected:
CAppPointer * APP;
int nb_controleur;
};
//generated by generatemidi.exe
static char * tabmidi[128][2] = {
{"Controleur 0"," 0 DO C -2"},
{"Controleur 1"," 1 DO# C# -2"},
{"Controleur 2"," 2 RE D -2"},
{"Controleur 3"," 3 RE# D# -2"},
{"Controleur 4"," 4 MI E -2"},
{"Controleur 5"," 5 FA F -2"},
{"Controleur 6"," 6 FA# F# -2"},
{"Controleur 7"," 7 SOL G -2"},
{"Controleur 8"," 8 SOL# G# -2"},
{"Controleur 9"," 9 LA A -2"},
{"Controleur 10"," 10 LA# A# -2"},
{"Controleur 11"," 11 SI B -2"},
{"Controleur 12"," 12 DO C -1"},
{"Controleur 13"," 13 DO# C# -1"},
{"Controleur 14"," 14 RE D -1"},
{"Controleur 15"," 15 RE# D# -1"},
{"Controleur 16"," 16 MI E -1"},
{"Controleur 17"," 17 FA F -1"},
{"Controleur 18"," 18 FA# F# -1"},
{"Controleur 19"," 19 SOL G -1"},
{"Controleur 20"," 20 SOL# G# -1"},
{"Controleur 21"," 21 LA A -1"},
{"Controleur 22"," 22 LA# A# -1"},
{"Controleur 23"," 23 SI B -1"},
{"Controleur 24"," 24 DO C 0"},
{"Controleur 25"," 25 DO# C# 0"},
{"Controleur 26"," 26 RE D 0"},
{"Controleur 27"," 27 RE# D# 0"},
{"Controleur 28"," 28 MI E 0"},
{"Controleur 29"," 29 FA F 0"},
{"Controleur 30"," 30 FA# F# 0"},
{"Controleur 31"," 31 SOL G 0"},
{"Controleur 32"," 32 SOL# G# 0"},
{"Controleur 33"," 33 LA A 0"},
{"Controleur 34"," 34 LA# A# 0"},
{"Controleur 35"," 35 SI B 0"},
{"Controleur 36"," 36 DO C 1"},
{"Controleur 37"," 37 DO# C# 1"},
{"Controleur 38"," 38 RE D 1"},
{"Controleur 39"," 39 RE# D# 1"},
{"Controleur 40"," 40 MI E 1"},
{"Controleur 41"," 41 FA F 1"},
{"Controleur 42"," 42 FA# F# 1"},
{"Controleur 43"," 43 SOL G 1"},
{"Controleur 44"," 44 SOL# G# 1"},
{"Controleur 45"," 45 LA A 1"},
{"Controleur 46"," 46 LA# A# 1"},
{"Controleur 47"," 47 SI B 1"},
{"Controleur 48"," 48 DO C 2"},
{"Controleur 49"," 49 DO# C# 2"},
{"Controleur 50"," 50 RE D 2"},
{"Controleur 51"," 51 RE# D# 2"},
{"Controleur 52"," 52 MI E 2"},
{"Controleur 53"," 53 FA F 2"},
{"Controleur 54"," 54 FA# F# 2"},
{"Controleur 55"," 55 SOL G 2"},
{"Controleur 56"," 56 SOL# G# 2"},
{"Controleur 57"," 57 LA A 2"},
{"Controleur 58"," 58 LA# A# 2"},
{"Controleur 59"," 59 SI B 2"},
{"Controleur 60"," 60 DO C 3"},
{"Controleur 61"," 61 DO# C# 3"},
{"Controleur 62"," 62 RE D 3"},
{"Controleur 63"," 63 RE# D# 3"},
{"Controleur 64"," 64 MI E 3"},
{"Controleur 65"," 65 FA F 3"},
{"Controleur 66"," 66 FA# F# 3"},
{"Controleur 67"," 67 SOL G 3"},
{"Controleur 68"," 68 SOL# G# 3"},
{"Controleur 69"," 69 LA A 3"},
{"Controleur 70"," 70 LA# A# 3"},
{"Controleur 71"," 71 SI B 3"},
{"Controleur 72"," 72 DO C 4"},
{"Controleur 73"," 73 DO# C# 4"},
{"Controleur 74"," 74 RE D 4"},
{"Controleur 75"," 75 RE# D# 4"},
{"Controleur 76"," 76 MI E 4"},
{"Controleur 77"," 77 FA F 4"},
{"Controleur 78"," 78 FA# F# 4"},
{"Controleur 79"," 79 SOL G 4"},
{"Controleur 80"," 80 SOL# G# 4"},
{"Controleur 81"," 81 LA A 4"},
{"Controleur 82"," 82 LA# A# 4"},
{"Controleur 83"," 83 SI B 4"},
{"Controleur 84"," 84 DO C 5"},
{"Controleur 85"," 85 DO# C# 5"},
{"Controleur 86"," 86 RE D 5"},
{"Controleur 87"," 87 RE# D# 5"},
{"Controleur 88"," 88 MI E 5"},
{"Controleur 89"," 89 FA F 5"},
{"Controleur 90"," 90 FA# F# 5"},
{"Controleur 91"," 91 SOL G 5"},
{"Controleur 92"," 92 SOL# G# 5"},
{"Controleur 93"," 93 LA A 5"},
{"Controleur 94"," 94 LA# A# 5"},
{"Controleur 95"," 95 SI B 5"},
{"Controleur 96"," 96 DO C 6"},
{"Controleur 97"," 97 DO# C# 6"},
{"Controleur 98"," 98 RE D 6"},
{"Controleur 99"," 99 RE# D# 6"},
{"Controleur 100","100 MI E 6"},
{"Controleur 101","101 FA F 6"},
{"Controleur 102","102 FA# F# 6"},
{"Controleur 103","103 SOL G 6"},
{"Controleur 104","104 SOL# G# 6"},
{"Controleur 105","105 LA A 6"},
{"Controleur 106","106 LA# A# 6"},
{"Controleur 107","107 SI B 6"},
{"Controleur 108","108 DO C 7"},
{"Controleur 109","109 DO# C# 7"},
{"Controleur 110","110 RE D 7"},
{"Controleur 111","111 RE# D# 7"},
{"Controleur 112","112 MI E 7"},
{"Controleur 113","113 FA F 7"},
{"Controleur 114","114 FA# F# 7"},
{"Controleur 115","115 SOL G 7"},
{"Controleur 116","116 SOL# G# 7"},
{"Controleur 117","117 LA A 7"},
{"Controleur 118","118 LA# A# 7"},
{"Controleur 119","119 SI B 7"},
{"Controleur 120","120 DO C 8"},
{"Controleur 121","121 DO# C# 8"},
{"Controleur 122","122 RE D 8"},
{"Controleur 123","123 RE# D# 8"},
{"Controleur 124","124 MI E 8"},
{"Controleur 125","125 FA F 8"},
{"Controleur 126","126 FA# F# 8"},
{"Controleur 127","127 SOL G 8"},
};