tomwalters@0: % tool tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: tomwalters@0: tomwalters@0: function res=genton(nr_comps,nr_harm,f0,len) tomwalters@0: tomwalters@0: if nargin < 4 tomwalters@0: len=0.3; tomwalters@0: end tomwalters@0: tomwalters@0: s1=signal(len,16000); %erster Ton tomwalters@0: tomwalters@0: fundamental=f0; tomwalters@0: fcs=nr_harm*f0; tomwalters@0: bandwidth=(nr_comps-1)*f0; tomwalters@0: s=sprintf('sig=genharmonics(s1,''fundamental'',''%f'',''filterprop'',[%f 1 %f 1]);',fundamental,fcs,bandwidth); tomwalters@0: eval(s); tomwalters@0: tomwalters@0: sig=scaletomaxvalue(sig,1); tomwalters@0: sig=RampAmplitude(sig,0.01); % baue eine Rampe tomwalters@0: tomwalters@0: sig=setname(sig,sprintf('Fundamental:%dHz',round(f0))); tomwalters@0: res=sig;