fig=createmadfig('pipeline'); 
fig=createmadloadmenu(fig);
fig=createmadmenus(fig);

axisBottom=0.14;
axisWidth=0.2;
axisHeight=0.4;
sep=0.04; 

ud.signalAxes = axes('Parent',fig, ...
	'Box','on', ...
	'ButtonDownFcn','pipeline playSignal', ...
	'Position',[0.04 0.67 0.92 0.31]);
ud.sigline = line('Parent',ud.signalAxes, ...
	'ButtonDownFcn','pipeline playSignal', 'Color',[0 0 1]);
ud.signalLC = line('Parent',ud.signalAxes, ...
	'ButtonDownFcn','pipeline left', 'Color',[1 0 0], ...
	'EraseMode','xor');
  ud.signalRC = line('Parent',ud.signalAxes, ...
	'ButtonDownFcn','pipeline right', 'Color',[1 0 0], ...
	'EraseMode','xor');

ud.Axes1 = axes('Parent',fig, ...
	'Box','on', ...
	'Position',[0.04 axisBottom axisWidth axisHeight]);
ud.Axes1Line = line('Parent',ud.Axes1,'Color',[0 0 1]);

ud.Axes2 = axes('Parent',fig, ...
	'Box','on', ...
	'Position',[0.28 axisBottom axisWidth axisHeight]);
ud.Axes2Line = line('Parent',ud.Axes2,'Color',[0 0 1]);

ud.Axes3 = axes('Parent',fig, ...
	'Box','on', ...
	'Position',[0.52 axisBottom axisWidth axisHeight]);
ud.Axes3Line = line('Parent',ud.Axes3,'Color',[0 0 1]);

ud.Axes4 = axes('Parent',fig, ...
	'Box','on', ...
	'Position',[0.76 axisBottom axisWidth axisHeight]);
ud.Axes4Line = line('Parent',ud.Axes4,'Color',[0 0 1]);


ud.fn1 = uicontrol('Parent',fig, ...
	'Callback','pipeline changeFn1', ...
	'ListboxTop',0,  'Position',[0.04 0.54 axisWidth 0.0577], ...
	'String',' ', 'Style','popupmenu', 'Value',1);
ud.fn2 = uicontrol('Parent',fig, ...
	'Callback','pipeline changeFn2', ...
	'ListboxTop',0,  'Position',[0.28 0.54 axisWidth 0.0577], ...
	'String',' ', 'Style','popupmenu', 'Value',1);
ud.fn3 = uicontrol('Parent',fig, ...
	'Callback','pipeline changeFn3', ...
	'ListboxTop',0,  'Position',[0.52 0.54 axisWidth 0.0577], ...
	'String',' ', 'Style','popupmenu', 'Value',1);
ud.fn4 = uicontrol('Parent',fig, ...
	'Callback','pipeline changeFn4', ...
	'ListboxTop',0,  'Position',[0.76 0.54 axisWidth 0.0577], ...
	'String',' ', 'Style','popupmenu', 'Value',1);


ud.winSize = uicontrol('Parent',fig, ...
	'Callback','pipeline changeWinSize', ...
	'ListboxTop',0, ...
	'Position',[0.21 0.03 0.12 0.06], ...
	'String',' ', ...
	'Style','popupmenu', ...
	'Value',1);
uicontrol('Parent',fig, ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','right', ...
	'ListboxTop',0, ...
	'Position',[0.05 0.03 0.15 0.06], ...
	'String','Window Size', ...
	'Style','text');
uicontrol('Parent',fig, ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','right', ...
	'ListboxTop',0, ...
	'Position',[0.34 0.03 0.15 0.06], ...
	'String','Window Type', ...
	'Style','text');

ud.winType = uicontrol('Parent',fig, ...
	'Callback','pipeline changeWinType', ...
	'ListboxTop',0, ...
	'Position',[0.5 0.03 0.15 0.06], ...
	'String',' ', ...
	'Style','popupmenu', ...
	'Value',1);
ud.playOnRelease = uicontrol('Parent',fig, ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[0.76    0.03    0.18    0.06], ...
	'String','play on release', ...
	'Style','checkbox');

    % ud.handle.dftSize=findobj(gcf,'Tag','dftSizePopup');
set(gcf,'UserData',ud); 
