Up-/downsampling 'on the fly'

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

By the way, you can find now in the new JUCE DSP module my Oversampling class :D

I tried to follow all the rules I published before, and the filter coefficients are calculated on the fly as well using my filter design classes :party:

Post

Rockatansky wrote:
sault wrote:Repeating the same value (a -> a a a a instead of a -> a 0 0 0 ) is not good. Zero-stuff and filter, all the cool kids are doing it.
Hm, it's not that I absolutely WANT to not believe you, but I'm learning about these things at the moment and I like to shape my own opinion by reading up on things. Do you have any links to articles or papers with actual reasons why zero stuffing is better than repeating the original sample?
I realize you already have the answer, but wanted to point out a series of articles I wrote (last part waiting to publish, as soon as I have time to finish a diagram) that explains sampling in a way I haven't seen presented before, and it specifically addresses this sort of thing. Follow successive short articles, starting at the prologue:

http://www.earlevel.com/main/2017/08/15 ... -prologue/

In a nutshell, samples are impulses. If you repeat samples, it's the same as mixing in a half-sample delay with the original signal. And we know that's a filter. As far as the gain change, you just roll that into the coefficients.

Ivan covered everything very well. When you SR convert at more than an integer factor of two or three, conversion can be made more efficient in multiple smaller conversions. FIR are longer for the same characteristics at lower relative frequencies (an FIR lowpass at 0.125Fs is twice as long as 0.25FS for the same specs—the wavelengths are longer, the filter must be longer). While it may seem that you can only break even (two filters half as long doesn't win), you can optimize and beat it. The second filter can clean up details left by the first, for instance, and you may be able to use half-band filters and throw out zeros. You can win significantly this way.
My audio DSP blog: earlevel.com

Post Reply

Return to “DSP and Plugin Development”