Beat detection working