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.

  • 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? :) What is going on ?:)

    I am only speculating here

    thanks again!!

    01.jpg
    1391 x 553 - 176K
    02.jpg
    1377 x 534 - 143K
    02 fft.jpg
    1307 x 422 - 94K
    shruthi DC 1.wav
    253K
    shruthi DC 2 CV noise.wav
    242K
  • > 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…

  • >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

  • Hallo pichenettes :)

    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 :)

  • Ok I understand. Thanks for the explanation :)

  • 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 :)
    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.

    20160913_181900.jpg
    429 x 340 - 38K
    20160913_181800.jpg
    429 x 339 - 38K
    20160913_182025.jpg
    310 x 252 - 40K
    20160913_182138.jpg
    302 x 245 - 24K
  • @pichenettes
    How many bit resolution has the PWM signal for VCA and VCF in your shruthi synth?

    @t0mt0m
    Sorry… I did not want to disturb your discussion. Yor questions are very interesting!

  • > How many bit resolution has the PWM signal for VCA and VCF in your shruthi synth?

    8 :)

  • Sorry… I ask in my discussion again. I will not interfere with this discussion :)

  • I’ve come up with a simple idea to reduce the vca cv noise and to my surprise it worked on the first try. And much better than I’ve thought, so I thought I’d share it in case someone wants to do this, too.

    I’ve increased C5 from 100n to 150n and added a another, passive lowpass filter stage to it.
    So it is now a 2nd order lowpass, which – in simulation – has almost 13dB more suppression at 980Hz and even more at the harmonics.
    The step response rise time has almost trippled, but with under 2ms still fast enough for a synth, imho.

    You can hear the result in the attached “lowpassed saw” audio example. First half is normal 4pm design with audible zipper noise at the end of each note, second half is my modified cv filter. zipper noise is almost completely gone.
    The “Unfiltered Saw” example demonstrates, that the env is still pretty fast. I don’t hear much of a difference, though attack has been set to 0 in all cases.
    It’s no longer fast enough to get clicky attacks and releases, but I don’t think that’s a desirable sound anyway.

    The attached files:
    1. schematic comparison
    2. implementation: it’s a cheap hack, but it works
    3. simulated bode diagram comparison
    4. simulated step response comparison
    5. simulated scope showing improved smoothing
    6. lowpassed saw audio comparison before-after
    7. unfiltered saw audio comparison before-after

    I’m very pleased with the outcome. I liked my shruthi before and now I love it ;)

    shruthi vca cv filter schematic.jpg
    537 x 645 - 160K
    20160915_223115cut.jpg
    403 x 312 - 64K
    shruthi vca cv filter bode.jpg
    737 x 706 - 147K
    shruthi vca cv filter step response.jpg
    737 x 678 - 99K
    shruthi vca cv filter 980Hz square.jpg
    722 x 648 - 117K
    Lowpassed Saw VCA CV Noise Stock vs Smoothed.wav
    606K
    Unfiltered Saw VCA CV Noise Stock vs Smoothed.wav
    485K
  • Interesting, I never noticed that “zipper noise” in my two 4pm shruthis. Or maybe I just didn’t care about it? I should check it and see if I get the same noise.

  • If you want to try it out, the patch I’ve used is:
    single saw, lp4, liquid, cutoff ~30 (depends on your filter calibration), reso 0, envmod 0, amp env attack 0, release 30.

    I’d be interested, if you can recreate it…

  • Sorry for the necropost, I’d just like to confirm, that the ~980Hz carrier/zipper noise/whine is there.

    The easiest way to examine is to turn off both oscillators and the sub as well, set resonance to 0 and open the filter. Play any MIDI, turn up the speakers, and you’ll notice. I have the SMR4-mkII filter board.

    Also thanks for the fix t0mt0m, the hack you’ve come up with actually helps. Noise is still noticable, with oscillators turned off, but much better than it was.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion