# MATLAB- Add Envelope to Sound Signal

I’m in the process of making a convolution reverb and I’m trying to add an envelope to my impulse response signal and plot it in order to change the RT60 of my sound signal (Just a song). I’ve looked at the documentation on adding an envelope, but it doesn’t mention how to use the envelope for a signal that being sampled. The code is shown below.

I just want to know how I can add an envelope to my sound signal and adjust it so I can make the envelope bigger/smaller.

[im,Fsim]=audioread('foobar.wav');

[up,lo]=envelope(im,10)

plot(im)

title('IR')
xlabel('Time(s)')
ylabel('Amplitude')

• Mathematically, that just sounds like a multiplication with a slowly changing scalar, or am I missing something? – Marcus Müller Mar 16 '20 at 14:06
• @MarcusMüller That is correct, the scalar value would be the RT60. So in the code the user would change this varible and the amount of reverberation would be adjusted. – Neamus Mar 16 '20 at 14:29
• The conventional/simple way to reverberate a signal is to convolve the (sampled) sound signal with a sampled/generated impulse response. It is possible to dereverberate a signal using full band/spectral envelope processing (tightening in the decay), but I fail to see how one might extend the decay without adding "something" into that part of the envelope? – Knut Inge Mar 16 '20 at 15:07
• So I take it foobar.wav is your impulse response. What is envelope()? – Dan Szabo Mar 16 '20 at 16:17
• @DanSzabo Its the function that I want to use on the impulse response – Neamus Mar 16 '20 at 16:49