Cornus Ammonis
banner
cornusammonis.bsky.social
Cornus Ammonis
@cornusammonis.bsky.social
Just a feedback loop
The main difference is they support fast lower-precision math, have much more VRAM, much fewer ROPs, and don't have video output ports. It's a specialized GPU.
January 7, 2025 at 2:56 AM
I'm aware, but this is written with an audience in mind that is more familiar with trig than convolution.
January 6, 2025 at 8:59 PM
Thanks to @tildesounds.bsky.social for prompting this.
January 6, 2025 at 7:13 PM
That idea is a direct consequence of interpreting HD as AM. AM doesn't always produce tones that are harmonic relatives of the inputs, namely when the inputs aren't harmonic relatives of each other. The same is true of HD, and when this happens it's called intermodulation distortion.
January 6, 2025 at 6:52 PM
I also haven't addressed intermodulation distortion (ID). ID is often treated as something categorically different from HD, but I would argue that it is the same thing as HD, but in the context of complex signals, i.e. signals that contain tones that are not harmonics of one another.
January 6, 2025 at 6:50 PM
I've somewhat conflated "harmonic distortion," as in the harmonics created by distortion, and "a harmonic distortion," as in a memoryless nonlinearity that creates harmonics. If that bothers you, feel free to mentally substitute one or the other definition as appropriate.
January 6, 2025 at 6:49 PM
Some glossed-over details: I've assumed here that the sidechain signal is the same as the input signal. It doesn't have to be, and when it isn't we can't call a compressor a harmonic distortion. This reasoning only applies when the input and sidechain signals are harmonically related to each other.
January 6, 2025 at 6:49 PM
Interestingly, I've never seen a compressor design that attempts to account for and cancel out a compressor's effect on phase. Many people use compressors in a way that's closer to being a pure distortion (like OTT), which puts the most dramatic phase distortion in the range where you can notice it.
January 6, 2025 at 6:49 PM
So, is a compressor always a harmonic distortion? In one sense yes, in that it limits a signal by creating harmonics. In another sense no, in that the harmonics don't have the same phase relationship as they do in a harmonic distortion.
January 6, 2025 at 6:48 PM
On the other hand, the phase delay doesn't cause the magnitude of the harmonic spectrum to change due to interference, and the effect would mostly be heard as a change in spatialization (for a stereo signal) or a change in transients.
January 6, 2025 at 6:48 PM
Arguably yes, because of the influence of the lowpass filter on phase. A more strict definition of a (memoryless) distortion requires that the phase of the created harmonics can only change by a multiple of π/2, and the phase delay of the lowpass filter causes that to no longer be the case.
January 6, 2025 at 6:45 PM
This makes a compressor look more like a harmonic distortion, with a harmonic profile that's controlled by its lowpass filter characteristics. So, does using a lowpass filter make this not technically a harmonic distortion for some reason?
January 6, 2025 at 6:45 PM
Contrary to conventional wisdom, aliasing primarily happens inside the envelope follower/gain reduction stages, and the sidechain signal is typically audible, because the envelope follower filter is not steep enough to cut out everything above 20Hz, even with a slow attack/decay time.
January 6, 2025 at 6:45 PM
Put another way, so long as our envelope follower and gain reduction can be expressed as a (memoryless) distortion applied to the input signal, the whole system can be expressed as a single distortion function.
January 6, 2025 at 6:45 PM
From all this we can draw a few conclusions. Ignoring the lowpass filter (which corresponds to a very low attack/release time), a compressor is ultimately a saturating distortion like any other.
January 6, 2025 at 6:44 PM
In fact, if we ignore the lowpass filter in our compressor signal chain, we can combine the rectifier and gain reduction functions and compare that against tanh(x)/x, and see that they look almost identical if we choose appropriate threshold, ratio, and knee settings for gain reduction.
January 6, 2025 at 6:44 PM
Looking at tanh(x) again, we could instead frame the function in a "gain reduction form," meaning that we find the function that we would multiply by x to get tanh(x). This is simply tanh(x)/x, which is an even distortion.
January 6, 2025 at 6:42 PM
This means we have a signal chain that generates even harmonics, which is then multiplied by our fundamental. The fundamental is the first harmonic, which is odd. When we multiply even and odd harmonics together, the result is all odd harmonics, just like in the tanh(x) function from earlier.
January 6, 2025 at 6:37 PM
This combined gain reduction function is also an even distortion, so our signal chain so far is: even distortion -> lowpass filter -> even distortion. The final step in the chain is multiplying the result of the GR function with our original input signal.
January 6, 2025 at 6:35 PM
Without going too deep into the details, in practice, the gain reduction stages can typically be combined together as shown here, where x is the amplitude of the signal, k is the knee sharpness, T is the threshold in dB, and R is the compression ratio.
January 6, 2025 at 6:34 PM
The next stage of a compressor is gain reduction. This is typically done by taking our estimated signal level from the envelope follower, converting it to dB, thresholding it, and then converting it back from dB. A "soft knee" function is used for the threshold, like this "softplus" function:
January 6, 2025 at 6:31 PM
The slew limiter then filters out higher-frequency harmonics. Slew limiters are equivalent to a 1-pole lowpass when they 1) are exponential rather than linear and 2) have equal attack/decay times. They otherwise act like a lowpass + even distortion, which doesn't change the overall analysis much.
January 6, 2025 at 6:30 PM
A full-wave rectifier is equivalent (ideally) to the absolute value function, and a slew limiter is a kind of specialized 1-pole lowpass filter. A full-wave rectifier is an even distortion. It produces infinite harmonics, all of which are even multiples of the input frequency.
January 6, 2025 at 6:29 PM
A common envelope follower design works by passing a signal through a full-wave rectifier, which is then sent to a slew limiter to smooth the signal out with a specified attack/decay time. These steps are not spectrally neutral, and if not oversampled, the rectifier can cause aliasing.
January 6, 2025 at 6:28 PM
Back to compressors: a typical compressor design uses an envelope follower to estimate the level of a signal, and a threshold function to apply gain reduction to the input signal when it gets too loud. (This is a screenshot from a guide for producers, note the "Not Audible" claim--this is not true!)
January 6, 2025 at 6:27 PM