Oversampling Affecting Tone

I am having an issue with the oversampling affecting the tone of my audio, even without the oversampler actually processing the samples. It seems the initialization itself is causing this. Mainly, it’s reducing a lot of the presence and/or high frequency content of an electric guitar, which may be the result of some kind of new lack of amplitude in the signal, resulting in less drive into my distortion stages.

Has anyone had any issues with this before, and if so, how can they be taken care of?

I’m initializing the oversampler like so:

    // in the constructor

    oversample (numChannels, factor,
                            juce::dsp::Oversampling<float>::FilterType::filterHalfBandPolyphaseIIR,
                            true)

    // prepareToPlay
    oversample.clearOversamplingStages();
    oversample.addOversamplingStage(juce::dsp::Oversampling<float>::
    FilterType::filterHalfBandPolyphaseIIR, 0.2f, -75.f, 0.2f, -75.f);
    oversample.initProcessing(samplesPerBlock);
    oversample.reset();

If I remove the above code, the tone returns to its expected character.

What does this mean? If the issue seems to be caused by the presence of a juce::dsp::oversampling member in your class, that seems pretty strange indeed.

1 Like

0.2 transition bandwidth is far too high for the final stage. it’s a 0.2*samplerate transition width, so at 44.1khz, the fall off starts at 13 kHz, removing your high frequency content.

1 Like

Not the member just being there, but it appears the initialization of its filters was causing the issue.

Interesting. This is probably the issue. That’s what I get for making assumptions about how the filters work. I had assumed these bandwidth values controlled the steepness of the filter with cutoff fixed at half-Nyquist.