Discussion:
phase shift?
sadguitarius
2011-10-15 20:27:12 UTC
Permalink
I've been trying to recreate an analog-style phaser effect in SuperCollider and having no luck so far. I know this has been asked on the list before, but none of the proposed solutions I've seen really nail the effect. I've tried mixing the original signal with cascaded AllpassC delays but that produces a phase comb instead of just creating one notch per stage. There's a Max/MSP object called phaseshift~ that does exactly what I'm looking for. The help file for that object says it's a 2nd order phase shift filter. Would this be the same as a 2nd order allpass filter? Are there any combinations of existing SuperCollider ugens that would achieve this? I saw that there's a PV_PhaseShift ugen, but I shouldn't have to go into the frequency domain just to achieve this, should I? Thanks
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Bjorn Westergard
2011-10-17 15:55:19 UTC
Permalink
Could you post whatever code you've tried?
Post by sadguitarius
I've been trying to recreate an analog-style phaser effect in SuperCollider
and having no luck so far. I know this has been asked on the list before,
but none of the proposed solutions I've seen really nail the effect. I've
tried mixing the original signal with cascaded AllpassC delays but that
produces a phase comb instead of just creating one notch per stage. There's
a Max/MSP object called phaseshift~ that does exactly what I'm looking for.
The help file for that object says it's a 2nd order phase shift filter.
Would this be the same as a 2nd order allpass filter? Are there any
combinations of existing SuperCollider ugens that would achieve this? I saw
that there's a PV_PhaseShift ugen, but I shouldn't have to go into the
frequency domain just to achieve this, should I? Thanks
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
Bjorn (http://phrontist.org)
Andy Hayleck
2011-10-17 16:04:55 UTC
Permalink
*FreqShift.ar(input, shift, phase, mul, add)*
FreqShift.ar has a phase input. Just set the frequency input to zero and
change the phase:

{

x = WhiteNoise.ar(0.1);

x = x + FreqShift.ar(x, 0, SinOsc.kr(0.5).range(0,pi));

}.play(s)
Post by Bjorn Westergard
Could you post whatever code you've tried?
Post by sadguitarius
I've been trying to recreate an analog-style phaser effect in
SuperCollider and having no luck so far. I know this has been asked on the
list before, but none of the proposed solutions I've seen really nail the
effect. I've tried mixing the original signal with cascaded AllpassC delays
but that produces a phase comb instead of just creating one notch per stage.
There's a Max/MSP object called phaseshift~ that does exactly what I'm
looking for. The help file for that object says it's a 2nd order phase
shift filter. Would this be the same as a 2nd order allpass filter? Are
there any combinations of existing SuperCollider ugens that would achieve
this? I saw that there's a PV_PhaseShift ugen, but I shouldn't have to go
into the frequency domain just to achieve this, should I? Thanks
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
--
Bjorn (http://phrontist.org)
sadguitarius
2011-10-17 17:06:53 UTC
Permalink
Thanks, that comes much closer than anything I've tried but it's a different effect (one that I really like though. It also makes a great barber pole effect if you leave the phase alone and shift the frequency 0.5 Hz or so). I think what I am actually looking for is a 2nd order allpass filter. Does this exist as a UGen already or is it possible to create one from existing filters?
Post by Andy Hayleck
FreqShift.ar(input, shift, phase, mul, add)
{
x = WhiteNoise.ar(0.1);
x = x + FreqShift.ar(x, 0, SinOsc.kr(0.5).range(0,pi));
}.play(s)
sadguitarius
2011-10-20 17:11:13 UTC
Permalink
Nobody knows? Ok, guess it's time to get my hands dirty and try to code a filter UGen :-)
Post by sadguitarius
I think what I am actually looking for is a 2nd order allpass filter. Does this exist as a UGen already or is it possible to create one from existing filters?
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Josh Parmenter
2011-10-20 17:33:10 UTC
Permalink
Do you mean an all pass filter based on a second order section? Check out BAllPass.

Josh
Post by sadguitarius
Nobody knows? Ok, guess it's time to get my hands dirty and try to code a filter UGen :-)
Post by sadguitarius
I think what I am actually looking for is a 2nd order allpass filter. Does this exist as a UGen already or is it possible to create one from existing filters?
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
sadguitarius
2011-10-20 18:25:52 UTC
Permalink
Thank you! That is exactly what I'm looking for.
Post by Josh Parmenter
Do you mean an all pass filter based on a second order section? Check out BAllPass.
Josh
Post by sadguitarius
Nobody knows? Ok, guess it's time to get my hands dirty and try to code a filter UGen :-)
Post by sadguitarius
I think what I am actually looking for is a 2nd order allpass filter. Does this exist as a UGen already or is it possible to create one from existing filters?
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/
“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
porres
2013-10-05 16:46:25 UTC
Permalink
hi there, are you sure this is exactly the same as max's phaseshift~? Because
in Max you can also get an allpass from biquad coefficients (with
filtergraph), but the phase response is different.

Anyway, I'm here wondering about the same thing, if there's a supercollider
equivalent to it, and I don't think BAllPass is the one.

Cheers



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/phase-shift-tp6896487p7603412.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Julius Smith
2011-10-20 18:32:54 UTC
Permalink
At the risk of belaboring Faust offerings, there is a phaser based on
the second-order allpass in effect.lib called phaser2, as well a demo
GUI wrapper called phaser2_demo that can be tried out using, e.g.,
the following Faust program:

ol = library("oscillator.lib");
el = library("effect.lib");

process = ol.sawtooth_demo <: el.phaser2_demo;

Attached is the faust2supercollider output for the following
phaser2-only program:

process = component("effect.lib").phaser2_demo;

Note that it is a stereo effect (2 signals in, 2 out). This is of
course easily modified in the Faust source, as is the number of
allpass sections, etc.

- jos
Post by sadguitarius
Nobody knows? Ok, guess it's time to get my hands dirty and try to code a filter UGen :-)
Post by sadguitarius
I think what I am actually looking for is a 2nd order allpass
filter. Does this exist as a UGen already or is it possible to
create one from existing filters?
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Julius O. Smith III <jos-***@public.gmane.org>
Prof. of Music and Assoc. Prof. (by courtesy) of Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/
sadguitarius
2011-10-20 18:57:00 UTC
Permalink
Thanks, that all looks very helpful. I've been meaning to dive into Faust, so this gives me a good excuse. By the way, I found your chapter on phasing to be a big help as well.
Post by Julius Smith
ol = library("oscillator.lib");
el = library("effect.lib");
process = ol.sawtooth_demo <: el.phaser2_demo;
process = component("effect.lib").phaser2_demo;
Note that it is a stereo effect (2 signals in, 2 out). This is of course easily modified in the Faust source, as is the number of allpass sections, etc.
- jos
Post by sadguitarius
Nobody knows? Ok, guess it's time to get my hands dirty and try to code a filter UGen :-)
Post by sadguitarius
I think what I am actually looking for is a 2nd order allpass filter. Does this exist as a UGen already or is it possible to create one from existing filters?
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Prof. of Music and Assoc. Prof. (by courtesy) of Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/ <phaser2.sc><phaser2.cpp>
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Continue reading on narkive:
Loading...