|
|||
Urs wrote: Caco wrote: Urs wrote: Caco wrote: Another fun property of all this is that the more you oversample then the fewer iterations you need to do so oversampling ends up being really cheap
Unless your prediction comes up with a correct initial guess most of the time Cool, at the moment I average around four iterations at most filter settings but the iterations creeps up quite a bit at extreme resonance and cutoffs though. Yes, high resonance becomes a cpu killer. But take an example: In a synthesizer you actually know what's going into the filter (oscillator waveforms, white noise etc.). And once the filter goes into selfoscillation you also know what's happening. So you can take these cases into account when preparing your initial guess. I hadn't thought of it that way. So far I have been using the filter in effects rather than in a synth so I cannot predict what the input looks like in advance. I suppose when I am in self-oscillation I can start to build up a good idea of what the output should look like to help shape my initial guess better |
|||
| ^ | Joined: 25 Apr 2005 Member: #66287 | ||
|
|||
Yeah, that's one of the reasons why we haven't done any audio inputs yet... it may fry cpus even more |
|||
| ^ | Joined: 07 Aug 2002 Member: #3542 Location: Berlin | ||
|
|||
Urs wrote: Hmmm... in contrast to my earlier beliefs, I'd say that a basic LPF doesn't have a feedback. It has a state. Hi Urs!
I'd rather argue that point and say that a basic 1-pole LPF does have a negative feedback around an integrator. I wonder what makes you say otherwise? Regards, {Z} |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Z1202 wrote: Urs wrote: Hmmm... in contrast to my earlier beliefs, I'd say that a basic LPF doesn't have a feedback. It has a state. Hi Urs!
I'd rather argue that point and say that a basic 1-pole LPF does have a negative feedback around an integrator. I wonder what makes you say otherwise? Yes, but that's just one way to conceptualize it. As long as the one-pole filter has no non-linearities, you can assume it's free of that feedback and use most standard formulas without loss of quality. Then again, everything that has a "z" in the denominator of it's transfer-function has 'feedback' in one way or the other. Doesn't always mean that we have to model it that way! Cheers, - Clemens |
|||
| ^ | Joined: 20 Aug 2010 Member: #237880 | ||
|
|||
cheppner wrote: Z1202 wrote: Urs wrote: Hmmm... in contrast to my earlier beliefs, I'd say that a basic LPF doesn't have a feedback. It has a state. Hi Urs!
I'd rather argue that point and say that a basic 1-pole LPF does have a negative feedback around an integrator. I wonder what makes you say otherwise? Yes, but that's just one way to conceptualize it. As long as the one-pole filter has no non-linearities, you can assume it's free of that feedback and use most standard formulas without loss of quality. Then again, everything that has a "z" in the denominator of it's transfer-function has 'feedback' in one way or the other. Doesn't always mean that we have to model it that way! Cheers, - Clemens |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Z1202 wrote: cheppner wrote: Yes, but that's just one way to conceptualize it. As long as the one-pole filter has no non-linearities, you can assume it's free of that feedback and use most standard formulas without loss of quality. This is not fully correct. You get a somewhat different time-varying behavior if you don't preserve the analog topology. In some cases it gets critical.Can you give an example where this is visible in the linear case? Cheers, - Clemens |
|||
| ^ | Joined: 20 Aug 2010 Member: #237880 | ||
|
|||
cheppner wrote: Z1202 wrote: cheppner wrote: Yes, but that's just one way to conceptualize it. As long as the one-pole filter has no non-linearities, you can assume it's free of that feedback and use most standard formulas without loss of quality. This is not fully correct. You get a somewhat different time-varying behavior if you don't preserve the analog topology. In some cases it gets critical.Can you give an example where this is visible in the linear case? Cheers, - Clemens You probably could also try analyse this the other way round, applying a TPT conversion from discrete time to continuous time to the DF filters. I guess the inverse BLT will correspond to approximating z^-1 by an allpass, although I'm not sure. Then, particularly, you can check whether there are any cutoff-dependent gain factors directly connected to the output (without an integrator in between). A simplest possible example demonstrating the importance of topology in the linear time-varying cases is probably a serial connection of a gain and an integrator. Depending on the order of connection, you obviously get different results when modulating the gain. In theoretical terms, the standard analog-to-digital conversion techniques are developed for LTI filters. Nonlinear filters are obviously not LTI, but neither are linear filters in the time-varying case. Thus, a transfer function only gives you information about an LTI system's behavior. In linear time-varying cases you rather need to compare their state-space representations. Regards, {Z} |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Z1202 wrote: cheppner wrote: Z1202 wrote: Urs wrote: Hmmm... in contrast to my earlier beliefs, I'd say that a basic LPF doesn't have a feedback. It has a state. Hi Urs!
I'd rather argue that point and say that a basic 1-pole LPF does have a negative feedback around an integrator. I wonder what makes you say otherwise? Yes, but that's just one way to conceptualize it. As long as the one-pole filter has no non-linearities, you can assume it's free of that feedback and use most standard formulas without loss of quality. Then again, everything that has a "z" in the denominator of it's transfer-function has 'feedback' in one way or the other. Doesn't always mean that we have to model it that way! Cheers, - Clemens Regards, {Z} |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Hi Z1202,
yes I wasn't sure about these things after your comment and I did some analysis of simple RC-lowpass filters. It came out that if you choose the capacitor to be time variable and set the node equation to V = integrate( I/capacitance ) it does result in an equation where the multiplication needs to be _before_ the integrator (which intuitively makes sense). Nevertheless, you can make a simple formula out of that in the linear case even for a bilinear integrator. Didn't have the time right now to write that up but maybe later I will. Cheers, - Clemens |
|||
| ^ | Joined: 20 Aug 2010 Member: #237880 | ||
|
|||
cheppner wrote: It came out that if you choose the capacitor to be time variable You mean "state variable", right? What else would you choose as a state variable??? Capacitor is the only thing in there which has a state and that state is the capacitor charge, which in case of constant capacitance is equivalent to capacitor voltage being the state.
Quote: it does result in an equation where the multiplication needs to be _before_ the integrator (which intuitively makes sense). Of course, because the result is smoother then than otherwise Quote: Nevertheless, you can make a simple formula out of that in the linear case even for a bilinear integrator. Not sure what you're referring to here.
Regards, {Z} |
|||
| ^ | Joined: 11 Apr 2002 Member: #2472 | ||
|
|||
Z1202 wrote: cheppner wrote: It came out that if you choose the capacitor to be time variable You mean "state variable", right? What else would you choose as a state variable???Of course you need a state variable inside the integrator. What I was referring to was the actual RC-circuit: in ---- R ------ out | = C | ------------------ (gnd) If you vary the capacitance of the capacitor to adjust the cutoff frequency, you get a filter where the multiplication must be before the integrator. (edit: wrong:) If you would vary the resistance instead, you would have the non-smooth filter you've described with the multiplication afterwards. This is not a circuit that would be used for a VCF. I just picket it for simplicity. Active filters with opamps etc. are an open question to me. edit: This part is not correct... Simply a mistakt in my maths: What I found interesting is that varying the resistance does not give the smooth solution - which posts the question if there are some VCF circuits with that non-smooth behaviour Cheers, - Clemens Last edited by cheppner on Tue May 01, 2012 12:29 am; edited 1 time in total |
|||
| ^ | Joined: 20 Aug 2010 Member: #237880 | ||
|
|||
I'm not convinced that it makes any difference what the exactly topology of one-poles (leaky or not) happens to be, or even what transform you use for s-to-z.
As far as I can see, the only thing that's really relevant is that you maintain your state independent of cutoff (ie you can take the state only, and treat it as a "voltage" without knowing what the cutoff happens to be). edit (since I guess the above might not have been entirely clear): basically, in the time-invariant case it doesn't matter whether values are scaled during this sample or the next (or equivalently before or after storing the state variables) as long as the result is the same; the scalar multipliers are constant so one can combine and re-order them as desired, typically to minimize the work-load.. but in the time-variant case this is no longer safe because the scalars are no longer scalars For example, one can modify DF2 to be safe for time-variance (and assuming BLT low-pass just to have one less coeff), starting with the usual (input x, output y, state s): s[n] = x[n] - a*s[n-1] y[n] = b * (s[n] + s[n-1]) Modify by making the state independent of cutoff (ie get rid of b in the zeroes): s[n] = b*x[n] - a*s[n-1] y[n] = s[n] + s[n-1] The LTI response is the same, but since we scale on input, the gain of the state-variable doesn't depend on cutoff anymore; if we have the signal s[n], we can construct y[n] without knowing what the coefficients were. I'm proposing that this is the only condition that one needs to have a "nice" time-variant behavior [edit2: of a single one-pole section at least]. |
|||
| ^ | Joined: 11 Feb 2006 Member: #97939 Location: Helsinki, Finland | ||
|
|||
that is how you build a vcf, actually.
this whole issue is the difference between a*x + b*x vs. x(a + b). |
|||
| ^ | Joined: 07 Dec 2004 Member: #50793 | ||
|
|||
Btw:
out = buf + f * in buf = out + f * in transformed "delay-less" (as per neotec, just simplified): tmp = (in - buf) / (1 + f) out = buf + f * tmp buf = out + f * tmp it turns out the last line can be rewritten simply as: buf += 2*f * ( in - out ) Sorry if someone mentioned that already... ... could be useful for some things ... |
|||
| ^ | Joined: 11 Feb 2006 Member: #97939 Location: Helsinki, Finland | ||
|
|||
mystran wrote: basically, in the time-invariant case it doesn't matter whether values are scaled during this sample or the next (or equivalently before or after storing the state variables) as long as the result is the same; the scalar multipliers are constant so one can combine and re-order them as desired, typically to minimize the work-load.. but in the time-variant case this is no longer safe because the scalars are no longer scalars
Yes! Quote: For example, one can modify DF2 to be safe for time-variance (and assuming BLT low-pass just to have one less coeff), starting with the usual (input x, output y, state s):
s[n] = x[n] - a*s[n-1] y[n] = b * (s[n] + s[n-1]) Modify by making the state independent of cutoff (ie get rid of b in the zeroes): s[n] = b*x[n] - a*s[n-1] y[n] = s[n] + s[n-1] Yes, but this is kind of do-it-wrong-first and then repair the integrator. The question really should be, in my opinion, how did we get to the formular of the wrong integrator at first and how can we avoid that? My proposal is: Via analog circuit transformation WITHOUT assuming that the control-signal was time-independent at all! Quote: I'm proposing that this is the only condition that one needs to have a "nice" time-variant behavior [edit2: of a single one-pole section at least].
Yeah, but what if your filter circuit doesn't sound like it? I mean, we might get a nice AM-like effect with audio-rate modulations if we use the 'dirty' implementation. Or we can get a mixture by multiplying with sqrt(b) before and after! Cheers - Clemens |
|||
| ^ | Joined: 20 Aug 2010 Member: #237880 |
| KVR Forum Index » DSP and Plug-in Development | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group







