<div dir="auto">sorry, but I'm very curious. Using a resonance filter implies phase shifting right? (instead of using a non resonance linear phase filter) But this means that the tuning of the KS will be affected only near the resonance? i may not understand this fully, but I never thought about using resonance inside KS</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua., 27 de abr. de 2022 08:51, Claude Heiland-Allen <<a href="mailto:claude@mathr.co.uk">claude@mathr.co.uk</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alexandre,<br>
<br>
On 27/04/2022 06:01, Alexandre Torres Porres wrote:<br>
> hi list, I'm using a 2nd order lowpass resonant filter whose <br>
> coefficients I'm getting from the famous Eq-cookbook and using it <br>
> inside a feedback loop to implement karplus-strong.<br>
><br>
> I also have a coded object for that (pluck~) and the 'q' parameter is <br>
> 0.5, which is a "safe" setting, i.e. the filter doesn't get unstable <br>
> and blows up.<br>
<br>
The filter in isolation should be stable for any positive 'q', but its <br>
gain might get bigger than 1 making the larger feedback loop explode.<br>
<br>
You can do some additional gain reduction if increasing the q factor <br>
increases the peak gain of the filter and makes the feedback loop explode.<br>
<br>
> I was now trying to find a higher 'q' coefficient but it's hard to <br>
> know where I can go "exactly" just under it could blow up.<br>
<br>
You want the total gain in the feedback loop for all frequencies to be <br>
less than 1, i.e. peak (over frequencies) gain less than 1.<br>
<br>
> Is there an easy way to know this other than trial and error?<br>
The filter gain probably depends on cut-off frequency as well as q, so <br>
the filter peak gain is a function of 2 parameters.  Maybe gathering <br>
numerical data and surface-fitting a mathematical function could work, <br>
if the maths to do it analytically is too hard.<br>
<br>
If you modulate the filter parameters, it could still explode (the <br>
filter theory as per eq cookbook is only valid for fixed parameters, afaik).<br>
<br>
If you implement with insufficient accuracy inside the filter feedback <br>
(e.g. single precision floating point for 'y' in a biquad <br>
implementation), rounding errors can accumulate and can affect the <br>
actual gain (vs the theoretical gain you'd get from exact maths).<br>
<br>
<br>
Claude<br>
-- <br>
<a href="https://mathr.co.uk" rel="noreferrer noreferrer" target="_blank">https://mathr.co.uk</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank" rel="noreferrer">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div>