Question about upsampling methods

Christof Ressi <[email protected]>
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
Hi,

I have made a PoC for adding upsampling and reblocking support to 
SuperCollider: https://github.com/supercollider/supercollider/pull/6702

One thing I have been thinking about is the default upsampling method. 
Currently, I'm using zero-order-hold (ZOH), aka "sample and hold", which 
is also the default for Pd's [inlet~]. The other practical alternative 
would be zero-padding. Letting the users choose the method is not a real 
option, so I need to settle on a good default.

Generally, upsampling is done by zero-padding + low pass filtering.

ZOH is basically a low-quality low-pass filter. It's like a FIR filter 
that consists of a series of 1s and the frequency response is that of a 
Sinc function. AFAICT, it introduces high frequency noise, but I'm 
wondering how relevant that is when the output runs through an 
antialiasing filter anyway.

Zero-padding without low pass filtering results in repetitions of the 
original spectrum above the original Nyquist frequency. (It's like 
multiplying the signal with an impulse train, which results in the 
spectrum being convolved by an impulse train, resulting in a regular 
repetition.) I think that an *unfiltered*//zero-padded signal can lead 
to strange result. For example, a slowly moving ramp would almost look 
like an impulse train.

In my understanding, a zero-padded signal *must* be filtered, while an 
unfiltered ZOH signal may be acceptable for many use cases. Is this 
correct? @Miller: Is this maybe also the reason why Pd 0.44 has switched 
from "pad" to "hold" as the default upsample method in [inlet~]?

Zero-padding has the advantage that low pass filtering can fully restore 
the original signal, which apparently is not the case for a ZOH signal. 
On the other hand, it's always possible to zero-pad the input signal 
after the fact.

At the moment I'm tending to keep ZOH as the default upsampling method, 
but I would be curious about other people's opinions.

Christof

---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/Z4XPLPZSNDIE4EI2TLLTDVE3NSRJCN54/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.