On Wed, 10 Aug 2016 15:26:27 GMT, eric.jacobsen@ieee.org (Eric
Jacobsen) wrote:
>On Wed, 10 Aug 2016 07:12:10 -0700 (PDT), mavavilj@student.jyu.fi
>wrote:
>
>>On Wednesday, 10 August 2016 14:53:32 UTC+3, Tauno Voipio wrote:
>>> On 10.8.16 10:31, Matti Viljamaa wrote:
>>> > On Tuesday, August 9, 2016 at 9:45:30 PM UTC+3, Tauno Voipio wrote:
>>> >> On 9.8.16 12:59, Matti Viljamaa wrote:
>>> >>> On Thursday, August 4, 2016 at 11:00:43 PM UTC+3, robert bristow-john>>son wrote:
>>> >>>> On Monday, August 1, 2016 at 4:28:51 AM UTC-4, Matti Viljamaa wrote:
>>> >>>>> On Thursday, July 21, 2016 at 9:54:24 PM UTC+3, robert bristow-john>>son wrote:
>>> >>>>>> On Monday, July 18, 2016 at 5:25:33 AM UTC-4, Matti Viljamaa wrote>>:
>>> >>>>>>> On Sunday, July 17, 2016 at 8:46:35 PM UTC+3, robert bristow-john>>son wrote:
>>> >>>>>>>> On Sunday, July 17, 2016 at 4:16:45 AM UTC-4, Matti Viljamaa wro>>te:
>>> >>>>>>>>> On Saturday, July 16, 2016 at 5:24:29 PM UTC+3, Eric Jacobsen w>>rote:
>>> >>>>>>>>>> On Sat, 16 Jul 2016 02:09:44 -0700 (PDT), Matti Viljamaa
>>> >>>>>>>>>> <viljamaadsp@gmail.com> wrote:
>>> >>>>>>>>>>
>>> >>>>>>>> ...
>>> >>>>>>>>>>
>>> >>>>>>>>>>> Currently I'm leaning towards simple allpass filter based "sw>>eepable" filter structures (e.g. this library https://github.com/vinniefalc>>o/DSPFilters has a sweepable 2nd order allpass), since controlling an dry/a>>llpass "mix" makes controlling the gain easy.
>>> >>>>>>>>>>
>>> >>>>>>>>>> Allpass filters tend to have flat frequency responses (hence t>>he
>>> >>>>>>>>>> name), and modify mainly the phase response. It sounds like >>that's
>>> >>>>>>>>>> not what you want.
>>> >>>>>>>>>
>>> >>>>>>>>> But it's already working. I can create a peak filter using a se>>cond order allpass by mixing it to the input using the equation:
>>> >>>>>>>>>
>>> >>>>>>>>> y = (x + A(x) + K * (x - A(x)) / 2
>>> >>>>>>>>>
>>> >>>>>>>>> where K is a gain factor.
>>> >>>>>>>>>
>>> >>>>>>>>> I believe allpasses can form all the other basic filter types a>>s well.
>>> >>>>>>>>
>>> >>>>>>>
>>> >>>>>>>> you can, with a little manipulation, turn those 5 direct form co>>efficients into 5 independent coefficients in the Lattice form. the APF fo>>rm you show will not have an adjustment for the gain at Nyquist, which you >>may want. take a look at this old paper:
>>> >>>>>>>> http://www.musicdsp.org/files/EQ-Coefficients.pdf .
>>> >>>>>>>>
>>> >>>>>>>
>>> >>>>>>> How do you know that the filter implementation I'm using does hav>>e that problem?
>>> >>>>>>
>>> >>>>>> read the paper. it's free. last section (Sec 5) before the Concl>>usion address exactly the APF formulation you mention above.
>>> >>>>>>
>>> >>>>>>> Also why is no gain adjusment at Nyquist a problem?
>>> >>>>>>
>>> >>>>>> it cramps the frequency response so that it does not well match th>>e analog prototype.
>>> >>>>>
>>> >>>>> Can you be more specific?
>>> >>>>>
>>> >>>>> Like how does it cramp?
>>> >>>>>
>>> >>>>
>>> >>>> bilinear transform has a frequency warping effect that makes the ban>>dwidth of the digital filter slightly smaller than the analog prototype it >>is based on.
>>> >>>>
>>> >>>> it becomes a bigger problem if the resonant frequency is set very hi>>gh, close to Nyquist.
>>> >>>>
>>> >>>>> In my tests of the construct I have not heard problems. Should they>> be heard? Or only heard at Nyquist (which I'm not really equalizing at, mo>>st of my equalization occurs below 16kHz)?
>>> >>>>
>>> >>>> if you're sampling at 44.1 kHz, 16 kHz is getting pretty close to Ny>>quist. you may need to adjust the bandwidth (make it larger) or the Q (mak>>e it smaller) so that the bandwidth comes out to what you originally intend>>.
>>> >>>>
>>> >>>> r b-j
>>> >>>
>>> >>> I'm still unsure about what the problem of "cramping" specifically is>>.
>>> >>>
>>> >>> Does this problem cause "warping" of the entire frequency spectrum?
>>> >>>
>>> >>> Or is the problem only that the digital filter doesn't match the anal>>og prototype?
>>> >>>
>>> >>> How is the problem audible?
>>> >>
>>> >>
>>> >> Matti, you should get a good textbook on digital signal processing.
>>> >> My favorite is Rick Lyons' Understanding Digital Signal Processing.
>>> >> The part on IIR filter design using the bilinear transform explains
>>> >> it better than the space allows here.
>>> >>
>>> >> What are you attempting to achieve at the end? Equalization, filtering
>>> >> or both? Match amplitude or amplitude and phase? Delay specifications?
>>> >>
>>> >> --
>>> >>
>>> >> -TV
>>> >
>>> > I just need a sweepable 2nd order allpass filter. My idea being to make>> "arbitrary shapes" using many of such cascaded. And the APF structure that>> I posted earlier is the only one I know for performing filtering using an >>allpass filter.
>>> >
>>> > And I actually have this working already. Until RBJ posed that the stru>>cture contains the above mentioned problem ("no gain at Nyquist"), which I'>>m now trying to clarify, whether it really is a problem.
>>> >
>>> > I don't know what other options I have if I want to perform "arbitrary >>shape" (and sweepable/tunable/dynamic) filtering in the simplest way possib>>le (for now).
>>> >
>>>
>>>
>>> I have a feeling thet you may be barking up the wrong tree.
>>>
>>> You have avoided all discussion about delay/phase behaviour, but
>>> an all-pass is just a phase twister. It cannot alone be the thing
>>> for arbitrary shape filter. My guess is that you have a certain
>>> implementation with all-passes in mind, but you have not wanted to
>>> tell what your aim really is, e.g. where the sweep/tune/dynamic
>>> input comes from and what will the final result be.
>>>
>>> --
>>>
>>> -TV
>>
>>I've chosen allpasses, because using the structure mentioned earlier it sho>>uld be able to make all filter shapes (band, shelf, LP, HP). And combining >>many of these should give me more complex shapes. It should be simple since>> I'd only use allpasses.
>
>The point is that an allpass is not frequency selective. It passes
>all frequencies equally, hence the name. It cannot, therefore, be
>used to create a filter that is frequency selective (i.e., attenuates
>some frequencies and not others).
>
>>What do you mean by delay/phase behaviour? I'm not that versed in filter de>>sign to know what specifying these means, but am (in this thread) trying to>> find an implementation that allows "arbitrary shape" and dynamic/tunable f>>iltering.
>
>And many people have given you a lot of good advice, but you are not
>taking it and not listening if you still want to use allpass
>structures. It has also been explained to you many times that
>"arbitrary shape" is not really possible and there will be limitations
>in what you can and cannot do.
>
>I would suggest going back to the beginnings of the threads you have
>started and re-read all of them.
>
>>I'm using a control signal to control the filter parameters that may as wel>>l be from parameters given to the user, like in a typical parametric equali>>zer.
>
>
>
>I tried to respond to mavavilj and Randy's post, but there was some
>sort of a problem with the header, (441 error, header too long) so
>I'll say it here:
>
>It's pretty fundamental that you can cancel signals with an opposite
>phase, which is how multipath channels get frequency selective, too,
>even when all the paths are all-pass.
>
>But in filter design when you say:
>
>"What do you mean by delay/phase behaviour? I'm not that versed in
>filter design to know what specifying these means, but am (in this
>thread) trying to find an implementation that allows "arbitrary shape"
>and dynamic/tunable filtering."
>
>you're not going to get very far with all-pass structures.
>
>My wording was too absolute, though.
Once again, I can't respond directly to malaviij post because of Error
441 Header Line Too Long. So when he asked for elaboration, this is
my response:
Creating frequency selectivity with all-pass structures requires
careful coordination of the phase output characteristic of each
filter, because an all-pass filter is really just a phase modifier.
If you don't understand delay/phase behavior, you won't be able to do
anything with all-pass structures.