/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3316 by schoenebeck, Thu Jul 20 12:05:53 2017 UTC revision 3564 by schoenebeck, Sat Aug 24 09:18:57 2019 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (c) 2014 - 2017 Christian Schoenebeck   * Copyright (c) 2014 - 2019 Christian Schoenebeck
3   *   *
4   * http://www.linuxsampler.org   * http://www.linuxsampler.org
5   *   *
# Line 22  namespace LinuxSampler { Line 22  namespace LinuxSampler {
22      class InstrumentScriptVMFunction_play_note : public VMIntResultFunction {      class InstrumentScriptVMFunction_play_note : public VMIntResultFunction {
23      public:      public:
24          InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);
25          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
26          int maxAllowedArgs() const { return 4; }          vmint maxAllowedArgs() const OVERRIDE { return 4; }
27          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
28          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
29          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
30      protected:      protected:
31          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
32      };      };
# Line 34  namespace LinuxSampler { Line 34  namespace LinuxSampler {
34      class InstrumentScriptVMFunction_set_controller : public VMIntResultFunction {      class InstrumentScriptVMFunction_set_controller : public VMIntResultFunction {
35      public:      public:
36          InstrumentScriptVMFunction_set_controller(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_controller(InstrumentScriptVM* parent);
37          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
38          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
39          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
40          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
41          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
42      protected:      protected:
43          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
44      };      };
# Line 46  namespace LinuxSampler { Line 46  namespace LinuxSampler {
46      class InstrumentScriptVMFunction_ignore_event : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_ignore_event : public VMEmptyResultFunction {
47      public:      public:
48          InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent);
49          int minRequiredArgs() const { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
50          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
51          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
52          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
53          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
54      protected:      protected:
55          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
56      };      };
# Line 58  namespace LinuxSampler { Line 58  namespace LinuxSampler {
58      class InstrumentScriptVMFunction_ignore_controller : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_ignore_controller : public VMEmptyResultFunction {
59      public:      public:
60          InstrumentScriptVMFunction_ignore_controller(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_ignore_controller(InstrumentScriptVM* parent);
61          int minRequiredArgs() const { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
62          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
63          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
64          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
65          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
66      protected:      protected:
67          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
68      };      };
# Line 70  namespace LinuxSampler { Line 70  namespace LinuxSampler {
70      class InstrumentScriptVMFunction_note_off : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_note_off : public VMEmptyResultFunction {
71      public:      public:
72          InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);
73          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
74          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
75          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
76          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
77          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
78      protected:      protected:
79          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
80      };      };
# Line 82  namespace LinuxSampler { Line 82  namespace LinuxSampler {
82      class InstrumentScriptVMFunction_set_event_mark : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_set_event_mark : public VMEmptyResultFunction {
83      public:      public:
84          InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent);
85          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
86          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
87          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
88          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
89          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
90      protected:      protected:
91          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
92      };      };
# Line 94  namespace LinuxSampler { Line 94  namespace LinuxSampler {
94      class InstrumentScriptVMFunction_delete_event_mark : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_delete_event_mark : public VMEmptyResultFunction {
95      public:      public:
96          InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent);
97          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
98          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
99          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
100          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
101          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
102      protected:      protected:
103          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
104      };      };
# Line 106  namespace LinuxSampler { Line 106  namespace LinuxSampler {
106      class InstrumentScriptVMFunction_by_marks : public VMFunction {      class InstrumentScriptVMFunction_by_marks : public VMFunction {
107      public:      public:
108          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);
109          int minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
110          int maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
111          bool acceptsArgType(int iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
112          bool modifiesArg(int iArg) const OVERRIDE { return false; }          bool modifiesArg(vmint iArg) const OVERRIDE { return false; }
113          ExprType_t argType(int iArg) const OVERRIDE { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
114          ExprType_t returnType() OVERRIDE { return INT_ARR_EXPR; }          ExprType_t returnType() OVERRIDE { return INT_ARR_EXPR; }
115          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
116      protected:      protected:
# Line 120  namespace LinuxSampler { Line 120  namespace LinuxSampler {
120              StmtFlags_t flags;              StmtFlags_t flags;
121              EventGroup* eventGroup;              EventGroup* eventGroup;
122    
123              int arraySize() const OVERRIDE;              vmint arraySize() const OVERRIDE;
124              int evalIntElement(uint i) OVERRIDE;              vmint evalIntElement(vmuint i) OVERRIDE;
125              void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment              void assignIntElement(vmuint i, vmint value) OVERRIDE {} // ignore assignment
126              VMExpr* resultValue() OVERRIDE { return this; }              VMExpr* resultValue() OVERRIDE { return this; }
127              StmtFlags_t resultFlags() OVERRIDE { return flags; }              StmtFlags_t resultFlags() OVERRIDE { return flags; }
128              bool isConstExpr() const OVERRIDE { return false; }              bool isConstExpr() const OVERRIDE { return false; }
# Line 135  namespace LinuxSampler { Line 135  namespace LinuxSampler {
135      class InstrumentScriptVMFunction_change_vol : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_vol : public VMEmptyResultFunction {
136      public:      public:
137          InstrumentScriptVMFunction_change_vol(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_vol(InstrumentScriptVM* parent);
138          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
139          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
140          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
141          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
142          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
143            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
144            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
145            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
146      protected:      protected:
147          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
148      };      };
# Line 147  namespace LinuxSampler { Line 150  namespace LinuxSampler {
150      class InstrumentScriptVMFunction_change_tune : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_tune : public VMEmptyResultFunction {
151      public:      public:
152          InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent);
153          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
154          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
155          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
156          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
157          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
158            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
159            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
160      protected:      protected:
161          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
162      };      };
# Line 159  namespace LinuxSampler { Line 164  namespace LinuxSampler {
164      class InstrumentScriptVMFunction_change_pan : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_pan : public VMEmptyResultFunction {
165      public:      public:
166          InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent);
167          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
168          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
169          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
170          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
171          VMFnResult* exec(VMFnArgs* args);          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
172            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
173      protected:      protected:
174          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
175      };      };
# Line 171  namespace LinuxSampler { Line 177  namespace LinuxSampler {
177      class InstrumentScriptVMFunction_change_cutoff : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_cutoff : public VMEmptyResultFunction {
178      public:      public:
179          InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent);
180          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
181          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
182          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
183          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
184          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
185            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
186            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
187            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
188      protected:      protected:
189          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
190      };      };
# Line 183  namespace LinuxSampler { Line 192  namespace LinuxSampler {
192      class InstrumentScriptVMFunction_change_reso : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_reso : public VMEmptyResultFunction {
193      public:      public:
194          InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent);
195          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
196          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
197          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
198          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
199          VMFnResult* exec(VMFnArgs* args);          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
200            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
201      protected:      protected:
202          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
203      };      };
# Line 195  namespace LinuxSampler { Line 205  namespace LinuxSampler {
205      class InstrumentScriptVMFunction_change_attack : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_attack : public VMEmptyResultFunction {
206      public:      public:
207          InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);
208          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
209          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
210          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
211          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
212          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
213            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
214            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
215            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
216      protected:      protected:
217          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
218      };      };
# Line 207  namespace LinuxSampler { Line 220  namespace LinuxSampler {
220      class InstrumentScriptVMFunction_change_decay : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_decay : public VMEmptyResultFunction {
221      public:      public:
222          InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);
223          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
224          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
225          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
226          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
227          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
228            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
229            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
230            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
231      protected:      protected:
232          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
233      };      };
# Line 219  namespace LinuxSampler { Line 235  namespace LinuxSampler {
235      class InstrumentScriptVMFunction_change_release : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_release : public VMEmptyResultFunction {
236      public:      public:
237          InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);
238          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
239          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
240          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
241          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
242          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
243            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
244            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
245            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
246      protected:      protected:
247          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
248      };      };
249    
250      class VMChangeSynthParamFunction : public VMEmptyResultFunction {      class VMChangeSynthParamFunction : public VMEmptyResultFunction {
251      public:      public:
252          VMChangeSynthParamFunction(InstrumentScriptVM* parent) : m_vm(parent) {}          VMChangeSynthParamFunction(InstrumentScriptVM* parent, bool acceptFinal, StdUnit_t unit, bool acceptUnitPrefix)
253          int minRequiredArgs() const { return 2; }              : m_vm(parent), m_acceptFinal(acceptFinal), m_acceptUnitPrefix(acceptUnitPrefix), m_unit(unit) {}
254          int maxAllowedArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
255          bool acceptsArgType(int iArg, ExprType_t type) const;          vmint maxAllowedArgs() const OVERRIDE { return 2; }
256          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
257            bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
258          template<float NoteBase::_Override::*T_noteParam, int T_synthParam,          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
259                   bool T_isNormalizedParam, int T_maxValue, int T_minValue>          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
260            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
261    
262            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          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);
268      protected:      protected:
269          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
270            const bool m_acceptFinal;
271            const bool m_acceptUnitPrefix;
272            const StdUnit_t m_unit;
273      };      };
274    
275      class InstrumentScriptVMFunction_change_sustain : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_sustain : public VMChangeSynthParamFunction {
276      public:      public:
277          InstrumentScriptVMFunction_change_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_BEL,true) {}
278          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
279        };
280    
281        class InstrumentScriptVMFunction_change_cutoff_attack : public VMChangeSynthParamFunction {
282        public:
283            InstrumentScriptVMFunction_change_cutoff_attack(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {}
284            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
285        };
286    
287        class InstrumentScriptVMFunction_change_cutoff_decay : public VMChangeSynthParamFunction {
288        public:
289            InstrumentScriptVMFunction_change_cutoff_decay(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {}
290            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
291        };
292    
293        class InstrumentScriptVMFunction_change_cutoff_sustain : public VMChangeSynthParamFunction {
294        public:
295            InstrumentScriptVMFunction_change_cutoff_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_BEL,true) {}
296            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
297        };
298    
299        class InstrumentScriptVMFunction_change_cutoff_release : public VMChangeSynthParamFunction {
300        public:
301            InstrumentScriptVMFunction_change_cutoff_release(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {}
302            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
303      };      };
304    
305      class InstrumentScriptVMFunction_change_amp_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_amp_lfo_depth : public VMChangeSynthParamFunction {
306      public:      public:
307          InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {}
308          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
309      };      };
310    
311      class InstrumentScriptVMFunction_change_amp_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_amp_lfo_freq : public VMChangeSynthParamFunction {
312      public:      public:
313          InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {}
314          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
315        };
316    
317        class InstrumentScriptVMFunction_change_cutoff_lfo_depth : public VMChangeSynthParamFunction {
318        public:
319            InstrumentScriptVMFunction_change_cutoff_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {}
320            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
321        };
322    
323        class InstrumentScriptVMFunction_change_cutoff_lfo_freq : public VMChangeSynthParamFunction {
324        public:
325            InstrumentScriptVMFunction_change_cutoff_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {}
326            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
327      };      };
328    
329      class InstrumentScriptVMFunction_change_pitch_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pitch_lfo_depth : public VMChangeSynthParamFunction {
330      public:      public:
331          InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {}
332          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
333      };      };
334    
335      class InstrumentScriptVMFunction_change_pitch_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pitch_lfo_freq : public VMChangeSynthParamFunction {
336      public:      public:
337          InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {}
338          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
339      };      };
340    
341      class InstrumentScriptVMFunction_change_vol_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_vol_time : public VMChangeSynthParamFunction {
342      public:      public:
343          InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {}
344          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
345      };      };
346    
347      class InstrumentScriptVMFunction_change_tune_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_tune_time : public VMChangeSynthParamFunction {
348      public:      public:
349          InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {}
350          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
351        };
352    
353        class InstrumentScriptVMFunction_change_pan_time : public VMChangeSynthParamFunction {
354        public:
355            InstrumentScriptVMFunction_change_pan_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {}
356            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
357      };      };
358    
359      class VMChangeFadeCurveFunction : public VMEmptyResultFunction {      class VMChangeFadeCurveFunction : public VMEmptyResultFunction {
360      public:      public:
361          VMChangeFadeCurveFunction(InstrumentScriptVM* parent) : m_vm(parent) {}          VMChangeFadeCurveFunction(InstrumentScriptVM* parent) : m_vm(parent) {}
362          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
363          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
364          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
365          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
366    
367          template<fade_curve_t NoteBase::_Override::*T_noteParam, int T_synthParam>          template<fade_curve_t NoteBase::_Override::*T_noteParam, vmint T_synthParam>
368          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);
369      protected:      protected:
370          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
# Line 302  namespace LinuxSampler { Line 373  namespace LinuxSampler {
373      class InstrumentScriptVMFunction_change_vol_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_vol_curve : public VMChangeFadeCurveFunction {
374      public:      public:
375          InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
376          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
377      };      };
378    
379      class InstrumentScriptVMFunction_change_tune_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_tune_curve : public VMChangeFadeCurveFunction {
380      public:      public:
381          InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
382          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
383        };
384    
385        class InstrumentScriptVMFunction_change_pan_curve : public VMChangeFadeCurveFunction {
386        public:
387            InstrumentScriptVMFunction_change_pan_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
388            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
389      };      };
390    
391      class InstrumentScriptVMFunction_fade_in : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_fade_in : public VMEmptyResultFunction {
392      public:      public:
393          InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent);
394          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
395          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
396          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
397          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
398          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
399            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
400            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
401      protected:      protected:
402          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
403      };      };
# Line 326  namespace LinuxSampler { Line 405  namespace LinuxSampler {
405      class InstrumentScriptVMFunction_fade_out : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_fade_out : public VMEmptyResultFunction {
406      public:      public:
407          InstrumentScriptVMFunction_fade_out(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_fade_out(InstrumentScriptVM* parent);
408          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
409          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
410          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
411          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
412          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
413            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
414            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
415      protected:      protected:
416          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
417      };      };
# Line 338  namespace LinuxSampler { Line 419  namespace LinuxSampler {
419      class InstrumentScriptVMFunction_get_event_par : public VMIntResultFunction {      class InstrumentScriptVMFunction_get_event_par : public VMIntResultFunction {
420      public:      public:
421          InstrumentScriptVMFunction_get_event_par(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_get_event_par(InstrumentScriptVM* parent);
422          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
423          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
424          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
425          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
426          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
427      protected:      protected:
428          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
429      };      };
# Line 350  namespace LinuxSampler { Line 431  namespace LinuxSampler {
431      class InstrumentScriptVMFunction_set_event_par : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_set_event_par : public VMEmptyResultFunction {
432      public:      public:
433          InstrumentScriptVMFunction_set_event_par(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_event_par(InstrumentScriptVM* parent);
434          int minRequiredArgs() const { return 3; }          vmint minRequiredArgs() const OVERRIDE { return 3; }
435          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
436          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
437          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
438          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
439      protected:      protected:
440          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
441      };      };
# Line 362  namespace LinuxSampler { Line 443  namespace LinuxSampler {
443      class InstrumentScriptVMFunction_change_note : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_note : public VMEmptyResultFunction {
444      public:      public:
445          InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent);
446          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
447          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
448          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
449          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
450          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
451      protected:      protected:
452          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
453      };      };
# Line 374  namespace LinuxSampler { Line 455  namespace LinuxSampler {
455      class InstrumentScriptVMFunction_change_velo : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_velo : public VMEmptyResultFunction {
456      public:      public:
457          InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent);
458          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
459          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
460          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
461          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
462          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
463      protected:      protected:
464          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
465      };      };
# Line 386  namespace LinuxSampler { Line 467  namespace LinuxSampler {
467      class InstrumentScriptVMFunction_change_play_pos : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_play_pos : public VMEmptyResultFunction {
468      public:      public:
469          InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent);
470          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
471          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
472          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; }
473          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
474          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
475            ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
476            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
477      protected:      protected:
478          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
479      };      };
# Line 398  namespace LinuxSampler { Line 481  namespace LinuxSampler {
481      class InstrumentScriptVMFunction_event_status : public VMIntResultFunction {      class InstrumentScriptVMFunction_event_status : public VMIntResultFunction {
482      public:      public:
483          InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent);
484          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
485          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
486          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
487          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
488          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
489      protected:      protected:
490          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
491      };      };
# Line 410  namespace LinuxSampler { Line 493  namespace LinuxSampler {
493      class InstrumentScriptVMFunction_callback_status : public VMIntResultFunction {      class InstrumentScriptVMFunction_callback_status : public VMIntResultFunction {
494      public:      public:
495          InstrumentScriptVMFunction_callback_status(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_callback_status(InstrumentScriptVM* parent);
496          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
497          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
498          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
499          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
500          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
501      protected:      protected:
502          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
503      };      };
# Line 423  namespace LinuxSampler { Line 506  namespace LinuxSampler {
506      class InstrumentScriptVMFunction_wait : public CoreVMFunction_wait {      class InstrumentScriptVMFunction_wait : public CoreVMFunction_wait {
507      public:      public:
508          InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent);
509          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
510      };      };
511    
512      class InstrumentScriptVMFunction_stop_wait : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_stop_wait : public VMEmptyResultFunction {
513      public:      public:
514          InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent);
515          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
516          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
517          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
518          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
519          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
520      protected:      protected:
521          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
522      };      };
# Line 441  namespace LinuxSampler { Line 524  namespace LinuxSampler {
524      class InstrumentScriptVMFunction_abort : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_abort : public VMEmptyResultFunction {
525      public:      public:
526          InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent);
527          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
528          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
529          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; }
530          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
531          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
532      protected:      protected:
533          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
# Line 453  namespace LinuxSampler { Line 536  namespace LinuxSampler {
536      class InstrumentScriptVMFunction_fork : public VMIntResultFunction {      class InstrumentScriptVMFunction_fork : public VMIntResultFunction {
537      public:      public:
538          InstrumentScriptVMFunction_fork(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_fork(InstrumentScriptVM* parent);
539          int minRequiredArgs() const { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
540          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
541          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
542          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }
543          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
544      protected:      protected:
545          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
546      };      };

Legend:
Removed from v.3316  
changed lines
  Added in v.3564

  ViewVC Help
Powered by ViewVC