1 |
schoenebeck |
2596 |
/* |
2 |
persson |
3455 |
* Copyright (c) 2014 - 2019 Christian Schoenebeck |
3 |
schoenebeck |
2596 |
* |
4 |
|
|
* http://www.linuxsampler.org |
5 |
|
|
* |
6 |
|
|
* This file is part of LinuxSampler and released under the same terms. |
7 |
|
|
* See README file for details. |
8 |
|
|
*/ |
9 |
|
|
|
10 |
|
|
#ifndef LS_INSTRSCRIPTVMFUNCTIONS_H |
11 |
|
|
#define LS_INSTRSCRIPTVMFUNCTIONS_H |
12 |
|
|
|
13 |
|
|
#include "../../common/global.h" |
14 |
|
|
#include "../../scriptvm/CoreVMFunctions.h" |
15 |
schoenebeck |
3118 |
#include "Note.h" |
16 |
schoenebeck |
2596 |
|
17 |
|
|
namespace LinuxSampler { |
18 |
|
|
|
19 |
schoenebeck |
2630 |
class EventGroup; |
20 |
schoenebeck |
2596 |
class InstrumentScriptVM; |
21 |
|
|
|
22 |
schoenebeck |
2598 |
class InstrumentScriptVMFunction_play_note : public VMIntResultFunction { |
23 |
schoenebeck |
2596 |
public: |
24 |
|
|
InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent); |
25 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
26 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 4; } |
27 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
28 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
29 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
30 |
schoenebeck |
2596 |
protected: |
31 |
|
|
InstrumentScriptVM* m_vm; |
32 |
|
|
}; |
33 |
|
|
|
34 |
schoenebeck |
2600 |
class InstrumentScriptVMFunction_set_controller : public VMIntResultFunction { |
35 |
|
|
public: |
36 |
|
|
InstrumentScriptVMFunction_set_controller(InstrumentScriptVM* parent); |
37 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
38 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
39 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
40 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
41 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
42 |
schoenebeck |
2600 |
protected: |
43 |
|
|
InstrumentScriptVM* m_vm; |
44 |
|
|
}; |
45 |
|
|
|
46 |
schoenebeck |
2598 |
class InstrumentScriptVMFunction_ignore_event : public VMEmptyResultFunction { |
47 |
|
|
public: |
48 |
|
|
InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent); |
49 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 0; } |
50 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
51 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
52 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
53 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
54 |
schoenebeck |
2598 |
protected: |
55 |
|
|
InstrumentScriptVM* m_vm; |
56 |
|
|
}; |
57 |
|
|
|
58 |
|
|
class InstrumentScriptVMFunction_ignore_controller : public VMEmptyResultFunction { |
59 |
|
|
public: |
60 |
|
|
InstrumentScriptVMFunction_ignore_controller(InstrumentScriptVM* parent); |
61 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 0; } |
62 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
63 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
64 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
65 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
66 |
schoenebeck |
2598 |
protected: |
67 |
|
|
InstrumentScriptVM* m_vm; |
68 |
|
|
}; |
69 |
|
|
|
70 |
schoenebeck |
2629 |
class InstrumentScriptVMFunction_note_off : public VMEmptyResultFunction { |
71 |
|
|
public: |
72 |
|
|
InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent); |
73 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
74 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
75 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
76 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
77 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
78 |
schoenebeck |
2630 |
protected: |
79 |
|
|
InstrumentScriptVM* m_vm; |
80 |
|
|
}; |
81 |
|
|
|
82 |
|
|
class InstrumentScriptVMFunction_set_event_mark : public VMEmptyResultFunction { |
83 |
|
|
public: |
84 |
|
|
InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent); |
85 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
86 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
87 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
88 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
89 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
90 |
schoenebeck |
2629 |
protected: |
91 |
|
|
InstrumentScriptVM* m_vm; |
92 |
|
|
}; |
93 |
|
|
|
94 |
schoenebeck |
2630 |
class InstrumentScriptVMFunction_delete_event_mark : public VMEmptyResultFunction { |
95 |
|
|
public: |
96 |
|
|
InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent); |
97 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
98 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
99 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
100 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
101 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
102 |
schoenebeck |
2630 |
protected: |
103 |
|
|
InstrumentScriptVM* m_vm; |
104 |
|
|
}; |
105 |
|
|
|
106 |
|
|
class InstrumentScriptVMFunction_by_marks : public VMFunction { |
107 |
|
|
public: |
108 |
|
|
InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent); |
109 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
110 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
111 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
112 |
|
|
bool modifiesArg(vmint iArg) const OVERRIDE { return false; } |
113 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
114 |
schoenebeck |
3054 |
ExprType_t returnType() OVERRIDE { return INT_ARR_EXPR; } |
115 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
116 |
schoenebeck |
2630 |
protected: |
117 |
|
|
InstrumentScriptVM* m_vm; |
118 |
|
|
class Result : public VMFnResult, public VMIntArrayExpr { |
119 |
|
|
public: |
120 |
|
|
StmtFlags_t flags; |
121 |
|
|
EventGroup* eventGroup; |
122 |
|
|
|
123 |
schoenebeck |
3557 |
vmint arraySize() const OVERRIDE; |
124 |
|
|
vmint evalIntElement(vmuint i) OVERRIDE; |
125 |
|
|
void assignIntElement(vmuint i, vmint value) OVERRIDE {} // ignore assignment |
126 |
schoenebeck |
2630 |
VMExpr* resultValue() OVERRIDE { return this; } |
127 |
schoenebeck |
3054 |
StmtFlags_t resultFlags() OVERRIDE { return flags; } |
128 |
schoenebeck |
2945 |
bool isConstExpr() const OVERRIDE { return false; } |
129 |
schoenebeck |
2630 |
} m_result; |
130 |
|
|
|
131 |
|
|
VMFnResult* errorResult(); |
132 |
|
|
VMFnResult* successResult(EventGroup* eventGroup); |
133 |
|
|
}; |
134 |
|
|
|
135 |
schoenebeck |
2931 |
class InstrumentScriptVMFunction_change_vol : public VMEmptyResultFunction { |
136 |
|
|
public: |
137 |
|
|
InstrumentScriptVMFunction_change_vol(InstrumentScriptVM* parent); |
138 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
139 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
140 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
141 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
142 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
143 |
schoenebeck |
2931 |
protected: |
144 |
|
|
InstrumentScriptVM* m_vm; |
145 |
|
|
}; |
146 |
|
|
|
147 |
|
|
class InstrumentScriptVMFunction_change_tune : public VMEmptyResultFunction { |
148 |
|
|
public: |
149 |
|
|
InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent); |
150 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
151 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
152 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
153 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
154 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
155 |
schoenebeck |
2931 |
protected: |
156 |
|
|
InstrumentScriptVM* m_vm; |
157 |
|
|
}; |
158 |
|
|
|
159 |
|
|
class InstrumentScriptVMFunction_change_pan : public VMEmptyResultFunction { |
160 |
|
|
public: |
161 |
|
|
InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent); |
162 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
163 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
164 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
165 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
166 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
167 |
schoenebeck |
2931 |
protected: |
168 |
|
|
InstrumentScriptVM* m_vm; |
169 |
|
|
}; |
170 |
|
|
|
171 |
schoenebeck |
2935 |
class InstrumentScriptVMFunction_change_cutoff : public VMEmptyResultFunction { |
172 |
|
|
public: |
173 |
|
|
InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent); |
174 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
175 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
176 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
177 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
178 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
179 |
schoenebeck |
2935 |
protected: |
180 |
|
|
InstrumentScriptVM* m_vm; |
181 |
|
|
}; |
182 |
|
|
|
183 |
|
|
class InstrumentScriptVMFunction_change_reso : public VMEmptyResultFunction { |
184 |
|
|
public: |
185 |
|
|
InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent); |
186 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
187 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
188 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
189 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
190 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
191 |
schoenebeck |
2935 |
protected: |
192 |
|
|
InstrumentScriptVM* m_vm; |
193 |
|
|
}; |
194 |
schoenebeck |
2953 |
|
195 |
|
|
class InstrumentScriptVMFunction_change_attack : public VMEmptyResultFunction { |
196 |
|
|
public: |
197 |
|
|
InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent); |
198 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
199 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
200 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
201 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
202 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
203 |
schoenebeck |
2953 |
protected: |
204 |
|
|
InstrumentScriptVM* m_vm; |
205 |
|
|
}; |
206 |
schoenebeck |
2935 |
|
207 |
schoenebeck |
2953 |
class InstrumentScriptVMFunction_change_decay : public VMEmptyResultFunction { |
208 |
|
|
public: |
209 |
|
|
InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent); |
210 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
211 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
212 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
213 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
214 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
215 |
schoenebeck |
2953 |
protected: |
216 |
|
|
InstrumentScriptVM* m_vm; |
217 |
|
|
}; |
218 |
|
|
|
219 |
|
|
class InstrumentScriptVMFunction_change_release : public VMEmptyResultFunction { |
220 |
|
|
public: |
221 |
|
|
InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent); |
222 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
223 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
224 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
225 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
226 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
227 |
schoenebeck |
2953 |
protected: |
228 |
|
|
InstrumentScriptVM* m_vm; |
229 |
|
|
}; |
230 |
|
|
|
231 |
schoenebeck |
3118 |
class VMChangeSynthParamFunction : public VMEmptyResultFunction { |
232 |
|
|
public: |
233 |
|
|
VMChangeSynthParamFunction(InstrumentScriptVM* parent) : m_vm(parent) {} |
234 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
235 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
236 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
237 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
238 |
schoenebeck |
3118 |
|
239 |
schoenebeck |
3557 |
template<float NoteBase::_Override::*T_noteParam, vmint T_synthParam, |
240 |
|
|
bool T_isNormalizedParam, vmint T_maxValue, vmint T_minValue> |
241 |
schoenebeck |
3118 |
VMFnResult* execTemplate(VMFnArgs* args, const char* functionName); |
242 |
|
|
protected: |
243 |
|
|
InstrumentScriptVM* m_vm; |
244 |
|
|
}; |
245 |
|
|
|
246 |
schoenebeck |
3316 |
class InstrumentScriptVMFunction_change_sustain : public VMChangeSynthParamFunction { |
247 |
|
|
public: |
248 |
|
|
InstrumentScriptVMFunction_change_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
249 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
250 |
schoenebeck |
3316 |
}; |
251 |
|
|
|
252 |
schoenebeck |
3360 |
class InstrumentScriptVMFunction_change_cutoff_attack : public VMChangeSynthParamFunction { |
253 |
|
|
public: |
254 |
|
|
InstrumentScriptVMFunction_change_cutoff_attack(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
255 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
256 |
schoenebeck |
3360 |
}; |
257 |
|
|
|
258 |
|
|
class InstrumentScriptVMFunction_change_cutoff_decay : public VMChangeSynthParamFunction { |
259 |
|
|
public: |
260 |
|
|
InstrumentScriptVMFunction_change_cutoff_decay(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
261 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
262 |
schoenebeck |
3360 |
}; |
263 |
|
|
|
264 |
|
|
class InstrumentScriptVMFunction_change_cutoff_sustain : public VMChangeSynthParamFunction { |
265 |
|
|
public: |
266 |
|
|
InstrumentScriptVMFunction_change_cutoff_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
267 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
268 |
schoenebeck |
3360 |
}; |
269 |
|
|
|
270 |
|
|
class InstrumentScriptVMFunction_change_cutoff_release : public VMChangeSynthParamFunction { |
271 |
|
|
public: |
272 |
|
|
InstrumentScriptVMFunction_change_cutoff_release(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
273 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
274 |
schoenebeck |
3360 |
}; |
275 |
|
|
|
276 |
schoenebeck |
3118 |
class InstrumentScriptVMFunction_change_amp_lfo_depth : public VMChangeSynthParamFunction { |
277 |
|
|
public: |
278 |
|
|
InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
279 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
280 |
schoenebeck |
3118 |
}; |
281 |
|
|
|
282 |
|
|
class InstrumentScriptVMFunction_change_amp_lfo_freq : public VMChangeSynthParamFunction { |
283 |
|
|
public: |
284 |
|
|
InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
285 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
286 |
schoenebeck |
3118 |
}; |
287 |
|
|
|
288 |
schoenebeck |
3360 |
class InstrumentScriptVMFunction_change_cutoff_lfo_depth : public VMChangeSynthParamFunction { |
289 |
|
|
public: |
290 |
|
|
InstrumentScriptVMFunction_change_cutoff_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
291 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
292 |
schoenebeck |
3360 |
}; |
293 |
|
|
|
294 |
|
|
class InstrumentScriptVMFunction_change_cutoff_lfo_freq : public VMChangeSynthParamFunction { |
295 |
|
|
public: |
296 |
|
|
InstrumentScriptVMFunction_change_cutoff_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
297 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
298 |
schoenebeck |
3360 |
}; |
299 |
|
|
|
300 |
schoenebeck |
3118 |
class InstrumentScriptVMFunction_change_pitch_lfo_depth : public VMChangeSynthParamFunction { |
301 |
|
|
public: |
302 |
|
|
InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
303 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
304 |
schoenebeck |
3118 |
}; |
305 |
|
|
|
306 |
|
|
class InstrumentScriptVMFunction_change_pitch_lfo_freq : public VMChangeSynthParamFunction { |
307 |
|
|
public: |
308 |
|
|
InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
309 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
310 |
schoenebeck |
3118 |
}; |
311 |
|
|
|
312 |
schoenebeck |
3188 |
class InstrumentScriptVMFunction_change_vol_time : public VMChangeSynthParamFunction { |
313 |
|
|
public: |
314 |
|
|
InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
315 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
316 |
schoenebeck |
3188 |
}; |
317 |
|
|
|
318 |
|
|
class InstrumentScriptVMFunction_change_tune_time : public VMChangeSynthParamFunction { |
319 |
|
|
public: |
320 |
|
|
InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
321 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
322 |
schoenebeck |
3188 |
}; |
323 |
|
|
|
324 |
schoenebeck |
3335 |
class InstrumentScriptVMFunction_change_pan_time : public VMChangeSynthParamFunction { |
325 |
|
|
public: |
326 |
|
|
InstrumentScriptVMFunction_change_pan_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {} |
327 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
328 |
schoenebeck |
3335 |
}; |
329 |
|
|
|
330 |
schoenebeck |
3246 |
class VMChangeFadeCurveFunction : public VMEmptyResultFunction { |
331 |
|
|
public: |
332 |
|
|
VMChangeFadeCurveFunction(InstrumentScriptVM* parent) : m_vm(parent) {} |
333 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
334 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
335 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
336 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
337 |
schoenebeck |
3246 |
|
338 |
schoenebeck |
3557 |
template<fade_curve_t NoteBase::_Override::*T_noteParam, vmint T_synthParam> |
339 |
schoenebeck |
3246 |
VMFnResult* execTemplate(VMFnArgs* args, const char* functionName); |
340 |
|
|
protected: |
341 |
|
|
InstrumentScriptVM* m_vm; |
342 |
|
|
}; |
343 |
|
|
|
344 |
|
|
class InstrumentScriptVMFunction_change_vol_curve : public VMChangeFadeCurveFunction { |
345 |
|
|
public: |
346 |
|
|
InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {} |
347 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
348 |
schoenebeck |
3246 |
}; |
349 |
|
|
|
350 |
|
|
class InstrumentScriptVMFunction_change_tune_curve : public VMChangeFadeCurveFunction { |
351 |
|
|
public: |
352 |
|
|
InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {} |
353 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
354 |
schoenebeck |
3246 |
}; |
355 |
|
|
|
356 |
schoenebeck |
3335 |
class InstrumentScriptVMFunction_change_pan_curve : public VMChangeFadeCurveFunction { |
357 |
|
|
public: |
358 |
|
|
InstrumentScriptVMFunction_change_pan_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {} |
359 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
360 |
schoenebeck |
3335 |
}; |
361 |
|
|
|
362 |
schoenebeck |
3188 |
class InstrumentScriptVMFunction_fade_in : public VMEmptyResultFunction { |
363 |
|
|
public: |
364 |
|
|
InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent); |
365 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
366 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
367 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
368 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
369 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
370 |
schoenebeck |
3188 |
protected: |
371 |
|
|
InstrumentScriptVM* m_vm; |
372 |
|
|
}; |
373 |
|
|
|
374 |
|
|
class InstrumentScriptVMFunction_fade_out : public VMEmptyResultFunction { |
375 |
|
|
public: |
376 |
|
|
InstrumentScriptVMFunction_fade_out(InstrumentScriptVM* parent); |
377 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
378 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
379 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
380 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
381 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
382 |
schoenebeck |
3188 |
protected: |
383 |
|
|
InstrumentScriptVM* m_vm; |
384 |
|
|
}; |
385 |
|
|
|
386 |
schoenebeck |
3193 |
class InstrumentScriptVMFunction_get_event_par : public VMIntResultFunction { |
387 |
|
|
public: |
388 |
|
|
InstrumentScriptVMFunction_get_event_par(InstrumentScriptVM* parent); |
389 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
390 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
391 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
392 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
393 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
394 |
schoenebeck |
3193 |
protected: |
395 |
|
|
InstrumentScriptVM* m_vm; |
396 |
|
|
}; |
397 |
|
|
|
398 |
|
|
class InstrumentScriptVMFunction_set_event_par : public VMEmptyResultFunction { |
399 |
|
|
public: |
400 |
|
|
InstrumentScriptVMFunction_set_event_par(InstrumentScriptVM* parent); |
401 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 3; } |
402 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
403 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
404 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
405 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
406 |
schoenebeck |
3193 |
protected: |
407 |
|
|
InstrumentScriptVM* m_vm; |
408 |
|
|
}; |
409 |
|
|
|
410 |
schoenebeck |
3214 |
class InstrumentScriptVMFunction_change_note : public VMEmptyResultFunction { |
411 |
|
|
public: |
412 |
|
|
InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent); |
413 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
414 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
415 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
416 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
417 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
418 |
schoenebeck |
3214 |
protected: |
419 |
|
|
InstrumentScriptVM* m_vm; |
420 |
|
|
}; |
421 |
|
|
|
422 |
|
|
class InstrumentScriptVMFunction_change_velo : public VMEmptyResultFunction { |
423 |
|
|
public: |
424 |
|
|
InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent); |
425 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
426 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
427 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
428 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
429 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
430 |
schoenebeck |
3214 |
protected: |
431 |
|
|
InstrumentScriptVM* m_vm; |
432 |
|
|
}; |
433 |
|
|
|
434 |
schoenebeck |
3255 |
class InstrumentScriptVMFunction_change_play_pos : public VMEmptyResultFunction { |
435 |
|
|
public: |
436 |
|
|
InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent); |
437 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
438 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
439 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } |
440 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
441 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
442 |
schoenebeck |
3255 |
protected: |
443 |
|
|
InstrumentScriptVM* m_vm; |
444 |
|
|
}; |
445 |
|
|
|
446 |
schoenebeck |
2935 |
class InstrumentScriptVMFunction_event_status : public VMIntResultFunction { |
447 |
|
|
public: |
448 |
|
|
InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent); |
449 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
450 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
451 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
452 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
453 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
454 |
schoenebeck |
2935 |
protected: |
455 |
|
|
InstrumentScriptVM* m_vm; |
456 |
|
|
}; |
457 |
|
|
|
458 |
schoenebeck |
3296 |
class InstrumentScriptVMFunction_callback_status : public VMIntResultFunction { |
459 |
|
|
public: |
460 |
|
|
InstrumentScriptVMFunction_callback_status(InstrumentScriptVM* parent); |
461 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
462 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
463 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
464 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
465 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
466 |
schoenebeck |
3296 |
protected: |
467 |
|
|
InstrumentScriptVM* m_vm; |
468 |
|
|
}; |
469 |
|
|
|
470 |
schoenebeck |
2948 |
// overrides core wait() implementation |
471 |
|
|
class InstrumentScriptVMFunction_wait : public CoreVMFunction_wait { |
472 |
|
|
public: |
473 |
|
|
InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent); |
474 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
475 |
schoenebeck |
2948 |
}; |
476 |
|
|
|
477 |
|
|
class InstrumentScriptVMFunction_stop_wait : public VMEmptyResultFunction { |
478 |
|
|
public: |
479 |
|
|
InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent); |
480 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
481 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
482 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
483 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
484 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
485 |
schoenebeck |
2948 |
protected: |
486 |
|
|
InstrumentScriptVM* m_vm; |
487 |
|
|
}; |
488 |
|
|
|
489 |
schoenebeck |
3277 |
class InstrumentScriptVMFunction_abort : public VMEmptyResultFunction { |
490 |
|
|
public: |
491 |
|
|
InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent); |
492 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
493 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
494 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } |
495 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
496 |
schoenebeck |
3277 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
497 |
|
|
protected: |
498 |
|
|
InstrumentScriptVM* m_vm; |
499 |
|
|
}; |
500 |
|
|
|
501 |
schoenebeck |
3293 |
class InstrumentScriptVMFunction_fork : public VMIntResultFunction { |
502 |
|
|
public: |
503 |
|
|
InstrumentScriptVMFunction_fork(InstrumentScriptVM* parent); |
504 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 0; } |
505 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
506 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
507 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
508 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
509 |
schoenebeck |
3293 |
protected: |
510 |
|
|
InstrumentScriptVM* m_vm; |
511 |
|
|
}; |
512 |
|
|
|
513 |
schoenebeck |
2596 |
} // namespace LinuxSampler |
514 |
|
|
|
515 |
|
|
#endif // LS_INSTRSCRIPTVMFUNCTIONS_H |