Updated onset detection with 3 frame buffering