A Collection of Useful C++ Classes for Signal Processing

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

The easiest way to make the band shelf from a band pass is to use the dry/wet filter. This way you can balance between the dry and the filtered signal to get the shelf...
It still leaves the matter of the less stable form of the IIR computation for varying parameters.

Post

Miles1981 wrote:The easiest way to make the band shelf from a band pass is to use the dry/wet filter. This way you can balance between the dry and the filtered signal to get the shelf...
It still leaves the matter of the less stable form of the IIR computation for varying parameters.
Does that not create different type of phasing than an algorithmic bandshelf? The bandpass surely leaks some freqs around the center freq.
Last edited by soundmodel on Wed Jul 22, 2015 4:19 pm, edited 1 time in total.

Post

double post

Post

Fluky wrote:Does that not create different type of phasing than an algorithmic bandshelf? The bandpass surely leaks some freqs around the center freq.
What do you mean by leak frequencies ? (I guess I should start a new thread for ATK instead...)
The bandshelf design is done exactly like that anyway (Hbs(z) = alpha + (1-alpha)*Hbp(z)).

Post

Miles1981 wrote:
Fluky wrote:Does that not create different type of phasing than an algorithmic bandshelf? The bandpass surely leaks some freqs around the center freq.
What do you mean by leak frequencies ? (I guess I should start a new thread for ATK instead...)
The bandshelf design is done exactly like that anyway (Hbs(z) = alpha + (1-alpha)*Hbp(z)).
Well e.g. that the shape of the so called bandshelf is different than that of the bandpass. Then one cannot match them. It's hard to tell what the shapes are because there are no pictures.

Sure Hbs(z) is a type of bandshelf, but are all bandshelves done like that?

Post

In that case I would need to see the way it is created from the low pass filter...
I guess that's the easiest way to build a band shelf filter. Another way of creating them is with an allpass filter that dephases to 180° where it has to be filtered (so more or less 2 second order all pass filters, each of them set to one of the band pass extremes), and then you apply the same dry/wet thingy. It's just that I don't have an all pass design for Butterworth filters, and even less so for this kind of specific phase changes :/

Post

Miles1981 wrote:In that case I would need to see the way it is created from the low pass filter...
I guess that's the easiest way to build a band shelf filter. Another way of creating them is with an allpass filter that dephases to 180° where it has to be filtered (so more or less 2 second order all pass filters, each of them set to one of the band pass extremes), and then you apply the same dry/wet thingy. It's just that I don't have an all pass design for Butterworth filters, and even less so for this kind of specific phase changes :/
Does the bandshelf using dry/wet mixing correspond directly to the dB values or the gain?
That is, does +6dB peak at 1kHz using the bandshelf correspond to mixing in the bandpassed signal at a level +6dB higher than the dry signal?

Post

Sorry, I was confused between the band stop and the band pass... The dry/wet is adequate for shelving with a negative gain between the original signal and the band stop, but not for a positive gain. In that case, it is perhaps easier to use the band pass and just a volume to add or remove the bandwidth you want. I don't remember if the bandpass transform gives a filter with 0 phase in the bandwidth...
I used the transforms from scipy for all the filters, I don't think there was a band shelf with them, I don't think they added one :/

Post

Miles1981 wrote:Sorry, I was confused between the band stop and the band pass... The dry/wet is adequate for shelving with a negative gain between the original signal and the band stop, but not for a positive gain. In that case, it is perhaps easier to use the band pass and just a volume to add or remove the bandwidth you want. I don't remember if the bandpass transform gives a filter with 0 phase in the bandwidth...
I used the transforms from scipy for all the filters, I don't think there was a band shelf with them, I don't think they added one :/
One cannot necessarily create a peak eq from the bandpass as the dry and wet signals must e.g. match in phase in order to not create phasing in other frequencies. Therefore I think that the bandshelf eq must be more complicated than merely mixing dry and wet (bandpassed) signals.

Post

Yes, this is why I need to check the phase on the bandpass I'm generating :/

Post

Tried it, the phase is not consistent, so I'll need another transform instead... I'll have to look for one.

Post

Fluky wrote:
Fluky wrote:Dsp::Filter * f = new Dsp::SmoothedFilterDesign<Dsp::Bessel::Design::BandShelf <1>, 2, Dsp::DirectFormII>(1024);

Produces error:
error C2039: 'getKind' : is not a member of 'Dsp::Butterworth::BandShelf<1>

What's wrong?
Help.
So I noticed by trying other filters that the getKind error was suddenly also in other filters that had worked in the past. So I thought I'd recompile the library.

Suddenly also Dsp::Bessel::Design::BandShelf works. No idea how it (the .lib) got broken, but it did.

Post

I'm not at all certain what you are looking for, fluky. If you want shelving and peaking filters for EQ, rbj filters are easy and work pretty good. In his equations, just look for the shelving and peaking instances.

They work pretty consistent with what one would expect from analog, except in the top couple of octaves. They work fine up there as well, but diverge from what one would expect from analog. To get better conformance to analog expectations in high freqs, you could oversample your EQ.

Or find different and maybe better methods. But the rbj stuff is quite well behaved and easy.

Because digital filters do not build up appreciable noise, if for instance you want a 5 band parametric with a low shelf, high shelf, and three bell peak/dip bands, just instantiate the 5 filters and run the audio thru them in series. No appreciable phase cancellations between bands from mixing parallel out of phase copies of the audio.

Post

Anyone know if the process function of the filters can be iterated?
So one could apply it per sample while varying some parameters over the audio block (e.g. 1024 samples).

Post

Fluky wrote:Anyone know if the process function of the filters can be iterated?
So one could apply it per sample while varying some parameters over the audio block (e.g. 1024 samples).
Can you explain what it is you are trying to accomplish? Applying a filter per sample makes no sense to me and I don't believe you can get anything you would want to listen to that way.

A single sample point is meaningless. It describes nothing more than an amplitude. It is the transition of the amplitude over time that makes a signal. Filters keep an internal history. That history buffer is unique to that filter type and all the parameters that went into creating it. That is why there is no way to instantly transfer from one filter type to another. This is why the smoothing filters require a transition size, defaulted to 1024, to smoothly transition from one filter to another.

The best you could possibly do, is reprocess the audio for the second filter, adjust both filters to compensate for the time shift each introduced so both buffers are in perfect sync and then crossfade. You still aren't going to transition on a dime and get results that don't introduce hideous artifacts.

Post Reply

Return to “DSP and Plugin Development”