Most harmonically pure attack shape?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

A very old trick used in early digital equipment consists in changing the gain when the input crosses zero.

This is very light on CPU.
It does not click.
It preserves the waveform of the input signal.
See you here and there... Youtube, Google Play, SoundCloud...

Post

Smashed Transistors wrote:A very old trick used in early digital equipment consists in changing the gain when the input crosses zero.

This is very light on CPU.
It does not click.
It preserves the waveform of the input signal.
The zero crossing may be better than some random location, dunno. Or alternately, peaks where the instantaneous slope is hopefully "near 0".

However, in my experience which could be wrong, sudden changes in wave slope can be perceived by the ear as a click. It depends on context in the audio and is not predictable. Sometimes a sudden slope change is not noticed as a click and other times it sounds like a very annoying click. I've debugged clicks in auto-crossfade algorithms where the slope change is so subtle you can barely see it in the audio editor window even when you know exactly where to look, but it is annoying obvious click to the ear. Other times, rather ugly sudden slope changes as visible to the eye, which sound fine to the ear.

So if suddenly changing gain at a zero-crossing, or splicing poorly-matched waveforms at zero-crossings, causes sudden slope change, it will not always sound like a click but will sound like a click often enough that IMO it is not a very useful strategy to rely on. Even if it "works" transparently 9 times out of 10, the other 1 times out of 10 is the deal-breaker. :)

That is why lookahead is so useful in hard limiters. Without the lookahead, the first over-thresh gain change is a sudden slope change which is not always heard as a click, but is often enough heard as a click as to be useless. Or in the case of some of the old non-lookahead analog limiters, it seemed a gentler trade-off to suffer a relatively "rare and gentle" click rather than suffer frequent hard-clipping splatters. :)

Post

JCJR wrote: However, in my experience which could be wrong, sudden changes in wave slope can be perceived by the ear as a click. It depends on context in the audio and is not predictable. Sometimes a sudden slope change is not noticed as a click and other times it sounds like a very annoying click.
The click from instantaneous jump that results in a discontinuity has a spectral fall-off of 6dB/octave (like a saw-tooth or a square). The click from a discontinuity in slope has a spectral fall-off of 12dB/octave (like a triangle). That sort of makes it objectively better, but still bad. :)

Post

Yes, the trick can and must be improved with an interpolation of the gain around the zero crossing.

One particular case were it is sensitive is when you want sharp modulator attacks in a phase modulation. The "update gain on zero crossing" trick is quite efficient in this case.

First with the Axoloti factory object (linear interpolation over 16 samples), second with "update gain on zero crossing".

https://soundcloud.com/thierry-rocheboi ... modulation
See you here and there... Youtube, Google Play, SoundCloud...

Post Reply

Return to “DSP and Plugin Development”