<plugin resizable="true">
	<ui:eval id="is_sidechain" value="(ex :sc) or (ex :sc_l) or (ex :sc_r)"/>

	<!-- Control linking -->
	<ui:for
		id="port"
		list="'scm'; 'sla'; 'scr'; 'scp'; 'sclc'; 'schc'; 'sclf'; 'schf'; 'sce'; 'scs';
			'cm'; 'ce'; 'bs'; 'bm'; 'al'; 'at'; 'rrl'; 'rt'; 'ht'; 'cr'; 'kn'; 'bth'; 'bsa'; 'mk'">
		<ui:for id="i" first="0" count="8">
			<ctl:link
				id.1="${port}_${i}l" value.1=":${port}_${i}r"
				id.2="${port}_${i}r" value.2=":${port}_${i}l"
				activity=":clink" />
		</ui:for>
	</ui:for>

	<ui:for
		id="port"
		list="'cbe'; 'sf'">
		<ui:for id="i" first="1" count="7">
			<ctl:link
				id.1="${port}_${i}l" value.1=":${port}_${i}r"
				id.2="${port}_${i}r" value.2=":${port}_${i}l"
				activity=":clink" />
		</ui:for>
	</ui:for>

	<vbox spacing="4">
		<grid rows="2" cols="5" vspacing="4" hspacing="4" expand="true">

			<group ui:inject="GraphGroup" ipadding="0" expand="true" fill="true" text="labels.graphs.spectrum">
				<graph width.min="720" height.min="350" expand="true" fill="true">
					<origin hpos="-1" vpos="-1" visible="false"/>

					<!-- Additional grid -->
					<ui:with color="graph_alt_1">
						<ui:for id="f" first="20" last="90" step="10">
							<marker v="${:f}"/>
							<marker v="${:f*10}"/>
							<marker v="${:f*100}"/>
						</ui:for>
						<marker v="20000"/>
						<ui:with ox="1" oy="0">
							<marker v="+12 db"/>
							<marker v="-12 db"/>
							<marker v="-36 db"/>
							<marker v="-60 db"/>

							<ui:for id="g" first="-42" last="6" step="12">
								<marker v="${g} db" visibility=":zoom le -9 db"/>
							</ui:for>
							<ui:for id="g" first="-21" last="3" step="6">
								<marker v="${g} db" visibility=":zoom le -15 db"/>
							</ui:for>
						</ui:with>
					</ui:with>

					<!-- Secondary grid -->
					<ui:with color="graph_sec">
						<marker v="100"/>
						<marker v="1000"/>
						<marker v="10000"/>
						<marker value="0 db" ox="1" oy="0"/>
						<marker value="-24 db" ox="1" oy="0"/>
						<marker value="-48 db" ox="1" oy="0"/>
					</ui:with>

					<!-- Piano keys -->
					<embed oy="4" start.x="midi_freq_start(12, 127)" start.y="20" end.x="midi_freq_end(12, 127)" end.y="44" valign="1" alpha="0" visibility=":_ui_graph_piano_layout">
						<piano natural="false" note.min="12" note.max="127" height="24" editable="false" selectable="false" border="0"/>
					</embed>

					<!-- Octave text -->
					<ui:with ox="0" oy="4" y="44" halign="1" valign="1" pgroup="0" priority="10" visibility=":_ui_graph_piano_layout" pad.b="2">
						<ui:for id="octave" first="0" last="9">
							<text x="midi_freq(12 * ${:octave + 1})" text="lists.notes.fmt.c" text:octave="${octave}" valign="1" halign="0"/>
						</ui:for>
					</ui:with>

					<!-- Band markers -->
					<ui:with
						width="2"
						fill="0.5"
						color.a="0.2"
						hcolor.a="0.8"
						lcolor.a="0.8"
						hlcolor.a="0.8"
						rcolor.a="0.8"
						hrcolor.a="0.8"
						color="graph_marker_cycle"
						hcolor="graph_marker_cycle"
						lcolor="graph_marker_cycle"
						hlcolor="graph_marker_cycle"
						rcolor="graph_marker_cycle"
						hrcolor="graph_marker_cycle">
						<marker v="10" color.hue=":hue_0l" hcolor.hue=":hue_0l" rborder="16" rcolor.hue=":hue_0l" hrborder="16" hrcolor.hue=":hue_0l"/>
						<marker v="10" color.hue=":hue_0r" hcolor.hue=":hue_0r" rborder="16" rcolor.hue=":hue_0r" hrborder="16" hrcolor.hue=":hue_0r"/>
						<marker id="fre_0l" color.hue=":hue_0l" hcolor.hue=":hue_0l" lborder="16" lcolor.hue=":hue_0l" hlborder="16" hlcolor.hue=":hue_0l"/>
						<marker id="fre_0r" color.hue=":hue_0r" hcolor.hue=":hue_0r" lborder="16" lcolor.hue=":hue_0r" hlborder="16" hlcolor.hue=":hue_0r"/>
						<ui:for id="i" first="1" last="7">
							<marker id="sf_${i}l" ui:id="split_marker_${i}l" visibility=":cbe_${i}l" editable="true" color.hue=":hue_${i}l" hcolor.hue=":hue_${i}l" rborder="16" rcolor.hue=":hue_${i}l" hrborder="16" hrcolor.hue=":hue_${i}l" pointer="hsize"/>
							<marker id="sf_${i}r" ui:id="split_marker_${i}r" visibility=":cbe_${i}r" editable="true" color.hue=":hue_${i}r" hcolor.hue=":hue_${i}r" rborder="16" rcolor.hue=":hue_${i}r" hrborder="16" hrcolor.hue=":hue_${i}r" pointer="hsize"/>
							<marker id="fre_${i}l" visibility=":cbe_${i}l" color.hue=":hue_${i}l" hcolor.hue=":hue_${i}l" lborder="16" lcolor.hue=":hue_${i}l" hlborder="16" hlcolor.hue=":hue_${i}l"/>
							<marker id="fre_${i}r" visibility=":cbe_${i}r" color.hue=":hue_${i}r" hcolor.hue=":hue_${i}r" lborder="16" lcolor.hue=":hue_${i}r" hlborder="16" hlcolor.hue=":hue_${i}r"/>
						</ui:for>
					</ui:with>

					<!-- Meshes -->
					<mesh id="bfc_0l" width="2" fill="true" smooth="true" color="graph_mesh_cycle" color.hue=":hue_0l" fcolor="graph_mesh_cycle" fcolor.hue=":hue_0l" fcolor.a="0.9" visibility=":flt_l"/>
					<mesh id="bfc_0r" width="2" fill="true" smooth="true" color="graph_mesh_cycle" color.hue=":hue_0r" fcolor="graph_mesh_cycle" fcolor.hue=":hue_0r" fcolor.a="0.9" visibility=":flt_r"/>

					<ui:for id="i" first="1" last="7">
						<mesh id="bfc_${i}l" width="2" fill="true" smooth="true" color="graph_mesh_cycle" color.hue=":hue_${i}l" fcolor="graph_mesh_cycle" fcolor.hue=":hue_${i}l" fcolor.a="0.9" visibility=":flt_l and :cbe_${i}l"/>
						<mesh id="bfc_${i}r" width="2" fill="true" smooth="true" color="graph_mesh_cycle" color.hue=":hue_${i}r" fcolor="graph_mesh_cycle" fcolor.hue=":hue_${i}r" fcolor.a="0.9" visibility=":flt_r and :cbe_${i}r"/>
					</ui:for>
					<mesh id="ifg_l" oy=":_ui_zoomable_spectrum_graph ? 1 : 3" width="0" color="left_in" color.a="0.8" fcolor.a="0.8" fill="true" fcolor="left_in" visibility=":ife_l"/>
					<mesh id="ifg_r" oy=":_ui_zoomable_spectrum_graph ? 1 : 3" width="0" color="right_in" color.a="0.8" fcolor.a="0.8" fill="true" fcolor="right_in" visibility=":ife_r"/>
					<mesh id="ofg_l" oy=":_ui_zoomable_spectrum_graph ? 1 : 3" width="2" color="left" visibility=":ofe_l"/>
					<mesh id="ofg_r" oy=":_ui_zoomable_spectrum_graph ? 1 : 3" width="2" color="right" visibility=":ofe_r"/>

					<mesh id="ag_l" width="3" color="left" smooth="true"/>
					<mesh id="ag_r" width="3" color="right" smooth="true"/>

					<!-- Boundaries -->
					<marker v="1" ox="2" oy="0" color="graph_prim" visibility="false"/>
					<marker v="24000" color="graph_prim" visibility="false"/>

					<!-- Axis -->
					<axis min="10" max="24000" angle="0.0" log="true" visibility="false"/>
					<axis min="-72 db / (:zoom ** 3)" max="24 db * :zoom" color="graph_prim" angle="0.5" log="true"/>
					<axis min="-1" max="1" visibility="false" angle="0.5"/>
					<axis min="-72 db" max="24 db" color="graph_prim" angle="0.5" log="true" visibility="false"/>
					<axis min="0" max=":_a_scaled_height" visibility="false" angle="0.5"/>

					<!-- Text -->
					<ui:with ox="0" oy="2" y="0" halign="1" valign="1">
						<text x="10" text="graph.units.hz"/>
						<text x="20" text="20"/>
						<text x="30" text="30"/>
						<text x="50" text="50"/>
						<text x="100" text="100"/>
						<text x="200" text="200"/>
						<text x="300" text="300"/>
						<text x="500" text="500"/>
						<text x="1000" text="graph.values.x_k" text:value="1"/>
						<text x="2000" text="graph.values.x_k" text:value="2"/>
						<text x="3000" text="graph.values.x_k" text:value="3"/>
						<text x="5000" text="graph.values.x_k" text:value="5"/>
						<text x="10000" text="graph.values.x_k" text:value="10"/>
						<text x="20000" text="graph.values.x_k" text:value="20"/>
					</ui:with>

					<ui:with x="10" halign="1" valign="1">
						<ui:for id="g" first="-60" last="12" step="12">
							<text y="${g} db" text="${g}"/>
						</ui:for>
						<text y="0 db" ox="0" oy="2" text="graph.units.db" valign="-1"/>
						<ui:for id="g" first="-42" last="6" step="12">
							<text y="${g} db" text="${g}" visibility=":zoom le -9 db"/>
						</ui:for>
						<ui:for id="g" first="-21" last="3" step="6">
							<text y="${g} db" text="${g}" visibility=":zoom le -15 db"/>
						</ui:for>
					</ui:with>

					<ui:for id="i" first="1" count="7">
						<ui:with ox="0" oy="2" y="1" valign="-1" color="graph_marker_cycle" visibility="false" pad.h="4" font.bold="true">
							<text ui:id="split_note_${i}l" x=":sf_${i}l" halign="(:sf_${i}l lt 500) ? 1 : -1" text.halign="(:sf_${i}l lt 500) ? -1 : 1" color.hue=":hue_${i}l"/>
							<text ui:id="split_note_${i}r" x=":sf_${i}r" halign="(:sf_${i}r lt 500) ? 1 : -1" text.halign="(:sf_${i}s lt 500)r ? -1 : 1" color.hue=":hue_${i}r"/>
						</ui:with>
					</ui:for>
				</graph>
			</group>
			<!-- zoom -->
			<cell rows="2">
				<vbox vexpand="true" bg.color="bg_schema">
					<label font.name="lsp-icons" font.size="12" font.antialias="true" text="icons.main.zoom" color="text_icon" pad.b="4" pad.t="4"/>
					<fader id="zoom" angle="1" vexpand="true" bg.inherit="true" flat="true"/>
					<value id="zoom" width="40"/>
				</vbox>
			</cell>
			<!-- meter in -->
			<cell rows="2">
				<vbox vexpand="true" bg.color="bg_schema">
					<label text="labels.chan.in" pad.b="3" pad.t="3"/>
					<ledmeter vexpand="true" angle="1">
						<ledchannel id="ilm_l" min="-72 db" max="12 db" log="true" type="rms_peak" peak.visibility="true" value.color="left_in"/>
						<ledchannel id="ilm_r" min="-72 db" max="12 db" log="true" type="rms_peak" peak.visibility="true" value.color="right_in"/>
					</ledmeter>
				</vbox>
			</cell>

			<!-- meter out -->
			<cell rows="2">
				<vbox vexpand="true" bg.color="bg_schema">
					<label text="labels.chan.out" pad.b="3" pad.t="3"/>
					<ledmeter vexpand="true" angle="1">
						<ledchannel id="olm_l" min="-72 db" max="12 db" log="true" type="rms_peak" peak.visibility="true" value.color="left"/>
						<ledchannel id="olm_r" min="-72 db" max="12 db" log="true" type="rms_peak" peak.visibility="true" value.color="right"/>
					</ledmeter>
				</vbox>
			</cell>

			<!-- signal -->
			<cell rows="2">
				<vbox spacing="4">
					<group text="groups.signal" expand="true">
						<grid rows="5" cols="2" hspacing="4">
							<knob id="g_in" pad.r="4"/>
							<vbox vfill="false">
								<label text="labels.input" halign="0"/>
								<value id="g_in" sline="true" halign="0"/>
							</vbox>

							<knob id="g_out" pad.r="4"/>
							<vbox vfill="false">
								<label text="labels.output" expand="true" halign="0"/>
								<value id="g_out" width.min="50" sline="true" halign="0"/>
							</vbox>

							<knob id="g_dry" scolor="dry" pad.r="4"/>
							<vbox vfill="false">
								<label text="labels.signal.dry" halign="0"/>
								<value id="g_dry" width.min="50" sline="true" halign="0"/>
							</vbox>

							<knob id="g_wet" scolor="wet" pad.r="4"/>
							<vbox vfill="false">
								<label text="labels.signal.wet" halign="0"/>
								<value id="g_wet" width.min="50" sline="true" halign="0"/>
							</vbox>

							<knob id="drywet" scolor="drywet" pad.r="4"/>
							<vbox vfill="false">
								<label text="labels.signal.drywet" halign="0"/>
								<value id="drywet" width.min="50" sline="true" halign="0"/>
							</vbox>
						</grid>
					</group>

					<!-- Analysis -->
					<group text="groups.analysis" expand="true" ipadding="0">
						<vbox>
							<grid rows="4" cols="2">
								<align halign="-1" pad.t="4" pad.l="6">
									<label text="labels.fft.fft_in"/>
								</align>
								<hbox spacing="4" pad.v="4" pad.h="6" hfill="false"><button id="ife_l" text="labels.chan.L_eft" size="19" ui:inject="Button_left_8"/>
									<button id="ife_r" text="labels.chan.R_ight" size="19" ui:inject="Button_right_8"/></hbox>

								<cell cols="2"><hsep pad.v="2" bg.color="bg" vreduce="true"/></cell>

								<align halign="-1" pad.t="4" pad.l="6">
									<label text="labels.fft.fft_out" halign="0"/>
								</align>
								<hbox spacing="4" pad.v="4" pad.h="6" hfill="false"><button id="ofe_l" text="labels.chan.L_eft" size="19" ui:inject="Button_left_8"/>
									<button id="ofe_r" text="labels.chan.R_ight" size="19" ui:inject="Button_right_8"/></hbox>

								<cell cols="2"><hsep pad.v="2" bg.color="bg" vreduce="true"/></cell>
							</grid>

							<grid rows="2" cols="2" transpose="false" expand="true" hspacing="4">
								<knob id="react" size="20" pad.r="4" pad.l="6"/>
								<vbox vfill="false" pad.r="6">
									<label text="labels.metering.reactivity" halign="0"/>
									<value id="react" width.min="50" sline="true" halign="0"/>
								</vbox>

								<knob id="shift" size="20" pad.r="4" pad.l="6"/>
								<vbox vfill="false" pad.r="6">
									<label text="labels.metering.shift" halign="0"/>
									<value id="shift" width.min="50" sline="true" halign="0"/>
								</vbox>
							</grid>
						</vbox>
					</group>
				</vbox>
			</cell>

			<!-- bottom line -->
			<hbox spacing="4" vreduce="true" bg.color="bg_schema" pad.h="6">
				<label text="labels.mode:"/>
				<combo id="mode" pad.r="8" pad.v="4"/>
				<label text="labels.sc_boost:"/>
				<combo id="envb" pad.r="8"/>
				<button ui:id="premix_trigger" id="showpmx" text="labels.premix" size="22" />
				<label text="labels.filters" pad.l="6"/>
				<hbox spacing="4" pad.h="6">
					<button id="flt_l" text="labels.chan.L_eft" size="22" ui:inject="Button_left"/>
					<button id="flt_r" text="labels.chan.R_ight" size="22" ui:inject="Button_right"/>
				</hbox>
				<button id="clink" ui:inject="Button_green" text="labels.chan.lr_link" />
				<void hexpand="true"/>
				<vsep pad.h="2" bg.color="bg" reduce="true"/>
				<shmlink id="link" pad.l="2"/>
			</hbox>
		</grid>

		<!-- down part -->
		<hbox>

			<cgroup id="bsel" embed.h=":bsel ilt 2" embed.b=":bsel ilt 2" width.min="870" height.min="424">
				<ui:for id="c" first="0" last="1">
					<ui:eval id="channel" value="(:c ieq 0) ? 'num_id_L_eft' : 'num_id_R_ight'"/>

					<grid rows="14" cols="25" transpose="true">
						<!-- Labels -->
						<label text="labels.band" pad.v="4" bg.color="bg_schema" hreduce="true"/>
						<vbox pad.v="4">
							<label text="labels.range"/>
							<label text="labels.units.:hz"/>
						</vbox>
						<label text="labels.controls" pad.v="4" bg.color="bg_schema"/>
						<label text="labels.sidechain" pad.v="4" bg.color="bg_schema"/>
						<cell rows="2" pad.v="4" hreduce="true" pad.h="6">
							<label text="labels.sc_preamp_makeup:db_db"/>
						</cell>
						<cell rows="2" pad.v="4">
							<label text="labels.ratio_knee:db" bg.color="bg_schema"/>
						</cell>
						<cell rows="2" pad.v="4">
							<label text="labels.attack:db_ms"/>
						</cell>
						<cell rows="2" pad.v="4">
							<label text="labels.release:db_ms" bg.color="bg_schema"/>
						</cell>
						<cell rows="2">
							<void bg.color="bg_schema"/>
						</cell>

						<!-- Bands -->
						<ui:for id="i" first="0" last="7">
							<ui:set id="ch" value="${:i}${(:c ieq 0) ? 'l' : 'r'}"/>

							<!-- Column 1 -->
							<ui:if test=":i ieq 0">
								<!-- Separator -->
								<cell rows="14"><vsep pad.h="2" bg.color="bg" hreduce="true"/></cell>

								<ui:with bright="((${i} ieq 0) or :cbe_${ch}) ? 1 : 0.75" bg.bright="((${i} ieq 0) or :cbe_${ch}) ? 1.0 : :const_bg_darken">
									<cell cols="2" bg.color="bg_schema">
										<button text="labels.chan.${channel}" text:id="${:i+1}" value="1" editable="false" pointer="arrow" hfill="true" ui:inject="Button_ne_Cycle" height="19" pad.h="6" pad.v="4"/>
									</cell>
									<cell cols="2" fill="false">
										<vbox width.min="40" height="36" vreduce="true">
											<label text="0"/>
											<value id="fre_${ch}" sline="true" detailed="false"/>
										</vbox>
									</cell>
								</ui:with>
							</ui:if>

							<ui:if test=":i ine 0">
								<!-- Separator -->
								<cell rows="12"><vsep pad.h="2" bg.color="bg" hreduce="true"/></cell>

								<ui:with bright="((${i} ieq 0) or :cbe_${ch}) ? 1 : 0.75" bg.bright="((${i} ieq 0) or :cbe_${ch}) ? 1.0 : :const_bg_darken">
									<cell cols="2" bg.color="bg_schema">
										<button
											id="cbe_${ch}"
											text="labels.chan.${channel}"
											text:id="${:i+1}"
											ui:inject="Button_Cycle"
											hfill="true"
											height="19"
											down.color.hue=":hue_${ch}"
											down.hover.color.hue=":hue_${ch}"
											text.down.color.hue=":hue_${ch}"
											text.down.hover.color.hue=":hue_${ch}"
											border.down.color.hue=":hue_${ch}"
											border.down.hover.color.hue=":hue_${ch}"
											pad.h="6"
											pad.v="4"/>
									</cell>
									<knob id="sf_${ch}" size="16" ssize="3" pad.v="4" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}"/>
								</ui:with>
							</ui:if>

							<ui:with bright="((${i} ieq 0) or :cbe_${ch}) ? 1 : 0.75" bg.bright="((${i} ieq 0) or :cbe_${ch}) ? 1.0 : :const_bg_darken">
								<cell cols="2" pad.h="6" bg.color="bg_schema">
									<grid rows="2" cols="1" hspacing="4" vreduce="true">
										<button
											id="ce_${ch}"
											text="labels.chan.on"
											height="19"
											hfill="true"
											ui:inject="Button_Cycle"
											down.color.hue=":hue_${ch}"
											down.hover.color.hue=":hue_${ch}"
											text.down.color.hue=":hue_${ch}"
											text.down.hover.color.hue=":hue_${ch}"
											border.down.color.hue=":hue_${ch}"
											border.down.hover.color.hue=":hue_${ch}"
											pad.v="4"/>
										<hbox pad.b="4">
											<button id="bs_${ch}" text="labels.chan.solo" height="19" hfill="true" ui:inject="Button_green_8"/>

											<button id="bm_${ch}" text="labels.chan.mute" height="19" hfill="true" ui:inject="Button_red_8" pad.l="4"/>
										</hbox>
									</grid>
								</cell>
								<cell cols="2" pad.h="6" bg.color="bg_schema">
									<combo id="sce_${ch}" fill="true" pad.l="4"/>
								</cell>
								<knob id="scp_${ch}" size="16" ssize="3" pad.t="4" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}"/>
								<value id="scp_${ch}" pad.b="4" width.min="32" detailed="false"/>
								<knob id="cr_${ch}" size="16" ssize="3" pad.t="4" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}" bg.color="bg_schema"/>
								<hbox fill="false" pad.b="4" bg.color="bg_schema">
									<value id="cr_${ch}" detailed="false"/>
									<label text=":"/>
									<label text="1"/>
								</hbox>
								<knob id="al_${ch}" size="16" ssize="3" pad.t="4" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'attack' : 'attack_inactive'"/>
								<value id="al_${ch}" pad.b="4" detailed="false"/>
								<knob id="rrl_${ch}" size="16" ssize="3" pad.t="4" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'release' : 'release_inactive'" bg.color="bg_schema"/>
								<value id="rrl_${ch}" pad.b="4" detailed="false" bg.color="bg_schema"/>

								<ui:if test=":i ieq 0">
									<cell cols="23"><hsep bg.color="bg" pad.v="2" vreduce="true"/></cell>
									<cell cols="23"><void height="30"/></cell>
								</ui:if>

								<!-- Column 2 -->
								<ui:if test=":i ine 0">
									<vbox width.min="40" height="36" vreduce="true">
										<value id="sf_${ch}" detailed="false"/>
										<value id="fre_${ch}" detailed="false" visibility=":cbe_${ch}"/>
										<label text="labels.chan.off" visibility="not :cbe_${ch}"/>
									</vbox>
								</ui:if>
								<knob id="mk_${ch}" size="16" pad.t="4" ssize="3" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}"/>
								<value id="mk_${ch}" pad.b="4" width.min="32" detailed="false"/>
								<knob id="kn_${ch}" size="16" pad.t="4" ssize="3" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}" bg.color="bg_schema"/>
								<value id="kn_${ch}" pad.b="4" detailed="false" bg.color="bg_schema"/>
								<knob id="at_${ch}" size="16" pad.t="4" ssize="3" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}"/>
								<value id="at_${ch}" pad.b="4" detailed="false"/>
								<knob id="rt_${ch}" size="16" pad.t="4" ssize="3" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}" bg.color="bg_schema"/>
								<value id="rt_${ch}" size="16" pad.b="4" detailed="false" bg.color="bg_schema"/>
							</ui:with>
						</ui:for>
					</grid>
				</ui:for>

				<ui:for id="i" first="0" last="7">
					<hbox spacing="4" bg.color="bg">
						<vbox expand="true" bg.color="bg_schema">
							<void bg.color="bg" height="4" vreduce="true"/>
							<align halign="-1">
								<label text="labels.sidechain" pad.h="6" height="20" bg.color="bg_schema_name"/>
							</align>
							<hsep/>

							<grid rows="7" cols="8" spacing="0">
								<label text="labels.mode" pad.v="4" vreduce="true"/>
								<label text="labels.sc.lookahead"/>
								<label text="labels.sc.preamp"/>
								<label text="labels.sc.reactivity"/>
								<cell cols="2">
									<label text="labels.flt.LCF"/>
								</cell>
								<cell cols="2">
									<label text="labels.flt.HCF"/>
								</cell>

								<cell cols="8"><hsep bg.color="bg" pad.v="2" vreduce="true"/></cell>

								<cell rows="2">
									<vbox vfill="false" spacing="4" pad.l="6" pad.v="4">
										<combo id="scm_${i}l" fill="true"/>
										<combo id="scs_${i}l" fill="true"/>
										<combo id="sce_${i}l" fill="true" height="19"/>
									</vbox>
								</cell>
								<knob id="sla_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<knob id="scp_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<knob id="scr_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<cell cols="2" bg.bright="(:sclc_${i}l ieq 0) ? :const_bg_darken : 1.0">
									<button text="labels.flt.LCF" pad.h="6" id="sclc_${i}l" ui:inject="Button_left" hfill="true" height="19"/>
								</cell>
								<cell cols="2" bg.bright="(:schc_${i}l ieq 0) ? :const_bg_darken : 1.0">
									<button text="labels.flt.HCF" pad.h="6" id="schc_${i}l" ui:inject="Button_left" hfill="true" height="19"/>
								</cell>

								<value id="sla_${i}l"/>
								<value id="scp_${i}l"/>
								<value id="scr_${i}l"/>

								<knob id="sclf_${i}l" size="16" ssize="3" scolor="(:sclc_${i}l ieq 0) ? 'cycle_inactive' : 'cycle'" pad.v="4" scolor.hue=":hue_${i}l" bg.bright="(:sclc_${i}l ieq 0) ? :const_bg_darken : 1.0"/>
								<value id="sclf_${i}l" bg.bright="(:sclc_${i}l ieq 0) ? :const_bg_darken : 1.0" bright="(:sclc_${i}l ieq 0) ? 0.75 : 1.0" width.min="30"/>

								<knob id="schf_${i}l" size="16" ssize="3" scolor="(:schc_${i}l ieq 0) ? 'cycle_inactive' : 'cycle'" pad.v="4" scolor.hue=":hue_${i}l" bg.bright="(:schc_${i}l ieq 0) ? :const_bg_darken : 1.0"/>
								<value id="schf_${i}l" pad.r="6" bg.bright="(:schc_${i}l ieq 0) ? :const_bg_darken : 1.0" bright="(:schc_${i}l ieq 0) ? 0.75 : 1.0" width.min="30"/>

								<cell cols="8"><hsep bg.color="bg" pad.v="2" vreduce="true"/></cell>

								<cell rows="2">
									<vbox vfill="false" spacing="4" pad.l="6" pad.v="4">
										<combo id="scm_${i}r" fill="true"/>
										<combo id="scs_${i}r" fill="true"/>
										<combo id="sce_${i}r" fill="true" height="19"/>
									</vbox>
								</cell>
								<knob id="sla_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<knob id="scp_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<knob id="scr_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>

								<cell cols="2" bg.bright="(:sclc_${i}r ieq 0) ? :const_bg_darken : 1.0">
									<button text="labels.flt.LCF" pad.h="6" id="sclc_${i}r" ui:inject="Button_right" hfill="true" height="19"/>
								</cell>
								<cell cols="2" bg.bright="(:schc_${i}r ieq 0) ? :const_bg_darken : 1.0">
									<button text="labels.flt.HCF" pad.h="6" id="schc_${i}r" ui:inject="Button_right" hfill="true" height="19"/>
								</cell>

								<value id="sla_${i}r"/>
								<value id="scp_${i}r"/>
								<value id="scr_${i}r"/>

								<knob id="sclf_${i}r" size="16" ssize="3" scolor="(:sclc_${i}r ieq 0) ? 'cycle_inactive' : 'cycle'" pad.v="4" scolor.hue=":hue_${i}r" bg.bright="(:sclc_${i}r ieq 0) ? :const_bg_darken : 1.0"/>
								<value id="sclf_${i}r" bg.bright="(:sclc_${i}r ieq 0) ? :const_bg_darken : 1.0" bright="(:sclc_${i}r ieq 0) ? 0.75 : 1.0"/>

								<knob id="schf_${i}r" size="16" ssize="3" scolor="(:sclc_${i}r ieq 0) ? 'cycle_inactive' : 'cycle'" pad.v="4" scolor.hue=":hue_${i}r" bg.bright="(:schc_${i}r ieq 0) ? :const_bg_darken : 1.0"/>
								<value id="schf_${i}r" pad.r="6" bg.bright="(:schc_${i}r ieq 0) ? :const_bg_darken : 1.0" bright="(:schc_${i}r ieq 0) ? 0.75 : 1.0"/>
							</grid>

							<void bg.color="bg" height="4" vreduce="true"/>

							<align halign="-1">
								<label text="labels.plug.compressor" halign="-1" pad.h="6" height="20" bg.color="bg_schema_name"/>
							</align>
							<hsep/>

							<grid rows="8" cols="10" hspacing="0">
								<!-- r1,2 -->
								<ui:with vreduce="true">
									<cell rows="2"><label text="labels.mode"/></cell>
									<cell rows="2"><label text="labels.ratio"/></cell>
									<cell rows="2"><label text="labels.knee"/></cell>
									<cell rows="2"><label text="labels.makeup"/></cell>
									<cell rows="2"><label text="labels.boost" bright="((:cm_${i}l ieq 0) and (:cm_${i}r ieq 0)) ? 0.5 : 1"/></cell>
									<cell cols="2"><label text="labels.attack" pad.t="4"/></cell>
									<cell cols="2"><label text="labels.release"/></cell>
									<cell rows="2"><label text="labels.hold"/></cell>

									<label text="labels.thresh_old"/>
									<label text="labels.time"/>
									<label text="labels.thresh_old"/>
									<label text="labels.time" pad.b="4"/>
								</ui:with>

								<!-- r3 -->
								<cell cols="10"><hsep bg.color="bg" pad.v="2" vreduce="true"/></cell>
								<!-- r4 -->
								<cell rows="2">
									<vbox vfill="false" spacing="4" pad.h="6" pad.v="4">
										<combo id="cm_${i}l" fill="true"/>
										<hbox fill="true" spacing="4">
											<button id="ce_${i}l" text="labels.chan.left_on" ui:inject="Button_left_8" hfill="true" height="19" hexpand="true"/>
											<button id="bs_${i}l" text="labels.chan.S_olo" ui:inject="Button_green_8" size="19"/>
											<button id="bm_${i}l" text="labels.chan.M_ute" ui:inject="Button_red_8" size="19"/>
										</hbox>
									</vbox>
								</cell>
								<knob id="cr_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<knob id="kn_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<knob id="mk_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<hbox>
									<knob
										id="bth_${i}l"
										size="16"
										ssize="3"
										pad.t="4"
										scolor="(:cm_${i}l ieq 0) ? 'cycle_inactive' : 'cycle'"
										scolor.hue=":hue_${i}l"
										bright="(:cm_${i}l ieq 0) ? 0.75 : 1"
										bg.bright="(:cm_${i}l ieq 0) ? :const_bg_darken : 1.0"
										visibility=":cm_${i}l ine 2"/>
									<knob
										id="bsa_${i}l"
										size="16"
										ssize="3"
										pad.t="4"
										scolor="(:cm_${i}l ieq 0) ? 'cycle_inactive' : 'cycle'"
										scolor.hue=":hue_${i}l"
										bright="(:cm_${i}l ieq 0) ? 0.75 : 1"
										bg.bright="(:cm_${i}l ieq 0) ? :const_bg_darken : 1.0"
										visibility=":cm_${i}l ieq 2"/>
								</hbox>
								<knob id="al_${i}l" size="16" ssize="3" pad.t="4" scolor="attack_1"/>
								<knob id="at_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<knob id="rrl_${i}l" size="16" ssize="3" pad.t="4" scolor="release_1"/>
								<knob id="rt_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<knob id="ht_${i}l" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}l"/>
								<!-- r5 -->
								<hbox fill="false" pad.h="6" pad.v="4" width.min="30">
									<value id="cr_${i}l" detailed="false"/>
									<label text=":"/>
									<label text="1"/>
								</hbox>
								<ui:with sline="true" pad.h="6" pad.v="4" width.min="48">
									<value id="kn_${i}l"/>
									<value id="mk_${i}l"/>
								</ui:with>
								<hbox pad.h="6" pad.v="4" bright="(:cm_${i}l ieq 0) ? 0.75 : 1" bg.bright="(:cm_${i}l ieq 0) ? :const_bg_darken : 1.0" width.min="54">
									<value id="bth_${i}l" sline="true" bright="(:cm_${i}l ieq 0) ? 0.75 : 1" bg.bright="(:cm_${i}l ieq 0) ? :const_bg_darken : 1.0" visibility=":cm_${i}l ine 2"/>
									<value id="bsa_${i}l" sline="true" bright="(:cm_${i}l ieq 0) ? 0.75 : 1" bg.bright="(:cm_${i}l ieq 0) ? :const_bg_darken : 1.0" visibility=":cm_${i}l ieq 2"/>
								</hbox>
								<ui:with sline="true" pad.h="6" pad.v="4" width.min="48">
									<value id="al_${i}l"/>
									<value id="at_${i}l"/>
									<value id="rrl_${i}l"/>
									<value id="rt_${i}l"/>
									<value id="ht_${i}l"/>
								</ui:with>
								<!-- r6 -->
								<cell cols="10"><hsep bg.color="bg" pad.v="2" vreduce="true"/></cell>

								<!-- r7 -->
								<cell rows="2">
									<vbox vfill="false" spacing="4" pad.h="6" pad.v="4">
										<combo id="cm_${i}r" fill="true"/>
										<hbox fill="true" spacing="4">
											<button id="ce_${i}r" text="labels.chan.right_on" ui:inject="Button_right_8" hfill="true" height="19" hexpand="true"/>
											<button id="bs_${i}r" text="labels.chan.S_olo" ui:inject="Button_green_8" size="19"/>
											<button id="bm_${i}r" text="labels.chan.M_ute" ui:inject="Button_red_8" size="19"/>
										</hbox>
									</vbox>
								</cell>
								<knob id="cr_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<knob id="kn_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<knob id="mk_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<hbox>
									<knob
										id="bth_${i}r"
										size="16"
										ssize="3"
										pad.t="4"
										scolor="(:cm_${i}r ieq 0) ? 'cycle_inactive' : 'cycle'"
										scolor.hue=":hue_${i}r"
										bright="(:cm_${i}r ieq 0) ? 0.75 : 1"
										bg.bright="(:cm_${i}r ieq 0) ? :const_bg_darken : 1.0"
										visibility=":cm_${i}r ine 2"/>
									<knob
										id="bsa_${i}r"
										size="16"
										ssize="3"
										pad.t="4"
										scolor="(:cm_${i}r ieq 0) ? 'cycle_inactive' : 'cycle'"
										scolor.hue=":hue_${i}r"
										bright="(:cm_${i}r ieq 0) ? 0.75 : 1"
										bg.bright="(:cm_${i}r ieq 0) ? :const_bg_darken : 1.0"
										visibility=":cm_${i}r ieq 2"/>
								</hbox>
								<knob id="al_${i}r" size="16" ssize="3" pad.t="4" scolor="attack_1"/>
								<knob id="at_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<knob id="rrl_${i}r" size="16" ssize="3" pad.t="4" scolor="release_1"/>
								<knob id="rt_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<knob id="ht_${i}r" size="16" ssize="3" scolor="cycle" pad.t="4" scolor.hue=":hue_${i}r"/>
								<!-- r8 -->
								<hbox fill="false" pad.h="6" pad.v="4">
									<value id="cr_${i}r" detailed="false"/>
									<label text=":"/>
									<label text="1"/>
								</hbox>
								<ui:with sline="true" pad.h="6" pad.v="4">
									<value id="kn_${i}r"/>
									<value id="mk_${i}r"/>
								</ui:with>
								<hbox pad.h="6" pad.v="4" bright="(:cm_${i}r ieq 0) ? 0.75 : 1" bg.bright="(:cm_${i}r ieq 0) ? :const_bg_darken : 1.0">
									<value id="bth_${i}r" sline="true" bright="(:cm_${i}r ieq 0) ? 0.75 : 1" bg.bright="(:cm_${i}r ieq 0) ? :const_bg_darken : 1.0" visibility=":cm_${i}r ine 2"/>
									<value id="bsa_${i}r" sline="true" bright="(:cm_${i}r ieq 0) ? 0.75 : 1" bg.bright="(:cm_${i}r ieq 0) ? :const_bg_darken : 1.0" visibility=":cm_${i}r ieq 2"/>
								</hbox>
								<ui:with sline="true" pad.h="6" pad.v="4">
									<value id="al_${i}r"/>
									<value id="at_${i}r"/>
									<value id="rrl_${i}r"/>
									<value id="rt_${i}r"/>
									<value id="ht_${i}r"/>
								</ui:with>

							</grid>
						</vbox>
						<!-- <vsep bg.color="red" pad.h="2" hreduce="true"/> -->

						<vbox>
							<grid rows="5" cols="6" transpose="true" bg.color="bg_schema">
								<cell cols="6"><void bg.color="bg" height="4" vreduce="true"/></cell>
								<vsep hreduce="true"/>
								<cell cols="6"><hsep bg.color="bg" pad.v="2" vreduce="true"/></cell>
								<cell rows="2"><vsep hreduce="true"/></cell>

								<label text="labels.channel" pad.v="4" vreduce="true"/>
								<label text="labels.band"/>
								<vbox fill="false">
									<label text="labels.range"/>
									<label text="labels.units.:hz"/>
								</vbox>

								<ui:for id="c" first="0" last="1">
									<ui:eval id="channel" value="(:c ieq 0) ? 'num_id_L_eft' : 'num_id_R_ight'"/>
									<ui:eval id="chan_col" value="(:c ieq 0) ? 'left' : 'right'"/>
									<ui:set id="ch" value="${:i}${(:c ieq 0) ? 'l' : 'r'}"/>

									<vsep bg.color="bg" pad.h="2" hreduce="true"/>
									<cell rows="2"><vsep bg.color="bg" pad.h="2" hreduce="true"/></cell>

									<label text="labels.chan.${chan_col}" pad.v="4" vreduce="true"/>
									<ui:if test=":i ieq 0">
										<button text="labels.chan.active_${channel}" text:id="${:i+1}" value="1" editable="false" pointer="arrow" hfill="true" ui:inject="Button_ne_${chan_col}" height="19" pad.h="6" pad.v="4"/>
										<hbox height="36" vreduce="true">
											<vbox >
												<label text="0" width.min="32"/>
												<value id="fre_${ch}" width.min="32" sline="true" detailed="false"/>
											</vbox>
										</hbox>
									</ui:if>

									<ui:if test=":i ine 0">
										<button id="cbe_${ch}" text="labels.chan.active_${channel}" text:id="${:i+1}" ui:inject="Button_${chan_col}" hfill="true" height="19" pad.h="6" pad.v="4"/>
										<hbox>
											<knob id="sf_${ch}" size="16" ssize="3" pad.v="4" scolor="((${i} ieq 0) or :cbe_${ch}) ? 'cycle' : 'cycle_inactive'" scolor.hue=":hue_${ch}"/>
											<vbox fill="false">
												<value id="sf_${ch}" width.min="32" detailed="false"/>
												<value id="fre_${ch}" detailed="false" width.min="32" visibility=":cbe_${ch}"/>
												<label text="labels.chan.off" width.min="32" visibility="not :cbe_${ch}"/>
											</vbox>
										</hbox>
									</ui:if>
								</ui:for>
							</grid>
							<void bg.color="bg" height="4" vreduce="true"/>

							<group ui:inject="GraphGroup" ipadding="0" expand="true" fill="true" text.show="false">
								<graph width.min="256" height.min="256" expand="false">
									<origin hpos="-1" vpos="-1" visible="false"/>

									<!-- Gray grid -->
									<ui:for id="g" first="-60" last="12" step="24">
										<marker v="${g} db" color="graph_alt_1"/>
										<marker v="${g} db" ox="1" oy="0" color="graph_alt_1"/>
									</ui:for>

									<!-- Yellow grid -->
									<ui:for id="g" first="-48" last="-24" step="24">
										<marker v="${g} db" color="graph_sec"/>
										<marker v="${g} db" ox="1" oy="0" color="graph_sec"/>
									</ui:for>

									<!-- Axes and boundaries -->
									<marker v="1" ox="1" oy="0" dv="1" dx=":_a_width" dy=":_a_height" color="graph_alt_1" width="2" smooth="true"/>
									<marker v="24 db" color="graph_alt_1" visibility="false"/>
									<marker v="24 db" ox="1" oy="0" color="graph_alt_1" visibility="false"/>
									<axis min="-72 db" max="24 db" color="graph_prim" angle="0.0" log="true" visibility="false"/>
									<axis min="-72 db" max="24 db" color="graph_prim" angle="0.5" log="true" visibility="false"/>

									<!-- 0 dB markers -->
									<marker v="0 db" ox="0" oy="1" width="2" color="graph_prim"/>
									<marker v="0 db" ox="1" oy="0" width="2" color="graph_prim"/>

									<!-- Meshes -->
									<mesh id="ccg_${i}l" width="3" color="left" smooth="true"/>
									<mesh id="ccg_${i}r" width="3" color="right" smooth="true"/>
									<dot x.id="elm_${i}l" y.id="clm_${i}l" color="left" bcolor="left"/>
									<dot x.id="elm_${i}r" y.id="clm_${i}r" color="right" bcolor="right"/>

									<!-- Markers -->
									<marker id="al_${i}l" editable="true" width="2" pointer="hsize" color="attack_1" hcolor="attack_1"/>
									<marker id="al_${i}r" editable="true" width="2" pointer="hsize" color="attack_2" hcolor="attack_2"/>
									<marker id="rl_${i}l" color="release_1"/>
									<marker id="rl_${i}r" color="release_2"/>

									<!-- Text -->
									<text x="0 db" y="0 db" text="0" halign="1" valign="1"/>
									<ui:attributes x="0 db" halign="1" valign="-1">
										<text y="24 db" text="graph.units.db"/>
										<text y="12 db" text="+12"/>
										<text y="-12 db" text="-12"/>
										<text y="-24 db" text="-24"/>
										<text y="-36 db" text="-36"/>
										<text y="-48 db" text="-48"/>
										<text y="-60 db" text="-60"/>
										<text y="-72 db" text="graph.axis.out" valign="1"/>
									</ui:attributes>
									<ui:attributes y="0 db" halign="-1" valign="1">
										<text x="24 db" text="graph.units.db"/>
										<text x="12 db" text="+12"/>
										<text x="-12 db" text="-12"/>
										<text x="-24 db" text="-24"/>
										<text x="-36 db" text="-36"/>
										<text x="-48 db" text="-48"/>
										<text x="-60 db" text="-60"/>
										<text x="-72 db" text="graph.axis.in" halign="1"/>
									</ui:attributes>
								</graph>
							</group>
						</vbox>
						<vbox>
							<void bg.color="bg" height="4" vreduce="true"/>
							<label text="labels.gain_" bg.color="bg_schema" pad.v="4"/>
							<ledmeter vexpand="true" height.min="256" angle="1">
								<ledchannel id="rlm_${i}l" min="-72 db" max="24 db" log="true" balance="0 db" balance.visibility="true" type="peak" value.color="bright_blue"/>
								<ledchannel id="rlm_${i}r" min="-72 db" max="24 db" log="true" balance="0 db" balance.visibility="true" type="peak" value.color="bright_blue"/>
							</ledmeter>
						</vbox>
					</hbox>

				</ui:for>
			</cgroup>
		</hbox>

	</vbox>

	<!-- Premix overlay -->
	<overlay id="showpmx" trigger="premix_trigger" hpos="1" vpos="1" halign="-1" valign="1" ipadding.t="4">
		<group text="groups.premix" vexpand="false" ipadding="0">
			<grid rows="3" cols="${(:is_sidechain) ? 8 : 5}" spacing="0" bg.color="bg_schema" transpose="true">
				<ui:if test=":is_sidechain">
					<label text="labels.premix.in_to_sc" pad.h="6" pad.v="4" />
					<knob id="in2sc" />
					<value id="in2sc" pad.h="6" pad.v="4" />
				</ui:if>

				<label text="labels.premix.in_to_link" pad.h="6" pad.v="4" />
				<knob id="in2lk" />
				<value id="in2lk" />

				<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>

				<ui:if test=":is_sidechain">
					<label text="labels.premix.sc_to_in" pad.h="6" pad.v="4" />
					<knob id="sc2in" />
					<value id="sc2in" pad.h="6" pad.v="4" />

					<label text="labels.premix.sc_to_link" pad.h="6" pad.v="4" />
					<knob id="sc2lk" />
					<value id="sc2lk" pad.h="6" pad.v="4" />

					<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
				</ui:if>

				<label text="labels.premix.link_to_in" pad.h="6" pad.v="4" />
				<knob id="lk2in" />
				<value id="lk2in" pad.h="6" pad.v="4" />

				<label text="labels.premix.link_to_sc" pad.h="6" pad.v="4" />
				<knob id="lk2sc" />
				<value id="lk2sc" pad.h="6" pad.v="4" />
			</grid>
		</group>
	</overlay>

</plugin>
