When you change the length of the sample, you can automatically set the envelope length to the new sample length.
Procedure
Result
The envelope length is modified to match the length of the sample.
Note
When you change the sample length by adjusting the Speed parameter on the Resynth page or when you loop a sample, it can be necessary to adjust the envelope length manually after applying Scale Envelope to Length of Sample.