Delay Effects
Effects built with delay lines.
- class tiliqua.dsp.delay_effect.PingPongDelay(*args, src_loc_at=0, **kwargs)
2-channel stereo ping-pong delay.
Based on 2 equal-length delay lines, fed back into each other.
Delay lines are created external to this component, and may be SRAM-backed or PSRAM-backed depending on the application.
- Members:
i (
In(stream.Signature(data.ArrayLayout(ASQ, 2)))) – Stereo sample pairs into ping-pong delay.o (
Out(stream.Signature(data.ArrayLayout(ASQ, 2)))) – Stereo sample pairs out of ping-pong delay. One per input.
- __init__(delayln1, delayln2, delay_samples=15000)
- delayln1delay_line.DelayLine
First delay line, must have max length >
delay_samples, and have been created withDelayLine.write_triggers_read == True.- delayln2delay_line.DelayLine
Second delay line, must have max length >
delay_samples, and have been created withDelayLine.write_triggers_read == True.- delay_samplesint
Length of each ping-pong section in samples.
- class tiliqua.dsp.delay_effect.Diffuser(*args, src_loc_at=0, **kwargs)
4-channel shuffling feedback delay.
Based on 4 separate delay lines with separate delay lengths, where the feedback paths are shuffled into different channels by a matrix mixer.
Delay lines are created external to this component, and may be SRAM-backed or PSRAM-backed depending on the application.
- Members:
i (
In(stream.Signature(data.ArrayLayout(ASQ, 4)))) – Sample array into the delay effect.o (
Out(stream.Signature(data.ArrayLayout(ASQ, 4)))) – Sample array out of the delay effect. One is produced per input.
- __init__(delay_lines, delays=None)
- delay_lines[delay_line.DelayLine]
Array of 4 delay lines used for feedback. Each delay line must be at least as long as the corresponding entry in
delays.- delays[int]
Fixed tap delay of each feedback path - one for each delay line. If not provided, some default tap lengths are used.
- class tiliqua.dsp.delay_effect.Boxcar(*args, src_loc_at=0, **kwargs)
Simple Boxcar Average.
Average of previous N samples, implemented with an accumulator and delay line. The accumulator sums all incoming samples, and we subtract an N-sample-delayed version of the incoming signal. This is the same as taking the average over the last N samples, requiring no multiplies but instead requiring space for N samples.
Can be used in low- or high-pass mode.
- Members:
i (
In(stream.Signature(sq))) – Samples into the boxcar averager.o (
Out(stream.Signature(sq))) – Samples out of the boxcar averager, one produced per input.
- __init__(n=32, hpf=False, sq=ASQ)
- nint
Delay line size and window length of the averager.
- hpfbool
High-pass mode - if true, the average value is subtracted from the last sample and we emit the difference, rather than emitting the average value itself. Almost no extra cost, useful for other applications.
- sqfixed.SQ
Fixed-point type used for underlying inputs, outputs and storage.