FS1RModel oFreqModeM = new BitModel(p, 0x05, aOp, 0x40, 6); BitModel oKeySyncM = new BitModel(p, 0, aOp, 0x40, 6); oSinePanel.add(new ComboBoxWidget("Freq mode", p, oFreqModeM, new BitSender(p, 0x05, aOp), new String []{"Ratio", "Fixed"})); oSinePanel.add(new CheckBoxWidget("Key sync", p, oKeySyncM, new BitSender(p, 0, aOp)));
FS1RModel oFreqModeM = new BitModel((Patch)p, 0x05, aOp, 0x40, 6); BitModel oKeySyncM = new BitModel((Patch)p, 0, aOp, 0x40, 6); oSinePanel.add(new ComboBoxWidget("Freq mode", p, oFreqModeM, new BitSender((Patch)p, 0x05, aOp), new String []{"Ratio", "Fixed"})); oSinePanel.add(new CheckBoxWidget("Key sync", p, oKeySyncM, new BitSender((Patch)p, 0, aOp)));
	private Container buildOperatorWindow(int aOp) {		Box oPane = Box.createVerticalBox();		// selon la forme d'onde les reglages sont differents		JPanel oSinePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));		FS1RModel oFreqModeM = new BitModel(p, 0x05, aOp, 0x40, 6);		BitModel oKeySyncM = new BitModel(p, 0, aOp, 0x40, 6);		oSinePanel.add(new ComboBoxWidget("Freq mode", p, oFreqModeM, new BitSender(p, 0x05, aOp), new String []{"Ratio", "Fixed"}));		oSinePanel.add(new CheckBoxWidget("Key sync", p, oKeySyncM, new BitSender(p, 0, aOp)));		JPanel oAllPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));		FS1RModel oSkirtM = new BitModel(p, 0x05, aOp, 0x38, 3);		oAllPanel.add(new ComboBoxWidget("Freq mode", p, oFreqModeM, new BitSender(p, 0x05, aOp), new String []{"Ratio", "Fixed"}));		oAllPanel.add(new SpinnerWidget("Skirt", p, 0, 7, 0, oSkirtM, new BitSender(p, 0x05, aOp)));		oAllPanel.add(new CheckBoxWidget("Key sync", p, oKeySyncM, new BitSender(p, 0, aOp)));		JPanel oResPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));		oResPanel.add(new ComboBoxWidget("Freq mode", p, oFreqModeM, new BitSender(p, 0x05, aOp), new String []{"Ratio", "Fixed"}));		oResPanel.add(new SpinnerWidget("Skirt", p, 0, 7, 0, oSkirtM, new BitSender(p, 0x05, aOp)));		oResPanel.add(new KnobWidget("Resonance", p, 0, 99, 0, new FS1RModel(p, 0x06, aOp), new FS1RSender(0x06, aOp)));		oResPanel.add(new CheckBoxWidget("Key sync", p, oKeySyncM, new BitSender(p, 0, aOp)));		JPanel oFormantPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));		oFormantPanel.add(new SpinnerWidget("Transpose", p, 0, 48, -24, new BitModel(p, 0, aOp, 0x3F, 0), new BitSender(p, 0, aOp)));		oFormantPanel.add(new KnobWidget("Band width", p, 0, 99, 0, new FS1RModel(p, 0x06, aOp), new FS1RSender(0x06, aOp)));		oFormantPanel.add(new SpinnerWidget("Skirt", p, 0, 7, 0, oSkirtM, new BitSender(p, 0x05, aOp)));		String[] oWaves = new String[]{"Sine", "All 1", "All 2", "Odd 1", "Odd 2", "Res 1", "Res 2", "Formant"};		JPanel oCardPane = new JPanel(new CardLayout());		oCardPane.add("Sine", oSinePanel);		oCardPane.add("All", oAllPanel);		oCardPane.add("Res", oResPanel);		oCardPane.add("Formant", oFormantPanel);		WaveComboListener oComboListener = new WaveComboListener(oCardPane, oWaves);		oComboListener.notifyChange(new BitModel(p, 0x04, aOp, 7, 0).get());		JPanel oPanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));		oPanel1.add(new ComboActionWidget("Wave", p, new BitModel(p, 0x04, aOp, 7, 0), new BitSender(p, 0x04, aOp), oWaves, oComboListener));		oPanel1.add(new KnobLookupWidget("Freq coarse", p, new FS1RModel(p, 0x01, aOp), new FS1RSender(0x01, aOp), FreqCoarseName));		oPanel1.add(new KnobWidget("Freq fine", p, 0, 0x7F, 0, new FS1RModel(p, 0x02, aOp), new FS1RSender(0x02, aOp)));		oPanel1.add(new KnobWidget("Freq scaling", p, 0, 99, 0, new FS1RModel(p, 0x03, aOp), new FS1RSender(0x03, aOp)));		oPanel1.add(new KnobWidget("Detune", p, 0, 30, -15, new FS1RModel(p, 0x07, aOp), new FS1RSender(0x07, aOp)));		oPanel1.add(oCardPane);		oPane.add(oPanel1);		JPanel oPanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));		oPanel3.add(new ComboBoxWidget("Left curve", p, new FS1RModel(p, 0x1A, aOp), new FS1RSender(0x1A, aOp), new String []{"-lin", "-exp", "+lin", "+exp"}));		oPanel3.add(new ComboBoxWidget("Breakpoint", p, new FS1RModel(p, 0x17, aOp), new FS1RSender(0x17), LSBreakPointName));		oPanel3.add(new ComboBoxWidget("Right curve", p, new FS1RModel(p, 0x1B, aOp), new FS1RSender(0x1B, aOp), new String []{"-lin", "-exp", "+lin", "+exp"}));		oPanel3.add(new KnobWidget("Left depth", p, 0, 99, 0, new FS1RModel(p, 0x18, aOp), new FS1RSender(0x18, aOp)));		oPanel3.add(new KnobWidget("Right depth", p, 0, 99, 0, new FS1RModel(p, 0x19, aOp), new FS1RSender(0x19, aOp)));		oPanel3.setBorder(new TitledBorder(LineBorder.createGrayLineBorder(),"Level Scaling",TitledBorder.LEFT,TitledBorder.CENTER));		oPane.add(oPanel3);		JPanel oPanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));		oPanel4.add(new KnobLookupWidget("Attenuation", p, new FS1RModel(p, 0x2D+aOp-1), new FS1RSender(0x2D+aOp-1), mAttenuations));		oPanel4.add(new KnobWidget("Output level", p, 0, 99, 0, new FS1RModel(p, 0x16, aOp), new FS1RSender(0x16, aOp)));		oPane.add(oPanel4);//		JPanel oPanel5 = new JPanel();//		oPanel5.setLayout(new FlowLayout(FlowLayout.LEFT));		Box oPanel5 = Box.createHorizontalBox();		EnvelopeWidget oEnv = new EnvelopeWidget("Amplitude Envelope Generator",p,new EnvelopeWidget.Node []		{        new EnvelopeWidget.Node(0,0,null, 0, 0,null,0,false,null,null,null,null),        new EnvelopeWidget.Node(0, 99, new FS1RModel(p, 0x14, aOp), 0, 0, null, 0, false, new FS1RSender(0x14), null, "Hold", null),        new EnvelopeWidget.Node(0, 99, new FS1RModel(p, 0x10, aOp), 0, 99,new FS1RModel(p, 0x0C, aOp), 0,false,new FS1RSender(0x10, aOp), new FS1RSender(0x0C, aOp),"R1","L1"),        new EnvelopeWidget.Node(0, 99, new FS1RModel(p, 0x11, aOp), 0, 99,new FS1RModel(p, 0x0D, aOp), 0,false,new FS1RSender(0x11, aOp), new FS1RSender(0x0D, aOp),"R2","L2"),			new EnvelopeWidget.Node(0, 99, new FS1RModel(p, 0x12, aOp), 0, 99,new FS1RModel(p, 0x0E, aOp), 0,false,new FS1RSender(0x12, aOp), new FS1RSender(0x0E, aOp),"R3","L3"),        new EnvelopeWidget.Node(0, 99, new FS1RModel(p, 0x13, aOp), 0, 99,new FS1RModel(p, 0x0F, aOp), 0,false,new FS1RSender(0x13, aOp), new FS1RSender(0x0F, aOp),"R4","L4")		});		//oEnv.setPreferredSize(new Dimension(ENV_WIDTH, ENV_HEIGHT));		oPanel5.add(oEnv);		oPanel5.add(Box.createHorizontalStrut(5));		oEnv = new EnvelopeWidget("Frequency Envelope Generator",p,new EnvelopeWidget.Node []		{//        new EnvelopeWidget.Node(50, 50, null, 0, 0, null,0,false,null,null,null,null),        new EnvelopeWidget.Node(0, 0, null, 0, 0x64, new FS1RModel(p, 8, aOp), 0, false, null, new FS1RSender(8, aOp), null, "Initial level"),        new EnvelopeWidget.Node(0, 0x63, new FS1RModel(p, 0x0A, aOp), 0, 0x64, new FS1RModel(p, 9, aOp), 0, false, new FS1RSender(0x14, aOp), new FS1RSender(9, aOp), "Attack time", "Attack level"),        new EnvelopeWidget.Node(0, 0x63, new FS1RModel(p, 0x0B, aOp), 0, 0, null, 0, false, new FS1RSender(0x0B, aOp), null, "Decay", null)		});		//oEnv.setPreferredSize(new Dimension(ENV_WIDTH, ENV_HEIGHT));		oPanel5.add(oEnv);		oPane.add(oPanel5);		JPanel oSensPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));		oSensPanel.add(new KnobWidget("Amp velocity", p, 0, 14, -7, new BitModel(p, 0x21, aOp, 0x0F, 0), new BitSender(p, 0x21, aOp)));		oSensPanel.add(new KnobWidget("Freq velocity", p, 0, 14, -7, new BitModel(p, 0x20, aOp, 0x0F, 0), new BitSender(p, 0x20, aOp)));		oSensPanel.add(new KnobWidget("Amp EG bias", p, 0, 14, -7, new FS1RModel(p, 0x22, aOp), new FS1RSender(0x22, aOp)));		oSensPanel.add(new KnobWidget("Freq bias", p, 0, 14, -7, new BitModel(p, 0x1F, aOp, 0x78, 3), new BitSender(p, 0x1F, aOp)));		oSensPanel.add(new KnobWidget("Width bias", p, 0, 14, -7, new BitModel(p, 0x04, aOp, 0x78, 3), new BitSender(p, 0x04, aOp)));		oSensPanel.add(new KnobWidget("Pitch mod", p, 0, 7, 0, new BitModel(p, 0x1F, aOp, 0x07, 0), new BitSender(p, 0x1F, aOp)));		oSensPanel.add(new KnobWidget("Amp mod", p, 0, 7, 0, new BitModel(p, 0x21, aOp, 0x70, 4), new BitSender(p, 0x21, aOp)));		oSensPanel.add(new KnobWidget("Freq mod", p, 0, 7, 0, new BitModel(p, 0x20, aOp, 0x70, 4), new BitSender(p, 0x20, aOp)));		oPane.add(oSensPanel);		return oPane;	}