Beispiel #1
0
        /// <summary>
        /// Returns the value of a window function.
        /// </summary>
        /// <param name="x">Argument</param>
        /// <param name="frameSize">Window size</param>
        /// <returns>float precision floating point number</returns>
        public override float Function(float x, int frameSize)
        {
            // Berlett-Hann function:
            float a = Math.Abs(Math.Abs(x / (frameSize - 1)) - 0.5f);

            return(0.62f - 0.48f * a - 0.38f * Cosine.cosinefunc(2 * x, frameSize));
        }
Beispiel #2
0
 /// <summary>
 /// Returns the value of a window function.
 /// </summary>
 /// <param name="x">Argument</param>
 /// <param name="frameSize">Window size</param>
 /// <returns>float precision floating point number</returns>
 public override float Function(float x, int frameSize)
 {
     return(0.35875f - 0.48829f * Cosine.cosinefunc(2 * x, frameSize) + 0.14128f * Cosine.cosinefunc(4 * x, frameSize) - 0.01168f * Cosine.cosinefunc(6 * x, frameSize));
 }
Beispiel #3
0
 /// <summary>
 /// Returns the value of a window function.
 /// </summary>
 /// <param name="x">Argument</param>
 /// <param name="frameSize">Window size</param>
 /// <returns>float precision floating point number</returns>
 public override float Function(float x, int frameSize)
 {
     return(0.3635819f - 0.4891775f * Cosine.cosinefunc(2 * x, frameSize) + 0.1365995f * Cosine.cosinefunc(4 * x, frameSize) - 0.0106411f * Cosine.cosinefunc(6 * x, frameSize));
 }
Beispiel #4
0
 /// <summary>
 /// Returns the value of a window function.
 /// </summary>
 /// <param name="x">Argument</param>
 /// <param name="frameSize">Window size</param>
 /// <returns>float precision floating point number</returns>
 public override float Function(float x, int frameSize)
 {
     return(0.53836f - 0.46164f * Cosine.cosinefunc(2 * x, frameSize));
 }
Beispiel #5
0
 /// <summary>
 /// Returns the value of a window function.
 /// </summary>
 /// <param name="x">Argument</param>
 /// <param name="frameSize">Window size</param>
 /// <returns>float precision floating point number</returns>
 public override float Function(float x, int frameSize)
 {
     return(1 - 1.93f * Cosine.cosinefunc(2 * x, frameSize) + 1.29f * Cosine.cosinefunc(4 * x, frameSize) - 0.388f * Cosine.cosinefunc(6 * x, frameSize) + 0.028f * Cosine.cosinefunc(8 * x, frameSize));
 }
Beispiel #6
0
 /// <summary>
 /// Returns the value of a window function.
 /// </summary>
 /// <param name="x">Argument</param>
 /// <param name="frameSize">Window size</param>
 /// <returns>float precision floating point number</returns>
 public override float Function(float x, int frameSize)
 {
     return 0.355768f - 0.487396f * Cosine.cosinefunc(2 * x, frameSize) + 0.144232f * Cosine.cosinefunc(4 * x, frameSize) - 0.012604f * Cosine.cosinefunc(6 * x, frameSize);
 }
Beispiel #7
0
 /// <summary>
 /// Returns the value of a window function.
 /// </summary>
 /// <param name="x">Argument</param>
 /// <param name="frameSize">Window size</param>
 /// <returns>float precision floating point number</returns>
 public override float Function(float x, int frameSize)
 {
     return(0.42f - 0.5f * Cosine.cosinefunc(2 * x, frameSize) + 0.08f * Cosine.cosinefunc(4 * x, frameSize));
 }