I'm trying to generate sounds as described in a scientific paper that I found on the Internet. What I need to do is to generate simple tones in a certain pattern, however I have some issues understanding how to do this correctly. The attached image contains the full description of the method. I'm stuck at "Thirteen tones of this sound .." .I'm confused about how this thirteen tones are selected and how to arrange them correctly. If anyone could provide some help, it would be much appreciated.
My code so far:
function testaudio()
sampleRate = 44100;
duration = 0.5;
freqs = [100 200 300 400 500 600 700 800 900 1000 1100 1200];
[signal t] = generateTone(freqs, sampleRate, duration);
sound(signal, sampleRate);
%generates a tone (pure or complex)
function [y t] = generateTone(freqs, sampleRate, duration)
timeSamples = duration * sampleRate;
t = linspace(0, duration, timeSamples);
y = zeros(size(t));
env = generateEnvelope(t);
for i=1:length(freqs)
temp = env.*sin(2*pi*freqs(i)*t);
y = y + temp;
end
% amplitude normalisation
y = y' / max(abs(y));
end
function y = generateEnvelope(t, alfa)
alfa = 1;
y = (-t.^alfa) .* log(t./max(t));
y(1) = 0;
end
end