@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
56 lines (55 loc) • 2.93 kB
TypeScript
/**
* creates a fast fourier transform analyser
*
*
*/
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { AudioBuilder } from '../../../core/audio/AudioBuilder';
import { AudioNodeAnalyserType } from '../../poly/NodeContext';
import { BaseAnalyserAudioNode } from './_BaseAnalyser';
declare class FFTAudioParamsConfig extends NodeParamsConfig {
/** @param array size will be 2**sizeExponent */
sizeExponent: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param array size */
arraySize: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param a value from between 0 and 1 where 0 represents no time averaging with the last analysis frame */
smoothing: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
/** @param normalizes the output between 0 and 1. The value will be in decibel otherwise. */
normalRange: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param groups the FFT frequency bands into octave bands */
asOctaves: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
octaveDivisions: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
/** @param display range param */
updateRangeParam: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param range value */
range: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR2>;
/** @param accumulated range */
maxRange: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.VECTOR2>;
/** @param resetMaxRange */
resetMaxRange: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BUTTON>;
}
export declare class FFTAudioNode extends BaseAnalyserAudioNode<FFTAudioParamsConfig> {
paramsConfig: FFTAudioParamsConfig;
static type(): AudioNodeAnalyserType;
initializeNode(): void;
cook(inputContents: AudioBuilder[]): void;
getAnalyserValue(): Float32Array | undefined;
private __octaveValues;
private _octaveDivisions;
private _octaveValues;
private __effect__;
private _effect;
private _createEffect;
private _resetEffect;
static PARAM_CALLBACK_updateEffect(node: FFTAudioNode): void;
private _updateEffect;
private _FFTSize;
static PARAM_CALLBACK_updateUpdateRangeParam(node: FFTAudioNode): void;
static PARAM_CALLBACK_resetMaxRange(node: FFTAudioNode): void;
private _updateRangeParam;
private _updateOnTickHook;
private _registerOnTickHook;
private _unRegisterOnTickHook;
private _tickCallbackName;
}
export {};