mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-08 20:43:51 +00:00
Working codec2 support
This commit is contained in:
1 parent
549b2356d6
commit
62b55523c2
150 files changed
+14078
-3
No files matched your search
@@ -0,0 +1,37 @@
|
||||
% pulse.m
|
||||
% David Rowe August 2009
|
||||
%
|
||||
% Experiments with human pulse perception for sinusoidal codecs
|
||||
|
||||
function pulse(samname)
|
||||
|
||||
A = 1000;
|
||||
K = 16000;
|
||||
N = 80;
|
||||
frames = K/N;
|
||||
s = zeros(1,K);
|
||||
|
||||
for f=1:frames
|
||||
% lets try placing np random pulses in every frame
|
||||
|
||||
P = 20 + (160-20)*rand(1,1);
|
||||
Wo = 2*pi/P;
|
||||
L = floor(pi/Wo);
|
||||
sf = zeros(1,N);
|
||||
for m=1:L/2:L
|
||||
pos = floor(rand(1,1)*N)+1;
|
||||
%pos = 50;
|
||||
for l=m:m+L/2-1
|
||||
sf = sf + A*cos(l*Wo*((f-1)*N+1:f*N) - pos*l*Wo);
|
||||
endfor
|
||||
endfor
|
||||
s((f-1)*N+1:f*N) = sf;
|
||||
endfor
|
||||
|
||||
plot(s(1:250));
|
||||
|
||||
fs=fopen(samname,"wb");
|
||||
fwrite(fs,s,"short");
|
||||
fclose(fs);
|
||||
endfunction
|
||||
|
||||
Reference in new issue
Block a user