added sampler event processing to lua API