1 |
/* |
/* |
2 |
* Copyright (c) 2014 Christian Schoenebeck |
* Copyright (c) 2014 - 2016 Christian Schoenebeck |
3 |
* |
* |
4 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
5 |
* |
* |
108 |
int minRequiredArgs() const { return 1; } |
int minRequiredArgs() const { return 1; } |
109 |
int maxAllowedArgs() const { return 1; } |
int maxAllowedArgs() const { return 1; } |
110 |
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
111 |
|
bool modifiesArg(int iArg) const OVERRIDE { return false; } |
112 |
ExprType_t argType(int iArg) const { return INT_EXPR; } |
ExprType_t argType(int iArg) const { return INT_EXPR; } |
113 |
ExprType_t returnType() { return INT_ARR_EXPR; } |
ExprType_t returnType() { return INT_ARR_EXPR; } |
114 |
VMFnResult* exec(VMFnArgs* args); |
VMFnResult* exec(VMFnArgs* args); |
124 |
void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment |
void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment |
125 |
VMExpr* resultValue() OVERRIDE { return this; } |
VMExpr* resultValue() OVERRIDE { return this; } |
126 |
StmtFlags_t resultFlags() { return flags; } |
StmtFlags_t resultFlags() { return flags; } |
127 |
|
bool isConstExpr() const OVERRIDE { return false; } |
128 |
} m_result; |
} m_result; |
129 |
|
|
130 |
VMFnResult* errorResult(); |
VMFnResult* errorResult(); |
131 |
VMFnResult* successResult(EventGroup* eventGroup); |
VMFnResult* successResult(EventGroup* eventGroup); |
132 |
}; |
}; |
133 |
|
|
134 |
|
class InstrumentScriptVMFunction_change_vol : public VMEmptyResultFunction { |
135 |
|
public: |
136 |
|
InstrumentScriptVMFunction_change_vol(InstrumentScriptVM* parent); |
137 |
|
int minRequiredArgs() const { return 2; } |
138 |
|
int maxAllowedArgs() const { return 3; } |
139 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
140 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
141 |
|
VMFnResult* exec(VMFnArgs* args); |
142 |
|
protected: |
143 |
|
InstrumentScriptVM* m_vm; |
144 |
|
}; |
145 |
|
|
146 |
|
class InstrumentScriptVMFunction_change_tune : public VMEmptyResultFunction { |
147 |
|
public: |
148 |
|
InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent); |
149 |
|
int minRequiredArgs() const { return 2; } |
150 |
|
int maxAllowedArgs() const { return 3; } |
151 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
152 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
153 |
|
VMFnResult* exec(VMFnArgs* args); |
154 |
|
protected: |
155 |
|
InstrumentScriptVM* m_vm; |
156 |
|
}; |
157 |
|
|
158 |
|
class InstrumentScriptVMFunction_change_pan : public VMEmptyResultFunction { |
159 |
|
public: |
160 |
|
InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent); |
161 |
|
int minRequiredArgs() const { return 2; } |
162 |
|
int maxAllowedArgs() const { return 3; } |
163 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
164 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
165 |
|
VMFnResult* exec(VMFnArgs* args); |
166 |
|
protected: |
167 |
|
InstrumentScriptVM* m_vm; |
168 |
|
}; |
169 |
|
|
170 |
|
class InstrumentScriptVMFunction_change_cutoff : public VMEmptyResultFunction { |
171 |
|
public: |
172 |
|
InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent); |
173 |
|
int minRequiredArgs() const { return 2; } |
174 |
|
int maxAllowedArgs() const { return 2; } |
175 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
176 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
177 |
|
VMFnResult* exec(VMFnArgs* args); |
178 |
|
protected: |
179 |
|
InstrumentScriptVM* m_vm; |
180 |
|
}; |
181 |
|
|
182 |
|
class InstrumentScriptVMFunction_change_reso : public VMEmptyResultFunction { |
183 |
|
public: |
184 |
|
InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent); |
185 |
|
int minRequiredArgs() const { return 2; } |
186 |
|
int maxAllowedArgs() const { return 2; } |
187 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
188 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
189 |
|
VMFnResult* exec(VMFnArgs* args); |
190 |
|
protected: |
191 |
|
InstrumentScriptVM* m_vm; |
192 |
|
}; |
193 |
|
|
194 |
|
class InstrumentScriptVMFunction_event_status : public VMIntResultFunction { |
195 |
|
public: |
196 |
|
InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent); |
197 |
|
int minRequiredArgs() const { return 1; } |
198 |
|
int maxAllowedArgs() const { return 1; } |
199 |
|
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;} |
200 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
201 |
|
VMFnResult* exec(VMFnArgs* args); |
202 |
|
protected: |
203 |
|
InstrumentScriptVM* m_vm; |
204 |
|
}; |
205 |
|
|
206 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |
207 |
|
|
208 |
#endif // LS_INSTRSCRIPTVMFUNCTIONS_H |
#endif // LS_INSTRSCRIPTVMFUNCTIONS_H |