Detects an audio signal's frequency spectrum. More...
Import Statement: | import |
Inherits: |
Detects information about an MP3Decoder's audio signal's spectrum. It does so by performing a fast fourier transform (FFT) on the audio signal. It then calculates certain information from the FFT spectrum. That information is then available via spectrumData.
This effect uses the FFTW3 library internally.
preEffect : AudioEffect |
An instance of an AudioEffect implementation to be applied to the input signal before the spectrum analysis.
You can set this to any AudioEffect instance, or null
, which is the default value.
Contains information about the audio signal at the current playback time.
This is a C++ object with the following properties:
maxFrequency
- The frequency with the highest amplitude, but not below startFrequency.meanFrequency
- The mean frequency of the power spectrum. This is calculated by averaging every frequency weighted by its power (square of the amplitude).dcValue
- The amplitude of the DC value (frequency 0).Size for the FFT transform, in samples.
Powers of 2, e.g. 1024 will yield the best results.
Minimum frequency for detecting spectrumData's maxFrequency
.