Polyphase oversampler producing output that's too high?
Archive · 20096 old posts
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Zyxoas ·
Hello, SMakers.
So, I downloaded the oversampling toolkit from the wiki a while ago, and today I found a use for it. After experimenting with it for a short while, I found that the polyphase ones in the example produced output that was too high. In particular, if your distortion is a simple 1 (0dB) clipper, and the input is a DC at 4, then the upsampler produces outputs of 2 each, the clipper clips them to 1, AND THEN THE DOWNSAMPLER OUTPUTS 2. That is, it doubles the output of the clipper.
After some fiddling, I changed the code of the example downsampler to include the two commented instructions that halve the inputs, and I removed the halving of the input of the upsampler. This produces properly clipped results, but quality is poor (though still better than the triangular and power series ones).
What am I missing here? How do I get proper output without degrading quality? I'm clipping stereo audio, by the way, so I can't do 4x oversampling, just 2x.
Any help would be highly appreciated.
Zyxoas ·
Oh and yes, I'm doing the stereo processing properly. Packing the 2 outputs of the upsampler in 4 SSE slots, clipping, separating the 4 into two 2s, then downsampling. But this problem also pops up when I make the modifications to the example schematic, so the fact that I'm processing stereo is irrelevant.
aliasant ·
Zyxoas wrote: Oh and yes, I'm doing the stereo processing properly. Packing the 2 outputs of the upsampler in 4 SSE slots, clipping, separating the 4 into two 2s, then downsampling. But this problem also pops up when I make the modifications to the example schematic, so the fact that I'm processing stereo is irrelevant.
Maybe you can post a small OSM so people can check it ?
Zyxoas ·
Sorry Aliasant, but I can't post an OSM, for various reasons.
Take the example oversampling schematic, and replace the overdrive module that's used for the distortion with a regular 0dB clipper ( max(min(in, 1), 0-1) ). Then, instead of the oscillator, feed it a simple float with value 4, then read the output with a Mono Readout. You should see that the output is not quite clipped to 1.
Zyxoas ·
Actually, I guess that simply halving the clipper's threshold would also solve the problem. But that's a hack.
hansdump ·
Better take a saturator after that OS module, otherwise you will produce more unwanted harmonics back to the signal.
H.
Wrote something here? To have a post removed or your name hidden, write to [email protected].