The “making of” series continues with part 2 of the Match Envelope VST plug-in, where I iterate and improve on its features to ensure high quality processing that does not unintentionally degrade or otherwise modify the audio in unexpected ways.

One of the mistakes in this formula was in comparing the interpolated value ‘ival’ with the actual sample amplitude of the ‘buffer’.  To remedy this, I now also extract the envelope of the destination audio that we are applying the envelope on to (with the same window width used to extract the source envelope) and use this value to compare the difference with ‘ival’.  This ensures a more consistent and accurate comparison of amplitudes.