示例#1
0
        private double CalculateBellEQGain(EQ.Band band, double x)
        {
            double freq = LinExpConvert.Convert(band.Freq, band.Freq.Min, band.Freq.Max);
            double gain = LinExpConvert.Convert(band.Gain, band.Gain.Min, band.Gain.Max);
            double q    = band.Q;//LinExpConvert.Convert(band.Q, band.Q.Min, band.Q.Max);

            return(gain * Math.Exp(-((x - freq) * (x - freq)) / (2 * (W_FACTOR / q) * (W_FACTOR / q))));
        }
示例#2
0
        private double CalculateFilterEQGain(EQ.Band band, double x)
        {
            double freq = LinExpConvert.Convert(band.Freq, band.Freq.Min, band.Freq.Max);
            double gain = LinExpConvert.Convert(band.Gain, band.Gain.Min, band.Gain.Max);
            double q    = band.Q;// LinExpConvert.Convert(band.Q, band.Q.Min, band.Q.Max);

            return(-Math.Exp(-(x - freq) / (1.5 * W_FACTOR)));
        }