--- linuxsampler/trunk/src/engines/common/Event.h 2014/06/04 01:59:56 2593 +++ linuxsampler/trunk/src/engines/common/Event.h 2014/06/05 00:16:25 2594 @@ -64,7 +64,7 @@ * controller like LFO or EG. An event should only be created by an * EventGenerator! * - * @see EventGenerator + * @see EventGenerator, ScriptEvent */ class Event { public: @@ -140,6 +140,23 @@ int32_t iFragmentPos; ///< Position in the current fragment this event refers to. }; + class VMEventHandler; + class VMExecContext; + + /** @brief Real-time instrument script event. + * + * Encapsulates one execution instance of a real-time instrument script for + * exactly one script event handler (script event callback). + */ + class ScriptEvent { + public: + Event cause; ///< Original external event that triggered this script event (i.e. MIDI note on event, MIDI CC event, etc.). + VMEventHandler** handlers; ///< The script's event handlers (callbacks) to be processed (NULL terminated list). + VMExecContext* execCtx; ///< Script's current execution state (polyphonic variables and execution stack). + int currentHandler; ///< Current index in 'handlers' list above. + int executionSlices; ///< Amount of times this script event has been executed by the ScriptVM runner class. + }; + } // namespace LinuxSampler #endif // __LS_EVENT_H__