Crackle on -in between- values for compiled PD patch on LICH

Hi All,

I successfully compiled one of my PD patched to work on the Befaco Lich.
It’s a chord-oscillator with control over base pitch, quality, inversions and stereo detune.
Push button 1 switches between quantized and unquantized output.

I get crackles (using the pots or the CV inputs, so it’s not due to faulty pots) on “in between” values.
As if the system can not decide whether to use the current or the next value in it’s calculations and just flips between them randomly.

I don’t get this behaviour when using the patch on the PC.

Is this a known issue and what would be a good way to go about fixing this?

Thanks in advance!!
All the best,

Boris

There is no code shared between the PC version and the transpiled C/C++ built for the OWL. There will be differences because you are literally not running the same code.

However without sharing the patch it’s impossible for anyone to say what is going on.

1 Like

Hi Dreamer,

Thanks for your reply, please find the patch attached here.
I thought this would be a general issue and not related to the patch or the compiler.
But you might be right! I could make a little video of the behaviour when I’m back at the studio later if that would help.

Best,
Boris

HLG_ChordOscillator.pd (9.3 KB)

1 Like

Hi Boris,

You’re right that this is something caused by running your patch code on actual hardware. The fact that PD on desktop and OWL is different doesn’t matter, it’s hapening because some noise is expected when inputs are read from analog values and converted into digital.

There are several topics here discussing the same issue, you can find them by searching for “ADC noise”. Most commonly it happens for various delay implementations, because that tiny amount of noise gets exaggerated when it goes through its feedback loop. But it can happen for every patch that is sensitive to tiny changes in its parameters.

There are a few approaches to solving this. Just smoothing inputs with an LPF to slew it is possible, but this makes parameter feel less responsive. A better solution is to implement hysteresis that would ignore changes to parameter unless the difference with previous value is above minimal threshold value.

If that helps, in C++ this looks like this:

    if(abs(value-newValue) > delta)
      value = newValue;

Also, I will add that some amount of smoothing is done by OWL firmware already, it’s just not always sufficient. Besides that, ADCs on OWL3 or Xibeca have lower noise level, it would be interested to hear which board version does your Lich run on.

1 Like

Hi Antisvin,

Thank you for your clear explanation!
Adding some hysteresis to the inputs will indeed probably solve this, thanks!
Filtering the inputs (probably with a pd line object) might do the trick too.
Will try both and report back when implemented and tested later this week.

FYI, I’m on a OWL mk2 Rev07

1 Like