<div dir="ltr">there are incremnents to do still, but thanks :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-12 9:25 GMT-03:00 patrice colet <span dir="ltr"><<a href="mailto:colet.patrice@free.fr" target="_blank">colet.patrice@free.fr</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<br>
<div>Le 12/04/2014 08:45, Alexandre Torres
Porres a écrit :<br>
</div><div class="">
<blockquote type="cite">
<div dir="ltr">
<div>> <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">change
the [fexpr~] to something like </span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">>
[fexpr~ $x[0] + ($f2 * $y[-1]) + ($f3 * $y[-2])]</span></div>
<div><br>
</div>
f*ck, I'll be damned, now my patch that implements [bp~] with
[fexpr~] seems to work, it's attached. Thanks! <br>
</div>
</blockquote>
<br></div>
thanks for the share, when I tried to implement filters with expr
and biquad I haven't been able to get it working fully (some clics
appeared when changing frequency)... Your implementation works very
well in both cases, "chapeau bas" <br>
<br>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div><br>
</div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">>
it's pretty easy to see that from the code you quoted</span><br>
</div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br>
</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">I
can't really see it from the code itself. And, well,
remember I mentioned about the biquad code? </span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br>
</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<div> {</div>
<div> t_sample output = *in++ + fb1 * last + fb2 *
prev;</div>
<div> if (PD_BIGORSMALL(output))</div>
<div> output = 0; </div>
<div> *out++ = ff1 * output + ff2 * last + ff3 *
prev;</div>
<div> prev = last;</div>
<div> last = output;</div>
<div> }</div>
<div><br>
</div>
<div>Well, I made a silly confusion mistake and thought the
first line was feedforward (and then equivalent to the
bp~). But still, it could be it for all I can tell. How
can you actually see wether is feedback or not?</div>
<div><br>
</div>
</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<div>Anyway, the patch works and I can also make it on
biquad, it's all attached.</div>
<div><br>
</div>
<div>> after all it's a resonating filter and therefore
needs a feedback path.</div>
</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<div><br>
</div>
<div>I wouldn't know about that, but that's how you
convinced me you knew what you were talking about :) </div>
<div><br>
</div>
<div>Thanks again</div>
</span></div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-04-11 16:46 GMT-03:00 volker böhm
<span dir="ltr"><<a href="mailto:vboehm@gmx.ch" target="_blank">vboehm@gmx.ch</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On 11.04.2014, at 16:48, Alexandre Torres Porres wrote:<br>
<br>
> ""last" and "prev" are the last two _output_ samples.<br>
> i don't know fexpr~ very well, but it looks like you
try to access the last _input_ samples."<br>
><br>
> In [fexpr~] you can access input samples with $x
variables and output samples with $y. So you're correct.
I'm going for the input samples.<br>
><br>
> But I did it because I believe "last" and "prev" in
this formula are in fact about input samples.<br>
<br>
<br>
</div>
no, and it's pretty easy to see that from the code you
quoted:<br>
<div><br>
> > t_sample output = *in++ + coef1 * last + coef2 *
prev;<br>
> ><br>
> > *out++ = gain * output;<br>
> ><br>
> > prev = last;<br>
> ><br>
> > last = output;<br>
<br>
<br>
</div>
after all it's a resonating filter and therefore needs a
feedback path.<br>
so it somehow has to take outgoing samples back in.<br>
<div><br>
<br>
> So I feel pretty strong about getting this [fexpr~]
right. Is there anything I did not take into
consideration?<br>
<br>
</div>
yes, calculate coef1, coef2 and gain by using the formulas
from the code,<br>
change the [fexpr~] to something like [ fexpr~ $x[0] + ($f2
* $y[-1]) + ($f3 * $y[-2]) ],<br>
(where $f2 and $f3 would be coef1 and coef2 resp.)<br>
apply the gain factor afterwards,<br>
and you are done.<br>
<span><font color="#888888"><br>
vb<br>
<br>
<br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><div class=""><pre>_______________________________________________
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
</div></blockquote>
<br>
</div>
</blockquote></div><br></div>