DC blocker in Rack API?

Is there a DC Blocker in dsp::filter or can one make one with what is there. Would RCFilter work as a DC Blocker?

A lot of people are using RCFilter at 10Hz, so sure. It doesn’t have the flattest response in the passband, and Butterworth would be better, but so far no users have complained.

1 Like

Grand works a treat! A bit of a click / thump from it so might look into Butterworth. It’s on a mixer chain so I’m not sure if setting a slew would get rid the click.

for reference:

    out = sumCh * outGain;
    float hpFreq = 10.3f;
    dcblockL.setCutoff(hpFreq / args.sampleRate);
    out -= dcblockL.lowpass();

I use a 3 pole butterworth at 50 hz in my plugins. Admittedly that’s a little high in freq…

If you’re bored, feel free to send me a ButterworthFilter as a subclass of IIRFilter. I’m not sure if implementing different types of filters as subclasses is the best way to go, but it’d be easy to use, which is more important to plugin developers than generalizability.

Don’t think I’d go 50 Hz as it is on the output on a mixer 20.6Hz is a safer limit imo.

1 Like

Is there a way to lessen this effect on the signal or is that the best RCFilter will do? Currently set to 16.35 Hz (C0).


With the initial attack of the dc signal, I can eliminate the click with a slew but this does not seem to work when the dcblock is in the negative area on the scope.

@Squinky which of your modules uses the 3 pole Butterworth dc blocker? Would like to compare this to RCFilter.

An “initial attack” is not a DC signal. It’s a signal with lots of high frequency content that is not going to be filtered with a highpass filter.

I mean to say I’m setting the attack in a different module for a mute state.

The waveform on/off you see in the scope is the level being muted on the mixer by an offset that is fed into the level CV in, it is a 10v signal and there is another 10v going to the input on the mixer just for good measure which has no CV connected to the level in. When I kill the 10v gate signal doing the job of the mute it doesn’t register a click that has an attack/decay, this is fed into a slew before going into the mixer to mute. When it is being unmuted you can hear the click. (Area in the negative on the the scope.)

Shaper uses it for the AC/DC option.

I was trying it with Shaper alright is there a setting that doesn’t use the shape at all and just passes the signal through the blockers?

Nope, but if you don’t mind hacking it is extremely easy to make one of the shapes “do nothing”:

template <class TBase>
void  Shaper<TBase>::processBuffer(float* buffer) const
    switch (shape) {
        case Shapes::FullWave:
            for (int i = 0; i < curOversample; ++i) {
                float x = buffer[i];
                x = std::abs(x);
                x *= 1.94f;
                x = std::min(x, 10.f);
                buffer[i] = x;

I think if you just go into one of the shapes and make that case do nothing you will get it.