gbc.gridx=10;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=1;
gbc.gridx=10;gbc.gridy=GridBagConstraints.RELATIVE;gbc.gridwidth=5;gbc.gridheight=1;
    public MIDIboxSIDSingleEditor(Patch patch)    {	super ("MIDIbox SID Patch Editor",patch);	gbc.weightx=0; gbc.weighty=0;/////////////////////////////////////////////////////////////////////////////////  Common Pane///////////////////////////////////////////////////////////////////////////////	JPanel cmnPane=new JPanel();	cmnPane.setLayout(new GridBagLayout());	addWidget(cmnPane,new PatchNameWidget(" Name  ",patch),0,0,2,1,0);	// horizontal location, the vertical location, the horizontal size, and the vertical size). The last number is the fader number        addWidget(cmnPane,new ComboBoxWidget("Play Mode",patch,new SIDModel(patch,0x11,0,0x7f,new int[]{0x0,0x01,0x3,0x7f}),new SIDSender(patch,0x11,0,0x7f,new int[]{0x0,0x1,0x3,0x7f}),new String []{"MONO", "LEGATO","WT Seq only","POLY"}),0,1,2,1,1);	addWidget(cmnPane,new ComboBoxWidget("Portam. Mode",patch,new SIDModel(patch,0x12),new SIDSender(patch,0x12),new String []{"Full Time", "Fingered (SusKey)"}),0,2,2,1,2);	addWidget(cmnPane,new KnobWidget("Volume",patch,0,127,0,new SIDModel(patch,0x10),new SIDSender(patch,0x10)),2,1,1,3,3);	gbc.gridx=0;gbc.gridy=0;gbc.gridwidth=5;gbc.gridheight=2;	cmnPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Common",TitledBorder.CENTER,TitledBorder.CENTER));  	scrollPane.add(cmnPane,gbc);///////////////////////////////////////////////////////////////////////////////// ENVs///////////////////////////////////////////////////////////////////////////////	JTabbedPane ENVPane=new JTabbedPane();   	for(int i=0; i<2; i++) {     	    JPanel panel = new JPanel();	    panel.setLayout(new GridBagLayout());	    ENVPane.addTab("Envelope"+(i+1),panel);gbc.weightx=0;	    addWidget(panel,new EnvelopeWidget("SW Envelope",patch,new EnvelopeWidget.Node[] {		new EnvelopeWidget.Node(0,0,null,0,0,null,0,false,null,null,null,null),     		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x73+i*5),127,127,null,25,false,new SIDSender(patch,0x73+i*5),null,"A",null),		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x74+i*5),0,127,new SIDModel(patch,0x75+i*5),25,false,new SIDSender(patch,0x74+i*5),new SIDSender(patch,0x75+i*5),"D","S"),		new EnvelopeWidget.Node(127,127,null,5000,5000,null,0,false,null,null,null,null),     		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x76+i*5),0,0,null,0,false,new SIDSender(patch,0x76+i*5),null,"R",null),		}     ),0,0,10,3,50);	    addWidget(panel,new KnobWidget("Depth",patch,0,127,-64,new SIDModel(patch,0x72+i*5),new SIDSender(patch,0x72+i*5)),0,5,1,3,51);	    addWidget(panel,new KnobWidget("Curve",patch,0,127,-64,new SIDModel(patch,0x1e+i),new SIDSender(patch,0x1e+i)),1,5,1,3,52);	    gbc.gridx=2;gbc.gridy=5;gbc.gridwidth=3;gbc.gridheight=1; panel.add(new JLabel("Curve used on"),gbc);	    addWidget(panel,new CheckBoxWidget("Attack", patch,new SIDModel(patch,0x15,0+i*4),new SIDSender(patch,0x15,0+i*4)),5,5,1,1,-100);	    addWidget(panel,new CheckBoxWidget("Decay", patch,new SIDModel(patch,0x15,1+i*4),new SIDSender(patch,0x15,1+i*4)),5,6,1,1,-101);	    addWidget(panel,new CheckBoxWidget("Release", patch,new SIDModel(patch,0x15,2+i*4),new SIDSender(patch,0x15,2+i*4)),5,7,1,1,-102);	}	gbc.gridx=0;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=2;	scrollPane.add(ENVPane,gbc);///////////////////////////////////////////////////////////////////////////////// LFOs///////////////////////////////////////////////////////////////////////////////	JTabbedPane LFOPane=new JTabbedPane();   	for(int i=0; i<6; i++) {     	    JPanel panel = new JPanel();	    panel.setLayout(new GridBagLayout());	    LFOPane.addTab("LFO"+(i+1),panel);gbc.weightx=0;	    addWidget(panel,new KnobWidget("Rate",patch,0,127,0,new SIDModel(patch,0x61+i*3),new SIDSender(patch,0x61+i*3)),0,0,1,3,40);	    addWidget(panel,new KnobWidget("Depth",patch,0,127,-64,new SIDModel(patch,0x62+i*3),new SIDSender(patch,0x62+i*3)),1,0,1,3,41);	    addWidget(panel,new ComboBoxWidget("Mode",patch,new SIDModel(patch,0x60+i*3,0,0x7,new int[]{0x0,0x01,0x3,0x7}),new SIDSender(patch,0x60+i*3,0,0x7,new int[]{0x0,0x01,0x3,0x7}),new String []{"off", "unsynced","Sync w/ assigned notes","Sync w/ all notes"}),2,0,5,1,42);	    addWidget(panel,new ComboBoxWidget("Waveform",patch,new SIDModel(patch,0x60+i*3,4,0x7),new SIDSender(patch,0x60+i*3,4,0x7),new String []{"SINE", "TRIANGLE","SAW","PULSE","RANDOM"}),3,1,5,1,43);	}	gbc.gridx=0;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=1;	scrollPane.add(LFOPane,gbc);///////////////////////////////////////////////////////////////////////////////// Controller Assigns///////////////////////////////////////////////////////////////////////////////	JTabbedPane assignPane=new JTabbedPane();	// Assign Velocity Pane  	JPanel LFOAPane=new JPanel();	LFOAPane.setLayout(new GridBagLayout());	assignPane.addTab("Velocity", LFOAPane); gbc.weightx=0;  	addWidget(LFOAPane,new ComboBoxWidget("Controller",patch,new SIDModel(patch,0x50),new SIDSender(patch,0x50),ccName),0,0,5,1,4);  	addWidget(LFOAPane,new ScrollBarWidget("Init Value",patch,0,127,0,new SIDModel(patch,0x51),new SIDSender(patch,0x51)),0,1,5,1,5);  	addWidget(LFOAPane,new ScrollBarWidget("Depth",patch,0,127,-64,new SIDModel(patch,0x52),new SIDSender(patch,0x52)),0,2,5,1,6);  	// Assign Mod Pane  	JPanel MODAPane=new JPanel();  	MODAPane.setLayout(new GridBagLayout());	assignPane.addTab("ModWheel", MODAPane); gbc.weightx=0;  	addWidget(MODAPane,new ComboBoxWidget("Controller",patch,new SIDModel(patch,0x53),new SIDSender(patch,0x53),ccName),0,0,5,1,7);  	addWidget(MODAPane,new ScrollBarWidget("Init Value",patch,0,127,0,new SIDModel(patch,0x54),new SIDSender(patch,0x54)),0,1,5,1,8);  	addWidget(MODAPane,new ScrollBarWidget("Depth",patch,0,127,-64,new SIDModel(patch,0x55),new SIDSender(patch,0x55)),0,2,5,1,9);  	// Assign Aftertouch Pane  	JPanel AFTAPane=new JPanel();  	AFTAPane.setLayout(new GridBagLayout());	assignPane.addTab("Aftertouch", AFTAPane); gbc.weightx=0;  	addWidget(AFTAPane,new ComboBoxWidget("Controller",patch,new SIDModel(patch,0x56),new SIDSender(patch,0x56),ccName),0,0,5,1,10);  	addWidget(AFTAPane,new ScrollBarWidget("Init Value",patch,0,127,0,new SIDModel(patch,0x57),new SIDSender(patch,0x57)),0,1,5,1,11);  	addWidget(AFTAPane,new ScrollBarWidget("Depth",patch,0,127,-64,new SIDModel(patch,0x58),new SIDSender(patch,0x58)),0,2,5,1,12);	gbc.gridx=0;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=1;	scrollPane.add(assignPane,gbc);///////////////////////////////////////////////////////////////////////////////// Oscillators///////////////////////////////////////////////////////////////////////////////	JTabbedPane oscPane=new JTabbedPane();   	for(int i=0; i<3; i++) {     	    JPanel panel = new JPanel();	    panel.setLayout(new GridBagLayout());	    oscPane.addTab("OSC"+(i+1),panel);gbc.weightx=0;	    addWidget(panel,new EnvelopeWidget("VCA Envelope",patch,new EnvelopeWidget.Node[] {		new EnvelopeWidget.Node(0,0,null,0,0,null,0,false,null,null,null,null),     		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x27+i*16),0,0,null,0,false,new SIDSender(patch,0x27+i*16),null,"Dly",null),		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x28+i*16),127,127,null,25,false,new SIDSender(patch,0x28+i*16),null,"A",null),		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x29+i*16),0,127,new SIDModel(patch,0x2a+i*16),25,false,new SIDSender(patch,0x29+i*16),new SIDSender(patch,0x2a+i*16),"D","S"),		new EnvelopeWidget.Node(127,127,null,5000,5000,null,0,false,null,null,null,null),     		new EnvelopeWidget.Node(0,127,new SIDModel(patch,0x2b+i*16),0,0,null,0,false,new SIDSender(patch,0x2b+i*16),null,"R",null),		}     ),0,0,5,5,33);	    addWidget(panel,new KnobWidget(" Transpose ",patch,0,127,-64,new SIDModel(patch,0x20+i*16),new SIDSender(patch,0x20+i*16)),0,6,1,3,20);	    addWidget(panel,new KnobWidget(" FineTune ",patch,0,127,-64,new SIDModel(patch,0x21+i*16),new SIDSender(patch,0x21+i*16)),1,6,1,3,21);	    addWidget(panel,new KnobWidget(" PitchRange ",patch,0,127,0,new SIDModel(patch,0x22+i*16),new SIDSender(patch,0x22+i*16)),2,6,1,3,22);	    addWidget(panel,new KnobWidget(" Arpeggiator ",patch,0,127,0,new SIDModel(patch,0x26+i*16),new SIDSender(patch,0x26+i*16)),0,9,1,3,23);	    addWidget(panel,new KnobWidget(" Portamento ",patch,0,127,0,new SIDModel(patch,0x23+i*16),new SIDSender(patch,0x23+i*16)),1,9,1,3,25);	    addWidget(panel,new KnobWidget(" PulseWidth ",patch,0,127,0,new SIDModel(patch,0x25+i*16),new SIDSender(patch,0x25+i*16)),2,9,1,3,26);	    addWidget(panel,new CheckBoxWidget("Tri",  patch,new SIDModel(patch,0x24+i*16,0),new SIDSender(patch,0x24+i*16,0)),3,7,1,1,-20);	    addWidget(panel,new CheckBoxWidget("Saw",  patch,new SIDModel(patch,0x24+i*16,1),new SIDSender(patch,0x24+i*16,1)),3,8,1,1,-21);	    addWidget(panel,new CheckBoxWidget("Rec",  patch,new SIDModel(patch,0x24+i*16,2),new SIDSender(patch,0x24+i*16,2)),4,7,1,1,-22);	    addWidget(panel,new CheckBoxWidget("Noise",patch,new SIDModel(patch,0x24+i*16,3),new SIDSender(patch,0x24+i*16,3)),4,8,1,1,-23);     	    addWidget(panel,new CheckBoxWidget("Sync",patch,new SIDModel(patch,0x24+i*16,5),new SIDSender(patch,0x24+i*16,5)),3,9,1,1,-24);	    addWidget(panel,new CheckBoxWidget("Ring",patch,new SIDModel(patch,0x24+i*16,6),new SIDSender(patch,0x24+i*16,6)),3,10,1,1,-25);	    addWidget(panel,new CheckBoxWidget("Off", patch,new SIDModel(patch,0x24+i*16,4),new SIDSender(patch,0x24+i*16,4)),4,9,1,1,-26);	    addWidget(panel,new CheckBoxWidget("Phase", patch,new SIDModel(patch,0x14,i),new SIDSender(patch,0x14,i)),4,10,1,1,-27);	    addWidget(panel,new ComboBoxWidget("Lower Limit",patch,new SIDModel(patch,0x2f+i*16),new SIDSender(patch,0x2f+i*16),NoteName),0,12,2,1,27);	    addWidget(panel,new ComboBoxWidget("Upper Limit",patch,new SIDModel(patch,0x5d+i),new SIDSender(patch,0x5d+i),NoteName),2,12,2,1,28);	}	gbc.gridx=5;gbc.gridy=0;gbc.gridwidth=5;gbc.gridheight=4;	scrollPane.add(oscPane,gbc);///////////////////////////////////////////////////////////////////////////////// Wavetables///////////////////////////////////////////////////////////////////////////////	JPanel WAVTPane=new JPanel();	WAVTPane.setLayout(new GridBagLayout());	addWidget(WAVTPane,new ComboBoxWidget("Parameter #1",patch,new SIDModel(patch,0x5a),new SIDSender(patch,0x5a),ccName),0,0,3,1,13);	addWidget(WAVTPane,new ComboBoxWidget("Parameter #2",patch,new SIDModel(patch,0x5b),new SIDSender(patch,0x5b),ccName),0,1,3,1,14);	addWidget(WAVTPane,new ComboBoxWidget("Parameter #3",patch,new SIDModel(patch,0x5c),new SIDSender(patch,0x5c),ccName),0,2,3,1,15);	addWidget(WAVTPane,new ScrollBarWidget("Rate",patch,0,127,0,new SIDModel(patch,0x59),new SIDSender(patch,0x59)),0,3,5,1,16);               table.setPreferredScrollableViewportSize(new Dimension(100, 100));        JScrollPane scrollpane = new JScrollPane(table);	gbc.gridx=0;gbc.gridy=5;gbc.gridwidth=5;gbc.gridheight=20;        WAVTPane.add(scrollpane, gbc);                TableColumn column = null;        column = table.getColumnModel().getColumn(0);        column = table.getColumnModel().getColumn(1);	JComboBox comboBox = new JComboBox();	for(int i=0; i<dataModel.modeNames.length; ++i) {	    comboBox.addItem(dataModel.modeNames[i]);	}	column.setCellEditor(new DefaultCellEditor(comboBox));        column = table.getColumnModel().getColumn(2);        column = table.getColumnModel().getColumn(3);        column = table.getColumnModel().getColumn(4);	byte[] cooked_dump = dataModel.getCookedDump();	for(int i=0; i<cooked_dump.length; ++i)	    cooked_dump[i] = ((Patch)p).sysex[8+0x80+i];	dataModel.setCookedDump(cooked_dump);	table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);	ListSelectionModel tableSM = table.getSelectionModel();	tableSM.addListSelectionListener(new ListSelectionListener() {		public void valueChanged(ListSelectionEvent e) {		    sendDumpChanges();		}	    });	// JButton switchViewButton = new JButton(dataModel.getHexView() ? "Switch to Dec" : "Switch to Hex");	// (defined as global button)        switchViewButton.addActionListener(new ActionListener() {		public void actionPerformed(ActionEvent e)		{		    viewPressed();		}	    });	gbc.gridx=0;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=1;gbc.gridheight=1;        WAVTPane.add(switchViewButton, gbc);	// JButton updateWavetableButton = new JButton("Update Wavetable");		// (defined as global button)        updateWavetableButton.addActionListener(new ActionListener() {		public void actionPerformed(ActionEvent e)		{		    sendDumpChanges();		}	    });	gbc.gridx=1;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=1;gbc.gridheight=1;        WAVTPane.add(updateWavetableButton, gbc);	gbc.gridx=5;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=3;	WAVTPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Wavetable",TitledBorder.CENTER,TitledBorder.CENTER));  	scrollPane.add(WAVTPane,gbc);///////////////////////////////////////////////////////////////////////////////// Filter///////////////////////////////////////////////////////////////////////////////	JPanel FILTPane=new JPanel();	FILTPane.setLayout(new GridBagLayout());	addWidget(FILTPane,new KnobWidget("CutOff",patch,0,127,0,new SIDModel(patch,0x1a),new SIDSender(patch,0x1a)),0,0,2,3,30);	addWidget(FILTPane,new KnobWidget("Resonance",patch,0,127,0,new SIDModel(patch,0x1b),new SIDSender(patch,0x1b)),2,0,2,3,31);	gbc.gridx=4;gbc.gridy=0;gbc.gridwidth=2;gbc.gridheight=1; FILTPane.add(new JLabel("Channel"),gbc);	addWidget(FILTPane,new CheckBoxWidget("O1", patch,new SIDModel(patch,0x18,0),new SIDSender(patch,0x18,0)),4,1,1,1,-13);	addWidget(FILTPane,new CheckBoxWidget("O2", patch,new SIDModel(patch,0x18,1),new SIDSender(patch,0x18,1)),5,1,1,1,-14);	addWidget(FILTPane,new CheckBoxWidget("O3", patch,new SIDModel(patch,0x18,2),new SIDSender(patch,0x18,2)),4,2,1,1,-15);	addWidget(FILTPane,new CheckBoxWidget("Ext",patch,new SIDModel(patch,0x18,3),new SIDSender(patch,0x18,3)),5,2,1,1,-16);	addWidget(FILTPane,new CheckBoxWidget("LP",patch,new SIDModel(patch,0x19,0),new SIDSender(patch,0x19,0)),0,4,1,1,-17);	addWidget(FILTPane,new CheckBoxWidget("HP",patch,new SIDModel(patch,0x19,1),new SIDSender(patch,0x19,1)),1,4,1,1,-18);	addWidget(FILTPane,new CheckBoxWidget("BP",patch,new SIDModel(patch,0x19,2),new SIDSender(patch,0x19,2)),2,4,1,1,-19);	addWidget(FILTPane,new CheckBoxWidget("3O",patch,new SIDModel(patch,0x19,3),new SIDSender(patch,0x19,3)),3,4,1,1,-20);	gbc.gridx=10;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=1;	FILTPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Filter",TitledBorder.CENTER,TitledBorder.CENTER));  	scrollPane.add(FILTPane,gbc);///////////////////////////////////////////////////////////////////////////////// Modulation Matrix///////////////////////////////////////////////////////////////////////////////	JPanel MODMPane=new JPanel();	MODMPane.setLayout(new GridBagLayout());	gbc.gridx=0;gbc.gridy=1;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("OSC1 Pitch"),gbc);	gbc.gridx=0;gbc.gridy=2;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("OSC2 Pitch"),gbc);	gbc.gridx=0;gbc.gridy=3;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("OSC3 Pitch"),gbc);	gbc.gridx=0;gbc.gridy=4;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("OSC1 PW"),gbc);	gbc.gridx=0;gbc.gridy=5;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("OSC2 PW"),gbc);	gbc.gridx=0;gbc.gridy=6;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("OSC3 PW"),gbc);	gbc.gridx=0;gbc.gridy=7;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("Filter"),gbc);	gbc.gridx=1;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("E1"),gbc);	gbc.gridx=2;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("E2"),gbc);	gbc.gridx=3;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("L1"),gbc);	gbc.gridx=4;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("L2"),gbc);	gbc.gridx=5;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("L3"),gbc);	gbc.gridx=6;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("L4"),gbc);	gbc.gridx=7;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("L5"),gbc);	gbc.gridx=8;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; MODMPane.add(new JLabel("L6"),gbc);	for(int i=0; i<3; i++) {	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2e+i*16,0),new SIDSender(patch,0x2e+i*16,0)),1,1+i,1,1,-40);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2e+i*16,1),new SIDSender(patch,0x2e+i*16,1)),2,1+i,1,1,-41);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2c+i*16,0),new SIDSender(patch,0x2c+i*16,0)),3,1+i,1,1,-42);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2c+i*16,1),new SIDSender(patch,0x2c+i*16,1)),4,1+i,1,1,-43);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2c+i*16,2),new SIDSender(patch,0x2c+i*16,2)),5,1+i,1,1,-44);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2c+i*16,3),new SIDSender(patch,0x2c+i*16,3)),6,1+i,1,1,-45);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2c+i*16,4),new SIDSender(patch,0x2c+i*16,4)),7,1+i,1,1,-46);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2c+i*16,5),new SIDSender(patch,0x2c+i*16,5)),8,1+i,1,1,-47);	}	for(int i=0; i<3; i++) {	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2e+i*16,4),new SIDSender(patch,0x2e+i*16,4)),1,4+i,1,1,-48);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2e+i*16,5),new SIDSender(patch,0x2e+i*16,5)),2,4+i,1,1,-49);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2d+i*16,0),new SIDSender(patch,0x2d+i*16,0)),3,4+i,1,1,-50);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2d+i*16,1),new SIDSender(patch,0x2d+i*16,1)),4,4+i,1,1,-51);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2d+i*16,2),new SIDSender(patch,0x2d+i*16,2)),5,4+i,1,1,-52);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2d+i*16,3),new SIDSender(patch,0x2d+i*16,3)),6,4+i,1,1,-53);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2d+i*16,4),new SIDSender(patch,0x2d+i*16,4)),7,4+i,1,1,-54);	    addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x2d+i*16,5),new SIDSender(patch,0x2d+i*16,5)),8,4+i,1,1,-55);	}	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1d,0),new SIDSender(patch,0x1d,0)),1,7,1,1,-56);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1d,1),new SIDSender(patch,0x1d,1)),2,7,1,1,-57);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1c,0),new SIDSender(patch,0x1c,0)),3,7,1,1,-58);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1c,1),new SIDSender(patch,0x1c,1)),4,7,1,1,-59);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1c,2),new SIDSender(patch,0x1c,2)),5,7,1,1,-60);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1c,3),new SIDSender(patch,0x1c,3)),6,7,1,1,-61);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1c,4),new SIDSender(patch,0x1c,4)),7,7,1,1,-62);	addWidget(MODMPane,new CheckBoxWidget("",patch,new SIDModel(patch,0x1c,5),new SIDSender(patch,0x1c,5)),8,7,1,1,-63);	gbc.gridx=10;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=3;	MODMPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Modulation Matrix",TitledBorder.CENTER,TitledBorder.CENTER));  	scrollPane.add(MODMPane,gbc);///////////////////////////////////////////////////////////////////////////////// MIDI Sync///////////////////////////////////////////////////////////////////////////////	JPanel CLKPane=new JPanel();	CLKPane.setLayout(new GridBagLayout());	gbc.gridx=0;gbc.gridy=0;gbc.gridwidth=1;gbc.gridheight=1; CLKPane.add(new JLabel("Targets   "),gbc);	addWidget(CLKPane,new CheckBoxWidget("Wavetable Seq./Arp.", patch,new SIDModel(patch,0x13,0),new SIDSender(patch,0x13,0)),1,1,1,1,-10);	addWidget(CLKPane,new CheckBoxWidget("LFOs", patch,new SIDModel(patch,0x13,1),new SIDSender(patch,0x13,1)),1,2,1,1,-11);	addWidget(CLKPane,new CheckBoxWidget("ENVs", patch,new SIDModel(patch,0x13,2),new SIDSender(patch,0x13,2)),1,3,1,1,-12);	gbc.gridx=10;gbc.gridy=gbc.RELATIVE;gbc.gridwidth=5;gbc.gridheight=1;	CLKPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"MIDI Clock Synchronization",TitledBorder.CENTER,TitledBorder.CENTER));  	scrollPane.add(CLKPane,gbc);	pack();	show();    }