pyFDN.td.RingModulator#

class pyFDN.td.RingModulator(channels, fs, *, rate, depth, active_channels=None)[source]#

Stateful, controllable ring modulator, y[n, c] = depth * x[n, c] * sin(2 * pi * rate * n / fs), applied to active_channels (default all); the rest pass through unchanged.

Multiplying by a sine shifts the spectrum of the active channels by +-rate rather than adding harmonics on top of it, so the effect reads as tremolo at a low rate and as an inharmonic, bell-like retuning once rate enters the audible range. A unit-amplitude sine carries only half the power of the signal it multiplies, so depth = sqrt(2) keeps the operator energy-preserving. rate and depth are named as in TimeVaryingMatrix. The modulation phase runs continuously across process_block() calls, tracked by sample_index.

__init__(channels, fs, *, rate, depth, active_channels=None)[source]#

Methods

__init__(channels, fs, *, rate, depth[, ...])

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

in_channels

out_channels

process_block(block)[source]#

Process one block and advance internal state.

Return type:

ndarray

reset()[source]#

Clear internal state (no-op for stateless operators).

Return type:

None