Attack and sustain are separate things to a listener and a single number to a compressor. A transient shaper splits them by running two envelope followers at different speeds and looking at the gap between them.
How the detection works
The fast follower reacts in about 1 ms, so it climbs with the front of every note. The slow follower takes as long as the response control says, so it lags behind.
While the fast one is ahead, the signal is in its attack. While it is behind, the signal is decaying. That difference in dB is what the attack and sustain controls are scaled against, which is why there is no threshold: a quiet hit has the same envelope shape as a loud one and gets the same treatment.
Attack
Attack runs from -12 to +12 dB and applies only during the leading edge of a note.
Positive values push the stick, pick, or consonant forward, which reads as more definition without any change in overall level. Negative values round the front off, which is the fastest way to calm a clicky kick drum or a hard piano attack.
Sustain
Sustain covers everything after the front of the note, over the same -12 to +12 dB range.
Positive values pull the tail up: longer cymbals, more room, more of a guitar’s ring. Negative values shorten the decay, which tightens drums and removes bleed. This is where a transient shaper does something a gate cannot, because the decay is faded rather than cut at a threshold.
Response
Response sets the slow follower’s attack time between 5 and 200 ms, so it decides how much of each note is treated as its front.
30 ms is a reasonable default for drums. Sources with a soft start, like bowed strings or a synth pad, need 80 ms or more before the shaper reacts to anything at all.
Output
Output trims the result by up to 6 dB either way. Raising attack and sustain together raises the whole file, so this is where you take the difference back out before comparing.
Example: a room-heavy drum loop
Attack +4 dB, sustain -5 dB, response 25 ms, output -1 dB.
The hits come forward, the room between them drops back, and the loop sits in a mix without needing a gate.