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 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
142 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
143 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
144 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
145 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
146 |
schoenebeck |
2931 |
protected: |
147 |
|
|
InstrumentScriptVM* m_vm; |
148 |
|
|
}; |
149 |
|
|
|
150 |
|
|
class InstrumentScriptVMFunction_change_tune : public VMEmptyResultFunction { |
151 |
|
|
public: |
152 |
|
|
InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent); |
153 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
154 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
155 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
156 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
157 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
158 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
159 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
160 |
schoenebeck |
2931 |
protected: |
161 |
|
|
InstrumentScriptVM* m_vm; |
162 |
|
|
}; |
163 |
|
|
|
164 |
|
|
class InstrumentScriptVMFunction_change_pan : public VMEmptyResultFunction { |
165 |
|
|
public: |
166 |
|
|
InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent); |
167 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
168 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
169 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
170 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
171 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
172 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
173 |
schoenebeck |
2931 |
protected: |
174 |
|
|
InstrumentScriptVM* m_vm; |
175 |
|
|
}; |
176 |
|
|
|
177 |
schoenebeck |
2935 |
class InstrumentScriptVMFunction_change_cutoff : public VMEmptyResultFunction { |
178 |
|
|
public: |
179 |
|
|
InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent); |
180 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
181 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
182 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
183 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
184 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
185 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
186 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
187 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
188 |
schoenebeck |
2935 |
protected: |
189 |
|
|
InstrumentScriptVM* m_vm; |
190 |
|
|
}; |
191 |
|
|
|
192 |
|
|
class InstrumentScriptVMFunction_change_reso : public VMEmptyResultFunction { |
193 |
|
|
public: |
194 |
|
|
InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent); |
195 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
196 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
197 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
198 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
199 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
200 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
201 |
schoenebeck |
2935 |
protected: |
202 |
|
|
InstrumentScriptVM* m_vm; |
203 |
|
|
}; |
204 |
schoenebeck |
2953 |
|
205 |
|
|
class InstrumentScriptVMFunction_change_attack : public VMEmptyResultFunction { |
206 |
|
|
public: |
207 |
|
|
InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent); |
208 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
209 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
210 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
211 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
212 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
213 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
214 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
215 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
216 |
schoenebeck |
2953 |
protected: |
217 |
|
|
InstrumentScriptVM* m_vm; |
218 |
|
|
}; |
219 |
schoenebeck |
2935 |
|
220 |
schoenebeck |
2953 |
class InstrumentScriptVMFunction_change_decay : public VMEmptyResultFunction { |
221 |
|
|
public: |
222 |
|
|
InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent); |
223 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
224 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
225 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
226 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
227 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
228 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
229 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
230 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
231 |
schoenebeck |
2953 |
protected: |
232 |
|
|
InstrumentScriptVM* m_vm; |
233 |
|
|
}; |
234 |
|
|
|
235 |
|
|
class InstrumentScriptVMFunction_change_release : public VMEmptyResultFunction { |
236 |
|
|
public: |
237 |
|
|
InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent); |
238 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
239 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
240 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
241 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
242 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
243 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
244 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
245 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
246 |
schoenebeck |
2953 |
protected: |
247 |
|
|
InstrumentScriptVM* m_vm; |
248 |
|
|
}; |
249 |
|
|
|
250 |
schoenebeck |
3118 |
class VMChangeSynthParamFunction : public VMEmptyResultFunction { |
251 |
|
|
public: |
252 |
schoenebeck |
3564 |
VMChangeSynthParamFunction(InstrumentScriptVM* parent, bool acceptFinal, StdUnit_t unit, bool acceptUnitPrefix) |
253 |
|
|
: m_vm(parent), m_acceptFinal(acceptFinal), m_acceptUnitPrefix(acceptUnitPrefix), m_unit(unit) {} |
254 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
255 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
256 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
257 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
258 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
259 |
schoenebeck |
3561 |
bool acceptsArgFinal(vmint iArg) const OVERRIDE; |
260 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
261 |
schoenebeck |
3118 |
|
262 |
schoenebeck |
3561 |
template<class T_NoteParamType, T_NoteParamType NoteBase::_Override::*T_noteParam, |
263 |
|
|
vmint T_synthParam, |
264 |
|
|
vmint T_minValueNorm, vmint T_maxValueNorm, bool T_normalizeNorm, |
265 |
|
|
vmint T_minValueUnit, vmint T_maxValueUnit, |
266 |
|
|
MetricPrefix_t T_unitPrefix0, MetricPrefix_t ... T_unitPrefixN> |
267 |
schoenebeck |
3118 |
VMFnResult* execTemplate(VMFnArgs* args, const char* functionName); |
268 |
|
|
protected: |
269 |
|
|
InstrumentScriptVM* m_vm; |
270 |
schoenebeck |
3561 |
const bool m_acceptFinal; |
271 |
schoenebeck |
3564 |
const bool m_acceptUnitPrefix; |
272 |
schoenebeck |
3561 |
const StdUnit_t m_unit; |
273 |
schoenebeck |
3118 |
}; |
274 |
|
|
|
275 |
schoenebeck |
3316 |
class InstrumentScriptVMFunction_change_sustain : public VMChangeSynthParamFunction { |
276 |
|
|
public: |
277 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_BEL,true) {} |
278 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
279 |
schoenebeck |
3316 |
}; |
280 |
|
|
|
281 |
schoenebeck |
3360 |
class InstrumentScriptVMFunction_change_cutoff_attack : public VMChangeSynthParamFunction { |
282 |
|
|
public: |
283 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_cutoff_attack(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {} |
284 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
285 |
schoenebeck |
3360 |
}; |
286 |
|
|
|
287 |
|
|
class InstrumentScriptVMFunction_change_cutoff_decay : public VMChangeSynthParamFunction { |
288 |
|
|
public: |
289 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_cutoff_decay(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {} |
290 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
291 |
schoenebeck |
3360 |
}; |
292 |
|
|
|
293 |
|
|
class InstrumentScriptVMFunction_change_cutoff_sustain : public VMChangeSynthParamFunction { |
294 |
|
|
public: |
295 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_cutoff_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_BEL,true) {} |
296 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
297 |
schoenebeck |
3360 |
}; |
298 |
|
|
|
299 |
|
|
class InstrumentScriptVMFunction_change_cutoff_release : public VMChangeSynthParamFunction { |
300 |
|
|
public: |
301 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_cutoff_release(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {} |
302 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
303 |
schoenebeck |
3360 |
}; |
304 |
|
|
|
305 |
schoenebeck |
3118 |
class InstrumentScriptVMFunction_change_amp_lfo_depth : public VMChangeSynthParamFunction { |
306 |
|
|
public: |
307 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {} |
308 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
309 |
schoenebeck |
3118 |
}; |
310 |
|
|
|
311 |
|
|
class InstrumentScriptVMFunction_change_amp_lfo_freq : public VMChangeSynthParamFunction { |
312 |
|
|
public: |
313 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {} |
314 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
315 |
schoenebeck |
3118 |
}; |
316 |
|
|
|
317 |
schoenebeck |
3360 |
class InstrumentScriptVMFunction_change_cutoff_lfo_depth : public VMChangeSynthParamFunction { |
318 |
|
|
public: |
319 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_cutoff_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {} |
320 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
321 |
schoenebeck |
3360 |
}; |
322 |
|
|
|
323 |
|
|
class InstrumentScriptVMFunction_change_cutoff_lfo_freq : public VMChangeSynthParamFunction { |
324 |
|
|
public: |
325 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_cutoff_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {} |
326 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
327 |
schoenebeck |
3360 |
}; |
328 |
|
|
|
329 |
schoenebeck |
3118 |
class InstrumentScriptVMFunction_change_pitch_lfo_depth : public VMChangeSynthParamFunction { |
330 |
|
|
public: |
331 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {} |
332 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
333 |
schoenebeck |
3118 |
}; |
334 |
|
|
|
335 |
|
|
class InstrumentScriptVMFunction_change_pitch_lfo_freq : public VMChangeSynthParamFunction { |
336 |
|
|
public: |
337 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {} |
338 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
339 |
schoenebeck |
3118 |
}; |
340 |
|
|
|
341 |
schoenebeck |
3188 |
class InstrumentScriptVMFunction_change_vol_time : public VMChangeSynthParamFunction { |
342 |
|
|
public: |
343 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {} |
344 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
345 |
schoenebeck |
3188 |
}; |
346 |
|
|
|
347 |
|
|
class InstrumentScriptVMFunction_change_tune_time : public VMChangeSynthParamFunction { |
348 |
|
|
public: |
349 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {} |
350 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
351 |
schoenebeck |
3188 |
}; |
352 |
|
|
|
353 |
schoenebeck |
3335 |
class InstrumentScriptVMFunction_change_pan_time : public VMChangeSynthParamFunction { |
354 |
|
|
public: |
355 |
schoenebeck |
3564 |
InstrumentScriptVMFunction_change_pan_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {} |
356 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
357 |
schoenebeck |
3335 |
}; |
358 |
|
|
|
359 |
schoenebeck |
3246 |
class VMChangeFadeCurveFunction : public VMEmptyResultFunction { |
360 |
|
|
public: |
361 |
|
|
VMChangeFadeCurveFunction(InstrumentScriptVM* parent) : m_vm(parent) {} |
362 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
363 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
364 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
365 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
366 |
schoenebeck |
3246 |
|
367 |
schoenebeck |
3557 |
template<fade_curve_t NoteBase::_Override::*T_noteParam, vmint T_synthParam> |
368 |
schoenebeck |
3246 |
VMFnResult* execTemplate(VMFnArgs* args, const char* functionName); |
369 |
|
|
protected: |
370 |
|
|
InstrumentScriptVM* m_vm; |
371 |
|
|
}; |
372 |
|
|
|
373 |
|
|
class InstrumentScriptVMFunction_change_vol_curve : public VMChangeFadeCurveFunction { |
374 |
|
|
public: |
375 |
|
|
InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {} |
376 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
377 |
schoenebeck |
3246 |
}; |
378 |
|
|
|
379 |
|
|
class InstrumentScriptVMFunction_change_tune_curve : public VMChangeFadeCurveFunction { |
380 |
|
|
public: |
381 |
|
|
InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {} |
382 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
383 |
schoenebeck |
3246 |
}; |
384 |
|
|
|
385 |
schoenebeck |
3335 |
class InstrumentScriptVMFunction_change_pan_curve : public VMChangeFadeCurveFunction { |
386 |
|
|
public: |
387 |
|
|
InstrumentScriptVMFunction_change_pan_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {} |
388 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
389 |
schoenebeck |
3335 |
}; |
390 |
|
|
|
391 |
schoenebeck |
3188 |
class InstrumentScriptVMFunction_fade_in : public VMEmptyResultFunction { |
392 |
|
|
public: |
393 |
|
|
InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent); |
394 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
395 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
396 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
397 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
398 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
399 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
400 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
401 |
schoenebeck |
3188 |
protected: |
402 |
|
|
InstrumentScriptVM* m_vm; |
403 |
|
|
}; |
404 |
|
|
|
405 |
|
|
class InstrumentScriptVMFunction_fade_out : public VMEmptyResultFunction { |
406 |
|
|
public: |
407 |
|
|
InstrumentScriptVMFunction_fade_out(InstrumentScriptVM* parent); |
408 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
409 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
410 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE; |
411 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
412 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
413 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
414 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
415 |
schoenebeck |
3188 |
protected: |
416 |
|
|
InstrumentScriptVM* m_vm; |
417 |
|
|
}; |
418 |
|
|
|
419 |
schoenebeck |
3193 |
class InstrumentScriptVMFunction_get_event_par : public VMIntResultFunction { |
420 |
|
|
public: |
421 |
|
|
InstrumentScriptVMFunction_get_event_par(InstrumentScriptVM* parent); |
422 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
423 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
424 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
425 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
426 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
427 |
schoenebeck |
3193 |
protected: |
428 |
|
|
InstrumentScriptVM* m_vm; |
429 |
|
|
}; |
430 |
|
|
|
431 |
|
|
class InstrumentScriptVMFunction_set_event_par : public VMEmptyResultFunction { |
432 |
|
|
public: |
433 |
|
|
InstrumentScriptVMFunction_set_event_par(InstrumentScriptVM* parent); |
434 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 3; } |
435 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 3; } |
436 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
437 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
438 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
439 |
schoenebeck |
3193 |
protected: |
440 |
|
|
InstrumentScriptVM* m_vm; |
441 |
|
|
}; |
442 |
|
|
|
443 |
schoenebeck |
3214 |
class InstrumentScriptVMFunction_change_note : public VMEmptyResultFunction { |
444 |
|
|
public: |
445 |
|
|
InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent); |
446 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
447 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
448 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
449 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
450 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
451 |
schoenebeck |
3214 |
protected: |
452 |
|
|
InstrumentScriptVM* m_vm; |
453 |
|
|
}; |
454 |
|
|
|
455 |
|
|
class InstrumentScriptVMFunction_change_velo : public VMEmptyResultFunction { |
456 |
|
|
public: |
457 |
|
|
InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent); |
458 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
459 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
460 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
461 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
462 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
463 |
schoenebeck |
3214 |
protected: |
464 |
|
|
InstrumentScriptVM* m_vm; |
465 |
|
|
}; |
466 |
|
|
|
467 |
schoenebeck |
3255 |
class InstrumentScriptVMFunction_change_play_pos : public VMEmptyResultFunction { |
468 |
|
|
public: |
469 |
|
|
InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent); |
470 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 2; } |
471 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
472 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } |
473 |
schoenebeck |
3561 |
bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE; |
474 |
schoenebeck |
3564 |
bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE; |
475 |
schoenebeck |
3557 |
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
476 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
477 |
schoenebeck |
3255 |
protected: |
478 |
|
|
InstrumentScriptVM* m_vm; |
479 |
|
|
}; |
480 |
|
|
|
481 |
schoenebeck |
2935 |
class InstrumentScriptVMFunction_event_status : public VMIntResultFunction { |
482 |
|
|
public: |
483 |
|
|
InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent); |
484 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
485 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
486 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
487 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
488 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
489 |
schoenebeck |
2935 |
protected: |
490 |
|
|
InstrumentScriptVM* m_vm; |
491 |
|
|
}; |
492 |
|
|
|
493 |
schoenebeck |
3296 |
class InstrumentScriptVMFunction_callback_status : public VMIntResultFunction { |
494 |
|
|
public: |
495 |
|
|
InstrumentScriptVMFunction_callback_status(InstrumentScriptVM* parent); |
496 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
497 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
498 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
499 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
500 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
501 |
schoenebeck |
3296 |
protected: |
502 |
|
|
InstrumentScriptVM* m_vm; |
503 |
|
|
}; |
504 |
|
|
|
505 |
schoenebeck |
2948 |
// overrides core wait() implementation |
506 |
|
|
class InstrumentScriptVMFunction_wait : public CoreVMFunction_wait { |
507 |
|
|
public: |
508 |
|
|
InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent); |
509 |
schoenebeck |
3557 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
510 |
schoenebeck |
2948 |
}; |
511 |
|
|
|
512 |
|
|
class InstrumentScriptVMFunction_stop_wait : public VMEmptyResultFunction { |
513 |
|
|
public: |
514 |
|
|
InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent); |
515 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
516 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
517 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
518 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
519 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
520 |
schoenebeck |
2948 |
protected: |
521 |
|
|
InstrumentScriptVM* m_vm; |
522 |
|
|
}; |
523 |
|
|
|
524 |
schoenebeck |
3277 |
class InstrumentScriptVMFunction_abort : public VMEmptyResultFunction { |
525 |
|
|
public: |
526 |
|
|
InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent); |
527 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 1; } |
528 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
529 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } |
530 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
531 |
schoenebeck |
3277 |
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
532 |
|
|
protected: |
533 |
|
|
InstrumentScriptVM* m_vm; |
534 |
|
|
}; |
535 |
|
|
|
536 |
schoenebeck |
3293 |
class InstrumentScriptVMFunction_fork : public VMIntResultFunction { |
537 |
|
|
public: |
538 |
|
|
InstrumentScriptVMFunction_fork(InstrumentScriptVM* parent); |
539 |
schoenebeck |
3557 |
vmint minRequiredArgs() const OVERRIDE { return 0; } |
540 |
|
|
vmint maxAllowedArgs() const OVERRIDE { return 2; } |
541 |
|
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;} |
542 |
|
|
ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; } |
543 |
|
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
544 |
schoenebeck |
3293 |
protected: |
545 |
|
|
InstrumentScriptVM* m_vm; |
546 |
|
|
}; |
547 |
|
|
|
548 |
schoenebeck |
2596 |
} // namespace LinuxSampler |
549 |
|
|
|
550 |
|
|
#endif // LS_INSTRSCRIPTVMFUNCTIONS_H |