Live Normalization Clipping Problem

I’m having great difficulty normalizing audio in real time. I understand the basic reasons why it is not working, but I can not think of a way to reslove it in Max Msp. I’m using Max 4.5 by the way.

I have my piece listening for specific pitches. When it detects them, it records a 1500 ms sample and then manipulates it. I want the sample to then be normalized in real time, preferably after 1500 ms. All I get is clipping. Is there a way to ramp using normalization? The line~ just won’t work for me. adsr~? Tried and failed!