pyFDN.td.RecursionState#

class pyFDN.td.RecursionState(delays, max_block_size)[source]#

Vectorised bank of block-addressable delay lines.

The state store a feedback loop is built on: get_values() reads the next block_size output samples of every line, set_values() writes the samples going back in, and advance() moves the read/write pointers. Reading before writing is what breaks the algebraic loop, so a whole block can be computed at once.

Used by Recursion (all lines the length of one processing block) and by pyFDN.process_fdn() (one line per FDN delay).

Parameters:
  • delays (ArrayLike) – Length of each delay line in samples, shape (num_delays,). Must be positive.

  • max_block_size (int) – Largest block get_values() will be asked for. Must not exceed the shortest delay, otherwise a block would wrap around its own line.

__init__(delays, max_block_size)[source]#

Methods

__init__(delays, max_block_size)

advance(block_size)

Move the read/write pointers on by one block.

get_values(block_size)

Read the next block_size samples out of every delay line.

reset()

Zero the buffers and rewind the pointers.

set_values(block)

Write a (block_size, num_delays) block into the slots just read.

advance(block_size)[source]#

Move the read/write pointers on by one block.

Return type:

None

get_values(block_size)[source]#

Read the next block_size samples out of every delay line.

Return type:

ndarray

reset()[source]#

Zero the buffers and rewind the pointers.

Return type:

None

set_values(block)[source]#

Write a (block_size, num_delays) block into the slots just read.

Return type:

None