Front-end code for the real-time event detection prototype