DC offset on VCO outputs is bad, part #137

Nice! - How about:

“The Squinkinator” or “The Squinky Lab”

:slight_smile:

“Auntie Alias”

2 Likes

“Aliases Anonymous”

You are a wizzard, sir!

I don’t think I’ll ever understand that. It violates my entire idea of what “audio at audible frequencies” is. It certainly doesn’t work like that in nature.

  • The Rack module sanitizer
  • The badness detector
  • RackBlame
  • The nastines visualizer

:slight_smile:

Me neither really. I had a probably naive understanding that it is the bipolar nature of audio signals that makes speakers work by moving the cone back and forth.

3 Likes

Theoretically you can produce audible sound in a unipolar fashion, the only requirement is “air oscillating”. However, the mechanical requirements of speakers, eardrums and vocalchords etc. don’t support such a mode, so they are all bipolar, and everything “struck” or vibrating in nature is bipolar. So in a very practical sense sound is bipolar.

Bipolar oscillation is Strain->Relax (swingback), unipolar is Strain->Strain, so very mechanically inefficient.

1 Like

I started it. I wanted to talk more about the common problem of DC on outputs, and did not wish to hijack an existing thread.

2 Likes

I have a long paper on this topic that used to be publicly available, but I think others here have read it.

The real problem is when you run the waveform with DC into a VCA and modulate it (like with an ADSR). Then the modulated DC is audible, either as thumps or low frequency hash. It will also fool and processors that are DC coupled, like a meter or a compressor. They will think the DC is part of the signal, and overestimate how loud it is.

The worst offenders are a typical pulse output. For very narrow pulses many put out way more DC than signal. Mine used to do that.

That said, if you want to use it as an LFO, you probably want the DC, so many ppl (now) give an option.

1 Like

Oh I understand that (or at least I have read about that before) - My 'Me neither really" comment was related to what Lars said about not really understanding why Serge modules would use unipolar, rather than bipolar audio.

1 Like

That’s pretty cool. If such a system were to try to output a number (like “20 mv DC”, or ("aliasing down 20 db) then you don’t have a human looking at the analyzer, and it’s easy to make mistakes. Esp if your “test” signal isn’t an exact multiple of the FFT size, then you can get spurious DC or good harmonics maybe a band away from where you expect them.

Also, a little bit of phase jitter “spreads out” the harmonic energy and “widens” the good signal. In all these cases it’s quite easy for analysis software to misinterpret “good” signal and think it’s something “bad”.

And, of course, if the signal frequency isn’t an exact multiple of the FFT bin you need to window the signal, which is its own can of worms!

Quite doable, but not as trivial as it might seem.

Apologies in advance, everyone probably is aware of these issues.

(apologies just skimming the thread, maybe this has been addressed) Glad you brought up pulse as an example. A PWM’d pulse signal is going to have a varying DC offset. AC-coupling that signal may not give the results one expects. If you were to use an AC-coupled pulse for FM or other modulation (filter, etc) it’s going to be all over the board.

I really don’t know enough about the subject, but I rather like Jakub Ciupinski’s approach to DC offset :grinning:,

skip to 2:20

2 Likes

So I noodled with this a bit more. It will be in the bacon plugs nightly soon

I made this little LintBuddy module. It has an input or an output. You hook that up to an output or input of another module which then means it is “monitoring” them (if you hook up both the output wins)

It does a series of scans and puts warnings in the top and info in the bottom. Clearly some UI work to be done here including making that list scroll. The only test I have now is “name is blank or an input or output starts with #” but even with that I found a couple of things in surge which are labeled but not named.

I think this could be a useful thing to expand. So maybe I will! Will definitely help me.

9 Likes

Nice!

mine are not ac-coupled, they use arithmetic to output a waveform that can go as low as you want, but does not output any DC. Instead of a filter, I just subtract out the constants DC. It works better and uses less CPU. It’s good for all audio applications I know of. It’s non-ideal for some LFO cases.

1 Like

Is a varying DC offset expected on any modulation use case? I’d think it’s more than some LFO cases. FM, filter modulation, etc will have different results due to the changing DC offset. When one touches the pulse width knob on the patch below the pitch of the modulated VCO changes.

coupling

you might think that, but you would tend to be wrong. In this case, VCV VCO is well know to clip the FM cv, so it can not do true “through zero” modulation. Even if it were set to linear FM (I wouldn’t expect exponential FM to stay in tune no matter what.)

If the module is going to provide its own non-linear processing to what you send to it, you can’t really reason about it easily. Here, Fundamental’s rather bizarre extra code to remove “negative” frequencies is in effect adding its own DC to any bipolar input.

In any case, if anyone really likes DC riding on top of their audio, they are free to add it in. The problem is for the vast majority who don’t want it, they need to know about this issue, then get a DC blocker to get rid of it.

If you like DC on your output. there are plenty of ways to get it.

I appreciate the friendly curmudgeonly nature of this thread. this is just the kind of engineering talk I can enjoy reading in my spare time, and I don’t know much about oscillator design, so I’ve definitely learned a few things to tuck away.

The auto linter and alias detector is a great idea.

1 Like

A properly DC mitigated pulse wave has its amplitude around the zero-point shifted/offset, like this:

Nothing so bad you can’t use it for something :slight_smile:

Great stuff Paul. So it’s pure introspection of another module? I think this would be very helpful to other devs if it contains a number of tests for the most often seen sins.

1 Like

Exactly.

1 Like