%fs=44000*2;

fs=200000;

puvodni=loadwav('01_R_cut.wav',200000);

sp=abs(fft(puvodni,fs));

src=sp;

src_w=puvodni;



puvodni=loadwav('01 blade 128k_mp3_r_cut.wav',200000);

sp=abs(fft(puvodni,fs));

rblade=src-sp;

rblade_w=src_w-puvodni;



puvodni=loadwav('01 onlyh_mp3_r_cut.wav',200000);

sp=abs(fft(puvodni,fs));

rnotlame=src-sp;

rnotlame_w=src_w-puvodni;



puvodni=loadwav('01 min128k vbr_mp3_r_cut.wav',200000);

sp=abs(fft(puvodni,fs));

rvbr=src-sp;

rvbr_w=src_w-puvodni;



n=length(sp)/2;

figure;

plot(rblade(1:n),'b');

hold on;

plot(rnotlame(1:n),'r');

plot(rvbr(1:n),'g');

hold off;

title('Rozdily specter: blue=blade, red=notlame, green=vbr nl');



figure;

plot(rvbr(1:n),'g');

hold on;

plot(rnotlame(1:n),'r');

plot(rblade(1:n),'b');

hold off;

title('Rozdily specter: blue=blade, red=notlame, green=vbr nl');



figure;

plot(rblade_w,'b');

hold on;

plot(rnotlame_w,'r');

plot(rvbr_w,'g');

hold off;

title('Rozdily wavu: blue=blade, red=notlame, green=vbr nl');



blade=sum(abs(rblade))

notlame=sum(abs(rnotlame))

vbr=sum(abs(rvbr))



prb=100;

prnl=prb/blade*notlame

prv=prb/blade*vbr





return

figure;

subplot(3,1,1);

plot(rblade_w,'b');

subplot(3,1,2);

plot(rnotlame_w,'r');

subplot(3,1,3);

plot(rvbr_w,'k');

hold off;

title('Rozdily wavu: blue=blade, red=notlame, green=vbr nl');

