function s = clavecin(f1,T,Fe)
%        s = clavecin(f1,T,Fe)
% son de type clavecin
% B = inharmonicite, alpha = taux de decroissance
%---------------------------------------------------------

B = .01; 
alpha = 1;

h = 1/Fe;
th = 0:h:T;
n = min(42,ceil(Fe/2/f1));
N = 1:n;

% poids des harmoniques
a = N.^(-1.1);

% inharmonicite, log2(fn) = log2(n*f) + (inharm/1200)*n^2
cent = 2^(1/1200);
harm = N.*cent.^(B*N.^2);
f = harm*f1;

s = synthad(a,f,0*f,T,Fe);

t  = T*[0 .001 .9 1];
a  =   [0  1  1 0];
env = envelop(t,a,Fe);
s   = s.*env.*exp(-alpha*th);

%s = reverb(s,5,5,Fe);
