Help with echo effect to audio signal code?

6 visualizaciones (últimos 30 días)
Anne Nguyen
Anne Nguyen el 20 de Oct. de 2019
Respondida: Saisruthi Bandla el 29 de Feb. de 2020
How do I create a function that will add an echo effect to the audio signal? The function should take in the sound vector, sampling frequency, delay in seconds, and echo amplitude. The function should return a vector containing the echoed sound.
The function must:
(a) Take in the audio vector and sampling frequency, delay and echo gain.
(b) Convert the delay in seconds to number of samples: delaySamples = Fs * delay;
(c) Figure out a way to add a delayed version of the signal vector to the original audio vector: delaySamples tells you how many elements the offset needs to be. echoGain sets the amplitude of the echo signal (0.5 = 50% amplitude, 1 = 100% amplitude, 1.5 = 150% amplitude, etc.) to be added.
(d) Return the new version of your audio vector:
Then, play the new version of the audio vector.
What I have so far is:
function [audioVecEcho] = audioEcho(audioVec, Fs, delay, echoGain)
audioVecEcho = 7 %dummy value
end
I am very stuck, any help would be appreciated. Thank you!

Respuestas (2)

Kaashyap Pappu
Kaashyap Pappu el 23 de Oct. de 2019
The Audio Toolbox has an Echo object that could cater to your needs. Create the object using the following code:
echoObject = audioexample.Echo
Pass the audio signal to the object to get the signal with echo included.
To learn more about this object, type the following command into the console:
edit('audioexample.Echo')
Hope this helps!

Saisruthi Bandla
Saisruthi Bandla el 29 de Feb. de 2020
Hello,
I have the same question. Can you provide me with some sample code to run off of? I am really confused on how to start this off.

Categorías

Más información sobre Signal Processing Toolbox en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by