pyFDN.td.GranularPitchShift#
- class pyFDN.td.GranularPitchShift(channels, max_delay_samps, grain_dur_samps, transpose_cents, active_channels, fade_ratio=0.25, seed=None)[source]#
Stateful, controllable granular pitch shifter.
Two grains, triggered half a grain apart, read a shared per-channel circular buffer at a rate set by
transpose_cents. Each grain is windowed by a raised-cosine envelope and, on reachinggrain_dur_samps, restarts at a new random position inside the buffer – trading the continuous read-head wraparound ofPitchShiftfor grain-boundary clicks disguised by the envelope. Onlyactive_channelsare shifted; the rest pass through unchanged.- __init__(channels, max_delay_samps, grain_dur_samps, transpose_cents, active_channels, fade_ratio=0.25, seed=None)[source]#
Methods
__init__(channels, max_delay_samps, ...[, ...])filter(block)Filter one block and advance internal state.
process(signal, *[, squeeze])Filter 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_channelsout_channels