Patch to remove DC offset?

Anything modular synth related that is not format specific.

Moderators: Joe., lisa, luketeaford, Kent

Post Reply
User avatar
Navs
Super Deluxe Wiggler
Posts: 4101
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Patch to remove DC offset?

Post by Navs » Sun Nov 30, 2014 7:47 am

Has anyone got a canny patch for removing a DC offset of known value, other than using a high pass filter?

I'm building a sound in the Clavia Nord Modular with a wavefolder and have been surprised to find that 'virtual' DC offsets make it to the real world/ my speakers! I imagine a solution should be applicable to all systems, not just the NM.

I'm mixing an offset (from a constant value module) and/ or LFO with my audio ahead of the wavefolder to get asymmetrical folds. The HP filter before the output works if the DC offset is static but if I alter the offset or apply the LFO I get that familiar scratch or thump.

One solution I tried was to invert the offset and subtract it in another mixer ahead of the final output but it didn't quite work. Any ideas?

User avatar
Dave Kendall
Set The Controls . . .
Posts: 1211
Joined: Thu Jul 16, 2009 7:20 am
Location: England

Post by Dave Kendall » Sun Nov 30, 2014 11:46 am

Don't know about the NM, but in a hardware environment a module/piece of outboard gear with AC-coupled inputs and/or outputs should do the trick. Put it last in the chain.

cheers,
Dave
"Everything in moderation, including moderation"

User avatar
mateo
Super Deluxe Wiggler
Posts: 1128
Joined: Tue Oct 06, 2009 7:14 pm
Location: Montreal
Contact:

Post by mateo » Sun Nov 30, 2014 11:56 am

Dave Kendall wrote:Don't know about the NM, but in a hardware environment a module/piece of outboard gear with AC-coupled inputs and/or outputs should do the trick. Put it last in the chain.

cheers,
Dave
That's basically the same as using a HP filter, isn't it?

User avatar
djthopa
Super Deluxe Wiggler
Posts: 1752
Joined: Thu Mar 22, 2012 5:48 pm
Location: Somewhere between a nappy and a wire

Post by djthopa » Sun Nov 30, 2014 1:12 pm

dont know if this is of any help, but ableton has a audio plugin - mono, that has a dc offset feature, i use ut with expert sleepers. but that is software and i think you want it in hardware.
Hope you fix it :tu:

User avatar
mateo
Super Deluxe Wiggler
Posts: 1128
Joined: Tue Oct 06, 2009 7:14 pm
Location: Montreal
Contact:

Re: Patch to remove DC offset?

Post by mateo » Sun Nov 30, 2014 1:20 pm

Navs wrote:I'm mixing an offset (from a constant value module) and/ or LFO with my audio ahead of the wavefolder to get asymmetrical folds. The HP filter before the output works if the DC offset is static but if I alter the offset or apply the LFO I get that familiar scratch or thump.
I imagine that's because the HP doesn't react fast enough to the change in DC offset?
Navs wrote:One solution I tried was to invert the offset and subtract it in another mixer ahead of the final output but it didn't quite work. Any ideas?
That's imagine that's because the resulting DC offset is not exactly the same as the applied offset. However, it might be a ratio of it, so perhaps if you look at what's happening with a scope you can find a formula that will correct things?

User avatar
daverj
Vintage Video Wiggler
Posts: 8514
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj » Sun Nov 30, 2014 4:00 pm

The HPF is removing the DC, but won't remove the high frequencies caused by suddenly connecting another signal or DC. You need to fade those in rather than switch them in. Feed them through an attenuator, VCA, Slew, etc... to cause a gradual change in voltage as they get introduced.

If there is a LPF that is DC coupled, then you might also try putting it after the switch, before the mix so it softens the sharp transition.

extra testicle
Wiggling with Experience
Posts: 441
Joined: Sat Sep 22, 2012 9:12 pm

Post by extra testicle » Sun Nov 30, 2014 9:27 pm

have you tried any kind of rectifying and using mixers to move the mid point of the constant lfo mix? diodes on the nord mod.

it sounds like what might be happening though is you are getting zero crossing? the nord is being too good at changing levels. clavia are into being snappy.
"Note: A very short attack time can produce a click in the beginning of the sound. This is only normal according to physics theory. To eliminate any click, just increase the attack time slightly."
:lol:

the constant is zero attack.

if that's the case you could try using a sustained bipolar envelope instead with a short attack. an envelope follower with increased attack and then bi-polarized after might work too. i've never run a constant through one on the nord to see if any changes "re-trigger" it.

if it is zero crossing you also might be able to avoid it by syncing phase on the lfo because it clicks every time it resets and jumps to where the constant is set instead of the bottom.

User avatar
flo
Space Jack
Posts: 4952
Joined: Tue Jul 10, 2012 4:37 am
Location: Zurich

Post by flo » Mon Dec 01, 2014 4:03 am

Wouldn't multing your offset to the HPF work? Then the DC filtering should adjust as you alter the offset...

User avatar
Navs
Super Deluxe Wiggler
Posts: 4101
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Post by Navs » Mon Dec 01, 2014 11:15 am

Thanks for the suggestions! Daverj's notion of the frequency/ rate of change has given me another idea. This has always been the problem with AC-coupling, for example on lin-FM inputs: if the offset is large and fast enough, the cap can't cope.

It may well be something peculiar to the NM i.e. if events are processed serially. The one advantage I had hoped for, though, was accuracy: popping a virtual 1V into an inverter should give me exactly -1V. I tried a simple cancellation test on my 'real' modular and it was a fiddle.

User avatar
PrimateSynthesis
Super Deluxe Wiggler
Posts: 3355
Joined: Tue Mar 15, 2011 6:50 pm

Post by PrimateSynthesis » Mon Dec 01, 2014 5:10 pm

mateo wrote: That's basically the same as using a HP filter, isn't it?
For all practical purposes, yes. An AC-coupled input is a high-pass filter. But you can can have a high-pass filter without a capacitor. A friend of mine had a very old RCA passive bandpass filter that was just a big box full of massive inductors with two selector switches. While today purely inductive filters are generally only used at audio frequencies in speaker crossovers, an inductor going to ground is a high-pass filter, and an inductor in series is a low-pass filter.
FS: Rare Morley Rotating Wah Oil Can Delay!

Since the forum has gone back to being 100% community funded, I've decided to donate half the proceeds from the Morley Rotating Wah this thread is supposedly selling :miley:

https://www.muffwiggler.com/forum/viewt ... p?t=131332

User avatar
daverj
Vintage Video Wiggler
Posts: 8514
Joined: Fri Jun 19, 2009 11:09 am

Post by daverj » Mon Dec 01, 2014 6:47 pm

PrimateSynthesis wrote:an inductor going to ground is a high-pass filter, and an inductor in series is a low-pass filter.
A filter requires two or more components. The second component might be a "phantom" component, such as the output resistance in a driver circuit, or could be an actual component such a component before or after the one you mention.

An RL high pass filter has a resistor in series with the signal and an inductor to ground. This might look at first glance like it will pass DC, but it doesn't. At low frequencies the inductor has extremely low resistance, so it creates a virtual short circuit of the output of the resistor to ground, killing the DC part of the signal (as well as low frequencies).

Here's a simulation with an amp mixing a DC offset with a sine wave oscillation. The output of the mix is sent through an RL high pass filter. Note that the mixed signal (vin) has a 6 volt DC bias while the output of the filter (vout) is centered on ground.

Image

User avatar
Navs
Super Deluxe Wiggler
Posts: 4101
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Post by Navs » Tue Dec 02, 2014 4:28 pm

daverj wrote:The HPF is removing the DC, but won't remove the high frequencies caused by suddenly connecting another signal or DC. ... Slew
250ms slew did the trick, thank you Dave! :yay: This slowed the changes enough for my mirrored subtraction scheme to be effective.

The other method I considered was a delay but I'm now not sure why I thought that might help.

User avatar
giorgio
NITE MIND
Posts: 2454
Joined: Sat Oct 24, 2009 6:42 pm
Location: BRAND NEW YORK

Post by giorgio » Tue Dec 02, 2014 4:46 pm

slew aka low pass filter :hihi:
Navs wrote:
daverj wrote:The HPF is removing the DC, but won't remove the high frequencies caused by suddenly connecting another signal or DC. ... Slew
250ms slew did the trick, thank you Dave! :yay: This slowed the changes enough for my mirrored subtraction scheme to be effective.

The other method I considered was a delay but I'm now not sure why I thought that might help.
▲✌♡✂☃☂☁☀☻☹☺♢✄✐☒☠☣☢☤☎✇✈✖▼

User avatar
PrimateSynthesis
Super Deluxe Wiggler
Posts: 3355
Joined: Tue Mar 15, 2011 6:50 pm

Post by PrimateSynthesis » Tue Dec 02, 2014 6:53 pm

daverj wrote: A filter requires two or more components. The second component might be a "phantom" component, such as the output resistance in a driver circuit, or could be an actual component such a component before or after the one you mention.
Keeping things simple, let's assume it's connected to something 8_)
daverj wrote:An RL high pass filter has a resistor in series with the signal and an inductor to ground. This might look at first glance like it will pass DC, but it doesn't. At low frequencies the inductor has extremely low resistance, so it creates a virtual short circuit of the output of the resistor to ground, killing the DC part of the signal (as well as low frequencies).
Right. Well to me it doesn't look like it would pass DC, as a 100mH choke is only couple hundred Ohms. So it will remove DC offset. Anyway, my point was that inductive filters exist. Although a large enough inductor to pass audio is impractical due to size and cost.
FS: Rare Morley Rotating Wah Oil Can Delay!

Since the forum has gone back to being 100% community funded, I've decided to donate half the proceeds from the Morley Rotating Wah this thread is supposedly selling :miley:

https://www.muffwiggler.com/forum/viewt ... p?t=131332

morbank
Common Wiggler
Posts: 108
Joined: Sun Sep 15, 2019 12:08 pm
Location: California, USA

Re:

Post by morbank » Sun Mar 15, 2020 2:09 am

Navs wrote:
Tue Dec 02, 2014 4:28 pm
daverj wrote:The HPF is removing the DC, but won't remove the high frequencies caused by suddenly connecting another signal or DC. ... Slew
250ms slew did the trick, thank you Dave! :yay: This slowed the changes enough for my mirrored subtraction scheme to be effective.
I know this is an old thread, but can anyone (Navs?) explain the “mirrored subtraction” patch in more detail?

User avatar
Navs
Super Deluxe Wiggler
Posts: 4101
Joined: Fri Sep 18, 2009 3:49 am
Location: Berlin, Germany

Re: Re:

Post by Navs » Sun Mar 15, 2020 4:13 am

morbank wrote:
Sun Mar 15, 2020 2:09 am
Navs wrote:
Tue Dec 02, 2014 4:28 pm
daverj wrote:The HPF is removing the DC, but won't remove the high frequencies caused by suddenly connecting another signal or DC. ... Slew
250ms slew did the trick, thank you Dave! :yay: This slowed the changes enough for my mirrored subtraction scheme to be effective.
I know this is an old thread, but can anyone (Navs?) explain the “mirrored subtraction” patch in more detail?
Haha :zombie: :sb:

Yes, I can see why 'mirrored subtraction' might be confusing; it's just subtraction: take the offset value that's needed in one part of the patch and then remove it at the output where it's causing a problem.

So, e.g. I shifted my audio by +1V, then later centred it again by adding -1V (i.e., 'subtracting' +1V). Does that make sense?

morbank
Common Wiggler
Posts: 108
Joined: Sun Sep 15, 2019 12:08 pm
Location: California, USA

Re: Patch to remove DC offset?

Post by morbank » Sun Mar 15, 2020 11:14 am

Navs wrote:
Sun Mar 15, 2020 4:13 am
Yes, I can see why 'mirrored subtraction' might be confusing; it's just subtraction: take the offset value that's needed in one part of the patch and then remove it at the output where it's causing a problem.

So, e.g. I shifted my audio by +1V, then later centred it again by adding -1V (i.e., 'subtracting' +1V). Does that make sense?
Yes, I get it now! Thanks Navs!

Post Reply

Return to “Modular Synth General Discussion”