Page 2 of 3
Re: Oversampling Toolkit (Revisited)
Posted: Sun Dec 21, 2014 8:42 pm
by MyCo
Jesus... how couldn't I see that. It would definetely make a difference on higher order version. On the Order 12 version it would save 12 multiplication each for up/downsampling.
Re: Oversampling Toolkit (Revisited)
Posted: Sun Dec 21, 2014 9:03 pm
by adamszabo
can you guys show what you mean with this optimization?

how does the "order 2" look like now?
Re: Oversampling Toolkit (Revisited)
Posted: Sun Dec 21, 2014 9:35 pm
by MyCo
I'll make an update. It'll take a bit, because there are 24 modules to do it on

Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 1:29 am
by MyCo
OK, I've updated the download in the first post with the changes Martin suggested. In the Order 10 Version it saves about 30 cycles according to the analyzer. That's pretty huge! On the decimator test it makes a difference of 0.2% according to FlowStones status bar.
Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 5:10 am
by Tronic
great work

one question, how you have calculated the coefficient for this HBAP ?
Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 10:19 am
by MyCo
They are from this file:
http://musicdsp.org/files/BandLimit.cppNot sure how those coeffs were generated, may be that guy built them as lowpass first and splitted them later into allpasses. I've done the inverse of that, by just merging the paralleled allpasses together, as a first try.
They phase rotate 180° at fs/4 but each with different slope. That's all that I found out.
I used my filter construction kit, to get the cascaded filter coeffs from the biquads.
viewtopic.php?f=3&t=1234
Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 11:43 am
by martinvicanek
I think the theory is very well outlined in
Tapio Saramäki's lecture notes, especially pages 12 and 28. You would use Matlab to get the coefficients.
Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 1:58 pm
by MyCo
yeah, but the art is: Choose the filter coeffs so that the upper half band ripples are as low as possible. Designing 2 Allpass in a Lowpass arrangment isn't a big deal. Designing 12 Lowpasses so that 1 half band is nearly unaffected and the other half gets as much reduced as possible, that's the difficult part.
Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 3:41 pm
by martinvicanek
Exactly!
Re: Oversampling Toolkit (Revisited)
Posted: Mon Dec 22, 2014 5:08 pm
by Tronic
Ok here the Polyphase IIR filter coefficient calculator

Code: Select all
# Ruby port of http://ldesoras.free.fr/prod.html#src_hiir
# Troniclabs - 2014 #
# removed