function y = flute(f,t,Fe)
%        y = flute(f,t,Fe)
% imitation flute
%-----------------------------------------

h = 1/Fe; th = 0:h:t;

n = 6; 
harm = 1:n;
am = [2 .1 .05 .001 .002 .001];
%am = [16 4 1 .00 .00 .00]; % pour ladomi
f = harm*f;

% harmoniques
y = zeros(1,length(th));
for k = 1:n
    z = cos(2*pi*f(k)*th);
    y = y + am(k)*z;   
end

% enveloppe
tr = t*[0 .2 .9 1];
yr = [0 1 .9 0];
y = y.*envelop(tr,yr,Fe);
y = .99*y/(max(abs(y)));
