📄 fmcor.m
字号:
% Script : correct the formant using the GCI display with the mouse.
% fmcor will coeerct one formant in the neighborhood of the mouse position.
%
% fmcor.m is a call_function executed by "cor_pb" on figure(Fchek_f).
if Fdefault==0 % correct the formant
% 1. secify the neighborhood for the mouse cross hair
figure(Fchek_f);
[xframe yformant]=ginput(1);
% 2. find the formant in the neighborhood of the mouse cross hair
region=Left:Rite;
[aa,xpoint]=min(abs(region-xframe));
xpoint=Left+xpoint-1;
ff=FF0(xpoint,:);
[aa,ypoint]=min(abs(ff-yformant));
% plot the selected formant
ori_ff=FF0(xpoint,ypoint);
hold on;
plot(xpoint,FF0(xpoint,ypoint),'rx');
hold off;
set(shift_up,'Visible','on');
set(shift_dw,'Visible','on');
set(undo_pb,'Visible','on');
set(apply_pb,'Visible','on');
elseif Fdefault==1 % load the default formant
clear signal FF0 FB0 vctyp0;
signal=speech;
vctyp0=vctyp;
FF0=FF;
FB0=FB;
set(undo_pb,'Visible','off');
set(apply_pb,'Visible','off');
% plot the formant track
plot(Left:Rite,FF0(Left:Rite,:),'k' );hold on
frm=find(vctyp0>0);
frm=frm( frm>=Left & frm<=Rite );
for kk=1:numf
plot(frm,FF0(frm,kk),'co');
end
hold off;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -