This patch controls pre- and post-gain controls on either side of a waveshaper via the average signal level of the input. This creates distortion that evolves with the average signal level, rather than only responding to the peak level.
Patcher preset, demo project, and demo video all attached. In the demo, all notes are played at the same velocity, to hopefully better demonstrate how some individual notes will "run hot" thanks to the long chords that precede them, before "cooling down" once the average level decreases again.
The following notes are in a Fruity Notebook inside the patch:
XYZ 1 receives "raw" peak input into its x value from the peak controller. The input is time smoothed via speed/acc parameters in XYZ 1.
(FYI - smoothing in XYZ controller happens BETWEEN input mapping and output mapping)
XYZ 1 sends its x output to XYZ 2, which receives it into both x and y inputs. Those inputs are remapped via output mapping, and they control pre- and post-gain on either side of Waveshaper.