<plugin resizable="true">
	<grid rows="2" cols="2" vspacing="4" hspacing="4" expand="true">
		<vbox spacing="4" expand="true">
			<!-- Signal meters -->
			<hbox spacing="4">
				<meter expand="true"
					id="ilm_l" id2="ilm_r"
					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="olm_l" id2="olm_r"
					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="320" 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="+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 -->
				<marker value="-60 db" color="g_gray" basis="1" parallel="0" /> <!-- -60 dB -->
				
				<!-- Additional markers for zoom -->
				<marker value="6 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -9 db" />
				<marker value="-6 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -9 db" />
				<marker value="-18 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -9 db" />
				<marker value="-30 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -9 db" />
				<marker value="-42 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -9 db" />
	
				<marker value="3 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -15 db" />
				<marker value="-3 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -15 db" />
				<marker value="-9 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -15 db" />
				<marker value="-15 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -15 db" />
				<marker value="-21 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -15 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="0 db" color="g_yellow" basis="1" parallel="0" /> <!-- 0 dB -->
				<marker value="-24 db" color="g_yellow" basis="1" parallel="0" /> <!-- -24 dB -->
				<marker value="-48 db" color="g_yellow" basis="1" parallel="0" /> <!-- -48 dB -->
				
				<!-- Band markers -->
				<marker value="10" basis="0" parallel="1" color="g_red" hue_id="hue_0l" width="2" border="-16" />
				<marker value="10" basis="0" parallel="1" color="g_red" hue_id="hue_0r" width="2" border="-16" />
				<marker id="fre_0l" basis="0" parallel="1" color="g_red" hue_id="hue_0l" width="2" border="16" />
				<marker id="fre_0r" basis="0" parallel="1" color="g_red" hue_id="hue_0r" width="2" border="16" />
				<ui:for id="i" first="1" last="7">
					<marker id="sf_${i}l" editable="true" basis="0" parallel="1" color="g_red" hue_id="hue_${i}l" visibility=":frs_${i}l igt 0" width="2" border="-16" />
					<marker id="fre_${i}l" basis="0" parallel="1" color="g_red" hue_id="hue_${i}l" visibility=":frs_${i}l igt 0" width="2" border="16" />
					<marker id="sf_${i}r" editable="true" basis="0" parallel="1" color="g_red" hue_id="hue_${i}r" visibility=":frs_${i}r igt 0" width="2" border="-16" />
					<marker id="fre_${i}r" basis="0" parallel="1" color="g_red" hue_id="hue_${i}r" visibility=":frs_${i}r igt 0" width="2" border="16" />
				</ui:for>
	
				<!-- Meshes -->
				<mesh id="bfc_0l" color="eq_base" width="2" hue_id="hue_0l" fill="0.8" smooth="true" visibility=":flt_l" />
				<mesh id="bfc_0r" color="eq_base" width="2" hue_id="hue_0r" fill="0.8" smooth="true" visibility=":flt_r" />
				<ui:for id="i" first="1" last="7">
					<mesh id="bfc_${i}l" color="eq_base" width="2" hue_id="hue_${i}l" visibility=":flt_l and (:frs_${i}l igt 0)" fill="0.8" smooth="true" />
					<mesh id="bfc_${i}r" color="eq_base" width="2" hue_id="hue_${i}r" visibility=":flt_r and (:frs_${i}r igt 0)" fill="0.8" smooth="true" />
				</ui:for>
				
				<mesh id="ifg_l" width="3" color="left_channel_in" visibility=":ife_l" />
				<mesh id="ifg_r" width="3" color="right_channel_in" visibility=":ife_r" />
				<mesh id="ofg_l" width="3" color="left_channel"  visibility=":ofe_l" />
				<mesh id="ofg_r" width="3" color="right_channel"  visibility=":ofe_r" />
				
				<mesh id="ag_l" color="left_channel" width="3" smooth="true" visibility=":crv_l" />
				<mesh id="ag_r" color="right_channel" width="3" smooth="true" visibility=":crv_r" />
				
				<!-- 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" angle="0.0" color="g_white" logarithmic="true" />
				<axis min="-72 db / (:zoom ** 3)" max="24 db * :zoom" color="g_white" angle="0.5" logarithmic="true" /> <!-- -72..+24 dB -->
				<axis min="-1" max="1" visible="false" angle="0.5" />
				
				<!-- Marker -->
				<marker id="freq" color="g_red" basis="0" parallel="1" />
				<marker id="lvl" color="g_red" basis="1" parallel="0" />
				
				<!-- 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.1k" basis="0;2" coord="1000;0" halign="1" valign="1" />
				<text text="graph.values.10k" basis="0;2" coord="10000;0" 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="-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="-48" coord="10;-48 db" halign="1" valign="1" />
				<text text="-60" coord="10;-60 db" halign="1" valign="1" />
				<text text="graph.units.db" basis="0;2" coord="10;1" halign="1" valign="-1" />
				
				<!-- Additional text -->
				<text text="6" coord="10;6 db" halign="1" valign="1" visibility=":zoom le -9 db" />
				<text text="-6" coord="10;-6 db" halign="1" valign="1" visibility=":zoom le -9 db" />
				<text text="-18" coord="10;-18 db" halign="1" valign="1" visibility=":zoom le -9 db" />
				<text text="-30" coord="10;-30 db" halign="1" valign="1" visibility=":zoom le -9 db" />
				<text text="-42" coord="10;-42 db" halign="1" valign="1" visibility=":zoom le -9 db" />
	
				<text text="3" coord="10;3 db" halign="1" valign="1" visibility=":zoom le -15 db" />
				<text text="-3" coord="10;-3 db" halign="1" valign="1" visibility=":zoom le -15 db" />
				<text text="-9" coord="10;-9 db" halign="1" valign="1" visibility=":zoom le -15 db" />
				<text text="-15" coord="10;-15 db" halign="1" valign="1" visibility=":zoom le -15 db" />
				<text text="-21" coord="10;-21 db" halign="1" valign="1" visibility=":zoom le -15 db" />
			</graph>
			
			<hbox spacing="4">
				<label text="labels.fft.fft:" />
				<hbox>
					<button id="ife_l" size="16" color="left_channel" text="labels.chan.L_eft" font_size="8" led="true" />
					<button id="ife_r" size="16" color="right_channel" text="labels.chan.R_ight" font_size="8"  led="true" />
				</hbox>
				<label text="labels.chan.in" />
				<hbox>
					<button id="ofe_l" size="16" color="left_channel" text="labels.chan.L_eft" font_size="8" led="true" />
					<button id="ofe_r" size="16" color="right_channel" text="labels.chan.R_ight" font_size="8" led="true" />
				</hbox>
				<label text="labels.chan.out" />
				<vsep />
				<hbox>
					<button id="flt_l" size="16" color="left_channel" text="labels.chan.L_eft" font_size="8" led="true" />
					<button id="flt_r" size="16" color="right_channel" text="labels.chan.R_ight" font_size="8" led="true" />
				</hbox>
				<label text="labels.filters" />
				<hbox>
					<button id="crv_l" size="16" color="left_channel" text="labels.chan.L_eft" font_size="8" led="true" />
					<button id="crv_r" size="16" color="right_channel" text="labels.chan.R_ight" font_size="8" led="true" />
				</hbox>
				<label text="labels.curve" />
				<align pad_right="4" hpos="1" expand="true">
					<label text="labels.graphs.spectrum" />
				</align>
			</hbox>
		</vbox>
		
		<!-- Zoom control -->
		<vbox>
			<label text="labels.zoom" />
			<fader id="zoom" angle="1" expand="true" />
			<value id="zoom" />
		</vbox>

		<!-- Controls -->
		<cell cols="2">
			<hbox spacing="2">
				<cgroup id="sel">
					<ui:for id="blk" first="0" last="1">
						<ui:set id="chc" value="${(:blk mod 2) ? 'right_channel' : 'left_channel'}" />
						<ui:set id="chl" value="${(:blk mod 2) ? 'labels.chan.id_R_ight' : 'labels.chan.id_L_eft'}" />
						<ui:set id="chp" value="${(:blk mod 2) ? 'r' : 'l'}" />
					
						<grid rows="12" cols="24" spacing="2" transpose="true">
							<label text="labels.band" />
							<label text="labels.slope" />
							<vbox>
								<label text="labels.range" />
								<label text="labels.units.:hz" />
							</vbox>
							<label text="labels.gain" />
							<label text="labels.units.:db" />
							<label text="labels.chan.solo" />
							<label text="labels.chan.mute" />
							<label text="labels.chan.phase" />
							<label text="labels.delay" />
							<label text="labels.units.:ms" />
							<label text="labels.chan.hue" />
							<void />

							<!-- Bands 0-7 -->
							<ui:for id="i" first="0" last="7">
								<!-- Separator -->
								<ui:if test="${:i igt 0}">
									<cell rows="12">
										<vsep />
									</cell>
								</ui:if>
								
								<!-- Band number -->
								<cell cols="2">
									<label text="${chl}" text:id="${i}" color="${chc}" />
								</cell>
								
								<!-- Slope selector -->
								<ui:if test="${:i ieq 0}">
									<cell cols="2"><void /></cell>
								</ui:if>
								<ui:if test="${:i igt 0}">
									<cell cols="2"><combo id="frs_${i}${chp}" /></cell>
								</ui:if>
								
								<!-- Band parameters  -->
								<ui:attributes ui:recurision="-1" bright="((${i} ieq 0) or (:frs_${i}${chp} igt 0)) ? 1 : 0.5">
									<ui:if test="${:i ieq 0}">
										<cell cols="2" fill="false">
											<vbox>
												<label text="0" />
												<value id="fre_${i}${chp}" same_line="true" detailed="false" />
											</vbox>
										</cell>
									</ui:if>
									<ui:if test="${:i igt 0}">
										<knob id="sf_${i}${chp}" size="16" scale_hue_id="hue_${i}${chp}" />
									</ui:if>
									<knob id="bg_${i}${chp}" scale_hue_id="hue_${i}${chp}" />
									<value id="bg_${i}${chp}" detailed="false" />
									<button id="bs_${i}${chp}" size="24" color="green" text="labels.chan.S_olo" led="true" />
									<button id="bm_${i}${chp}" size="24" color="red" text="labels.chan.M_ute" led="true" />
									<button id="bp_${i}${chp}" size="24" color="yellow" text="labels.chan.P_hase" led="true" />
									<knob id="bd_${i}${chp}" scale_hue_id="hue_${i}" />
									<value id="bd_${i}${chp}" detailed="false" />
									<knob id="hue_${i}${chp}" size="16" scale_hue_id="hue_${i}${chp}" />
									<value id="hue_${i}${chp}" detailed="false" />
									<ui:if test="${:i igt 0}">
										<vbox>
											<value id="sf_${i}${chp}" visibility=":frs_${i}${chp} igt 0" detailed="false" />
											<value id="fre_${i}${chp}" visibility=":frs_${i}${chp} igt 0" detailed="false" />
											<label text="labels.chan.off" visibility=":frs_${i}${chp} ile 0" />
										</vbox>
									</ui:if>
									<cell rows="9">
										<meter id="blm_${i}${chp}"
											angle="1"
											color="${chc}"
											logarithmic="true" type="rms_peak"
											min="-72 db" max="12 db" height="64"
										/>
									</cell>
								</ui:attributes>
							</ui:for>
						</grid>
					</ui:for>
				</cgroup>
				<vbox spacing="2">
					<group text="groups.signal">
						<grid rows="3" cols="2" spacing="2">
							<label text="labels.chan.input" />
							<label text="labels.chan.output" />
							
							<knob id="g_in" size="20" />
							<knob id="g_out" size="20" />
							
							<value id="g_in" />
							<value id="g_out" />
						</grid>
					</group>
					<group text="groups.analysis">
						<grid rows="3" cols="2" spacing="2">
							<label text="labels.metering.reactivity" />
							<label text="labels.metering.shift" />
							
							<knob id="react" size="20" />
							<knob id="shift" size="20" />
							
							<value id="react" />
							<value id="shift" />
						</grid>
					</group>
				</vbox>
			</hbox>
		</cell>
	</grid>
</plugin>