gwapp.m
来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 86 行
M
86 行
%FUNCTION: Apply button for glottal waveform modification.
%
% gcapp.m is a call function by "apply_pb" on figure(Gwset_f).
if App==1 % execute the apply buttom
%-------------------------
gpcf1(kf,1:5)=[Tp Te Ta Tc Ee];
gpcf3=gpcf1;
return;
elseif App==0 % execute the undo buttom
%------------------------
if exist('gpcf3')==1
gpcf1(kf,:)=gpcf3(kf,:);
else
gpcf1(kf,:)=gpcf(kf,:);
end
elseif App==2 % move down one frame
nkf=max(1,kf-1);
if nkf==kf
return;
end
kf=nkf;
set(fram_slider,'Value',kf);
elseif App==3 % move up one frame
nkf=min(nframe,kf+1);
if nkf==kf
return;
end
kf=nkf;
set(fram_slider,'Value',kf);
elseif App==4
nkf=fix(get(fram_slider,'Value'));
if nkf==kf
return;
end
kf=nkf;
end
Tp=gpcf1(kf,1);
Te=gpcf1(kf,2);
Ta=gpcf1(kf,3);
Tc=gpcf1(kf,4);
Ee=gpcf1(kf,5);
set(fram_val0,'String',num2str(kf));
if vctyp1(kf)==0
set(fram_val1,'String','unvoiced');
else
set(fram_val1,'String','voiced');
end
set(tp_val,'String',num2str(Tp));
set(tp_slider,'Value',Tp);
set(te_val,'String',num2str(Te));
set(te_slider,'Value',Te);
set(ta_val,'String',num2str(Ta));
set(ta_slider,'Value',Ta);
set(tc_val,'String',num2str(Tc));
set(tc_slider,'Value',Tc);
set(ee_val,'String',num2str(Ee/1000));
set(ee_slider,'Value',Ee/1000);
if Tp>0 & Tc>0
gwplt;
else
figure(Gwdis_f);
gp=zeros(1,100);
subplot(211);
plot(gp,'k');
xlabel('samples');
title('Unvoiced frame');
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?