end of report maybe
This commit is contained in:
parent
4dabe5838c
commit
5fd306c88f
Binary file not shown.
Binary file not shown.
28
vocoder.m
28
vocoder.m
|
|
@ -1 +1,27 @@
|
|||
pkg load signal
|
||||
pkg load signal
|
||||
|
||||
modfile = 'modulator22.wav';
|
||||
carfile = 'carrier22.wav';
|
||||
outfile = "vocodedsound.wav";
|
||||
[modul, sr1] = audioread(modfile);
|
||||
[carrier, sr2] = audioread(carfile);
|
||||
[outfile, sr3] = audioread(outfile);
|
||||
if sr1~=sr2, disp('your sampling rates dont match'); end
|
||||
y = chanvocoder(carrier, modul, 512, 16, .2);
|
||||
audiowrite(outfile,y,sr1)
|
||||
tmod=0:1/sr1:length(modul)/sr1-1/sr1;
|
||||
tcarrier=0:1/sr2:length(carrier)/sr2-1/sr2;
|
||||
tout=0:1/sr3:length(outfile)/sr3-1/sr3;
|
||||
|
||||
|
||||
plot(tmod,modul);
|
||||
xlabel("time(s)");
|
||||
ylabel('amplitude modul (norm. unit)');
|
||||
subplot(3,1,2);
|
||||
plot(tcarrier,carrier);
|
||||
xlabel("time(s)");
|
||||
ylabel('amplitude carrier (norm. unit)');
|
||||
subplot(3,2,3);
|
||||
plot (tout,outfile);
|
||||
xlabel("time(s)");
|
||||
ylabel('amplitude outfile (norm. unit)');
|
||||
Binary file not shown.
Loading…
Reference in New Issue