s quite easy to show that mixing a 1p1z lpf with the input produces a shelf. The coefficients for a lpf are: 0.5(1 + a)(z + 1) / (z + a). Divide by z to get the more conventional form. At dc, z = 1, so dc gain is 1. At nyquist, z = -1, so gain is 0. If we mix in the input by doing this: Y = k.X + (1-k).H.X Where H is the lpf transfer function above. Which can be rearranged to: Y/X = (k(z+a) + 0.5(1-k)(1+z)(1+a)) / (z+a) Now, you still get a dc gain of 1, but now your nyquist gain is k, giving you a shelving filter.
Ian On Wednesday, December 13, 2023, brianw <[email protected]> wrote: > Hi Stefano, What you describe seems neither intuitive nor correct. Mixing > a scaled amount of the input, which is presumably flat in response, with a > lowpass in parallel would still produce a falling amplitude with rising > frequency. Intuitively, > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > This message came from outside your organization. > > ZjQcmQRYFpfptBannerEnd > > Hi Stefano, > > What you describe seems neither intuitive nor correct. > > Mixing a scaled amount of the input, which is presumably flat in response, > with a lowpass in parallel would still produce a falling amplitude with > rising frequency. Intuitively, I am assuming no phase shift that would cause > constructive or destructive interference between the parallel audio paths. > Adding two copies of a signal, each of different amplitudes at different > frequencies, still results in an output amplitude that is relative to both > inputs. i.e. The output would not be flat above the cutoff unless both > signals are flat in the frequency range above the cutoff. > > Even if there would be a convenient phase shift that would somehow maintain a > flat response above the high shelf cutoff, it's certainly not intuitive that > the specific phase shift required would be automatic. When phase shift is > introduced by accident, it's often vastly different than expected. > > I will seek out the texts referenced by the other responses to this thread. > > Brian > > > On Nov 26, 2023, at 1:31 AM, Stefano D'Angelo wrote: > > Hello, > > > > Intuitively (I hope) you could simply think of a low shelving filter as a > > parallel of a lowpass + a scaled amount of the input, and conversely of a > > high shelving filter as a parallel of an highpass + a scaled amount of the > > input. > > > > E.g., in case of a low shelving whose output = (1 - k) * lowpass output + k > > * input, with 0 < k < 1, at DC you have gain = 1 and at freq=infty you have > > gain = k. (Actually, you have to scale the lowpass/highpass too if you want > > gain=1 at DC or infinity). > > > > Cheers, > > > > Stefano > > > > Il 26/11/23 07:32, brianw ha scritto: > >> Can anyone explain how a shelving filter is able to maintain a flat > >> frequency response both above and below its center frequency? > >> > >> I have a sense of first-order low-pass filters that have analogs in the > >> physical world - it somehow makes sense that the frequency response > >> continues to drop off as the frequency increases above the cutoff. > >> However, while a high shelving filter has a similar drop in frequency > >> response just above its cutoff, eventually the response levels off and > >> remains flat as frequency increases. For example, a high shelf set for -10 > >> dB would have a 0 dB response for frequencies significantly below the > >> cutoff, a transition around the cutoff with first order response, and then > >> once the response reaches -10 dB for high frequencies, the response > >> remains at -10 dB as frequency increases. > >> > >> I'm trying to understand how this is possible. The Wikipedia article for > >> audio EQ has a section that seems to hint at how this is achieved. > >> > >> https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Equalization-5F-28audio-29-23Shelving-5Ffilter&d=DwIFAg&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=TRvFbpof3kTa2q5hdjI2hccynPix7hNL2n0I6DmlDy0&m=upGIdDKIRsFXJZNFq2HDaJZ3o2g4X_MUDEt6vyMkQUWMkMzq2MaNL8TGk2mG7h3U&s=GWUlmLkjr9OLMrPKS-R0jAEZJ5TrrXSRi1VVGxm20Dc&e= > >> <https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Equalization-5F-28audio-29-23Shelving-5Ffilter&d=DwIFAg&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=TRvFbpof3kTa2q5hdjI2hccynPix7hNL2n0I6DmlDy0&m=upGIdDKIRsFXJZNFq2HDaJZ3o2g4X_MUDEt6vyMkQUWMkMzq2MaNL8TGk2mG7h3U&s=GWUlmLkjr9OLMrPKS-R0jAEZJ5TrrXSRi1VVGxm20Dc&e=%3E%3E> > >> This section mentions that there is both a pole and a zero in a shelving > >> filter. Is that how the response becomes flat in that region? Is it > >> because the first-order slopes of both the pole and zero add together and > >> end up being flat as frequency increases, albeit at a loss of 10 dB in the > >> example above? > >> > >> By the way, I tried to search the internet for an answer, but 99% of the > >> hits are articles about how to use a shelving filter, or what it does, but > >> none on how it does it. The remaining 1% of the articles are about the > >> detailed mathematical transfer functions for shelving filters, without any > >> simple overview of how they work, or what they're doing mathematically at > >> a high level rather than formula level. > >> > >> Thanks for any insight, > >> > >> Brian Willoughby > > > > >
