pyFDN.SDN#
- class pyFDN.SDN(room_size, source_pos, receiver_pos, *, fs=48000.0, c=343.0, wall_filters=None)[source]#
Scattering delay network of a shoebox room.
Signal flow, with every delay in samples:
x -> input_delays (one per wall) -> B -> [ wall_filters -> delays -> A ] -> C -> output_delays -> sum -> y, plus D * x delayed by direct_delay
where
[ ... ]is the feedback loop at the wall nodes: the nodes’ output, after the wall filters, is whatCpicks up.- Parameters:
room_size (
ArrayLike) – Room dimensions(Lx, Ly, Lz)in metres; z points up.source_pos (
ArrayLike) – Positions in metres.receiver_pos (
ArrayLike) – Positions in metres.fs (
float) – Sampling rate in Hz.c (
float) – Speed of sound in m/s.wall_filters (
ArrayLike|None) – SOS bank of the wall absorption:(sections, 6, 6), one filter per wall in the order ofWALL_NAMES, or(sections, 6, 30), one per delay line in the order ofrouting.Noneleaves the walls lossless.
- Variables:
delays (ndarray, (30,)) – Wall-to-wall delays in samples, in the order of
routing.A (ndarray, (30, 30)) – Scattering matrix: isotropic 5 x 5 scattering per node, after the delay lines are gathered by the node they arrive at.
B (ndarray, (30, 6)) – Source-to-node injection, the source gains folded in.
C (ndarray, (6, 30)) – Node-to-receiver pickup, the receiver gains folded in.
D (ndarray, (1, 1)) – Direct-path gain.
wall_filters (ndarray, (sections, 6, 30)) – Wall absorption per delay line, as an SOS bank.
output_delays (input_delays,) – Source-to-wall and wall-to-receiver delays in samples.
direct_delay (int) – Source-to-receiver delay in samples.
routing (tuple of (int, int)) –
routing[k] = (i, j): delay linekruns from wallito wallj.node_positions (ndarray, (6, 3)) – Scattering-node positions in metres.
Methods
__init__(room_size, source_pos, receiver_pos, *)