Audio analyser stream. Provides API of the AnalyserNode for audio-streams. In all respects can be used in the same way.
Usage
var Analyser = ;var Generator = ; var analyser = // Magnitude diapasone, in dB minDecibels: -100 maxDecibels: -30 // Number of time samples to transform to frequency fftSize: 1024 // Number of frequencies, twice less than fftSize frequencyBinCount: 1024/2 // Smoothing, or the priority of the old data over the new data smoothingTimeConstant: 02 // Number of channel to analyse channel: 0 // Size of time data to buffer bufferSize: 44100 // Windowing function for fft, https://github.com/scijs/window-functions { } //...pcm-stream params, if required; //AnalyserNode methods // Copies the current frequency data into a Float32Array array passed into it.analyser; // Copies the current frequency data into a Uint8Array passed into it.analyser; // Copies the current waveform, or time-domain data into a Float32Array array passed into it.analyser; // Copies the current waveform, or time-domain data into a Uint8Array passed into it.analyser; //Shortcut methods //return array with frequency data in decibels of size <= fftSizeanalyser; //return array with time data of size <= self.bufferSize (way more than fftSize)analyser; //Can be used both as a sink or pass-throughGenerator;
Related
audio-render — render audio streams.
audio-spectrum — render audio spectrum.
audio-spectrogram — render audio spectrogram.
audio-waveform — render audio waveform.
audio-stat — render any kind of audio info: waveform, spectrogram etc.
pcm-util — utils for work with pcm-streams.
ndarray-fft — implementation of fft for ndarrays.