T("spectrum")
ARSTEREOLISTENER Spectrum Viewer
入力のスペクトルを表示します。T("fft") と異なり、FFTサイズの設定や解析の間隔の設定が行なえますが、解析の結果の real, imag プロパティを他の T オブジェクトに渡すことができません。表示が目的の場合は T("spectrum")、 スペクトル合成が目的の場合は T("fft") と使いわけします。
以下の例では 100ミリ秒ごとに FFTサイズ 512 の解析結果を表示しています。
Properties
size(Number)- The size of the FFT. This must be a power of two. Default value is 512.
interval(Number or timevalue)- The interval to analyze. Default value is 500msec.
spectrum(ReadOnly Float32Array)- The frequency-domain data analyzed (dB).
real(ReadOnly Float32Array)- The real part of the Fourier transform.
imag(ReadOnly Float32Array)- The imaginary part of the Fourier transform.
Methods
plot(opts)
Events
fft
See Also
Source
https://github.com/mohayonao/timbre.js/blob/master/src/objects/spectrum.js