main_formant.m

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

M
91
字号
% Script : create a Graphic Interface for formant synthesizer
% In this mfile, one figure--main_fig is created
%
% Author: Albert Hsiao    2/97 
% modified by D. G. Childers 1/98 and 2/25/98
% User interface modified by karthik 1/98
% Changes made to make the code compatible with MATLAB5
% All figures specified in pixels rather than normalized units

close all;
clear;
clc;

%path(path,'.\data');
%path(path,'.\source');
%path(path,'.\formant');
%path(path,'.\synthesis');
%path(path,'.\utilities');
%path(path,'.\source\uicontrols');
%path(path,'.\formant\uicontrols');

path('.\data',path);
path('.\source',path);
path('.\formant',path);
path('.\synthesis',path);
path('.\utilities',path);
path('.\source\uicontrols',path);
path('.\formant\uicontrols',path);


Srate = 10000;    %Unless changed, this is the fixed value for sampling rate
Nframe=20;        %This is the default

% Define some global variables

global Ts;        %Sampling period in seconds
Ts = 1e-4;

%color_flag=0;		% Black background and white text
color_flag=1;		% White background and black text

global BACK_COLOR TEXT_COLOR LINE_COLOR;	

if color_flag == 1
   BACK_COLOR=[1 1 1]; %white
	TEXT_COLOR=[0 0 0]; %black
   LINE_COLOR=[0 0 1]; %blue

else
   BACK_COLOR=[0 0 0];
   TEXT_COLOR=[1 1 1];
   LINE_COLOR=[0 0 1]; %blue

end

check = 1;        %Variable used for proper closing and opening of windows
catch2 = 'check = 0;';
catch1 = 'break;';

PV = [40 354 155 176];
s2 = 'Main Functions Window';

main_figure=figure('Position',PV,...
   'Numbertitle','off',...
   'color',[1 1 1],...
   'Name',s2);

%Pushbuttons with user interface controls

uicontrol('Style','Pushbutton',...
   'Position',[10 140 130 30],...
   'String','Source Specification',...
   'CallBack','Source_main');   

uicontrol('Style','Pushbutton',...
   'Position',[10 100 130 30],...
   'String','Formant Specification',...
   'CallBack','Formant_main');   

uicontrol('Style','Pushbutton',...
   'Position',[10 60 130 30],...
   'String','Synthesis',...
   'Callback','Synthesis');

uicontrol('Style','Pushbutton',...
   'Position',[10 20 130 30],...   
   'String','Quit',...
   'Callback','close_main_formant');

clc;

⌨️ 快捷键说明

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