%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;
pitchScale = 2;

signalPitch = pitchShift(signal,pitchScale,Sr,hannWindowLength); 

%original sudio clip
wavplay(signal,Sr)

%time stretched signal
wavplay(signalPitch,Sr)

%wavwrite(signalPitch,Sr,16,'ToneENG2FIRE_pitchShift_upOctave.wav')

clear encode;
clear decode;
clear interpolate;