📄 m1_w1.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% m1_w1.m
%
% callback for window-display pushbutton 1 for m1
%
% SCALE FACTORS (GLOBAL) WINDOW
%
% jmw
% 6/8/94
% modified by D. G. Childers 2/16/98
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if (~isempty(w1_h))
;
% do nothing, window is already open
return;
else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% do following ONLY if window was just opened
% update SF vector
SF = [ vwl_sf nas_sf smv_sf bar_sf vfr_sf ust_sf ufr_sf sil_sf ];
% initialize window:
if (isempty(w1_saved_position))
w1_h=figure('Position',[50 50 440 330],'Numbertitle','off','Name',...
'SF''s: Scale Factors','Resize','on',...
'Color',BACK_COLOR);
else
w1_h=figure('Position',w1_saved_position,'Numbertitle','off','Name',...
'SF''s: Scale Factors','Resize','on',...
'Color',BACK_COLOR);
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'OK' function button
w1_pb_ok_h=uicontrol('Position',[20 280 60 30],'String','OK',...
'Callback','w1_ok');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'Unity' function button
w1_pb_unity_h=uicontrol('Position',[350 280 60 30],'String','Unity',...
'Callback','w1_unity');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'Update' function button
w1_pb_update_h=uicontrol('Position',[110 280 60 30],'String','Update',...
'Callback','w1_up','Visible', 'off');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add 'Cancel' function button
w1_pb_cancel_h=uicontrol('Position',[200 280 60 30],'String','Cancel',...
'Callback','w1_ca','Visible', 'off');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% add control pairs (8) (slider and text/value windows)
% slider and text/value positions
w1_s_pos(1,:) = [165 230 250 20]; % slider
w1_e_pos(1,:) = [115 230 40 20 ]; % edit/text/value box
w1_t_pos(1,:) = [-30 200 ];
for i=2:8,
w1_s_pos(i,:) = w1_s_pos(i-1,:) + [ 0 -30 0 0 ];
w1_e_pos(i,:) = w1_e_pos(i-1,:) + [ 0 -30 0 0 ];
w1_t_pos(i,:) = w1_t_pos(i-1,:) + [0 -30 ];
end;
% make sliders
for i=1:8,
w1_s_h(i)=uicontrol('Style', 'Slider',...
'Position',w1_s_pos(i,:),...
'Max',3,'Units','Pixels',...
'Value',SF(i),'Callback','w1_s');
end;
% make test/value displays
for i=1:8,
w1_e_h(i)=uicontrol('Style','Edit','Position',w1_e_pos(i,:),...
'String',sprintf('%3.2f',SF(i)));
end;
% make phoneme-type labels
%s=[];
%s(1)=Vowel ;
%s(2)=Nasal ;
%s(3)=Semivwl ;
%s(4)=Voicebar ;
%s(5)=V. Fric ;
%s(6)=Unv. Stop;
%s(7)=Unv. Fric;
%s(8)=Silent ;
text('Units','Pixels','Position',w1_t_pos(1,:),'String', 'Vowel',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(2,:),'String', 'Nasal',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(3,:),'String', 'Semivwl',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(4,:),'String', 'Voicebar',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(5,:),'String', 'V. Fric.',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(6,:),'String', 'Unv. Stop',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(7,:),'String', 'Unv. Fric.',...
'Color',TEXT_COLOR);
text('Units','Pixels','Position',w1_t_pos(8,:),'String', 'Silent',...
'Color',TEXT_COLOR);
axis off;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%end; % end ~isempty(w1_h)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear w1_s_pos w1_e_pos w1_t_pos i
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -