OSC DC Filter / VCA CV zipper noise

As I understand it, the DAC of the shruthi’s osc is one bit and requires highpass filtering to remove DC offset, right?

I think this highpass filter is set a bit too low to do the job properly, at least on my 4PM board.
The results are short, exponential dc-pops on the attack and release phase of each note.
I think it also makes the ~1kHz control rate of the VCA env audible in some cases, for example in the release phase of
lowpass filtered sounds with low cutoff.

So I want to raise the DC filter cutoff and maybe lower the VCA CV lowpass cutoff a bit.

Has anyone done this or knows how it’s done?
For the DC filter cutoff, it looks like C28, C6 or C2 could be responsible.
For smoothing the VCA control signal, C5 looks suspicious to me.

not sure…

AC-coupling cap : C28 for the oscillator and C29 for the external audio in. You can go as low as 100nF - beyond that you’ll start seriously losing lows.

I don’t see what’s the problem with this stage, though - the signal coming out of the Shruthi has a fairly constant DC offset of about 2.5V (except if you use something like a PW-modulated square at full amplitude).

VCA CV filtering : C5. You can try increasing it, but very quickly you’ll get slow envelopes.

1 Like

Thank you very much for your help, pichenettes.

I’ve tested it again. With basic waveforms, e.g. a single saw, the effect is very small and doesn’t bother me, in fact the little artefacts are what makes the shruthi’s sound special, yet it’s there. However with more complex waves, e.g. using ringmodulation, it gets emphasized too much for my taste. I am aware that ring modulation can cause a lot of ultra lf or dc, but the dc block highpass should take care of that. But somehow, at least on my shruthi it doesn’t.

Right now I can only think of two scenarios that could cause this behaviour:

  • pre VCA dc filtering doesn’t work (I’ve made a mistake soldering the thing).

  • osc are not permanently running, but starting on note on trigger and stopping after the amp env hits 0, therefore creating dc pulses, when dc is present in the waveform

I’ve attached images and sound examples of the patch in question.
It uses ringmod, which is perhaps the cause of excessive DC.
If the filter cutoff is turned down, the control rate noise (must be around 980Hz according to fft) becomes very audibe in the release phase, I imagine because the vca is turning down dc to 0 in a stepped manner, causing a sawtooth like tone, after final dc block.

Can you confirm, that the shruthi oscs are not permanently running? (In this case dc block would have to be implemented inside the code)
Or have I screwed something up? :slight_smile: What is going on ?:slight_smile:

I am only speculating here

thanks again

> Can you confirm, that the shruthi oscs are not permanently running?

When the VCA CV is null, the audio output is “muted” to a value of 128, causing the same 2.5V DC offset as with normal waveforms - which are all centered.

Ring modulating two identical waveforms will indeed result in an always positive signal that will swing between 128 and 255 (+2.5V and +5V) - so there’ll be a larger DC offset.

Smaller AC-coupling caps will never make this go away.

If you don’t mind the “bleed”, there’s a simple fix in the firmware code to prevent the oscillators to be silenced.

There’s no easy solution, only compromises…

1 Like

>When the VCA CV is null, the audio output is “muted” to a value of 128, causing the same 2.5V DC offset as with normal waveforms – which are all centered.

I understand. Smaller AC-coupling caps improve nothing in this case.

Does this also stop the osc sample computation or does it just swap out the value with 128?
Anyway, a simple 1st order IIR highpass with let’s say 5 or 10Hz cutoff right after the osc mixer code would take care of that, wouldn’t it?
(At least in a floating point system … don’t know much about fixed point programming)

Hmm, since I like to use compressors on synths, I do mind bleed…
So I guess it’s not possible to make the VCA shut off completely

I have a feeling the Shruthi MCU is maxed out as it is. Remember it’s a low-power 8-bit processor, not a modern 32-bit Cortex, plus its handling all control signals for the VCA and filter, generating envelopes and LFO, driving the menu system and processing MIDI and control inputs, as well as generating the oscillator signals.

a|x

> Does this also stop the osc sample computation or does it just swap out the value with 128?

The oscillators continue running, but the mixer code is bypassed.

> Anyway, a simple 1st order IIR highpass with let’s say 5 or 10Hz cutoff right after the osc mixer code would take

It would have exactly the same effect as increasing the value of the AC-coupling capacitor : it would take some time for the filter to “catch up” when there is a sudden change in the DC offset ; and making this time smaller would also mean attenuating the low frequencies.

Wouldnt a second digital filter in addition to the existing analog one increase the slope and thus be an improvement overall?

> It would have exactly the same effect as increasing the value of the AC-coupling capacitor : it would take some time for the filter to “catch up” when there is a sudden change in the DC offset ;

yes, if the highpass filter is placed after the signal gating.

But if one would place the highpass before the gating - before the discontinuities occur, then the problem would be fixed. i suppose the small impact on the lowend by using a 5Hz highpass is negligible and preferable over pops.
Don’t know if the MCU has the resources left to do this…

From what I know there’s unfortunately no CPU cycles left for digital filtering (without removing something else)

As I suspected.

a|x

@Bjarne:
Ha, I was thinking about asking you about this and there I have the answer. Thanks.

Though I thought a 1st order filter would not require more than 2 multiplications per sample…

Can anyone give me a hint where the osc muting/gating thing happens in the firmware code.
thanks.

> But if one would place the highpass before the gating

I see… Yeah it would work. Not sure about the CPU capacity though…

> Can anyone give me a hint where the osc muting/gating thing happens in the firmware code.
thanks.

Here

The gating of the output if the VCA gain is null is here

1 Like

Sorry :stuck_out_tongue:

Hallo pichenettes :slight_smile:

Why are you writing mute bytes (128) in the audio buffer if the vca gain < 2. In my code I do not this because the VCA output is very quietly! I write only mute bytes in the audio buffer when osc1 or osc2 is none.

> In my code I do not because of the VCA output is very quiet!

Because the Shruthi uses PWM, and because there are slight variations from chip to chip on the LOW and HIGH level of the ATMega GPIO outputs, there is a small voltage, variable from one unit to another, at the VCA pin when the VCA is set to 0 in software. You’d need to compensate for this voltage.

But… trimmers are evil in a DIY kit.

Hence… software kludge :slight_smile:

1 Like

Ok I understand. Thanks for the explanation :slight_smile:

I was trying to get a feel for how large the vca bleed would be if one would turn off the osc gating, so I turned off all oscs and set filter to self-osc and listened. No bleed at all, the vca seems to shut off properly.
BUT, even with no oscs, only the filter self osc I am getting the same DC-pops. Even with no signal at all they’re there.

So I’ve measured some voltages on my shruthi yesterday, using an oscilloscope, and I think I’ve found the cause of DC in my case… It’s the VCA itself. And it goes straight to the output.
It was my soundcard’s input highpass that did the filtering.
I’ve pre-biased the VCA input by connecting ~2.2MOhm to V- and it’s almost gone. I think I’ll add a trimmer to calibrate it perfectly.

I’ve attached some scope images in the following order:

  1. signal out saw unfiltered.
  2. signal out saw lowpass filtered. There’s DC
  3. signal going into the VCA: no DC
  4. output signal after rough DC correction (2M2 to V-).

Using ringmod does cause some extra DC, but not nearly as much as the VCA itself.
Since my VCA has virtually no bleed, DC compensation plus deactivated OSC muting/gating would completely solve the issue for me, i hope :slight_smile:
The rough DC correction I’ve implemented for now has already reduced the pops a lot.

Edit: The ~1kHz vca control voltage noise ist still there. So I’ll still have to test how much C5 can be increased until the envelope gets too slow.