Package Spectrogram

Class WindowFunction

java.lang.Object
Spectrogram.WindowFunction

public class WindowFunction extends Object
Window function for use with FFT.
Author:
Douglas Gillespie
  • Field Details

  • Constructor Details

    • WindowFunction

      public WindowFunction()
  • Method Details

    • getNames

      public static String[] getNames()
    • getWindowFunc

      public static double[] getWindowFunc(int windowType, int length)
    • hamming

      public static double[] hamming(int length)
    • hann

      public static double[] hann(int length)
    • rectangular

      public static double[] rectangular(int length)
    • bartlett

      public static double[] bartlett(int length)
    • blackman

      public static double[] blackman(int length)
    • blackmanharris

      public static double[] blackmanharris(int length)
    • tukey

      public static double[] tukey(int length, double a)
      also known as tapered-cosine, for a=0 becomes rectangular and a=1 becomes hann
      Parameters:
      length -
      Returns:
    • getWindowGain

      public static double getWindowGain(double[] windowFunction)
      Calculate the gain of the window function
      Parameters:
      windowFunction - window function array
      Returns:
      window rms gain as a factor (NOT dB);