function y = notegp(f,t,Fe)
%        y = notegp(f,t,Fe)
% note pour la gamme perpetuelle
%-------------------------------

h = 1/Fe;
th = 0:h:t;
nt = length(th);

% harmoniques en octaves seulement
y = 0;
for n = -10:10
    fn = 2^n*f;
    if (32 <= fn) & (fn <= 8192)
        H = 1+cos(pi*(2*log2(fn)-18)/8);
        H = H^2;
    else
        H = 0;
    end
    y = y + H*sin(2*pi*fn*th);
end

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