Compare commits

...

12 Commits

18 changed files with 53 additions and 3 deletions

BIN
I.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
N.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
ONE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
Spectrogram_output.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
Spectrogram_output2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
TWO.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
Three.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
U.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
comparison.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

BIN
comparison_zoomed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

BIN
modulator_new.wav Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -1,5 +1,39 @@
[y,Fs] = audioread("modulator22.wav");
#y = y(1.95*Fs:2.05*Fs)
% n between 1 an d 1.1
% u between 1.45 and 1.6
% i between 1.95 and 2.05
t = (0:length(y)-1)/Fs;
plot(t, y);
xlabel("Timee (s)");
ylabel("Amplitude");
%[pwr, dur] = frequencySpectrum(y, Fs, 0);
%xlabel("Timee (s)");
%ylabel("Amplitude");
#spectrogram(y,Fs,5,5);
Factor_of_reduction = 2;
y_down = downsample(y,Factor_of_reduction);
y_decimate = decimate(y,Factor_of_reduction);
audiowrite("modulator_new.wav", y_down, Fs/Factor_of_reduction);
%plot (t,y,'b')
%hold on
%t2 = (0:length(y_down)-1)/(Fs/Factor_of_reduction);
%plot (t2,y_down,'r')
%t3 = (0:length(y_decimate)-1)/(Fs/Factor_of_reduction);
%plot (t3,y_decimate,'g');
Fc = 1000;
[b] = fir1 (30,2*Fc/Fs);
y_b = filter(b,1,y);
[a,c] = butter(8,2*Fc/Fs);
y_ac = filter(a,c,y);
plot (t,y_b);
hold on;
plot (t,y_ac,'r');
freqz(a,c);
freqz(b,1);

16
vocoder.m Normal file
View File

@ -0,0 +1,16 @@
pkg load signal
modfile = 'modulator22.wav';
carfile = 'white_periodic.wav';
outfile = 'vocodedsound.wav'
[modul, sr1] = audioread(modfile);
[carrier, sr2] = audioread(carfile);
if sr1~=sr2, disp('your sampling rates dont match'); end
% the chanvovoder function isn't availiable on Octave and i am not able to find an equivalent function
y = chanvocoder(carrier, modul, 512, 16, .2);
audiowrite(y,sr1,16,outfile)
subplot()
%% on the same figure temporal variation, carrier and output