function [freqs] = pitch(y, Fs, d)

freqs = [];
for i=[1:d:size(y, 2)-d]
    x = fft(y(i:i+d));
    freqs = [freqs transpose(abs(x(1:d/2 + 1)))];
end
