function spec = createExcitationSpectrums(pitch,size,nbPartials,partialsWeights,dif,hammingWindows)
spec = zeros(size,nbPartials);
if (pitch)
    for harm = 1:nbPartials
        freq  =pitch*harm+1;
        low = floor(freq-dif/2);
        low = max(low,1);
        high = ceil(freq+dif/2);
        len = high-low+1;
        
        spec(low:high,harm) = hammingWindows{len}*partialsWeights(harm);
        spec(low:high,harm) = spec(low:high,harm)/max(spec(low:high,harm));
    end
end
spec(size+1:end,:)=[];

