From 7592194eecdefd5b2a6a19483123668296c45729 Mon Sep 17 00:00:00 2001 From: Gabri6 Date: Thu, 30 Mar 2023 17:42:29 +0200 Subject: [PATCH] temporal curve of each signal displayed --- vocoder.m | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/vocoder.m b/vocoder.m index 0b71b55..090079c 100644 --- a/vocoder.m +++ b/vocoder.m @@ -19,3 +19,27 @@ outfile = 'vocodedsound.wav' if sr1~=sr2, disp('your sampling rates dont match'); end y = chanvocoder(carrier, modul, 512, 16, .2); audiowrite(outfile, y, sr1); + +figure; + +subplot(3,1,1); +t=[1:1:size(modul,1)]; + +plot(t,modul); +xlabel('Time (s)'); +ylabel("Modulator's Amplitude (a.u.)"); + +subplot(3,1,2); +t=[1:1:size(carrier,1)]; + +plot(t,carrier); +xlabel('Time (s)'); +ylabel("Carrier's Amplitude (a.u.)"); + +subplot(3,1,3); +[y fs]=audioread(outfile); +t=[1:1:size(y,1)]; + +plot(t,y); +xlabel('Time (s)'); +ylabel("Outfile's Amplitude (a.u.)"); \ No newline at end of file