pyFDN.td.TimeOperator#
- class pyFDN.td.TimeOperator[source]#
Abstract class. Parent of all classes belonging to the td-graph group. A stateful
(T, in_channels) -> (T, out_channels)time-domain block. Subclasses setin_channels/out_channelsand implementprocess_block().reset()returns the operator to its initial (zero) state.- __init__()#
Methods
__init__()impulse_response(ir_len)Impulse response from zero state, one Dirac per input channel.
process_block(block)Process one block and advance internal state.
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
- impulse_response(ir_len)[source]#
Impulse response from zero state, one Dirac per input channel.
The operator is
reset()before each channel, so it does not matter what it processed before; it is left in the state the last channel ends in. This is how a system with filters is rendered, e.g.pyFDN.dss_to_td(*dss, **filters).impulse_response(ir_len).- Returns:
Shape
(ir_len, out_channels, in_channels).- Return type:
- abstractmethod process_block(block)[source]#
Process one block and advance internal state.
- Return type:
- process_signal(signal, *, squeeze=False)[source]#
Process a whole signal in one call, from the current state.
Convenience wrapper around
process_block()for the common case of rendering an operator tree offline. Operators that process in blocks internally (Recursion) do so regardless of how the signal is handed to them, so this gives the same result as streamingsignalthroughprocess_block()block by block.