%Vocoder example using the vocoding engine created

[signal,Sr] = wavread('ToneENG2FIRE.wav');
%[signal,Sr] = wavread('flute-C5.wav');

%1024 is good for this sample, a large or smaller one can be used depending
%on the Sr,
hannWindowLength = 1024;
timeScale = 3;

signalStretch = timeStretch(signal,timeScale,Sr,hannWindowLength);

%original sudio clip
wavplay(signal,Sr)

%time stretched signal
wavplay(signalStretch,Sr)

%wavwrite(signalStretch,Sr,16,'ToneENG2FIRE_stretch_2X.wav')

%used only during debugging
clear encode;
clear decode;
clear interpolate;