% gamme en tons perpetuelle
%--------------------------

clear all; close all;

Fe = 22050; h = 1/Fe;
f0 = 110*2^(1/4); t = 1;
ton = 2^(1/6);
N = 14;

x = [];
for k = 0:N
    f = f0*ton^k;
    x = [x, notegp(f,t,Fe)];
end

% crescendo et diminuando
t = (length(x)-1)/Fe;
tr = t*[0 .5 .7 1];
yr = [0 .9 1 0];
env = envelop(tr,yr,Fe);
x = x.*env;

sound(x,Fe);
%wavwrite(x,Fe,'../SONS/401gperpet.wav');
aux = voirspec(x,Fe,8200,1024);
