modified onsetdetection4