<plugin resizable="true">
	<grid rows="2" cols="3" spacing="4">
		<vbox spacing="4" expand="true">
			<!-- Signal meters -->
			<hbox spacing="4">
				<meter expand="true"
					id="iml" id2="imr"
					stereo="true" type="rms_peak"
					angle="0"
					min="-36 db" max="+6 db" 
					color="left_channel" color2="right_channel"
				/>
				<label text="labels.input:db" />
				<void min_width="64" />
				<label text="labels.output:db" />
				<meter expand="true"
					id="sml" id2="smr"
					stereo="true" type="rms_peak"
					angle="0"
					min="-36 db" max="+6 db" 
					color="left_channel" color2="right_channel"
				/>
			</hbox>

			<!-- Graph -->
			<graph width="640" height="340" expand="true" fill="true">
				<center hpos="-1" vpos="-1" visible="false" />
				
				<!-- Gray grid -->
				<ui:for id="f" first="20" last="90" step="10"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
				<ui:for id="f" first="200" last="900" step="100"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
				<ui:for id="f" first="2000" last="9000" step="1000"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
				<marker value="20000" color="g_gray" basis="0" parallel="1" />
				
				<marker value="+36 db" color="g_gray" basis="1" parallel="0" /> <!-- +36 dB -->
				<marker value="+12 db" color="g_gray" basis="1" parallel="0" /> <!-- +12 dB -->
				<marker value="-12 db" color="g_gray" basis="1" parallel="0" /> <!-- -12 dB -->
				<marker value="-36 db" color="g_gray" basis="1" parallel="0" /> <!-- -36 dB -->
				
				<!-- Additional markers for zoom -->
				<marker value="+18 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
				<marker value="+6 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
				<marker value="-6 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
				<marker value="-18 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
				
				<marker value="+9 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
				<marker value="+3 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
				<marker value="-3 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
				<marker value="-9 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
				
				<!-- Yellow grid -->
				<marker value="100" color="g_yellow" basis="0" parallel="1" /> <!-- 100 Hz -->
				<marker value="1000" color="g_yellow" basis="0" parallel="1" /> <!-- 1 kHz -->
				<marker value="10000" color="g_yellow" basis="0" parallel="1" /> <!-- 10 kHz -->

				<marker value="+24 db" color="g_yellow" basis="1" parallel="0" /> <!-- 24 dB -->
				<marker value="0 db" color="g_white" basis="1" parallel="0" /> <!-- 0 dB -->
				<marker value="-24 db" color="g_yellow" basis="1" parallel="0" /> <!-- -24 dB -->

				<!-- Amplitude graph -->
				<mesh id="fftg_l" width="2" color="left_channel" visibility_id="fftv_l" />
				<mesh id="fftg_r" width="2" color="right_channel" visibility_id="fftv_r" />
				<mesh id="ag_l" width="3" color="left_channel" fill="0.8" smooth="true" visibility_id="fftv_l" />
				<mesh id="ag_r" width="3" color="right_channel" fill="0.8" smooth="true" visibility_id="fftv_r" />
				
				<!-- Dots -->
				<ui:attributes editable="true" border="8" padding="8">
					<dot hpos="14.91" vpos_id="gl_0" visibility_id="fvl_0" color="left_channel" />
					<dot hpos="16.77" vpos_id="gr_0" visibility_id="fvr_0" color="right_channel" />
					<dot hpos="18.91" vpos_id="gl_1" visibility_id="fvl_1" color="left_channel" />
					<dot hpos="21.15" vpos_id="gr_1" visibility_id="fvr_1" color="right_channel" />
					<dot hpos="23.71" vpos_id="gl_2" visibility_id="fvl_2" color="left_channel" />
					<dot hpos="26.57" vpos_id="gr_2" visibility_id="fvr_2" color="right_channel" />
					<dot hpos="29.82" vpos_id="gl_3" visibility_id="fvl_3" color="left_channel" />
					<dot hpos="33.54" vpos_id="gr_3" visibility_id="fvr_3" color="right_channel" />
					<dot hpos="37.46" vpos_id="gl_4" visibility_id="fvl_4" color="left_channel" />
					<dot hpos="42.05" vpos_id="gr_4" visibility_id="fvr_4" color="right_channel" />
					<dot hpos="47.43" vpos_id="gl_5" visibility_id="fvl_5" color="left_channel" />
					<dot hpos="53.13" vpos_id="gr_5" visibility_id="fvr_5" color="right_channel" />
					<dot hpos="59.64" vpos_id="gl_6" visibility_id="fvl_6" color="left_channel" />
					<dot hpos="67.07" vpos_id="gr_6" visibility_id="fvr_6" color="right_channel" />
					<dot hpos="74.92" vpos_id="gl_7" visibility_id="fvl_7" color="left_channel" />
					<dot hpos="84.09" vpos_id="gr_7" visibility_id="fvr_7" color="right_channel" />
					<dot hpos="94.57" vpos_id="gl_8" visibility_id="fvl_8" color="left_channel" />
					<dot hpos="105.74" vpos_id="gr_8" visibility_id="fvr_8" color="right_channel" />
					<dot hpos="119.27" vpos_id="gl_9" visibility_id="fvl_9" color="left_channel" />
					<dot hpos="134.15" vpos_id="gr_9" visibility_id="fvr_9" color="right_channel" />
					<dot hpos="149.09" vpos_id="gl_10" visibility_id="fvl_10" color="left_channel" />
					<dot hpos="167.68" vpos_id="gr_10" visibility_id="fvr_10" color="right_channel" />
					<dot hpos="189.15" vpos_id="gl_11" visibility_id="fvl_11" color="left_channel" />
					<dot hpos="211.47" vpos_id="gr_11" visibility_id="fvr_11" color="right_channel" />
					<dot hpos="237.14" vpos_id="gl_12" visibility_id="fvl_12" color="left_channel" />
					<dot hpos="265.66" vpos_id="gr_12" visibility_id="fvr_12" color="right_channel" />
					<dot hpos="298.18" vpos_id="gl_13" visibility_id="fvl_13" color="left_channel" />
					<dot hpos="335.36" vpos_id="gr_13" visibility_id="fvr_13" color="right_channel" />
					<dot hpos="374.59" vpos_id="gl_14" visibility_id="fvl_14" color="left_channel" />
					<dot hpos="420.46" vpos_id="gr_14" visibility_id="fvr_14" color="right_channel" />
					<dot hpos="474.29" vpos_id="gl_15" visibility_id="fvl_15" color="left_channel" />
					<dot hpos="531.33" vpos_id="gr_15" visibility_id="fvr_15" color="right_channel" />
					<dot hpos="596.37" vpos_id="gl_16" visibility_id="fvl_16" color="left_channel" />
					<dot hpos="670.73" vpos_id="gr_16" visibility_id="fvr_16" color="right_channel" />
					<dot hpos="749.18" vpos_id="gl_17" visibility_id="fvl_17" color="left_channel" />
					<dot hpos="840.92" vpos_id="gr_17" visibility_id="fvr_17" color="right_channel" />
					<dot hpos="945.74" vpos_id="gl_18" visibility_id="fvl_18" color="left_channel" />
					<dot hpos="1057.37" vpos_id="gr_18" visibility_id="fvr_18" color="right_channel" />
					<dot hpos="1192.74" vpos_id="gl_19" visibility_id="fvl_19" color="left_channel" />
					<dot hpos="1341.45" vpos_id="gr_19" visibility_id="fvr_19" color="right_channel" />
					<dot hpos="1490.92" vpos_id="gl_20" visibility_id="fvl_20" color="left_channel" />
					<dot hpos="1676.81" vpos_id="gr_20" visibility_id="fvr_20" color="right_channel" />
					<dot hpos="1891.48" vpos_id="gl_21" visibility_id="fvl_21" color="left_channel" />
					<dot hpos="2114.74" vpos_id="gr_21" visibility_id="fvr_21" color="right_channel" />
					<dot hpos="2371.43" vpos_id="gl_22" visibility_id="fvl_22" color="left_channel" />
					<dot hpos="2656.63" vpos_id="gr_22" visibility_id="fvr_22" color="right_channel" />
					<dot hpos="2981.84" vpos_id="gl_23" visibility_id="fvl_23" color="left_channel" />
					<dot hpos="3353.63" vpos_id="gr_23" visibility_id="fvr_23" color="right_channel" />
					<dot hpos="3745.92" vpos_id="gl_24" visibility_id="fvl_24" color="left_channel" />
					<dot hpos="4204.58" vpos_id="gr_24" visibility_id="fvr_24" color="right_channel" />
					<dot hpos="4742.86" vpos_id="gl_25" visibility_id="fvl_25" color="left_channel" />
					<dot hpos="5313.25" vpos_id="gr_25" visibility_id="fvr_25" color="right_channel" />
					<dot hpos="5963.69" vpos_id="gl_26" visibility_id="fvl_26" color="left_channel" />
					<dot hpos="6707.26" vpos_id="gr_26" visibility_id="fvr_26" color="right_channel" />
					<dot hpos="7491.83" vpos_id="gl_27" visibility_id="fvl_27" color="left_channel" />
					<dot hpos="8409.16" vpos_id="gr_27" visibility_id="fvr_27" color="right_channel" />
					<dot hpos="9457.42" vpos_id="gl_28" visibility_id="fvl_28" color="left_channel" />
					<dot hpos="10573.72" vpos_id="gr_28" visibility_id="fvr_28" color="right_channel" />
					<dot hpos="11927.37" vpos_id="gl_29" visibility_id="fvl_29" color="left_channel" />
					<dot hpos="13414.51" vpos_id="gr_29" visibility_id="fvr_29" color="right_channel" />
					<dot hpos="14909.23" vpos_id="gl_30" visibility_id="fvl_30" color="left_channel" />
					<dot hpos="16768.14" vpos_id="gr_30" visibility_id="fvr_30" color="right_channel" />
					<dot hpos="18914.82" vpos_id="gl_31" visibility_id="fvl_31" color="left_channel" />
					<dot hpos="21147.40" vpos_id="gr_31" visibility_id="fvr_31" color="right_channel" />
				</ui:attributes>

				<!-- Boundaries -->
				<marker value="1" color="g_white" basis="2" parallel="0" /> <!-- +48 dB -->
				<marker value="24000" color="g_white" basis="0" parallel="1" />
				
				<!-- Axis -->
				<axis min="10" max="24000" color="g_white" angle="0.0" logarithmic="true" />
				<axis min="-48 db / :zoom" max="48 db * :zoom" color="g_white" angle="0.5" logarithmic="true" /> <!-- -48..+48 dB -->
				<axis min="-1" max="1" visible="false" angle="0.5" />
				
				<!-- Text -->
				<text text="graph.units.hz" basis="0;2" coord="10;0" halign="1" valign="1" />
				<text text="100" basis="0;2" coord="100;0" halign="1" valign="1" />
				<text text="graph.values.x_k" text:value="1" basis="0;2" coord="1000;0" halign="1" valign="1" />
				<text text="graph.values.x_k" text:value="10" basis="0;2" coord="10000;0" halign="1" valign="1" />
				
				<text text="+36" coord="10;36 db" halign="1" valign="-1" />
				<text text="+24" coord="10;24 db" halign="1" valign="-1" />
				<text text="+12" coord="10;12 db" halign="1" valign="-1" />
				<text text="0" coord="10;0 db" halign="1" valign="1" />
				<text text="-12" coord="10;-12 db" halign="1" valign="1" />
				<text text="-24" coord="10;-24 db" halign="1" valign="1" />
				<text text="-36" coord="10;-36 db" halign="1" valign="1" />
				<text text="graph.units.db" basis="0;2" coord="10;1" halign="1" valign="-1" />
				
				<!-- Additional text -->
				<text text="+18" coord="10;18 db" halign="1" valign="-1" visibility=":zoom le -18 db" />
				<text text="+6" coord="10;6 db" halign="1" valign="-1" visibility=":zoom le -18 db" />
				<text text="-6" coord="10;-6 db" halign="1" valign="1" visibility=":zoom le -18 db" />
				<text text="-18" coord="10;-18 db" halign="1" valign="1" visibility=":zoom le -18 db" />

				<text text="+9" coord="10;9 db" halign="1" valign="-1" visibility=":zoom le -33 db" />
				<text text="+3" coord="10;3 db" halign="1" valign="-1" visibility=":zoom le -33 db" />
				<text text="-3" coord="10;-3 db" halign="1" valign="1" visibility=":zoom le -33 db" />
				<text text="-9" coord="10;-9 db" halign="1" valign="1" visibility=":zoom le -33 db" />
			</graph>
			<hbox spacing="4">
				<label text="labels.mode" />
				<combo id="slope" />
				<combo id="mode" />
				<align hpos="0.5" expand="true">
					<hbox spacing="4">
						<button id="fftv_l" size="16" color="left_channel" led="true" />
						<label text="labels.chan.left" />
						<button id="fftv_r" size="16" color="right_channel" led="true" />
						<label text="labels.chan.right" />
					</hbox>
				</align>
				<label text="labels.graphs.spectrum" />
			</hbox>
		</vbox>
		<vbox>
			<label text="labels.zoom" />
			<fader id="zoom" angle="1" expand="true" />
			<value id="zoom" />
		</vbox>
		<vbox spacing="4">
			<group text="groups.signal" expand="true">
				<grid rows="3" cols="2" hspacing="4">
					<knob id="g_in" />
					<vbox vfill="false">
						<label text="labels.input" halign="0" />
						<value id="g_in" same_line="true" halign="0" />
					</vbox>
					
					<knob id="g_out" />
					<vbox vfill="false">
						<label text="labels.output" expand="true" halign="0" />
						<value id="g_out" same_line="true" halign="0" />
					</vbox>
					
					<knob id="bal" balance="0.5" scale_color="yellow" />
					<vbox vfill="false">
						<label text="labels.balance" halign="0" />
						<value id="bal" same_line="true" halign="0" />
					</vbox>
				</grid>
			</group>
			<group text="groups.analysis" expand="true">
				<vbox>
					<label text="labels.fft.fft" halign="0" />
					<combo id="fft" fill="true" />
					
					<grid rows="2" cols="2" transpose="false" expand="true" hspacing="4" >
						<knob id="react" size="20" />
						<vbox vfill="false">
							<label text="labels.metering.reactivity" halign="0" />
							<value id="react" same_line="true" halign="0" />
						</vbox>
						
						<knob id="shift" size="20" />
						<vbox vfill="false">
							<label text="labels.metering.shift" halign="0" />
							<value id="shift" same_line="true" halign="0" />
						</vbox>
					</grid>
				</vbox>
			</group>
		</vbox>
		
		<cell cols="3">
			<cgroup id="fsel">
				<ui:for id="blk" first="0" last="3">
					<ui:set id="chc" value="${(:blk mod 2) ? 'right_channel' : 'left_channel'}" />
					<ui:set id="chp" value="${(:blk mod 2) ? 'r' : 'l'}" />
					<ui:set id="f" value="${:blk idiv 2}" />
					
					<grid rows="5" cols="17">
						<label text="labels.units.hz" fill="true" halign="0" />
						<ui:if test="${:f ieq 0}">
							<label text="16" />
							<label text="20" />
							<label text="25" />
							<label text="31.5" />
							<label text="40" />
							<label text="50" />
							<label text="63" />
							<label text="80" />
							<label text="100" />
							<label text="125" />
							<label text="160" />
							<label text="200" />
							<label text="250" />
							<label text="315" />
							<label text="400" />
							<label text="500" />
						</ui:if>
						<ui:if test="${:f ieq 1}">
							<label text="630" />
							<label text="800" />
							<label text="labels.values.x_k" text:value="1" />
							<label text="labels.values.x_k" text:value="1.25" />
							<label text="labels.values.x_k" text:value="1.6" />
							<label text="labels.values.x_k" text:value="2" />
							<label text="labels.values.x_k" text:value="2.5" />
							<label text="labels.values.x_k" text:value="3.15" />
							<label text="labels.values.x_k" text:value="4" />
							<label text="labels.values.x_k" text:value="5" />
							<label text="labels.values.x_k" text:value="6.3" />
							<label text="labels.values.x_k" text:value="8" />
							<label text="labels.values.x_k" text:value="10" />
							<label text="labels.values.x_k" text:value="12.5" />
							<label text="labels.values.x_k" text:value="16" />
							<label text="labels.values.x_k" text:value="20" />
						</ui:if>
						
						<label text="labels.ctl" halign="0" />
						<ui:for id="i" first="${:f*16}" last="${:f*16+15}">
							<ui:set id="ch" value="${chp}_${i}" />
							<grid rows="3" cols="2" fill="false">
								<button id="xe${ch}" led="true" size="12" color="yellow" />
								<label text="labels.chan.on" font_size="9" />
								<button id="xs${ch}" led="true" size="12" color="green" />
								<button id="xm${ch}" led="true" size="12" color="red" />
								<label text="labels.chan.S_olo" font_size="9" />
								<label text="labels.chan.M_ute" font_size="9" />
							</grid>
						</ui:for>
						
						<cell rows="2"><label text="labels.gain:db" halign="0" /></cell>
						<ui:for id="i" first="${:f*16}" last="${:f*16+15}">
							<knob id="g${chp}_${i}"  size="20" scale_color="${chc}" />
						</ui:for>
						
						<ui:for id="i" first="${:f*16}" last="${:f*16+15}">
							<value id="g${chp}_${i}" detailed="false" />
						</ui:for>
					</grid>
				</ui:for>
			</cgroup>
		</cell>		
	</grid>
</plugin>
