poledf#

class diffsptk.AllPoleDigitalFilter(filter_order, frame_period, ignore_gain=False)[source]#

See this page for details.

Parameters:
filter_orderint >= 0 [scalar]

Order of filter coefficients, \(M\).

frame_periodint >= 1 [scalar]

Frame period, \(P\).

ignore_gainbool [scalar]

If True, perform filtering without gain.

forward(x, a)[source]#

Apply an all-pole digital filter.

Parameters:
xTensor [shape=(…, T)]

Excitation signal.

aTensor [shape=(…, T/P, M+1)]

Filter coefficients.

Returns:
yTensor [shape=(…, T)]

Output signal.

Examples

>>> x = diffsptk.step(4)
>>> a = diffsptk.ramp(4)
>>> poledf = diffsptk.AllPoleDigitalFilter(0, 1)
>>> y = poledf(x, a.view(-1, 1))
>>> y
tensor([[0., 1., 2., 3., 4.]])

See also

linear_intpl lpc