コード例 #1
0
ファイル: BiQuad.cs プロジェクト: CheViana/AudioLab
 public static BiQuad CreatePeakEQFilter(int sampleRate, double frequency, double bandWidth, double peakGainDB)
 {
     BiQuad res = new BiQuad();
     res.Q = bandWidth;
     res.fc = frequency / sampleRate;
     res.peakGain = peakGainDB;
     res.CalcBiquad();
     return res;
 }
コード例 #2
0
ファイル: BiQuad.cs プロジェクト: yazici/AudioLab
        public static BiQuad CreatePeakEQFilter(int sampleRate, double frequency, double bandWidth, double peakGainDB)
        {
            BiQuad res = new BiQuad();

            res.Q        = bandWidth;
            res.fc       = frequency / sampleRate;
            res.peakGain = peakGainDB;
            res.CalcBiquad();
            return(res);
        }
コード例 #3
0
ファイル: EqFilter.cs プロジェクト: CheViana/AudioLab
        public EqFilter(int sampleRate, double centerFrequency, float bandWidth, float gain)
        {
            if (sampleRate <= 0)
                throw new ArgumentOutOfRangeException("sampleRate");
            if (centerFrequency <= 0)
                throw new ArgumentOutOfRangeException("centerFrequency");
            if (bandWidth <= 0)
                throw new ArgumentOutOfRangeException("bandWidth");

            _sampleRate = sampleRate;
            _centerFrequency = centerFrequency;
            _bandWidth = bandWidth;
            _gain = gain;

            _filter = BiQuad.CreatePeakEQFilter(sampleRate, centerFrequency, bandWidth, gain);
        }