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