Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

FFTWindow

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Window functions for FFT spectrum analysis.

Pass a value from this enum to the window parameter of AudioListener.GetSpectrumData or AudioSource.GetSpectrumData. Unity applies the window to the time-domain samples before the FFT to reduce spectral leakage (energy spreading from one frequency bin into neighboring bins).

Stronger windows taper the signal more at the edges of the analysis block, which typically lowers sidelobe leakage but widens the effective main lobe and can reduce frequency resolution. A more complex window can also be less efficient. For background on the tradeoff, see the notes on AudioSource.GetSpectrumData.

Typical choices:

Additional resources: AudioListener.GetSpectrumData, AudioSource.GetSpectrumData.

Properties

Property Description
RectangularRectangular (no) window for FFT spectrum analysis.
TriangleTriangular (Bartlett) window for FFT spectrum analysis.
HammingHamming window for FFT spectrum analysis.
HanningHanning (Hann) window for FFT spectrum analysis.
BlackmanBlackman window for FFT spectrum analysis.
BlackmanHarrisBlackman-Harris window for FFT spectrum analysis.