Phase shifting a signal
Hi,
How do i implement phase shift on an audio signal in radians/degrees? I know allpass filters and phaseshift~ can give a phase shift, but how can I implement that using a control in degrees?
as far as I understand this is not possible with allpass design.
think of the phase shift in allpass filters as being an artifact of delaying a signal, that is not really controllable in the way you want.
what I would do is perform an fft of your signal, add a (variable) phase constant to all frequency bins and then convert back to time-domain
So the algorithm should be like: fft of input, adding a phase variable to the imaginary part and ifft?
someone with more experience with spectral domain processing may want to expand on this, but here is a simple example. Be warned, this is not a replacement for an allpass filter-- the process is completely different!
here's the main patch:
and here's the pfft contents (save as "constant-phase-changer"):
EDIT: compensatory delay should be 4096 samples less the signal vector size. why? don't know
because of pffts weird numbering scheme?