15 |
|
|
16 |
namespace LinuxSampler { |
namespace LinuxSampler { |
17 |
|
|
18 |
|
class EventGroup; |
19 |
class InstrumentScriptVM; |
class InstrumentScriptVM; |
20 |
|
|
21 |
class InstrumentScriptVMFunction_play_note : public VMIntResultFunction { |
class InstrumentScriptVMFunction_play_note : public VMIntResultFunction { |
47 |
InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent); |
InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent); |
48 |
int minRequiredArgs() const { return 1; } |
int minRequiredArgs() const { return 1; } |
49 |
int maxAllowedArgs() const { return 1; } |
int maxAllowedArgs() const { return 1; } |
50 |
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
bool acceptsArgType(int iArg, ExprType_t type) const; |
51 |
ExprType_t argType(int iArg) const { return INT_EXPR; } |
ExprType_t argType(int iArg) const { return INT_EXPR; } |
52 |
VMFnResult* exec(VMFnArgs* args); |
VMFnResult* exec(VMFnArgs* args); |
53 |
protected: |
protected: |
71 |
InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent); |
InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent); |
72 |
int minRequiredArgs() const { return 1; } |
int minRequiredArgs() const { return 1; } |
73 |
int maxAllowedArgs() const { return 2; } |
int maxAllowedArgs() const { return 2; } |
74 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
75 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
76 |
|
VMFnResult* exec(VMFnArgs* args); |
77 |
|
protected: |
78 |
|
InstrumentScriptVM* m_vm; |
79 |
|
}; |
80 |
|
|
81 |
|
class InstrumentScriptVMFunction_set_event_mark : public VMEmptyResultFunction { |
82 |
|
public: |
83 |
|
InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent); |
84 |
|
int minRequiredArgs() const { return 2; } |
85 |
|
int maxAllowedArgs() const { return 2; } |
86 |
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
87 |
ExprType_t argType(int iArg) const { return INT_EXPR; } |
ExprType_t argType(int iArg) const { return INT_EXPR; } |
88 |
VMFnResult* exec(VMFnArgs* args); |
VMFnResult* exec(VMFnArgs* args); |
90 |
InstrumentScriptVM* m_vm; |
InstrumentScriptVM* m_vm; |
91 |
}; |
}; |
92 |
|
|
93 |
|
class InstrumentScriptVMFunction_delete_event_mark : public VMEmptyResultFunction { |
94 |
|
public: |
95 |
|
InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent); |
96 |
|
int minRequiredArgs() const { return 2; } |
97 |
|
int maxAllowedArgs() const { return 2; } |
98 |
|
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
99 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
100 |
|
VMFnResult* exec(VMFnArgs* args); |
101 |
|
protected: |
102 |
|
InstrumentScriptVM* m_vm; |
103 |
|
}; |
104 |
|
|
105 |
|
class InstrumentScriptVMFunction_by_marks : public VMFunction { |
106 |
|
public: |
107 |
|
InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent); |
108 |
|
int minRequiredArgs() const { return 1; } |
109 |
|
int maxAllowedArgs() const { return 1; } |
110 |
|
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
111 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
112 |
|
ExprType_t returnType() { return INT_ARR_EXPR; } |
113 |
|
VMFnResult* exec(VMFnArgs* args); |
114 |
|
protected: |
115 |
|
InstrumentScriptVM* m_vm; |
116 |
|
class Result : public VMFnResult, public VMIntArrayExpr { |
117 |
|
public: |
118 |
|
StmtFlags_t flags; |
119 |
|
EventGroup* eventGroup; |
120 |
|
|
121 |
|
int arraySize() const OVERRIDE; |
122 |
|
int evalIntElement(uint i) OVERRIDE; |
123 |
|
void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment |
124 |
|
VMExpr* resultValue() OVERRIDE { return this; } |
125 |
|
StmtFlags_t resultFlags() { return flags; } |
126 |
|
} m_result; |
127 |
|
|
128 |
|
VMFnResult* errorResult(); |
129 |
|
VMFnResult* successResult(EventGroup* eventGroup); |
130 |
|
}; |
131 |
|
|
132 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |
133 |
|
|
134 |
#endif // LS_INSTRSCRIPTVMFUNCTIONS_H |
#endif // LS_INSTRSCRIPTVMFUNCTIONS_H |