Phase Rotation FOS

hey, there is this phase rotation plugin called “disperser” which is using a cascade of allpass filters to change the phase of the input signal. It sounds really great on bass sounds.

@nathan was so kind to share with me an example of an Impulse going through a chain of 1-order allpass filters which already does the job (thanks a lot) and pointed out FOS.

(
{
	var snd;
	snd = Impulse.ar(0);
	100.do {
		snd = AllpassN.ar(snd, SampleDur.ir, SampleDur.ir, SampleDur.ir * 10);
	};
	snd ! 2;
}.play(fadeTime: 0);
)

Does somebody has experience with the FOS UGen and has an idea how the code could be rewritten with it for effiency reasons?
Secondly with the plugin you could set the “amount” which corresponds to the number of allpass filters and also a cutoff frequency which is missing here.
thanks :slight_smile:

Transfer function of a digital first-order allpass filter:

H(z) = Y(z) / X(z) = (-k + z^-1) / (1 - kz^-1)

Difference equation:

y[t] = -k x[t] + x[t-1] + k y[t-1]

Implementation with FOS.ar:

(
{
	var snd, k;
	snd = Impulse.ar(0);
	k = 0.8;
	100.do {
		snd = FOS.ar(snd, k.neg, 1, k);
	};
	snd ! 2;
} .play(fadeTime: 0);
)

Adjust k to different values in the range (-1, 1) for different sounds.

1 Like

thank you very much :slight_smile:
i might be wrong but when you adjust the formula for k like this you can put in a cutoff frequency in hz directly:

(
{
	var snd, k;
	snd = Impulse.ar(0);
	k = exp(-2pi * (\lpf.kr(500) * SampleDur.ir));
	100.do {
		snd = FOS.ar(snd, k.neg, 1, k);
	};
	snd ! 2;
} .play(fadeTime: 0);
)

Allpass1 from sc3-plugins is also available for the job.

1 Like

thats great thankyou very much :slight_smile:

(
{
	var snd, dry, wet;
	dry = Impulse.ar(0);	
	wet = dry;
	100.do {
		wet = Allpass1.ar(wet, \ffreq.kr(1000));
	};
	snd = XFade2.ar(dry, wet, \mix.kr(0.5).linlin(0, 1, -1, 1));
	//snd = dry.blend(wet, \mix.kr(0.5));	
	snd ! 2;
} .play(fadeTime: 0);
)