% accords majeurs sur les trois gammes
%-------------------------------------

clear all; close all;

Fe = 22050; h = 1/Fe;
f0 = 110*2^(1/4); t = 2;
n = length(0:(1/Fe):t);

% accord majeur tempere
%----------------------
fr = f0*2.^([0 4 7]/12);
x = zeros(1,n);
for k = 1:3
    x = x + (-1)^k*orgue(fr(k),t,Fe);
end
x = .98*x/(max(abs(x)));
sound(x,Fe);
pause(1)
%wavwrite(x,Fe,'../SONS/307acctemp.wav');

% accord majeur Pythagore
%------------------------
fr = f0*[1 81/64 3/2];
x = zeros(1,n);
for k = 1:3
    x = x + (-1)^k*orgue(fr(k),t,Fe);
end
x = .98*x/(max(abs(x)));
sound(x,Fe);
pause(1)
%wavwrite(x,Fe,'../SONS/308accpyth.wav');

% accord majeur Zarlino
%----------------------
fr = f0*[1 5/4 3/2];
x = zeros(1,n);
for k = 1:3
    x = x + (-1)^k*orgue(fr(k),t,Fe);
end
x = .98*x/(max(abs(x)));
sound(x,Fe);
%wavwrite(x,Fe,'../SONS/309acczarl.wav');