Convolution of Audio Signals

19 Ansichten (letzte 30 Tage)
Shubhra Sinha
Shubhra Sinha am 23 Apr. 2020
Kommentiert: Walter Roberson am 21 Dez. 2021
I'm trying to convolve audio signal with impulse response but every time it's giving error as "A & A must be in vector forms"
[sig1, fs] = audioread('mysong1.wav'); % import the song
t = [1:length(sig1)]/fs;
subplot(3,1,1)
plot(t, sig1) % plot the song
xlabel('t (second)')
ylabel('Relative signal strength')
title('Song')
[sig2, fs] = audioread('StNCh.wav'); % import the song
t1 = [1:length(sig2)]/fs;
subplot(3, 1, 2)
plot(t1, sig2) % plot the song
xlabel('t1 (second)')
ylabel('Relative signal strength')
title('Impulse Response')
w = conv(sig1,sig2);
t2 = 0:1:10;
subplot(3,1,3);
plot(t2,w);
xlabel('t2 (second)')
ylabel('Relative signal strength')
title('Convolved Signal')
Please help me to figure out this.
  5 Kommentare
Shubhra Sinha
Shubhra Sinha am 23 Apr. 2020
Okay, Thank you Walter...
Ricardo Reyes
Ricardo Reyes am 13 Okt. 2020
do you have the code fixed up?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Michael Ndungi
Michael Ndungi am 8 Jun. 2021
[sig1, fs] = audioread('mysong1.wav'); % import the song
t = [1:length(sig1)]/fs;
subplot(3,1,1)
plot(t, sig1) % plot the song
xlabel('t (second)')
ylabel('Relative signal strength')
title('Song')
[sig2, fs] = audioread('StNCh.wav'); % import the song
t1 = [1:length(sig2)]/fs;
subplot(3, 1, 2)
plot(t1, sig2) % plot the song
xlabel('t1 (second)')
ylabel('Relative signal strength')
title('Impulse Response')
w = conv(sig1,sig2);
t2 = 0:1:10;
subplot(3,1,3);
plot(t2,w);
xlabel('t2 (second)')
ylabel('Relative signal strength')
title('Convolved Signal')
  3 Kommentare
Nurafiqah Mukhtar
Nurafiqah Mukhtar am 21 Dez. 2021
i cant use this coding.. may i know why?
wave convolution not came out.
Walter Roberson
Walter Roberson am 21 Dez. 2021
I described some reasons in the comments I posted earlier.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Audio Processing Algorithm Design finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by