function varargout = ui(varargin)
% UI MATLAB code for ui.fig
% UI, by itself, creates a new UI or raises the existing
% singleton*.
%
% H = UI returns the handle to a new UI or the handle to
% the existing singleton*.
%
% UI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UI.M with the given input arguments.
%
% UI('Property','Value',...) creates a new UI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help ui
% Last Modified by GUIDE v2.5 26-Apr-2018 22:06:17
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ui_OpeningFcn, ...
'gui_OutputFcn', @ui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function ui_OpeningFcn(hObject, eventdata, handles, varargin)%这里初始化一些参量
global no a A a1 a2 C B D PART
%-----全局变量说明------------------------------------------------------------------------------------------
% no 当前第几道题
% A:part 1 的参数读取矩阵
% B:part 2 的参数读取矩阵
% C:part 3 的参数读取矩阵
% D:一个只由0和1组成的向量,决定左右按钮顺序或颠倒
% PART:表示当前在进行哪个部分 1 2 3
% a: 被读取音频编号的随机矩阵
%----------------------------------------------------------------------------------------------------------
a1=0;a2=0;
no=280; %全局变量no表示第几道题
str1=num2str(no); %这两行显示题号,从全局变量no获得数据
set(handles.edit1,'String',str1);
D=randi([0 1],280,1);%生成一个1*72 一维序列a,a是只有0,1组成,长度72的radom序列 用于决定音频1音频2随机是原声和合成声
N=280; %输入需要抽取的原始音频的数量
num=380; %音频库里面音频总数量
p=randperm(num); %随机生成1~num个随机整数
a=p(1:N); %取p的前N个数 a是一个单行矩阵
%----------------------------------------------------------------%A矩阵是3*72,每一行从左到右是,NV通道数,vC载波类型(1-tone,2-noise),o处理策略(1-ACE,2-CLA)
%----------------------------------------PART 1 参数设置
A1 =[
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80 ,1, 1;
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80 ,1, 1;
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2,
% UI MATLAB code for ui.fig
% UI, by itself, creates a new UI or raises the existing
% singleton*.
%
% H = UI returns the handle to a new UI or the handle to
% the existing singleton*.
%
% UI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UI.M with the given input arguments.
%
% UI('Property','Value',...) creates a new UI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help ui
% Last Modified by GUIDE v2.5 26-Apr-2018 22:06:17
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ui_OpeningFcn, ...
'gui_OutputFcn', @ui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function ui_OpeningFcn(hObject, eventdata, handles, varargin)%这里初始化一些参量
global no a A a1 a2 C B D PART
%-----全局变量说明------------------------------------------------------------------------------------------
% no 当前第几道题
% A:part 1 的参数读取矩阵
% B:part 2 的参数读取矩阵
% C:part 3 的参数读取矩阵
% D:一个只由0和1组成的向量,决定左右按钮顺序或颠倒
% PART:表示当前在进行哪个部分 1 2 3
% a: 被读取音频编号的随机矩阵
%----------------------------------------------------------------------------------------------------------
a1=0;a2=0;
no=280; %全局变量no表示第几道题
str1=num2str(no); %这两行显示题号,从全局变量no获得数据
set(handles.edit1,'String',str1);
D=randi([0 1],280,1);%生成一个1*72 一维序列a,a是只有0,1组成,长度72的radom序列 用于决定音频1音频2随机是原声和合成声
N=280; %输入需要抽取的原始音频的数量
num=380; %音频库里面音频总数量
p=randperm(num); %随机生成1~num个随机整数
a=p(1:N); %取p的前N个数 a是一个单行矩阵
%----------------------------------------------------------------%A矩阵是3*72,每一行从左到右是,NV通道数,vC载波类型(1-tone,2-noise),o处理策略(1-ACE,2-CLA)
%----------------------------------------PART 1 参数设置
A1 =[
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80 ,1, 1;
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 1, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
40, 2, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 1, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
22, 2, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 1, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
16, 2, 1;
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80 ,1, 1;
80 ,1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 1, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2, 1;
80, 2,