34 |
VMEventHandler* handlerController; ///< VM representation of script's MIDI controller callback or NULL if current script did not define such an event handler. |
VMEventHandler* handlerController; ///< VM representation of script's MIDI controller callback or NULL if current script did not define such an event handler. |
35 |
Pool<ScriptEvent>* pEvents; ///< Pool of all available script execution instances. ScriptEvents available to be allocated from the Pool are currently unused / not executiong, whereas the ScriptEvents allocated on the list are currently suspended / have not finished execution yet. |
Pool<ScriptEvent>* pEvents; ///< Pool of all available script execution instances. ScriptEvents available to be allocated from the Pool are currently unused / not executiong, whereas the ScriptEvents allocated on the list are currently suspended / have not finished execution yet. |
36 |
AbstractEngineChannel* pEngineChannel; |
AbstractEngineChannel* pEngineChannel; |
37 |
|
String code; ///< Source code of the instrument script. Used in case the sampler engine is changed, in that case a new ScriptVM object is created for the engine and VMParserContext object for this script needs to be recreated as well. Thus the script is then parsed again by passing the source code to recreate the parser context. |
38 |
|
|
39 |
InstrumentScript(AbstractEngineChannel* pEngineChannel) { |
InstrumentScript(AbstractEngineChannel* pEngineChannel) { |
40 |
parserContext = NULL; |
parserContext = NULL; |
48 |
} |
} |
49 |
|
|
50 |
~InstrumentScript() { |
~InstrumentScript() { |
51 |
reset(); |
resetAll(); |
52 |
} |
} |
53 |
|
|
54 |
void load(const String& text); |
void load(const String& text); |
55 |
void reset(); |
void unload(); |
56 |
|
void resetAll(); |
57 |
}; |
}; |
58 |
|
|
59 |
/** @brief Real-time instrument script virtual machine. |
/** @brief Real-time instrument script virtual machine. |