private void patternPane(Graphics g, int ystart, int yend)
	{
		int cssize = 3+2+2+3  +1;
		int widthChars = width/4;
		int widthChannels = (widthChars-4)/cssize;
		int heightChars = (yend-ystart)/6;
		g.setColor(Color.BLACK);
		
		int offscol = 0;
		int xoffsrow = heightChars/2;
		int offsrow = patrow-xoffsrow;
		
		// TODO: room for track head
		
		SessionPattern pat = session.getPattern(lbsel[3]);
		
		for(int j = 0, y = ystart; j < heightChars; j++, y += 6)
		{
			TrackerFont.FNT_XAIMUS.write(g, String.format("%03d|", j+offsrow), 0, y);
		}
		
		for(int i = 0, x = 4*4; i < widthChannels; i++, x += cssize*4)
		{
			int rows = 0;
			
			SessionTrack trk = null;
			
			if(pat != null)
			{
				rows = pat.getRows();
				trk = pat.getTrack(i+patcoloffs);
			}
			
			for(int j = 0, y = ystart; j < heightChars; j++, y += 6)
			{
				dcell[0] = 253;
				dcell[1] = dcell[3] = dcell[4] = 0;
				dcell[2] = 255;
				
				int r = j+offsrow;
				
				if(r >= 0 && r < rows)
				{
					if(trk != null)
					{
						trk.getData(r, dcell);
						
						TrackerFont.FNT_XAIMUS.write(g,
							String.format("%s%s%s%s%02X|"
								,getStrNote(dcell[0])
								,getStrIns(dcell[1])
								,getStrVol(dcell[2])
								,getStrEft(dcell[3])
								,dcell[4]
									),
							x, y);
						
						if(dcell[2] >= 128 && dcell[2] <= 192)
						{
							g.setXORMode(Color.BLACK);
							g.setColor(Color.WHITE);
							g.fillRect(x + 4*(3+2), y, 2*4, 5);
							g.setPaintMode();
							g.setColor(Color.BLACK);
						}
					}
				}
			}
		}
		
		g.setXORMode(Color.BLACK);
		g.setColor(Color.WHITE);
		g.fillRect(4*4, ystart+6*xoffsrow, width-4*4, 5);
		g.setPaintMode();
		g.setColor(Color.BLACK);
		
		//g.fillRect(1, ystart+1, width-2, yend-ystart-2);
	}