Re: low-pass and high-pass filter.
Re: low-pass and high-pass filter.
- Subject: Re: low-pass and high-pass filter.
- From: Nigel Redmon <email@hidden>
- Date: Sat, 24 Dec 2016 18:19:57 +0700
Brian, I think you rushed to judgment...I said "that vDSP function"—not my job to find him another vDSP function, but I did tell him why it might not be best, so the OP could do that himself.
You misunderstood my performance/optimization comments. The purpose of vDSP is clearly optimization, which I noted was not an issue here. The inline comment was an aside, as a comparison to vDSP, but again I noted it only mattered in situations where performance was an issue—not this case. And not that it matters because I pointed him to existing code—clearly I did not expecting him to be coding and debugging such code, as you implied.
I also have the bias that I want at least the option of building a Windows version, so the vDSP solution looks especially bad to me for such a trivial thing as a biquad. The OP can pick his poison, but he already said he was looking at the vDSP solution and saying he expected the implementation to be challenging. I don't know if he was referring to the complicated calling convention or not, but it looks confusing to me. ;-)
> On Dec 24, 2016, at 2:16 PM, Brian Willoughby <email@hidden> wrote:
>
> In response to the first complaint, the vDSP_biquadD() function is double precision. If vDSP_biquad() is inadequate due to its single precision, then substituting vDSP_biquadD() is rather trivial.
>
> In response to the second complaint; the OP has already identified as a novice, so writing and debugging inline code will be much more challenging than using Apple's tested version. I'm sure there are a few programmers who can produce a better implementation than Apple, but why worry about optimization when it's not yet proven to be an issue? At the very least, start with Apple's vDSP_biquadD() and then benchmark it against inline code.
>
> Brian Willoughby
>
>
>> On Dec 23, 2016, at 8:49 PM, Nigel Redmon <email@hidden> wrote:
>> I'd skip using that vDSP function, personally. First, it's single precision. If it's a direct form II transposed implementation, it's probably adequate for most cases (but you're cascading four...possibly noise issues at low frequency settings, I guess still ok). Second, I don't think you're going to see a big performance improvement in a vectored IIR, in typical use cases. So I'd be running a plain-ol' inline IIR with doubles.
>>
>> The IIR implementation itself is trivial, and very fast as an inline (otherwise the function call overhead is disproportionate, if performance is an issue). Calculating the coefficients takes a little more knowledge, but you can either use my coefficient calculator (for fixed filters), or the C++ code on my site or elsewhere to calc at runtime.
>>
>> Nigel
>>
>>> On Dec 24, 2016, at 5:29 AM, Waverly Edwards <email@hidden> wrote:
>>> Nigel Redmon wrote:
>>>>> Maybe this will help? Use four biquads, each set to the same frequency, but with Q set as indicated by the calculator:
>>>>> http://www.earlevel.com/main/2016/09/29/cascading-filters/
>>>
>>> Evan Balster wrote:
>>>>> It took me a while to get my head around digital filter design algorithms.
>>>>> You'll need to do the following steps, which I recommend you research individually:
>>>
>>> Both of these are EXCELLENT resources. I’ve been looking into the cascading filters options that was suggested and I’ll work on implementing that, if I understand it correctly.
>>> I will also look into the C++ library that was recommended as well.
>>>
>>> In the process of researching what both of you said, I also found references to vDSP_biquad. https://developer.apple.com/reference/accelerate/1450838-vdsp_biquad
>>> It sounds like a great way to go but I just have a very surface level understanding so implementation will be challenging.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden