public void DetectOnsets(float sensitivity = 1.5f) { onsetDetection = new OnsetDetection(PCMStream, 1024); // Has finished reading in the audio file bool finished = false; // Set the pcm data back to the beginning SetTrackPosition(0); do { // Read in audio data and find the flux values until end of audio file finished = onsetDetection.AddFlux(ReadMonoPCM()); }while (!finished); // Find peaks onsetDetection.FindOnsets(sensitivity); }
public void DetectOnsets(float sensitivity = 1.5f, float thresholdTimeSpan = 0.5f) { onsetDetection = new OnsetDetection(PCMStream, 1024); // Has finished reading in the audio file bool finished = false; // Set the pcm data back to the beginning SetTrackPosition(0); do { // Read in audio data and find the flux values until end of audio file finished = onsetDetection.AddFlux(ReadMonoPCM()); } while (!finished); // Find peaks onsetDetection.FindOnsets(sensitivity); }