0

I'm adding some equalizers to my app using the AKEqualizerFilter from AudioKit and I just want to make sure I understand how the bandwidth parameter affects the Q-factor. As far as I understand it, dividing the center frequency by the bandwidth will give me the Q-factor. So if the center frequency is 50 and the bandwidth is 50, the Q-factor is 1, and if the bandwidth is 25, then the Q-factor is 2. Is my understanding of this correct?

lxirsh
  • 93
  • 8
  • SO is a programming Q&A platform and this question is not about programming. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) – Rob Jul 28 '21 at 21:51

1 Answers1

1

That's a good question! I think it's best to check the implementation here ( https://github.com/AudioKit/AudioKit/blob/master/AudioKit/Common/Nodes/Effects/Filters/Equalizer%20Filter/AKEqualizerFilter.swift )

/// A 2nd order tunable equalization filter that provides a peak/notch filter
/// for building parametric/graphic equalizers. With gain above 1, there will be
/// a peak at the center frequency with a width dependent on bandwidth. If gain
/// is less than 1, a notch is formed around the center frequency.
punkbit
  • 7,347
  • 10
  • 55
  • 89
  • Yeah, I've checked the documentation. There's just no clarification on what exactly the bandwidth parameter is for. I'm assuming it describes the length of the bandwidth affected by increasing or decreasing the gain. So, like in my example, with a center frequency of 50 and the bandwidth set to 50, the upper and lower bounds of the affected bandwidth would be 81 and 31 respectively. So, a smaller bandwidth will give a bigger Q-factor and a larger bandwidth will give a smaller Q-factor. That would make sense to me anyway. – lxirsh May 22 '20 at 17:20
  • I should have said the upper and lower bounds of the affected bandwidth would be 25 and 75 respectively. – lxirsh May 22 '20 at 18:28
  • The link I've shared is not the documentation, if you spare a minute, you can see how the computation is performed and the related processes, which will provide you with an answer – punkbit May 22 '20 at 19:12
  • 1
    Ah, thanks. It was right in front of my eyes, I just didn't see it. – lxirsh May 23 '20 at 05:35
  • No problem, happy to help :) – punkbit May 23 '20 at 11:19