Generating an Echo for an Audio Signal using Convolution

조회 수: 21 (최근 30일)
Abdelrhman Abdelfatah
Abdelrhman Abdelfatah 2022년 5월 10일
답변: mariam 2023년 12월 5일
[y,Fs] = audioread('Test1.wav');
delay=0.8*Fs; %Delay
attenuation_factor=0.4;
h=zeros(1,delay);%Impulse
h(delay)=attenuation_factor; %Impulse at delay
z=conv(y,h); %Convolution
sound(z,Fs)
The produced sound doesn't include the desired echo, and not sure why so. I would apprechiate the help

채택된 답변

Prakash S R
Prakash S R 2022년 5월 10일
편집: Prakash S R 2022년 5월 10일
z is simply the delayed input (echo). You forgot to add echo to the input! You are listening to the echo component only, not sound + echo

추가 답변 (1개)

mariam
mariam 2023년 12월 5일
[y,Fs] = audioread('Test1.wav');
delay=0.8*Fs; %Delay
attenuation_factor=0.4;
h=zeros(1,delay);%Impulse
h(delay)=attenuation_factor; %Impulse at delay
z=conv(y,h); %Convolution
sound(z,Fs)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by