% Chowning, variation de f1
%--------------------------

clear all; close all;

Fe = 22050;
f0 = 220; T = 1.5;
h = 1/Fe; t = 0:h:T;

f1 = f0*(1+.5*(0:5));
beta  = 2*f0;
lf = length(f1);

tt = Fe/2+(1:ceil(10*Fe/f0)); % pour plot

tr = T*[0 .002 .3 .9 1];
yr = [0 1 .4 .1 0];
env = envelop(tr,yr,Fe);
y = [];
silence = zeros(1,round(Fe/2));

for k = 1:lf
    s = sin(2*pi*f0*t+beta*sin(2*pi*f1(k)*t)/f1(k));
    s = .95*s.*env;
    num = num2str(k);
    subplot(lf,1,k);
    plot(t(tt),s(tt));
    sound(s,Fe); pause(T+1);
    y = [y silence s];
end

%wavwrite(y,Fe,'../SONS/601chowning.wav');
