Пример #1
0
        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);
        }
Пример #2
0
        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);
        }