calculateHP20alpha

Creates the alpha value for a HP20 filter. Filter formula: y[n] = (y[n-1] + x[n] - x[n-1]) * alpha Where alpha is: 1 / (1 + 2 * pi * timeConstantInSeconds * samplerate)

@nogc nothrow pure @safe
double
calculateHP20alpha
(
float fs
,
float f0
)

Parameters

fs float

Sampling frequency.

f0 float

Cutoff frequency.

Return Value

Type: double

The alpha value.

Meta