Added onset detection