[x,fs] = wavread('clar.wav');
[f,m,n,bw,T] = yasa(x,512,2,60,fs);
[F,M,N,BW] = maketracks(f,m,n,bw,1/1.03,1.03);
[zs,zn] = synthsntrax(F,M,N,fs,512/2,120);
zr = 4*zs + zn;
soundsc(zr,fs)
break

[x,fs] = wavread('speech.wav');
y = filter([1 -0.95],1,x); %preemphasis
[f,m,n,bw,T] = yasa(y,512,2,60,fs);
[F,M,N,BW] = maketracks(f,m,n,bw,1/1.03,1.03);
[zs,zn] = synthsntrax(F,M,N,fs,512/2);
zr = 2*zs+zn;
xr = filter(1,[1 -0.95],zr); %deemphasis
soundsc(xr,fs)
soundsc(x,fs)

%time stretch
[zs,zn] = synthsntrax(F,M,N,fs,512/2,120,3);
zr = 2*zs+zn;
xr = filter(1,[1 -0.95],zr); %deemphasis
soundsc(xr,fs)
%pitch shift
[zs,zn] = synthsntrax(2*F,M,N,fs,512/2,120);
zr = 2*zs+zn;
xr = filter(1,[1 -0.95],zr); %deemphasis
soundsc(xr,fs)

%noise reduction...
% analyze with higher beta in yasa
% reduce Fmin,Fmax and possibly Aratio in maketracks


