-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVCV_ExperimenterGUI.m
108 lines (85 loc) · 3.8 KB
/
VCV_ExperimenterGUI.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
function VCV_ExperimenterGUI
fig2=figure(2);
color2=[1 0.7 0.4];
color3=[1 1 0.4];
set(fig2,'NumberTitle','off','Menubar','none',...
'Name','Test Progress',...
'Units','Normalized','OuterPosition',[0 0.2 0.4 0.7],...
'Color',color2,'Resize','off')
axis off
drawnow
% waitbar
handles2.wb2=waitbar(0,' ','Visible','off');
c2 = get(handles2.wb2,'Children');
set(c2,'Parent',fig2); % Set the position of the WAITBAR on your figure
set(c2,'Units','Normalized','Position',[0 0.02 0 0.03]);
set(c2,'Color', [1,0.09,0.09]);
c2.Visible = 'On';
handles2.wb2 = c2;
handles2.wb2.Visible = 'On';
%
uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.2 0.9 0.3 0.05],...
'String',sprintf('%12s','Token:'),'FontSize',14,'BackgroundColor',color2);
uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.2 0.8 0.3 0.05],...
'String',sprintf('%12s','SNR:'),'FontSize',14,'BackgroundColor',color2);
uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.2 0.7 0.3 0.05],...
'String',sprintf('%12s','Vowel:'),'FontSize',14,'BackgroundColor',color2);
uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.2 0.6 0.3 0.05],...
'String',sprintf('%12s','Consonant:'),'FontSize',14,'BackgroundColor',color2);
uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.2 0.5 0.3 0.05],...
'String',sprintf('%12s','Response:'),'FontSize',14,'BackgroundColor',color2);
uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.2 0.4 0.3 0.05],...
'String',sprintf('%12s','Time:'),'FontSize',14,'BackgroundColor',color2);
handles2.token_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.51 0.9 0.2 0.05],...
'String','','FontSize',14,...
'BackgroundColor',color3,'ForegroundColor','k');
handles2.snr_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.51 0.8 0.2 0.05],...
'String','','FontSize',14,...
'BackgroundColor',color3,'ForegroundColor','k');
handles2.vowel_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.51 0.7 0.2 0.05],...
'String','','FontSize',14,...
'BackgroundColor',color3,'ForegroundColor','k');
handles2.consonant_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.51 0.6 0.2 0.05],...
'String','','FontSize',14,...
'BackgroundColor',color3,'ForegroundColor','k');
handles2.response_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.51 0.5 0.2 0.05],...
'String','','FontSize',14,...
'BackgroundColor',color3,'ForegroundColor','k');
handles2.response_time=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.51 0.4 0.2 0.05],...
'String','','FontSize',14,...
'BackgroundColor',color3,'ForegroundColor','k');
handles2.status_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.1 0.2 0.8 0.2],...
'String',sprintf('Test\nStatus'),'FontSize',14,...
'BackgroundColor',color2);
handles2.count_text=uicontrol(fig2,'Style','Text',...
'Units','Normalized','Position',[0.86 0.051 0.1 0.03],...
'String',sprintf('300/300'),'FontSize',9,...
'BackgroundColor',color2);
% Quit button
handles2.quit_pb=uicontrol(fig2,'Style','Pushbutton',...
'Units','Normalized','Position',[0.1 0.2 0.2 0.08],...
'String','Quit','FontSize',16,...
'BackgroundColor',[1 0 0],...
'Callback','quit_test');
% Continue button
handles2.continue_pb=uicontrol(fig2,'Style','Pushbutton',...
'Units','Normalized','Position',[0.7 0.2 0.2 0.08],...
'String','Continue','FontSize',16,...
'BackgroundColor',[0 1 0],...
'Callback','continue_test');
drawnow
guidata(fig2,handles2)
return