Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-28 Thread vadim.zavalishin
robert bristow-johnson писал 2016-03-28 23:31: This statement implies the LTI case, where the concept of the transfer function exists. i didn't say that. i said "applying ... to the same integrator." about each individual "transfer function" that looks like "s^(-1)" You were talking about

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-28 Thread vadim.zavalishin
I don't know much about these yet -- but your book is on my list to read in the near future! This stuff is actually simpler than what you're trying to do. So I'm not sure, what are you waiting for ;) robert bristow-johnson писал 2016-03-28 17:57: using the trapezoid rule to

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-28 Thread robert bristow-johnson
Original Message Subject: Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state? From: "Ethan Fenn" <et...@polyspectral.com> Date: Mon, March 28, 2016 11:43 a

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-28 Thread Ethan Fenn
Hi Vadim, IIRC, the problem with this form (as with Jordan normal form in principle) > is that it gets ill-conditioned when the poles get close to each other > (upon the first look I'm not sure where this ill-conditioning appears in > your formulas, though, so I might be wrong there, or there

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-28 Thread vadim.zavalishin
Ethan Fenn писал 2016-03-25 20:57: oscillator. The update step looks like this: y := p + b0*x p := -(a1/2)*p + (sigma/2)*q + (b1 - a1*b0)*x q := -(sigma/2)*p - (a1/2)*q + (1/sigma)*(2*b2 - 2*a2*b0 - a1*b1 + a1^2*b0)*x Is there a name for this kind of representation? This looks like a

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-25 Thread Ethan Fenn
So the idea I mentioned earlier in this thread about matching signal value and derivative didn't really turn out to make much sense when I tried it out. But I did hit upon a topology that seems interesting. By changing the basis of the state space and computing some new coefficients, a biquad can

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread Tom O'Hara
4. the only problem with the filter cross-fade scheme is knowing how long to wait before you can ping-pong back to the other filter. it's like you have two filters running simultaneously on the same input with ostensibly the same coefficients (most of the time) so their outputs should be

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread robert bristow-johnson
On 3/3/16 7:46 PM, Stefan Sullivan wrote: I looked into this exact issue a little while ago. I found that my filters sounded better/worse depending on the biquad topology. Basically if your gaining your input going into states, then those states are more likely to be very far off from where

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread Stefan Sullivan
I looked into this exact issue a little while ago. I found that my filters sounded better/worse depending on the biquad topology. Basically if your gaining your input going into states, then those states are more likely to be very far off from where they should be when you change the parameters.

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread robert bristow-johnson
On 3/3/16 7:23 PM, robert bristow-johnson wrote: 6. another form to consider is the Lattice or, if you're doing it in fixed-point, the Normalized Ladder form. these are all second-order so they all have the same transfer function and you can calculate coefficients as a function of Cookbook

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread robert bristow-johnson
so i read Jean Laroche's paper in the previous decade and i forget what the takeaway was from it besides i thought he had a good model for describing the non-TI in the LTI. had to do with calculation of the states in a way that made an equivalent filter but with possibly unstable

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread Ethan Fenn
> > I'm not sure quite how this would work for discrete time? Is the idea to > interpret them as continuous-time filters for the purposes of the state > update? I wasn't really thinking about them as continuous-time filters, but considering the output as a continuous-time signal. Specifically,

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread Ethan Duni
Yeah zeroing out the state is going to lead to a transient, since the filter has to ring up. If you want to go that route, one possibility is to use two filters in parallel: one that keeps the old state/coeffs but gets zero input, and another that has zero state and gets the new input/coeffs. You

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-03 Thread Ethan Fenn
As a simple fix, I would also try just leaving the state alone rather than zeroing it out. I've done this plenty of times before and it's always sounded okay for moderate/gradual changes of the coefficients. As for doing it "correctly" -- I haven't read up on this but my thinking would go like

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-02 Thread Theo Verelst
Paul Stoffregen wrote: Does anyone have any suggestions or publications or references to best practices for what to do with the state variables of a biquad filter when changing the coefficients? ... I am not directly familiar with the programming of the particular biquad filter variation,

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread Phil Burk
I use biquads in JSyn. The coefficients are calculated using RBJ's excellent biquad cookbook from the music-dsp archives. I have found that I can recalculate and update the filter coefficients on the fly without unpleasant artifacts. I do NOT zero out or modify the internal state variables. I

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread Laurent de Soras
Paul Stoffregen wrote: Does anyone have any suggestions or publications or references to best practices for what to do with the state variables of a biquad filter when changing the coefficients? Use an implementation designed to handle nicely coefficient changes. For example the trapezoidal

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread Bjorn Roche
This is a common and well-researched problem. The two solutions are usually: 1. cross-fade between two filter settings (this actually works reasonably well) 2. use a filter architecture that is guaranteed to be stable for intermediate states. (e.g., I believe lattice filters have this property,

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread Ivan Cohen
Have a look also for the book "the art of virtual analog filter design" by Vadim Zavalishin. It provides a new structure for simulating state variable filters especially suited for time varying cases. Ivan MusicalEntropy.com Blog

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread pdowling
yes - don’t use biquads :-) On 1 Mar 2016, at 14:56, Paul Stoffregen wrote: > Does anyone have any suggestions or publications or references to best > practices for what to do with the state variables of a biquad filter when > changing the coefficients? > > For a bit of

Re: [music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread Giulio Moro
,”in Proceedings of the 17th International Conference on DigitalAudio Effects (DAFx-14), 2014, pp. 69–76. From: Paul Stoffregen <p...@pjrc.com> To: music-dsp@music.columbia.edu Sent: Tuesday, 1 March 2016, 14:56 Subject: [music-dsp] Changing Biquad filter coefficients on-the-fl

[music-dsp] Changing Biquad filter coefficients on-the-fly, how to handle filter state?

2016-03-01 Thread Paul Stoffregen
Does anyone have any suggestions or publications or references to best practices for what to do with the state variables of a biquad filter when changing the coefficients? For a bit of background, I implement a Biquad Direct Form 1 filter in this audio library. It works well.