f0 = [338.62]; % First frequcney I found, you can add more f1 = [514.69]; f2 = [561.81]; amp = 3; % controls the pitch Fs = 15000; % Samples per second Ts = 1/Fs; T = 0:Ts:4; %play each frequency for 1 second, increasing will increase loading time edamp = exp(-5*T); %high dampening factor of 5 x = []; x2 =[]; x3=[]; for freq = f0 for i = 1:length(T) x = [ x, amp * edamp(i)* sin(2*pi*freq*T(i))]; end disp(freq); %helps me see loading progress end for freq = f1 for i = 1:length(T) x2 = [ x2, amp * edamp(i)* sin(2*pi*freq*T(i))]; end disp(freq); %helps me see loading progress end for freq = f2 for i = 1:length(T) x3 = [ x3, amp * edamp(i)* sin(2*pi*freq*T(i))]; end disp(freq); %helps me see loading progress end sound((x+x2+x3),Fs)