Accord.Audio.Windows.BlackmanWindow.BlackmanWindow C# (CSharp) Method

BlackmanWindow() public method

Constructs a new Blackman window.
public BlackmanWindow ( double alpha, int length ) : System
alpha double Blackman's alpha
length int The length for the window.
return System
        public BlackmanWindow(double alpha, int length) 
            : base(length)
        {
            double a0 = (1.0 - alpha) / 2.0;
            double a1 = 0.5;
            double a2 = alpha / 2.0;

            for (int i = 0; i < length; i++)
                this[i] = (float)(a0 - a1 * Math.Cos((2.0 * System.Math.PI * i) / (length - 1))
                    + a2 * Math.Cos((4.0 * System.Math.PI * i) / (length - 1)));
        }

Same methods

BlackmanWindow::BlackmanWindow ( int length ) : System
BlackmanWindow