% 
% expander.m
% example call of DAFX compexp function + plot


close all;
clear all;

filename='acoustic.wav';


% read the sample waveform
[x,Fs,bits] = wavread(filename);

comp = 0.5; %set Expandor
a = 0.5;

y = compexp(x,comp,a,Fs);

% write output
wavwrite(y,Fs,bits,'out_expander.wav');

figure(1);


hold on
plot(x,'b');

plot(y,'r');

title('Expander Signal');