spchg.m

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

M
36
字号
% Function : modify the speech spectrum from the GCI display using the mouse.
%    spchg will shift the formant frequency up or down by clicking the mouse.
%
%    spchg.m is a call_function executed by "fmt_silder" or "formant_edit"
%    figure(Smod_f).

 %------------------------------% 
 % change the speech spectrum   %
 %------------------------------%
 figure(Sdis_f);

 thefmt=get(formant_pp,'Value');

 if Up==1 % increase the formant frequency by using the slider
 
     val=get(fmt_slider,'Value');
     set(formant_edit,'String',num2str(val) );
     FF1(:,thefmt)=FF1(:,thefmt)-avFF1(thefmt)+val;

     hold on;
     plot(FF1,'k');hold off;
     avFF1=mean(FF1);
 
 elseif Up==2; % set the average formant frequenct with the text editor
     val=str2num( get(formant_edit,'String') );
     FF1(:,thefmt)=FF1(:,thefmt)-avFF1(thefmt)+val;
     avFF1=mean(FF1);
     set(fmt_slider,'Value',val);

     hold on;
     plot(FF1,'k');hold off;
     avFF1=mean(FF1);

 end

⌨️ 快捷键说明

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