Adds several samples at end of delay.
Adds a new sample at end of delay.
Initialize the delay line. Can delay up to numSamples samples.
Combined feed + sampleFull. Uses the delay line as a fixed delay of count samples.
Combined feed + sampleFull. Uses the delay line as a fixed delay of count samples.
Resize the delay line. Can delay up to count samples. The state is cleared.
Random access sampling of the delay-line at integer points. Delay 0 = last entered sample with feed().
Random access sampling of the delay-line at integer points, extract a time slice. Delay 0 = last entered sample with feed().
Random access sampling of the delay-line with a 3rd order polynomial.
Random access sampling of the delay-line with linear interpolation. Note that will the HF rollout of linear interpolation, it can often sound quite good in 44.1 kHz
Third-order spline interpolation http://musicdsp.org/showArchiveComment.php?ArchiveID=62
4th order spline interpolation http://musicdsp.org/showArchiveComment.php?ArchiveID=60
Allow to sample signal back in time. This delay-line has a twin write index, so that the read pointer can read a contiguous memory area. ____________________________________________________________________________________ | | _index | | readPointer = _index + half size | |
import dplug.dsp.delayline;
void delaySampleBySample() // slower method, but easier to be correct { Delayline!float delayline; delayline.initialize(maxPossibleDelay); for (int n = 0; n < frames; ++n) { delayline.feedSample(inputn);
// desiredDelay = 0 would be the sample we just fed // the delayline with. delayedn = delayline.fullSample(desiredDelay); } }
void delayUsingReadPointer() // fastest method, but more confusing { Delayline!float delayline; delayline.initialize(maxFrames + maxPossibleDelay); delayline.feedBuffer(input.ptr, frames); const(float)* readPtr = d.readPointer() - desiredDelay - frames + 1; delayed[0..frames] = readPtr[0..frames]; // Caveats: frames <= maxFrames and desiredDelay <= maxPossibleDelay. }