<div dir="ltr">Yeah, my [filterplot.mmb] abstraction actually wraps the phase to -pi to pi and scales that to -1 to 1. I don&#39;t remember why I did the scaling. ;-) Also, I don&#39;t know if it matters with how you&#39;re analyzing [phaseshift~], but the frequency axis is non-linear. You can change it by sending a [linfreq 1( message (I think I forgot to put that in the helpfile).<div>

<br></div><div>You&#39;re right that a second-order filter doesn&#39;t necessarily mean it is a biquad structure, but as long as it is a linear filter, you can recreate any second-order filter using a biquad. You just put in 0 for the coefficients you aren&#39;t using. However, second-order all-pass filters are likely going to be biquads, since the feedforward and feedback coefficients will be inverses of each other (i.e. b0 = a2, b1 = a1, b2 = a0).</div>

<div><br></div><div>Anyway, I don&#39;t have access to Max these, so I can&#39;t really look at it. There is this filter described here (<a href="https://ccrma.stanford.edu/~jos/pasp/Phasing_2nd_Order_Allpass_Filters.html" target="_blank">https://ccrma.stanford.edu/~jos/pasp/Phasing_2nd_Order_Allpass_Filters.html</a>) that gives a response similar to what you described with f = 4kHz and R = .1, but I don&#39;t think that&#39;s the one given what it says in the [phaseshift~] reference page. The paper describe this filter says R should be exp(-pi * bandwidth / samplerate), and that usually results in .5 &lt; R &lt; 1.</div>
<div><br></div><div>Hope that helps at all.</div><div>.mmb</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Oct 5, 2013 at 7:14 PM, Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>hi mmb, thanks for showing up :)</div><div><br></div>hmmmm, my problem was that the phase response graph generated from your Pd patch based on RBJ looks different than the one from max&#39;s phaseshift. But it just occurred to me that one thing about it might only be a matter of normalizing it and displaying in the same way.<div>

<br></div><div>For example, your patch gives us a drop from 0 to -1 and then from 1 to 0, while phaseshift in Max is from 0 to -2pi continuously. I&#39;m now considering that both behaviours could be related, only that your patch &quot;wraps&quot; it around -1 back to 1. What do you think?</div>

<div><br></div><div>But even so, there&#39;s also the issue of getting the Q parameter to behave in the same way. Max&#39;s phaseshift, when set to Q = 0.1 and freq = 4KHz will give you a linear drop from 0 to -2pi. Now, I can&#39;t seem to get that based on RBJ&#39;s cookbook formulas and your patch. But then, another thing I haven&#39;t thought of might be a difference in the scale plot...</div>

<div><br></div><div>One way or another, the Q parameter seems off. </div><div><br></div><div>So, as you can see, there are these plotting differences, but I know what you mean, that is what I was suspecting too, it sure looks like the same thing at a first glance, meaning you can get to it from a biquad coefficient perspective. The problem is that max&#39;s phaseshift isn&#39;t very clear about what it really is, other than saying it is a second order filter. But that doesn&#39;t have to imply it is the same as a second order biquad, does it?</div>

<div><br></div><div>Thanks</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/5 Mike Moser-Booth <span dir="ltr">&lt;<a href="mailto:mmoserbooth@gmail.com" target="_blank">mmoserbooth@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">From looking at the helpfile for [phaseshift~], this sounds very much like the all-pass filter from Robert Bristow-Johnson&#39;s EQ Cookbook. You can calculate the biquad coefficients for it like this:<div>

<br>
</div><div>w0 = 2*pi*frequency_in_Hz / sample_rate</div><div>alpha = sin(w0)*sinh(ln(2)/2*Q*w0/sin(w0))</div><div><br></div><div>fb1 = 2*cos(w0) / (1+alpha)</div><div>fb2 = (-1+alpha) / (1+alpha)</div><div>ff1 = -fb2</div>


<div>ff2 = -fb1</div><div>ff3 = 1</div><span><font color="#888888"><div><br></div><div>.mmb</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Oct 5, 2013 at 12:31 PM, Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>&gt; the phase response given in phaseshift&#39;s help file suggest otherwise.<br><div class="gmail_extra">


<br></div></div><div class="gmail_extra">it&#39;s more like the response from miller&#39;s H14 example...</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">So I guess you can have a 2nd order one (lie phaseshift) by putting two of these together, right? And I suspect it doesn&#39;t really need to have anything to do biquad just for being &quot;2nd order&quot;, huh?</div>



<div class="gmail_extra"><br></div><div class="gmail_extra">cheers</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/5 Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span><br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Anyway, next on my list is finding out how to implement max&#39;s [phaseshift~], which is also an allpass filter. There&#39;s no Pd clone for it so it seems, right? <div>



<br></div><div>Well, it doesn&#39;t really what it is other than a 2nd order filter. From that I could think you can generate it with [biquad~], but the phase response given in phaseshift&#39;s help file suggest otherwise.<br>




<div class="gmail_extra"><br></div><div class="gmail_extra">any contributions welcome</div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks a lot<br><br><div class="gmail_quote">2013/10/5 Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span><br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">but this way it won&#39;t be the same as cyclone&#39;s [allpass~], the way I did it is equivalent to it (and max&#39;s).<div>




<br></div><div>cheers</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/10/3 Chris Clepper <span dir="ltr">&lt;<a href="mailto:cgclepper@gmail.com" target="_blank">cgclepper@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div dir="ltr">You only need one delay line for the allpass.<div><br></div><div>feedforward = input * -gain</div><div>feedback = delayout * gain</div><div>delayin = input + feedback</div><div>output = delayout + feedforward</div>






<div><br></div><div><a href="http://www.spinsemi.com/knowledge_base/effects.html#Reverberation" target="_blank">http://www.spinsemi.com/knowledge_base/effects.html#Reverberation</a><br></div>
</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 3, 2013 at 11:29 AM, Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">i hope i guess i figured it out on how to implement it with delay lines. see attachment. And I realize you can&#39;t do this with [fexpr~] or [biquad~] because the sample delay length is kinda big for that, right?<div>







<br></div><div>cheers</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/3 Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span><br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">cool, but do you know how to implement cyclone&#39;s [allpass~] with it? <div>



<br></div><div>It&#39;s really unclear to me what is the relation of this pass filter with the one you can generate with biquad coefficients, or with raw poles/zeros objects for that matter.</div>




<div><br></div><div>Well, one way or another, it&#39;s also unclear to me how to do it with delay lines.<br></div><div><br></div><div>seems that it is related to a comb filter, right?</div><div><br></div><div>cheers</div>








</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/2 Chris Clepper <span dir="ltr">&lt;<a href="mailto:cgclepper@gmail.com" target="_blank">cgclepper@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Allpass for reverb is easy to do with delwrite~ and vd~.  I used 32 of them today to recreate a famous &#39;deep space&#39; reverb.</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>








On Wed, Oct 2, 2013 at 1:53 AM, Alexandre Torres Porres <span dir="ltr">&lt;<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">hi there, i see the biquad&#39;s coefficients can be set as an allpass filter, generated by frequency and &quot;Q&quot; parameters. But can it do the same as cyclone&#39;s [allpass~] filer? If yes, them how since the parameters for [allpass~] are different (delaytime and such).<div>










<br></div><div>One way or another, I guess that my real question is: how to implement [allpass~] from vanilla objects?</div><div><br></div><div>thanks</div></div>
<br></div></div>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>