tomwalters@0: % method of class @signal tomwalters@0: % INPUT VALUES: tomwalters@0: % RETURN VALUE: tomwalters@0: % sig: @signal tomwalters@0: % bleeck@3: % This external file is included as part of the 'aim-mat' distribution package 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 sig=complexfilter(sig,formant_fre,formant_fre_width,formant_amp) tomwalters@0: % creates an vocal by filtering the signal (wich probably is a clicktrain) tomwalters@0: % in different formants tomwalters@0: tomwalters@0: nr_formants=length(formant_fre); tomwalters@0: tomwalters@0: for i=1:nr_formants tomwalters@0: fre=formant_fre(i); tomwalters@0: wid=formant_fre_width(i); tomwalters@0: fsig(i)=bandpass(sig,fre-wid,fre+wid,wid/10); tomwalters@0: % play(fsig(i)); tomwalters@0: end tomwalters@0: % plot(powerspectrum(fsig(1)),[10,13000],'b') tomwalters@0: % hold on tomwalters@0: % plot(powerspectrum(fsig(2)),[10,13000],'r') tomwalters@0: % plot(powerspectrum(fsig(3)),[10,13000],'g') tomwalters@0: % plot(powerspectrum(fsig(4)),[10,13000],'c') tomwalters@0: tomwalters@0: sumsig=fsig(1)*formant_amp(1); tomwalters@0: for i=2:nr_formants tomwalters@0: sumsig=sumsig+fsig(i)*formant_amp(i); tomwalters@0: end tomwalters@0: % plot(powerspectrum(sumsig),[10,13000],'k') tomwalters@0: sig=sumsig;