fig=createmadfig('vowelSeg'); 
simmenu = uimenu('Parent',fig, 'Label','Simulation', 'Tag','simmenu');
uimenu('Parent',simmenu, 'Callback','vowelSeg four', ...
'Label','DF0 = 4 semitones', 'Tag','Simulationuimenu6');
uimenu('Parent',simmenu, 'Callback','vowelSeg two', ...
'Label','DF0 = 2 semitones', 'Tag','Simulationuimenu5');
uimenu('Parent',simmenu, 'Callback','vowelSeg one', ...
'Label','DF0 = 1 semitone', 'Tag','Simulationuimenu4');
uimenu('Parent',simmenu, 'Callback','vowelSeg half', ...
'Label','DF0 = 0.5 semitones', 'Tag','Simulationuimenu3');
uimenu('Parent',simmenu, 'Callback','vowelSeg quarter', ...
'Label','DF0 = 0.25 semitones', 'Tag','Simulationuimenu2');
uimenu('Parent',simmenu, 'Callback','vowelSeg zero', ...
'Label','DF0 = 0 semitones', 'Tag','Simulationuimenu1');
fig=createmadmenus(fig);

left=0.1;
middle=0.6;
figwidth=0.38;
figheight=0.45;
figbottom=0.43;
titles=0.88;


h1 = uicontrol('Parent',fig, ...
'FontSize',14, ...
'Position',[left+(figwidth-0.3)/2 titles 0.3 0.07], ...
'String','Correlogram', ...
'Style','text', ...
'Tag','StaticText1');

h1 = uicontrol('Parent',fig, ...
'FontSize',14, ...
'Position',[middle+(figwidth-0.3)/2 titles 0.3 0.07], ...
'String','Oscillator Array', ...
'Style','text', ...
'Tag','StaticText2');

h1 = uicontrol('Parent',fig, ...
'FontSize',11, ...
'Position',[middle 0.205 0.22 0.05], ...
'String','Oscillator time step:', ...
'Style','text', ...
'Tag','StaticText2');

h1 = uicontrol('Parent',fig,'Style','frame','Position',[left 0.05 0.88 0.1]);

h2 = uicontrol('Parent',fig, ...
'FontSize',14, ...
'ForegroundColor',[1 0.0 0.0], ...
'Position',[0.14 0.08 0.8 0.05], ...
'String','', ...
'Style','text', ...
'Tag','scoreText');

h1 = uicontrol('Parent',fig, ...
'BackgroundColor',[1 1 1], ...
'Callback','vowelSeg sliderMoved', ...
'Max',100, ...
'Min',1, ...
'Position',[middle 0.28 figwidth 0.04], ...
'Style','slider', ...
'Tag','TimeSlider', ...
'Value',50);

h1 = uicontrol('Parent',fig, ...
'BackgroundColor',[1 1 1], ...
'Callback','vowelSeg boxChanged', ...
'Position',[0.88 0.21 0.1 0.05], ...
'String','41', ...
'Style','edit', ...
'Tag','TimeBox');


h1 = axes('Parent',fig, ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',[0 0 0], ...
'DrawMode','fast', ...
'LineStyleOrder',['- ';'--';': ';'-.'], ...
'NextPlot','add', ...
'Position',[left figbottom figwidth figheight], ...
'Tag','acgAxis', ...
'XColor',[0 0 0], ...
'XLim',[1 126], ...
'XLimMode','manual', ...
'XTick',[0 25 50 75 100 125], ...
'XTickLabel',['0.0 ';'2.5 ';'5.0 ';'7.5 ';'10.0';'12.5'], ...	
'YColor',[0 0 0], ...
'YLim',[0 64], ...
'YLimMode','manual', ...
'YTick',[0 16 32 48 64], ...
'YTickLabel',['80  ';'328 ';'866 ';'1924';'4000'], ...
'ZColor',[0 0 0], ...
'ZLimMode','manual');

ylabel('Channel Centre Frequency [Hz]');

h1 = axes('Parent',fig, ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',[0 0 0], ...
'DrawMode','fast', ...
'LineStyleOrder',['- ';'--';': ';'-.'], ...
'NextPlot','replacechildren', ...
'Position',[left 0.25 figwidth 0.1], ...
'Tag','SummaryAxis', ...
'XColor',[0 0 0], ...
'XLim',[1 126], ...
'XLimMode','manual', ...
'XTick',[0 25 50 75 100 125], ...
'XTickLabel',['0.0 ';'2.5 ';'5.0 ';'7.5 ';'10.0';'12.5'], ...	
'YColor',[0 0 0], ...
'YLim',[0 30], ...
'YLimMode','manual', ...
'YTick',[0 15 30], ...
'YTickLabel',[' ';' ';' '], ...	
'ZColor',[0 0 0], ...
'ZLimMode','manual');

xlabel('Autocorrelation Lag [ms]');

h1 = axes('Parent',fig, ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',[0 0 0], ...
'DrawMode','fast', ...
'LineStyleOrder',['- ';'--';': ';'-.'], ...
'NextPlot','add', ...
'Position',[middle figbottom figwidth figheight], ...
'Tag','oscAxis', ...
'XColor',[0 0 0], ...
'XLim',[1 100], ...
'XLimMode','manual', ...
'YColor',[0 0 0], ...
'YLim',[0 64], ...
'YLimMode','manual', ...
'YTick',[0 16 32 48 64], ...
'YTickLabel',['80  ';'328 ';'866 ';'1924';'4000'], ...
'ZColor',[0 0 0], ...
'ZLimMode','manual');

xlabel('Time [integration steps]');
ylabel('Channel Centre Frequency [Hz]');
