/[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 3587 by schoenebeck, Sat Aug 31 12:08:49 2019 UTC revision 3588 by schoenebeck, Sun Sep 1 16:06:48 2019 UTC
# Line 20  namespace LinuxSampler { Line 20  namespace LinuxSampler {
20      class InstrumentScriptVM;      class InstrumentScriptVM;
21    
22      class InstrumentScriptVMFunction_play_note FINAL : public VMIntResultFunction {      class InstrumentScriptVMFunction_play_note FINAL : public VMIntResultFunction {
23            using Super = VMIntResultFunction; // just an alias for the super class
24      public:      public:
25          InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);
26          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
# Line 29  namespace LinuxSampler { Line 30  namespace LinuxSampler {
30          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
31          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
32          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
33            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
34                           std::function<void(String)> wrn) OVERRIDE;
35          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
36      protected:      protected:
37          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
# Line 70  namespace LinuxSampler { Line 73  namespace LinuxSampler {
73      };      };
74    
75      class InstrumentScriptVMFunction_note_off FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_note_off FINAL : public VMEmptyResultFunction {
76            using Super = VMEmptyResultFunction; // just an alias for the super class
77      public:      public:
78          InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);
79          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
80          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
81          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
82            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
83                           std::function<void(String)> wrn) OVERRIDE;
84          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
85      protected:      protected:
86          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
87      };      };
88    
89      class InstrumentScriptVMFunction_set_event_mark FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_set_event_mark FINAL : public VMEmptyResultFunction {
90            using Super = VMEmptyResultFunction; // just an alias for the super class
91      public:      public:
92          InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent);
93          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
94          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
95          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
96            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
97                           std::function<void(String)> wrn) OVERRIDE;
98          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
99      protected:      protected:
100          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
101      };      };
102    
103      class InstrumentScriptVMFunction_delete_event_mark FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_delete_event_mark FINAL : public VMEmptyResultFunction {
104            using Super = VMEmptyResultFunction; // just an alias for the super class
105      public:      public:
106          InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent);
107          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
108          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
109          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
110            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
111                           std::function<void(String)> wrn) OVERRIDE;
112          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
113      protected:      protected:
114          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
115      };      };
116    
117      class InstrumentScriptVMFunction_by_marks FINAL : public VMFunction {      class InstrumentScriptVMFunction_by_marks FINAL : public VMFunction {
118            using Super = VMFunction; // just an alias for the super class
119      public:      public:
120          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);
121          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
# Line 112  namespace LinuxSampler { Line 125  namespace LinuxSampler {
125          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
126          bool modifiesArg(vmint iArg) const OVERRIDE { return false; }          bool modifiesArg(vmint iArg) const OVERRIDE { return false; }
127          ExprType_t returnType(VMFnArgs* args) OVERRIDE { return INT_ARR_EXPR; }          ExprType_t returnType(VMFnArgs* args) OVERRIDE { return INT_ARR_EXPR; }
128            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
129                           std::function<void(String)> wrn) OVERRIDE;
130          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
131      protected:      protected:
132          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
# Line 174  namespace LinuxSampler { Line 189  namespace LinuxSampler {
189      };      };
190    
191      class InstrumentScriptVMFunction_change_cutoff FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_cutoff FINAL : public VMEmptyResultFunction {
192            using Super = VMEmptyResultFunction; // just an alias for the super class
193      public:      public:
194          InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent);
195          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 182  namespace LinuxSampler { Line 198  namespace LinuxSampler {
198          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
199          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
200          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
201            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
202                           std::function<void(String)> wrn) OVERRIDE;
203          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
204      protected:      protected:
205          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
# Line 200  namespace LinuxSampler { Line 218  namespace LinuxSampler {
218      };      };
219            
220      class InstrumentScriptVMFunction_change_attack FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_attack FINAL : public VMEmptyResultFunction {
221            using Super = VMEmptyResultFunction; // just an alias for the super class
222      public:      public:
223          InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);
224          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 208  namespace LinuxSampler { Line 227  namespace LinuxSampler {
227          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
228          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
229          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
230            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
231                           std::function<void(String)> wrn) OVERRIDE;
232          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
233      protected:      protected:
234          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
235      };      };
236    
237      class InstrumentScriptVMFunction_change_decay FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_decay FINAL : public VMEmptyResultFunction {
238            using Super = VMEmptyResultFunction; // just an alias for the super class
239      public:      public:
240          InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);
241          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 222  namespace LinuxSampler { Line 244  namespace LinuxSampler {
244          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
245          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
246          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
247            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
248                           std::function<void(String)> wrn) OVERRIDE;
249          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
250      protected:      protected:
251          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
252      };      };
253            
254      class InstrumentScriptVMFunction_change_release FINAL : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_release FINAL : public VMEmptyResultFunction {
255            using Super = VMEmptyResultFunction; // just an alias for the super class
256      public:      public:
257          InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);
258          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 236  namespace LinuxSampler { Line 261  namespace LinuxSampler {
261          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
262          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
263          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
264            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
265                           std::function<void(String)> wrn) OVERRIDE;
266          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
267      protected:      protected:
268          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
269      };      };
270    
271      class VMChangeSynthParamFunction : public VMEmptyResultFunction {      class VMChangeSynthParamFunction : public VMEmptyResultFunction {
272            using Super = VMEmptyResultFunction; // just an alias for the super class
273      public:      public:
274          struct Opt_t {          struct Opt_t {
275              InstrumentScriptVM* vm = NULL; ///< Parent object owning the built-in function implementation object.              InstrumentScriptVM* vm = NULL; ///< Parent object owning the built-in function implementation object.
# Line 260  namespace LinuxSampler { Line 288  namespace LinuxSampler {
288          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
289          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
290          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
291            void checkArgs(VMFnArgs* args, std::function<void(String)> err,
292                           std::function<void(String)> wrn) OVERRIDE;
293    
294          template<class T_NoteParamType, T_NoteParamType NoteBase::_Override::*T_noteParam,          template<class T_NoteParamType, T_NoteParamType NoteBase::_Override::*T_noteParam,
295                  vmint T_synthParam,                  vmint T_synthParam,

Legend:
Removed from v.3587  
changed lines
  Added in v.3588

  ViewVC Help
Powered by ViewVC