[music-dsp] Re: A Collection of C++ Classes for Digital Signal
thevinn at yahoo.com
Sun May 3 10:07:01 EDT 2009
> From: Andrew Capon <andrew.capon at zen.co.uk>
> I could give you some help with an OS X
> build if you fancy.
That would be great. Hopefully it will all work without change but if I need to modify anything just let me know. I would love to make sure this works on as many compilers and systems as possible. I am fairly confident that the actual algorithms should work fine. Although I think I did make some assumptions that the underlying floating point representation is IEEE compliant.
> I think you need examples of use as templates can confuse many!
I agree! Thanks for pointing this out, I totally forgot. I just uploaded a new version of the code with an example function at the bottom of the header, its called FilteringExample(). Let me know if I need to provide more examples (I think I covered everything).
> From: "Didier Dambrin" <didid at skynet.be>
> are you saying you did the same for cascaded biquads
> in layers lagging each by 1 sample
The CascadeFilter class implements an abitrary order IIR filter by using a series cascade of second order stages. Each channel's stage maintains its own history but the coefficients for a stage are shared between channels. There is no "lag" other than that expected phase response from a filter of that type and order.
Note that for the case where the underlying data is in a smaller floating point representation than the type used for calculation, the optimized results will be slightly different than the unoptimized. That is because the data is processed in a different order, with intermediate stage results getting written back into the destination instead of carried through in the calculation type.
> Btw, which SSE3 instruction(s) did you find useful here?
This was my first ever SSE3 code (and the first assembly in quite a long time) so it is possible that it could be improved. The one SSE3 instruction that I needed was _mm_hadd_pd(). The rest use the SSE2 instruction set.
If anyone wants to show me how I could do it better, with fewer registers, or without the need for SSE3 instructions (does that even matter?), or tell me why I should be using more SSE3 instructions, or anything whatsoever, I'm all ears.
More information about the music-dsp