beat detection...still a work in progress