Пример #1
0
        public List <SoundFeature> GetAutoCorrelationSeries(string namePrefix, int autoCorrelationOrder)
        {
            List <SoundFeature> soundFeatureList = new List <SoundFeature>();

            for (int ii = 0; ii < autoCorrelationOrder; ii++)
            {
                SoundFeature soundFeature = new SoundFeature();
                soundFeature.Name = namePrefix + (ii + 1).ToString(); // No reason to compute order 0 (=1).
                soundFeature.SetSize(frameList.Count);
                soundFeatureList.Add(soundFeature);
            }
            for (int iFrame = 0; iFrame < frameList.Count; iFrame++)
            {
                WAVSound      frame = frameList[iFrame];
                List <double> autoCorrelationCoefficients = frame.ComputeNormalizedAutoCorrelationCoefficients(1, autoCorrelationOrder);
                for (int ii = 0; ii < autoCorrelationOrder; ii++)
                {
                    soundFeatureList[ii].ValueList[iFrame] = autoCorrelationCoefficients[ii];
                }
            }
            return(soundFeatureList);
        }