Say you had a sample with a loud attack but a sustain that's quieter. Normally, you'd have to use automatic gain to level out the amplitude across the whole sample externally.
What if instead of changing the sample itself, the gain is changed before output?
Loud attack with quiet sustain + non-leveled sample = loud attack with no timbre
Loud attack with quiet sustain + adjusting the sample with external gain controls = some sounds that should be quieter are amplified along with the timbre you're trying to capture
My idea: The sample doesn't need to be modified, and the attack can stay as loud as it wants to because the sustain will be dynamically compensated using velocity as a function. It would even play nice with attenuation because the maximum loudness would be set, meaning instead of low velocity making the sustain quiet to the point of inaudible, you would have your full attack and the gain at a specific velocity would pull up the usually quiet sustain to audible levels.