Improved onset detection data flow and added confusion matrix.