Example 1
%audio signal processing using lowpass Filter
clear all; close all;
fs=44100;
y=audioread('dsp.mp3'); %VideoReader(filename) or
p=audioplayer(y,fs); %VideoReader(filename,Name,Value) for video Signal
play(p); % You can choose any MP3 file which need to save in the folder where %main program is store
stop(p);
k=awgn(y,10);
sound(k,fs);
clear sound;
filtering=fdesign.lowpass('Fp,Fst,Ap,Ast',2000,2500,0.5,50,fs);
d=design(filtering);
s=filter(d,k);
sound(s,fs);
clear sound;
subplot(411);
plot(y);
subplot(412);
plot(k);
subplot(413);
plot(s);
% %creating echo in a audio signal
sterio=y;
N=fs/2;
for n=N+1:length(y);
sterio(n,1)=y(n,1)+y(n-N,2); %procrastinating signal from right to left
sterio(n,2)=y(n,2)+y(n-N,1); %procrastinating signal from left to right
end
sound(sterio,fs);
clear sound;
subplot(414);
plot(sterio);
%
y_left=y(:,1);
y_right=y(:,2);
left_minus_right=y_left-y_right;
sound(left_minus_right,fs);
clear sound;
% plot(sterio);
%
%reducing or removing echo (some portion of the signal)
%audio signal processing using lowpass Filter
clear all; close all;
fs=44100;
y=audioread('dsp.mp3'); %VideoReader(filename) or
p=audioplayer(y,fs); %VideoReader(filename,Name,Value) for video Signal
play(p); % You can choose any MP3 file which need to save in the folder where %main program is store
stop(p);
k=awgn(y,10);
sound(k,fs);
clear sound;
filtering=fdesign.lowpass('Fp,Fst,Ap,Ast',2000,2500,0.5,50,fs);
d=design(filtering);
s=filter(d,k);
sound(s,fs);
clear sound;
subplot(411);
plot(y);
subplot(412);
plot(k);
subplot(413);
plot(s);
% %creating echo in a audio signal
sterio=y;
N=fs/2;
for n=N+1:length(y);
sterio(n,1)=y(n,1)+y(n-N,2); %procrastinating signal from right to left
sterio(n,2)=y(n,2)+y(n-N,1); %procrastinating signal from left to right
end
sound(sterio,fs);
clear sound;
subplot(414);
plot(sterio);
%
y_left=y(:,1);
y_right=y(:,2);
left_minus_right=y_left-y_right;
sound(left_minus_right,fs);
clear sound;
% plot(sterio);
%
%reducing or removing echo (some portion of the signal)
Comments
Post a Comment