# Module that performs fractional sample delay (subsample delay)

I’m looking for a Rack module that can delay a signal by a fractional (non-integer) number of samples. It would need to resynthesize the signal, such as this example of delaying a 1-sample pulse (i.e. bandlimited delta function) by about 0.3 samples.

I couldn’t find a better image, but a real-world module couldn’t time-travel like this image, so it would have to use a minimum-phase filter instead.

Thanks!

Hi Andrew,

I am not sure about what you are looking for but I was wondering if you could use Lagrange interpolation to define the sample value at an arbitrary time instant.

An example of Lagrange interpolation for fractional delay is included in Sckitam WaveguideDelay. Is this what you were looking for?

Best regards,

1 Like

String Theory also uses Lagrange interpolation in its delay calculations

1 Like

Ah, it looks like Sckitam WaveguideDelay does this. Thanks! Just needed something quick for a patch.

Not sure what you are trying to achieve. The “non-discrete” (e.g. per ms or sample) delay you are describing can be seen as a phase shift. So any phase shifter (with enough of a resolution) might achieve what you are looking for?

If you sum/mix the delayed/phase shifted signal with the original signal it you will get a comb filter effect. When summing/mixing the individual the frequencies in the spectrum will phase in or out. Since harmonics are integer multiples of the root (first harmonic) there are ever more harmonics in between octaves going up the spectrum. Therefore, most of the audible spectral changes will occur in the higher frequency range of the spectrum (where generally there are more frequencies per octave). Sort results in multiple (shifting or static) peaks/notches where the bandwidth tends to be wider towards lower harmonic ranks and smaller going up the harmonic spectrum. The root will fully phase out last (at 180 degrees). The higher frequencies/harmonics will phase in and out faster (at their rank/integer division rate faster).

Simple detuning will also cause phase shifting. Since one cycle is faster then the other. Only here the gap (phase angle 1 as compared to phase angle 2) will keep increasing (until we went full circle and start over). This will effectively cause the phase shifting to cycle at the rate of the difference between both signals frequencies. This also implies that a temporary detune (e.g. using some modulation source like an envelope) will also result in a phase shift. Well, almost always: you could be “lucky” and end up exactly in phase.

This relation between varying frequency and phase is also behind why FM (frequency modulation) and PM (phase modulation) are almost the same concept in synthesis (Yamaha FM is actually PM).

You could also implement a frequency change/modulation by continuously shifting phase (e.g. Doppler effect). Vice versa, by changing/modulating frequency you could implement a phase shift.

Anyway…

Just some thoughts on absolute and relative phase. And some consequences/uses.

1 Like