updated beat tracker example code