pyFDN.dss_to_td#
- pyFDN.dss_to_td(delays, A, B, C, D, *, post_delay=None, post_matrix=None, post_output=None, block_size=None)[source]#
Assemble a delay state-space (DSS) system as a stateful
tdgraph.The returned graph contains the input, feedback, output, and direct gains; the delay bank; and the filter hooks given. It can process a whole signal with
process_signal, process a stream withprocess_block, and return to zero state withreset.The delay bank breaks the feedback loop, so the graph processes blocks of up to
block_sizesamples and implementsdelaysexactly. ADSSunpacks straight in:dss_to_td(*dss, post_delay=sos).- Parameters:
delays (
ArrayLike) – Positive delay lengths in samples, one per delay line.A (
ArrayLike) – Feedback matrix,(N, N). A filter (FIR) feedback matrix is a graph operator, not a DSS matrix: put it on the feedback path, e.g.dss_to_td(delays, np.eye(N), B, C, D, post_matrix=td.MatrixFIR(fir)).B (
ArrayLike) – Input, output, and direct gain matrices.C (
ArrayLike) – Input, output, and direct gain matrices.D (
ArrayLike) – Input, output, and direct gain matrices.post_delay (
ArrayLike|TimeOperator|Any|None) – In-loop (after the delays), feedback-path (afterA) and wet-signal (afterC) hooks. Each is an(sections, 6, channels)SOS bank (placed as aSOSBank), aTimeOperator, or any object with aprocess_block(block)method.post_matrix (
ArrayLike|TimeOperator|Any|None) – In-loop (after the delays), feedback-path (afterA) and wet-signal (afterC) hooks. Each is an(sections, 6, channels)SOS bank (placed as aSOSBank), aTimeOperator, or any object with aprocess_block(block)method.post_output (
ArrayLike|TimeOperator|Any|None) – In-loop (after the delays), feedback-path (afterA) and wet-signal (afterC) hooks. Each is an(sections, 6, channels)SOS bank (placed as aSOSBank), aTimeOperator, or any object with aprocess_block(block)method.block_size (
int|None) – Internal block size. Defaults to the shorter of 4096 samples and the shortest delay. It must be positive and cannot exceed the shortest delay.
- Return type:
- Returns:
TimeOperator – A stateful graph from FDN inputs to outputs.
The delay lines are the
RecursionStateatgraph.ops[0].ops[1].state; e.g. free decay from noise in every line:: – graph = dss_to_td(delays, A, B, C, D) graph.ops[0].ops[1].state.fill_noise() y = graph.process_signal(np.zeros(fs))