⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m1_w2.m

📁 这是一个用于语音信号处理的工具箱
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	
%	m1_w2.m
%
%	callback for window-display pushbutton 2 for m1
%
%	MINIMUM DURATIONS WINDOW
%
%	jmw
%	6/8/94
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if (~isempty(w2_h))
	;
	% do nothing, window is already open
	return;	
else
		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% do following ONLY if window was just opened

% initialize/update MD values

MD = [vwl_md nas_md smv_md bar_md vfr_md ust_md ufr_md sil_md];

% initialize window:

if (isempty(w2_saved_position))
	w2_h=figure('Position',[50 50 565 330],'Numbertitle','off','Name',...
	'MD''s: Minimum Durations','Resize','on',...
	'Color',BACK_COLOR); % was 440 wide
else
	w2_h=figure('Position',w2_saved_position,'Numbertitle','off','Name',...
	'MD''s: Minimum Durations','Resize','on',...
	'Color',BACK_COLOR);
end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% add 'OK' function button

w2_pb_ok_h=uicontrol('Position',[20 280 60 30],'String','OK',...
'Callback','w2_ok');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% add 'Defaults' function button

w2_pb_defaults_h=uicontrol('Position',[350 280 60 30],'String','Defaults',...
'Callback','w2_de');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% add 'Update' function button

w2_pb_update_h=uicontrol('Position',[110 280 60 30],'String','Update',...
'Callback','w2_up','Visible', 'off');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% add 'Cancel' function button

w2_pb_cancel_h=uicontrol('Position',[200 280 60 30],'String','Cancel',...
'Callback','w2_ca','Visible', 'off');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% add control pairs (8) (slider and text/value windows)

% slider and text/value positions
w2_s_pos(1,:) = [165 230 375 20];	% slider (was 250 length)
w2_e_pos(1,:) = [115 230 40 20 ];	% edit/text/value box
w2_t_pos(1,:) = [-30  200 ];

for i=2:8,
	w2_s_pos(i,:) = w2_s_pos(i-1,:) + [ 0 -30 0 0 ];
	w2_e_pos(i,:) = w2_e_pos(i-1,:) + [ 0 -30 0 0 ];
	w2_t_pos(i,:) = w2_t_pos(i-1,:) + [0 -30 ];
end;

% make sliders

for i=1:8,
	w2_s_h(i)=uicontrol('Style', 'Slider','Position',w2_s_pos(i,:),...
	'Value',MD(i),'Callback','w2_s','Units','Pixels',...
	'Max',3000); % was 2000 max
end;

% make test/value displays
for i=1:8,
	w2_e_h(i)=uicontrol('Style','Edit','Position',w2_e_pos(i,:),...
	'String',sprintf('%3.1f',MD(i)/10));
end;

% make phoneme-type labels

	text('Units','Pixels','Position',w2_t_pos(1,:),'String', 'Vowel',...
      'Color',TEXT_COLOR);
   text('Units','Pixels','Position',w2_t_pos(2,:),'String', 'Nasal',...
		'Color',TEXT_COLOR);
	text('Units','Pixels','Position',w2_t_pos(3,:),'String', 'Semivwl',...
      'Color',TEXT_COLOR);
   text('Units','Pixels','Position',w2_t_pos(4,:),'String', 'Voicebar',...
		'Color',TEXT_COLOR);
	text('Units','Pixels','Position',w2_t_pos(5,:),'String', 'V. Fric.',...
      'Color',TEXT_COLOR);
   text('Units','Pixels','Position',w2_t_pos(6,:),'String', 'Unv. Stop',...
		'Color',TEXT_COLOR);
	text('Units','Pixels','Position',w2_t_pos(7,:),'String', 'Unv. Fric.',...
      'Color',TEXT_COLOR);
   text('Units','Pixels','Position',w2_t_pos(8,:),'String', 'Silent',...
		'Color',TEXT_COLOR);
	axis off;
end;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%end;	% end ~isempty(w2_h) 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear w2_s_pos w2_e_pos  w2_t_pos i

⌨️ 快捷键说明

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