% bruit blanc (un peu gris : [50 Fe/2] Hz)
%-----------------------------------------

clear all; close all;

Fe = 22050; h = 1/Fe;
f0 = 440; T =  2;
th = 0:h:T;
N = 1000;
n = length(th);

% frequences et phases aleatoires
f = 50 + (Fe/2-50)*rand(1,N);
y = 0*th;
teta = rand(1,N)*2*pi;

% addition des partiels
for k = 1:N
    y = y+cos(2*pi*f(k)*th+teta(k));
end
plot(abs(fft(y)));
y = .3*y/max(abs(y));
sound(y,Fe);
%wavwrite(y,Fe,'../SONS/114bruitblanc.wav');
