Compare commits
12 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a9fc99a7c3 | |
|
|
86e90223c9 | |
|
|
5c2bdd7c93 | |
|
|
6ecd441fd5 | |
|
|
dcaafdc9cf | |
|
|
9462461d5c | |
|
|
4b3a769f7e | |
|
|
5add8fd719 | |
|
|
a76c77d59a | |
|
|
1baf092627 | |
|
|
deeb433c9b | |
|
|
5b2dcbd87b |
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 185 KiB |
BIN
modulator22.wav
|
After Width: | Height: | Size: 283 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||