Waveform
class Component ↳ extends MeterBase<WaveformOptions>
Get the current waveform data of the connected audio source.
Constructor
Section titled “Constructor”new Waveform(size?: number)Parameters
-
size
numberoptionalThe size of the Waveform. Value must be a power of two in the range 16 to 16384.
new Waveform(options?: Partial<WaveformOptions>)Parameters
- options
Partial<WaveformOptions>optional
Properties
Section titled “Properties”output
Section titled “output”↳ inherited from MeterBase
output: OutputNodeThe output is just a pass through of the input
size: numberThe size of analysis. This must be a power of two in the range 16 to 16384. Determines the size of the array returned by getValue.
Methods
Section titled “Methods”dispose()
Section titled “dispose()”↳ inherited from MeterBase
dispose(): thisDispose and disconnect
Returns this
getValue()
Section titled “getValue()”getValue(): Float32ArrayReturn the waveform for the current time as a Float32Array where each value in the array represents a sample in the waveform.
Returns Float32Array
getDefaults()
Section titled “getDefaults()”static
getDefaults(): WaveformOptionsReturns all of the default options belonging to the class.
Returns WaveformOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()