A hardware beatracker and tempo estimator