mgif_ps2.m

来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 105 行

M
105
字号
%
% Manuall glottal inverse filtering algorithm
% The inverse filter can be adjusted by hand using formant frequency 
% and bandwidths.
% Author : Minkyu Lee
% Date 10-Oct-1994
%

% Crude estimation of gain and formant frequencies and bandwidths.
% Here, the gain, ff1, ff2, ff3, ff4, fb1, fb2, fb3 and fb4 will be 
% estimated roughly in this script.
	
cur_gci=cur_gci+1;

if cur_gci < num_gci
	ydata_m=SPEECH(gci_m(cur_gci)+NEW_LEFT-ext_left:...
			gci_m(cur_gci+1)+NEW_LEFT+ext_right);
	
	% Plot the position of current frame
	figure(ana_wav_win_h);
	
	

	mgif_es;

	set(mgif_sl_gain_h,'Value',gain);
	set(mgif_sl_ff1_h,'Value',ff(1));
	set(mgif_sl_fb1_h,'Value',fb(1));
	set(mgif_sl_ff2_h,'Value',ff(2));
	set(mgif_sl_fb2_h,'Value',fb(2));
	set(mgif_sl_ff3_h,'Value',ff(3));
	set(mgif_sl_fb3_h,'Value',fb(3));
	set(mgif_sl_ff4_h,'Value',ff(4));
	set(mgif_sl_fb4_h,'Value',fb(4));
	set(mgif_sl_ff5_h,'Value',ff(5));
	set(mgif_sl_fb5_h,'Value',fb(5));
	set(mgif_ed_gain_h,'String',gain);
	set(mgif_ed_ff1_h,'String',ff(1));			
	set(mgif_ed_fb1_h,'String',fb(1));
	set(mgif_ed_ff2_h,'String',ff(2));	
	set(mgif_ed_fb2_h,'String',fb(2));
	set(mgif_ed_ff3_h,'String',ff(3));	
	set(mgif_ed_fb3_h,'String',fb(3));
	set(mgif_ed_ff4_h,'String',ff(4));	
	set(mgif_ed_fb4_h,'String',fb(4));
	set(mgif_ed_ff5_h,'String',ff(5));
	set(mgif_ed_fb5_h,'String',fb(5));
	
	mgif_go;
else
	disp('This is the end of this analysis frame')
	figure(mgif_plot_win_h);
	set(mgif_plot_win_h,'Name','Pitch & formant tracks');
	plot(TRACK);
   clear dg_final g_final gci_m;
   PV=[2 22 290 388];
s2 = 'Manual GIF control box';

% Open analysis window
while exist('mgif_con_win_h')==1
   try1 = 'get(mgif_con_win_h,''position'');';
   eval(try1,catch2);
   if check ==0
      clear mgif_con_win_h;
      check = 1;
      break;
   end
   s1 = get(mgif_con_win_h,'Name');
   if ~strcmp(s1,s2)
      clear mgif_con_win_h;
      break;
   end
   figure(mgif_con_win_h);
   break;
end;

if exist('mgif_con_win_h')~=1;
   mgif_con_win_h=figure('Position',PV,...
      'Resize','on',...
      'Numbertitle','off',...
      'color',BACK_COLOR,...
      'Name',s2);
end;
clf;
mgif_done_display = uicontrol('Style','text',...
   'Position',[10 170 200 30],...
   'String','Manual Glottal Inverse Filtering is completed!!',...
   'BackgroundColor','white',...
   'ForegroundColor','blue');

mgif_pb_re_h=uicontrol('Style','pushbutton',...
      'Position',[10 120 200 30],...
      'Callback','mgif_ca',...
      'String','Cancel');
   
   if gif_mark_flag == 1;
      SPEECH = SPEECH_OLD_A;   
      gif_mark_flag = 0;
      NEW_LEFT = 1;
      NEW_RIGHT = length(SPEECH);
      NEW_LEN = length(SPEECH);
   end
   return
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?