<?xml version="1.0"?>
<hbox spacing="5">
  <frame label="Global">
    <vbox border="6" spacing="10">
      <label />
      <vbox expand="0" fill="0">
        <label param="master"/>
        <knob param="master" size="5"/>
        <value param="master"/>
      </vbox>
      <label />
      <hbox spacing="4" expand="0" fill="0">
        <vbox>
          <label param="pbend_range"/>
          <knob param="pbend_range"/>
          <value param="pbend_range"/>
        </vbox>
        <vbox>
          <label param="portamento"/>
          <knob param="portamento"/>
          <value param="portamento"/>
        </vbox>
      </hbox>
      <vbox expand="0" fill="0">
        <label param="legato" expand="0"/>
        <combo param="legato" expand="0" fill="0"/>
      </vbox>
    </vbox>
  </frame>
  <notebook>
    <vbox page="Audio path" spacing="3">
      <hbox spacing="3">
        <vbox spacing="3">
          <frame label="Oscillator 1">
            <hbox spacing="3">
              <vbox>      
                <combo param="o1_wave" fill="0" expand="0"/>        
                <if cond="directlink">
                  <line-graph param="o1_wave" refresh="1" width="150" height="70" expand="1" fill="1"/>
                </if>
              </vbox>
              <vbox>
                <label attach-x="1" attach-y="0" param="o1_pw" text="Pulse Width"/>
                <knob attach-x="1" attach-y="1" param="o1_pw"/>
                <value attach-x="1" attach-y="2" param="o1_pw"/>
              </vbox>
              <vbox>
                <label param="o1_stretch" text="Stretch"/>
                <knob param="o1_stretch"/>
                <value param="o1_stretch"/>
              </vbox>
              <vbox>
                <label param="o1_window" text="Window"/>
                <knob param="o1_window"/>
                <value param="o1_window"/>
              </vbox>
            </hbox>
          </frame>
          <frame label="Oscillator 2">
            <hbox spacing="3">
              <vbox>
                <combo param="o2_wave" fill="0" expand="0"/>
                <if cond="directlink">
                  <line-graph param="o2_wave" refresh="1" width="150" height="70" expand="1" fill="1"/>
                </if>
              </vbox>
              <label />
              <vbox>
                <label attach-x="1" attach-y="0" param="o2_pw" text="Pulse Width"/>
                <knob attach-x="1" attach-y="1" param="o2_pw"/>
                <value attach-x="1" attach-y="2" param="o2_pw"/>
              </vbox>
              <label />
              <vbox>
                <label param="o2_xpose" text="Transpose"/>
                <knob type="1" param="o2_xpose"/>
                <value param="o2_xpose"/>
              </vbox>
              <label />
            </hbox>
          </frame>
        </vbox>
        <frame label="Oscillators - Common">
          <vbox>
            <vbox>
              <label param="o12_mix" expand="0" fill="0"/>
              <hscale param="o12_mix" position="bottom" expand="1" fill="1"/>
            </vbox>
            <hbox>
              <vbox>
                <label param="o12_detune"/>
                <knob param="o12_detune" size="3"/>
                <value param="o12_detune"/>
              </vbox>
              <vbox>
                <label param="scale_detune"/>
                <knob param="scale_detune" size="3"/>
                <value param="scale_detune"/>
              </vbox>
            </hbox>
            <vbox>
              <label param="phase_mode" />
              <combo param="phase_mode" fill="0" expand="0"/>
            </vbox>
          </vbox>
        </frame>
      </hbox>
      <hbox>
        <frame label="Filter">
          <hbox spacing="3">
            <vbox>
              <combo param="filter" fill="0" expand="0"/>
              <if cond="directlink">
                <line-graph param="filter" refresh="1" width="150" height="70" expand="1" fill="1" fade="0.5"/>
              </if>
            </vbox>
            <label />
            <vbox>
              <label param="cutoff"/>
              <knob param="cutoff" size="2"/>
              <value param="cutoff"/>
            </vbox>
            <label />
            <vbox>
              <label param="res"/>
              <knob param="res" size="2"/>
              <value param="res"/>
            </vbox>
            <label text="              "/>
            <vbox>
              <label param="filter_sep"/>
              <knob type="1" param="filter_sep" size="3"/>
              <value param="filter_sep"/>
            </vbox>
            <label text="          "/>
            <vbox>
              <label param="key_follow"/>
              <knob param="key_follow" size="3"/>
              <value param="key_follow"/>
            </vbox>
            <label/>
          </hbox>
        </frame>
      </hbox>
    </vbox>
    
    <vbox page="Modulation" spacing="4">
      <hbox spacing="8">
        <vbox>
          <frame label="Note velocity">
            <hbox spacing="10">
              <vbox>
                <label text="To Cutoff"/>
                <knob param="vel2filter" size="2"/>
                <value param="vel2filter"/>
              </vbox>
              <vbox>
                <label text="To Amp"/>
                <knob param="vel2amp" size="2"/>
                <value param="vel2amp"/>
              </vbox>        
            </hbox>
          </frame>
          <frame label="LFO 1">
            <vbox spacing="10">
              <hbox>
                <label param="lfo1_trig" text="Mode     " />
                <combo param="lfo1_trig" />
              </hbox>
              <hbox>
                <vbox>
                  <label text="Rate"/>
                  <knob param="lfo_rate"/>
                  <value param="lfo_rate"/>
                </vbox>
                <vbox>
                  <label text="Delay"/>
                  <knob param="lfo_delay"/>
                  <value param="lfo_delay"/>
                </vbox>
                <vbox>
                  <label text="ModWheel"/>
                  <knob param="mwhl2lfo"/>
                  <value param="mwhl2lfo"/>
                </vbox>
              </hbox>
              <hbox>
                <vbox>
                  <label text="To Cutoff"/>
                  <knob param="lfo2filter" type="1"/>
                  <value param="lfo2filter"/>
                </vbox>
                <vbox>
                  <label text="To Pitch"/>
                  <knob param="lfo2pitch"/>
                  <value param="lfo2pitch"/>
                </vbox>
                <vbox>
                  <label text="To Osc PW"/>
                  <knob param="lfo2pw"/>
                  <value param="lfo2pw"/>
                </vbox>
              </hbox>
            </vbox>
          </frame>
          <frame label="LFO 2">
            <vbox spacing="10">
              <hbox>
                <label param="lfo2_trig" text="     Mode" />
                <combo param="lfo2_trig" />
              </hbox>
              <hbox>
                <vbox>
                  <label text="Rate"/>
                  <knob param="lfo2_rate"/>
                  <value param="lfo2_rate"/>
                </vbox>
                <vbox>
                  <label text="Delay"/>
                  <knob param="lfo_delay"/>
                  <value param="lfo_delay"/>
                </vbox>
              </hbox>
            </vbox>
          </frame>
        </vbox>
        <vbox>
          <frame label="Envelope 1">
            <hbox spacing="4">
              <table cols="5" rows="1" homogeneous="1" fill-x="0" expand-x="0">
                <vbox attach-x="0" attach-y="0">
                  <label param="adsr_a" text="Attack"/>
                  <vscale param="adsr_a" inverted="1" size="1"/>
                  <value param="adsr_a" width="4"/>
                </vbox>
                <vbox attach-x="1" attach-y="0">
                  <label param="adsr_d" text="Decay"/>
                  <vscale param="adsr_d" inverted="1" size="1"/>
                  <value param="adsr_d" width="4"/>
                </vbox>
                <vbox attach-x="2" attach-y="0">
                  <label param="adsr_s" text="Sustain"/>
                  <vscale param="adsr_s" inverted="1" size="1"/>
                  <value param="adsr_s"/>
                </vbox>
                <vbox attach-x="3" attach-y="0">
                  <label param="adsr_f" text="Fade"/>
                  <vscale param="adsr_f" inverted="1" size="1"/>
                  <value param="adsr_f" width="4"/>
                </vbox>
                <vbox attach-x="4" attach-y="0">
                  <label param="adsr_r" text="Release"/>
                  <vscale param="adsr_r" inverted="1" size="1"/>
                  <value param="adsr_r" width="4"/>
                </vbox>
              </table>
              <vbox>
                <vbox>
                  <label text="To Cutoff"/>
                  <knob type="1" param="env2cutoff"/>
                  <value param="env2cutoff"/>
                </vbox>
                <vbox>
                  <label text="To Res"/>
                  <knob param="env2res"/>
                  <value param="env2res"/>
                </vbox>
                <vbox>
                  <label text="To Amp"/>
                  <toggle param="env2amp" size="1"/>
                </vbox>
              </vbox>
            </hbox>
          </frame>
          <frame label="Envelope 2">
            <hbox spacing="4">
              <table cols="5" rows="1" homogeneous="1" fill-x="0" expand-x="0">
                <vbox attach-x="0" attach-y="0">
                  <label param="adsr2_a" text="Attack"/>
                  <vscale param="adsr2_a" inverted="1" size="1"/>
                  <value param="adsr2_a" width="4"/>
                </vbox>
                <vbox attach-x="1" attach-y="0">
                  <label param="adsr2_d" text="Decay"/>
                  <vscale param="adsr2_d" inverted="1" size="1"/>
                  <value param="adsr2_d" width="4"/>
                </vbox>
                <vbox attach-x="2" attach-y="0">
                  <label param="adsr2_s" text="Sustain"/>
                  <vscale param="adsr2_s" inverted="1" size="1"/>
                  <value param="adsr2_s"/>
                </vbox>
                <vbox attach-x="3" attach-y="0">
                  <label param="adsr2_f" text="Fade"/>
                  <vscale param="adsr2_f" inverted="1" size="1"/>
                  <value param="adsr2_f" width="4"/>
                </vbox>
                <vbox attach-x="4" attach-y="0">
                  <label param="adsr2_r" text="Release"/>
                  <vscale param="adsr2_r" inverted="1" size="1"/>
                  <value param="adsr2_r" width="4"/>
                </vbox>
              </table>
              <vbox>
                <vbox>
                  <label text="To Cutoff"/>
                  <knob type="1" param="adsr2_cutoff"/>
                  <value param="adsr2_cutoff"/>
                </vbox>
                <vbox>
                  <label text="To Res"/>
                  <knob param="adsr2_res"/>
                  <value param="adsr2_res"/>
                </vbox>
                <vbox>
                  <label text="To Amp"/>
                  <toggle param="adsr2_amp" size="1"/>
                </vbox>
              </vbox>
            </hbox>
          </frame>
        </vbox>
      </hbox>
    </vbox>
    <if cond="configure">
      <vbox page="Modulation Matrix">
        <listview key="mod_matrix" />
      </vbox>
    </if>
  </notebook>
</hbox>
