a php class for bpm detection