Dawn@4: function [H1H2, H2H4] = func_GetH1H2_H2H4(H1, H2, H4, Fs, F0, F1, F2, B1, B2) Dawn@4: % [H1H2, H2H4] = func_GetH1H2_H2H4(H1, H2, H4, Fs, F0, F1, F2, B1, B2) Dawn@4: % Input: H1, H2, H4, vectors Dawn@4: % Fs - sampling frequency Dawn@4: % F0 - vector of fundamental frequencies Dawn@4: % Fx, Bx - vectors of formant frequencies and bandwidths Dawn@4: % Output: H1A1, H1A2, H1A3 vectors Dawn@4: % Notes: Function produces the corrected versions of the parameters. They Dawn@4: % are stored as HxHx for compatibility reasons. Use func_buildMData.m to Dawn@4: % recreate the mat data with the proper variable names. Dawn@4: % Also note that the bandwidths from the formant trackers are not currently Dawn@4: % used due to the variability of those measurements. Dawn@4: % Dawn@4: % Author: Yen-Liang Shue, Speech Processing and Auditory Perception Laboratory, UCLA Dawn@4: % Copyright UCLA SPAPL 2009 Dawn@4: Dawn@4: Dawn@4: if (nargin == 7) Dawn@4: B1 = func_getBWfromFMT(F1, F0, 'hm'); Dawn@4: B2 = func_getBWfromFMT(F2, F0, 'hm'); Dawn@4: end Dawn@4: Dawn@4: Dawn@4: H1_corr = H1 - func_correct_iseli_z(F0, F1, B1, Fs); Dawn@4: H1_corr = H1_corr - func_correct_iseli_z(F0, F2, B2, Fs); Dawn@4: H2_corr = H2 - func_correct_iseli_z(2*F0, F1, B1, Fs); Dawn@4: H2_corr = H2_corr - func_correct_iseli_z(2*F0, F2, B2, Fs); Dawn@4: H4_corr = H4 - func_correct_iseli_z(4*F0, F1, B1, Fs); Dawn@4: H4_corr = H4_corr - func_correct_iseli_z(4*F0, F2, B2, Fs); Dawn@4: Dawn@4: H1H2 = H1_corr - H2_corr; Dawn@4: H2H4 = H2_corr - H4_corr; Dawn@4: Dawn@4: Dawn@4: