pyFDN.td.PitchShift#

class pyFDN.td.PitchShift(channels, *, max_delay, window, transpose_cents, active_channels=None)[source]#

Stateful, controllable dual-read-head pitch shifter.

Writes into one circular buffer per channel and reads it back with two read heads spaced half a window apart, each sliding at a rate set by transpose_cents and crossfaded with a complementary sine window of window samples, so the head that is about to wrap is always faded out. Only active_channels (default all) are shifted; the rest pass through unchanged. max_delay is the buffer length in samples.

__init__(channels, *, max_delay, window, transpose_cents, active_channels=None)[source]#

Methods

__init__(channels, *, max_delay, window, ...)

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).

set_transpose_cents(cents)

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

set_transpose_cents(cents)[source]#
Return type:

None