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