Can you describe this 'residue function' in more detail? I don't quite understand what it is or is doing. I'm curious because correcting for overly loud applause this is a pretty important issue on many of my recordings.
Personally, I try to set recording levels for quieter material so that the applause is just under clipping. That does mean the recordings benefit from the effort of raising the level of the musical passages later, but recording at higher levels and clipping applause requires more radical correction work to sound natural in my experience. Even for very low-level passages and silent sections, doing that has not yet raised the noise floor of my equipment above that of the room. Plus, I find clipped applause sounds offensive to my ears even when lowered in level relative to the music. It still sounds clipped, just not as loud.
Regardless, I've made plenty of recordings that have the applause clipped, and have wondered about trying a 'clipped peak restortation' tool on those sections after lowering them to non-offenive levels in an effort to restore a more natrual 'unclipped' sound to the applause, regardless if they were limited, compressed, or enveloped to reduce their dynamics.