-
Notifications
You must be signed in to change notification settings - Fork 0
signal.AdaptiveStft.Function.getHarmonicAmplitudes
dsp-collection / signal/AdaptiveStft / getHarmonicAmplitudes
function getHarmonicAmplitudes(
samples,
windowCenterPosition,
f0,
harmonics,
relWindowWidth?,
windowFunction?): Float64Array<ArrayBufferLike> | undefined;Defined in: signal/AdaptiveStft.ts:135
Computes the amplitudes of the harmonic components for a specified fundamental frequency.
Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>
The input signal.
number
The center position of the window (in sample positions).
number
The fundamental frequency. The unit of the specified frequency value is 1/samples (normalized frequency).
number
The number of harmonics to compute.
number = 7
An integer specifying the window width relative to the wavelength of the fundamental frequency. Optional.
(x) => number
A window function. Optional.
Float64Array<ArrayBufferLike> | undefined
An array with the amplitudes of the harmonics, starting with the fundamental frequency.
a[0] = amplitude of fundamental frequency, a[i] = amplitude of harmonic i+1 with the frequency f0 * (i + 1).
undefined is returned if the amplitudes cannot be computed.