SynthMaker

Polyphase oversampler producing output that's too high?

Archive · 2009 6 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].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.