@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
51 lines (50 loc) • 2.59 kB
TypeScript
/**
* Get the current waveform data of the connected audio source
*
*
*/
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { AudioBuilder } from '../../../core/audio/AudioBuilder';
import { AudioNodeAnalyserType } from '../../poly/NodeContext';
import { BaseAnalyserAudioNode } from './_BaseAnalyser';
declare class WaveformAudioParamsConfig 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 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 WaveformAudioNode extends BaseAnalyserAudioNode<WaveformAudioParamsConfig> {
paramsConfig: WaveformAudioParamsConfig;
static type(): AudioNodeAnalyserType;
initializeNode(): void;
cook(inputContents: AudioBuilder[]): void;
private _previousValue;
getAnalyserValue(): Float32Array | undefined;
private _getWaveFormValue;
private _blendValue;
private __effect__;
private _effect;
private _createEffect;
private _resetEffect;
private _effectSize;
static PARAM_CALLBACK_updateUpdateRangeParam(node: WaveformAudioNode): void;
static PARAM_CALLBACK_resetMaxRange(node: WaveformAudioNode): void;
private _updateRangeParam;
private _updateOnTickHook;
private _registerOnTickHook;
private _unRegisterOnTickHook;
private _tickCallbackName;
}
export {};