Realtime tempo detection