clear;
load('FurEliseData.mat');

N = length(lefthand);

% Syxnothta deigmatolhpsias
fs = 16000;

% As ftia3oume ta hmitona
for i = 1:N
    
	t = 0:1/fs:lhdur(i)/1000;
    
	if lefthand(i) == 0 
		% exoume paush
        s{i} = zeros(1, length(t));
    else % ftia3te to antistoixo hmitono me xrhsh tou pinaka
         % freq pou dhmiourghsate nwritera
        freq = % INSERT CODE HERE
        s{i} = % INSERT CODE HERE
    end
end

% Keno dianysma
signal_left = [ ];

% For loop gia na gemisoume to dianysma me ta diadoxika hmitona
for i = 1:N
% Se ka8e loop, bazoume ena s{i} sto telos tou
% prohgoumenou signal_left pou exoume ftia3ei
	signal_left = [ signal_left s{i} ];
end

% Epanalambanoume gia to de3i xeri

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INSERT CODE HERE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Diafora sta mege8h twn dyo kanaliwn
D = length(signal_right)-length(signal_left);

% Swsto aristero kanali
signal_left = [signal_left zeros(1, D)];

% A8roisma
sig = signal_left + signal_right;

% Enjoy!
soundsc(sig, fs);