addWidget(miscPane,new CheckBoxWidget("Ring",  patch,new BitModel(patch,15,5),null),0,++row,1,1,0); if(HACK_MODE) { addWidget(miscPane,new CheckBoxWidget("Noise1",patch,new BitModel(patch,15,4),null),1,row,1,1,0); addWidget(miscPane,new CheckBoxWidget("Noise2",patch,new BitModel(patch,15,3),null),2,row,1,1,0); } else {  addWidget(miscPane,new CheckBoxWidget("Noise1",patch,new BitModel(patch,15,4),null),1,row,1,1,0); addWidget(miscPane,new CheckBoxWidget("Noise2",patch,new BitModel(patch,15,3),null),2,row,1,1,0); }
addWidget(miscPane,new CheckBoxWidget("Ring",  patch,new BitModel(patch,30,5),null),0,++row,1,1,0); addWidget(miscPane,new CheckBoxWidget("Noise1",patch,new BitModel(patch,30,4),null),1,row,1,1,0); addWidget(miscPane,new CheckBoxWidget("Noise2",patch,new BitModel(patch,30,3),null),2,row,1,1,0);
    public CasioCZ1000SingleEditor(Patch patch) {        super("Casio CZ-101/1000 Patch Editor", patch);		gbc.weightx=1;                JPanel miscPane=new JPanel();        miscPane.setLayout(new GridBagLayout());        miscPane.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED),"Parameters",TitledBorder.LEFT,TitledBorder.CENTER));        int row=-1;        addWidget(miscPane,new ScrollBarLookupWidget("Line Select",patch,0,3,80,new LineModel(patch),null, new String[] {"1","2","1+1'","1+2'"}),0,++row,7,1,0);		addWidget(miscPane,new CheckBoxWidget("Ring",  patch,new BitModel(patch,15,5),null),0,++row,1,1,0);		if(HACK_MODE) {	        addWidget(miscPane,new CheckBoxWidget("Noise1",patch,new BitModel(patch,15,4),null),1,row,1,1,0);	        addWidget(miscPane,new CheckBoxWidget("Noise2",patch,new BitModel(patch,15,3),null),2,row,1,1,0);		}		else {		    //TODO switch both or neither together	        addWidget(miscPane,new CheckBoxWidget("Noise1",patch,new BitModel(patch,15,4),null),1,row,1,1,0);	        addWidget(miscPane,new CheckBoxWidget("Noise2",patch,new BitModel(patch,15,3),null),2,row,1,1,0);		}		if(HACK_MODE)		    addWidget(miscPane,new ScrollBarWidget("Detune Step",patch,-127,127,0,80,new DetuneStepModel(patch),null),0,++row,7,1,0);		else		    addWidget(miscPane,new ScrollBarWidget("Detune Step",patch,-47,47,0,80,new DetuneStepModel(patch),null),0,++row,7,1,0);        addWidget(miscPane,new ScrollBarWidget("Detune Fine",patch,  0,63,0,80,new DetuneFineModel(patch),null),0,++row,7,1,0);                // Octave val==3 is same as 1 (+1 octave)        addWidget(miscPane,new ScrollBarWidget("Octave",patch,-1,1,0,80,new OctaveModel(patch),null),0,++row,7,1,0);        add(miscPane, getVibratoGUI(patch),0,++row,7,4);        // Note if either wf is >5, the other must be <=5.		JPanel dco1Panel = new JPanel();		dco1Panel.setLayout(new GridBagLayout());		add(dco1Panel,getEnvelopeGUI(patch,108),0,0,1,1);		JPanel dcw1Panel = new JPanel();		dcw1Panel.setLayout(new GridBagLayout());		if(HACK_MODE)		    addWidget(dcw1Panel,new ScrollBarWidget("Key Follow",patch,0,0xFFFF,0,new WordFieldModel(patch,36,0xFFFF),null),0,0,7,1,0);		else		    addWidget(dcw1Panel,new ScrollBarWidget("Key Follow",patch,0,9,0,new KeyFollowWModel(patch,36),null),0,0,7,1,0);		add(dcw1Panel,getEnvelopeGUI(patch,74),0,1,1,1);				JPanel dca1Panel = new JPanel();		dca1Panel.setLayout(new GridBagLayout());		if(HACK_MODE)		    addWidget(dca1Panel,new ScrollBarWidget("Key Follow",patch,0,0xFFFF,0,new WordFieldModel(patch,32,0xFFFF),null),0,0,7,1,0);		else		    addWidget(dca1Panel,new ScrollBarWidget("Key Follow",patch,0,9,0,new KeyFollowAModel(patch,32),null),0,0,7,1,0);		add(dca1Panel,getEnvelopeGUI(patch,40),0,1,1,1);				JPanel dco2Panel = new JPanel();		dco2Panel.setLayout(new GridBagLayout());		add(dco2Panel,getEnvelopeGUI(patch,222),0,0,1,1);		JPanel dcw2Panel = new JPanel();		dcw2Panel.setLayout(new GridBagLayout());		if(HACK_MODE)		    addWidget(dcw2Panel,new ScrollBarWidget("Key Follow",patch,0,0xFFFF,0,new WordFieldModel(patch,150,0xFFFF),null),0,0,7,1,0);		else		    addWidget(dcw2Panel,new ScrollBarWidget("Key Follow",patch,0,9,0,new KeyFollowWModel(patch,150),null),0,0,7,1,0);		add(dcw2Panel,getEnvelopeGUI(patch,188),0,1,1,1);				JPanel dca2Panel = new JPanel();		dca2Panel.setLayout(new GridBagLayout());		if(HACK_MODE)		    addWidget(dca2Panel,new ScrollBarWidget("Key Follow",patch,0,0xFFFF,0,new WordFieldModel(patch,146,0xFFFF),null),0,0,7,1,0);		else		    addWidget(dca2Panel,new ScrollBarWidget("Key Follow",patch,0,9,0,new KeyFollowAModel(patch,146),null),0,0,7,1,0);		add(dca2Panel,getEnvelopeGUI(patch,154),0,1,1,1);				JTabbedPane oscPane=new JTabbedPane();		oscPane.addTab("1 WF", getWaveformGUI(patch,28));		oscPane.addTab("1 Pitch",dco1Panel);		oscPane.addTab("1 Wave",dcw1Panel);		oscPane.addTab("1 Amp",dca1Panel);		oscPane.addTab("2 WF", getWaveformGUI(patch,142));		oscPane.addTab("2 Pitch",dco2Panel);		oscPane.addTab("2 Wave",dcw2Panel);		oscPane.addTab("2 Amp",dca2Panel);		gbc.gridy=0;		gbc.gridx=gbc.RELATIVE;        gbc.weightx = 1;        scrollPane.add(miscPane,gbc);        gbc.weightx = 1;        scrollPane.add(oscPane,gbc);    }