pyFDN.td.TimeVaryingMatrix#
- class pyFDN.td.TimeVaryingMatrix(channels, fs, *, rate, depth, spread=0.0, rng=None)[source]#
Stateful sinusoidally modulated orthogonal mixing matrix (time-varying feedback).
Each adjacent channel pair is rotated by a sinusoidally modulated angle, so the operator is orthogonal at every sample but never constant. Sitting on a
Recursionfeedback path, e.g.Series([Gain(A), TimeVaryingMatrix(N, fs, rate=1.5, depth=0.35)]), it makes the loop genuinely time-varying – there is no static transfer function. It also goes straight into a graph’spost_matrixhook, e.g.pyFDN.dss_to_td(*dss, post_matrix=TimeVaryingMatrix(N, fs, rate=1.5, depth=0.35)).The knobs are named as in
TimeVaryingKroneckerMatrix.Translation of the MATLAB implementation
timeVaryingMatrix.mfrom fdnToolbox. Original MATLAB code: (c) Sebastian Jiro Schlecht, 2019. Python translation: Alma Hova, 2026.- Parameters:
channels (
int) – Number of channels N (the matrix is N x N), a positive even integer.fs (
float) – Sampling rate in Hz; the modulation clock.rate (
float) – Modulation frequency in Hz.depth (
float) – Modulation amplitude (maximum angle deflection) in radians.spread (
float) – Relative random spread ofrateanddepthacross the rotation planes: each plane draws fromvalue * (1 +- spread).rng (
Generator|int|None) – Random generator or integer seed for the per-plane phases and spread.
- Variables:
Methods
__init__(channels, fs, *, rate, depth[, ...])impulse_response(ir_len)Impulse response from zero state, one Dirac per input channel.
process_block(block)Apply the time-varying orthogonal transformation to one block.
process_signal(signal, *[, squeeze])Process a whole signal in one call, from the current state.
reset()Clear internal state (no-op for stateless operators).
Attributes
in_channelsout_channels