<plugin resizable="true">
	<ui:eval id="is_sidechain" value="(ex :sc) or (ex :sc_l) or (ex :sc_r)"/>
	<ui:set id="has_solo" value="
		:bs_1 or :bs_2 or :bs_3 or (:ebe and :bs_4)"/>

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

			<group ui:inject="GraphGroup" ipadding="0" expand="true" fill="true" text="labels.graphs.spectrum">
				<graph width.min="590" height.min="160" 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 split markers -->
					<ui:with
						width="2"
						hwidth="2"
						fill="0.5"
						color.a="0.2"
						hcolor.a="0.1"
						lcolor.a="0.8"
						hlcolor.a="0.6"
						rcolor.a="0.8"
						hrcolor.a="0.6"
						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="0" hcolor.hue="0" rborder="16" hrborder="16" rcolor.hue="0" hrcolor.hue="0"/>
						<marker id="sf1" ui:id="split_marker1" editable="true" pointer="hsize" color.hue="0" hcolor.hue="0" lborder="16" hlborder="16" lcolor.hue="0" hlcolor.hue="0" rborder="16" hrborder="16" rcolor.hue="0.25" hrcolor.hue="0.25"/>
						<marker id="sf2" ui:id="split_marker2" editable="true" pointer="hsize" color.hue="0.25" hcolor.hue="0.25" lborder="16" hlborder="16" lcolor.hue="0.25" hlcolor.hue="0.25" rborder="16" hrborder="16" rcolor.hue="0.5" hrcolor.hue="0.5"/>
						<marker id="sf3" ui:id="split_marker3" editable="true" pointer="hsize" color.hue="0.5" hcolor.hue="0.5" lborder="16" hlborder="16" lcolor.hue="0.5" hlcolor.hue="0.5" rborder="16" hrborder="16" rcolor.hue="0.75" hrcolor.hue="0.75" visibility=":ebe"/>
						<marker v="24000" color.hue="(:ebe) ? 0.75 : 0.5" hcolor.hue="(:ebe) ? 0.75 : 0.5" lborder="16" hlborder="16" lcolor.hue="(:ebe) ? 0.75 : 0.5" hlcolor.hue="(:ebe) ? 0.75 : 0.5"/>
					</ui:with>

					<!-- Meshes -->
					<ui:for id="i" first="1" count="4">
						<mesh id="bfc_${i}" width="2" fill="false" smooth="true" color="graph_mesh_cycle" color.hue="${(:i-1) * 0.25}" fcolor="graph_mesh_cycle" fcolor.hue="${(:i-1) * 0.25}" color.a="0.6" fcolor.a="0.9" visibility="${(:i lt 4) ? ':flt' : ':flt and :ebe'}"/>
					</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="bright_cyan" smooth="true" visibility="!:ssplit"/>
					<mesh id="ag_l" width="3" color="left" smooth="true" visibility=":ssplit"/>
					<mesh id="ag_r" width="3" color="right" smooth="true" visibility=":ssplit"/>

					<!-- Threshold segments -->
					<ui:for id="b" first="1" count="4">
						<ui:if test=":b ieq 1">
							<!-- Band 1 -->
							<ui:eval id="sf" value="'10'"/>
							<ui:eval id="ef" value="':sf1'"/>
							<ui:set id="vis" value="true"/>
						</ui:if>
						<ui:if test=":b ieq 2">
							<!-- Band 2 -->
							<ui:eval id="sf" value="':sf1'"/>
							<ui:eval id="ef" value="':sf2'"/>
							<ui:set id="vis" value="true"/>
						</ui:if>
						<ui:if test=":b ieq 3">
							<!-- Band 3 -->
							<ui:eval id="sf" value="':sf2'"/>
							<ui:eval id="ef" value="'(:ebe ? :sf3 : 24000)'"/>
							<ui:set id="vis" value="true"/>
						</ui:if>
						<ui:if test=":b ieq 4">
							<!-- Band 4 -->
							<ui:eval id="sf" value="':sf3'"/>
							<ui:eval id="ef" value="'24000'"/>
							<ui:set id="vis" value=":ebe"/>
						</ui:if>

						<!-- Downward Threshold -->
						<line sx="${sf}" sy=":td_${b}" x="${ef}" y.id="td_${b}" y.editable="false" z.id="rd_${b}" z.editable="false" width="0" smooth="false" color="cyan" lborder="400" lcolor="cyan" lcolor.a="0.9" pointer="none" visibility="${vis}"/>

						<line
							sx="${sf}"
							sy=":td_${b}"
							x="${ef}"
							y.id="td_${b}"
							y.editable="true"
							z.id="rd_${b}"
							z.editable="true"
							width="3"
							smooth="true"
							color="cyan"
							hcolor="cyan"
							lborder="(2 - lg :rd_${b}) * 48"
							hlborder="(2 - lg :rd_${b}) * 48"
							lcolor="cyan"
							lcolor.a="0.5"
							hlcolor.a="0.2"
							hlcolor="cyan"
							pointer="vsize"
							visibility="${vis}"/>

						<!-- Upward Threshold -->
						<line sx="${sf}" sy=":tu_${b}" x="${ef}" y.id="tu_${b}" y.editable="false" z.id="ru_${b}" z.editable="false" width="0" smooth="false" color="cyan" rborder="400" rcolor="cyan" rcolor.a="0.9" pointer="none" visibility="${vis}"/>

						<line
							sx="${sf}"
							sy=":tu_${b}"
							x="${ef}"
							y.id="tu_${b}"
							y.editable="true"
							z.id="ru_${b}"
							z.editable="true"
							width="3"
							smooth="true"
							color="cyan"
							hcolor="cyan"
							rborder="(2 - lg :ru_${b}) * 48"
							hrborder="(2 - lg :ru_${b}) * 48"
							rcolor="cyan"
							rcolor.a="0.5"
							hrcolor.a="0.2"
							hrcolor="cyan"
							pointer="vsize"
							visibility="${vis}"/>

						<!-- Bottom Threshold -->
						<line sx="${sf}" sy=":tm_${b}" x="${ef}" y.id="tm_${b}" y.editable="true" z.id="kn_${b}" z.editable="true" width="3" smooth="true" color="cyan" hcolor="cyan" color.a="0.3" hcolor.a="0" pointer="vsize" visibility="${vis}"/>
					</ui:for>

					<!-- 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="0" 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="3">
						<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}" x=":sf${i}" halign="(:sf${i} lt 500) ? 1 : -1" text.halign="(:sf${i} lt 500) ? -1 : 1" color.hue="${(:i-1) * 0.25}"/>
						</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>

			<!-- Analysis -->
			<cell rows="2">
				<group text="groups.analysis" expand="false" 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" vexpand="false" height.min="100" 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>
						<hsep pad.v="2" bg.color="bg" vreduce="true"/>
						<void vexpand="true"/>
					</vbox>
				</group>
			</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">
				<group text="groups.signal" ipadding="0" vexpand="false">
					<grid rows="7" cols="2" height.min="154">

						<knob id="g_in" pad.r="4" pad.v="4" pad.l="6"/>
						<vbox vfill="false" pad.v="4" pad.r="6">
							<label text="labels.input" halign="0"/>
							<value id="g_in" sline="true" halign="0"/>
						</vbox>

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

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

						<knob id="g_dry" scolor="dry" pad.r="4" pad.v="4" pad.l="6"/>
						<vbox vfill="false" pad.v="4" pad.r="6">
							<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" pad.v="4" pad.l="6"/>
						<vbox vfill="false" pad.v="4" pad.r="6">
							<label text="labels.signal.wet" halign="0"/>
							<value id="g_wet" width.min="50" sline="true" halign="0"/>
						</vbox>

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

						<knob id="drywet" scolor="drywet" pad.r="4" pad.v="4" pad.l="6"/>
						<vbox vfill="false" pad.v="4" pad.r="6">
							<label text="labels.signal.drywet" halign="0"/>
							<value id="drywet" width.min="50" sline="true" halign="0"/>
						</vbox>
					</grid>
				</group>
			</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" />
				<button id="flt" text="labels.filters" size="22" ui:inject="Button_cyan"/>
				<void hexpand="true"/>
				<button id="ssplit" text="labels.stereo_split" size="22" ui:inject="Button_blue" pad.r="2"/>
				<vsep pad.h="2" bg.color="bg" reduce="true"/>
				<shmlink id="link" pad.l="2"/>
			</hbox>
		</grid>

		<!-- down part -->
		<grid rows="1" cols="3">
			<!-- Sidechain part -->
			<group text="labels.sidechain" expand="true" width.min="90" ipadding="0">
				<grid rows="16" cols="1" spacing="0" bg.color="bg_schema">
					<label text="labels.setup" pad.h="6" pad.v="4" vreduce="true"/>
					<vbox vreduce="true" pad.b="8">
						<button id="prot" text="labels.surge" fill="true" pad.h="6" pad.b="4"/>
						<combo id="sc_mode" pad.h="6" pad.b="4"/>
						<combo id="sc_src" pad.h="6" visibility="!:ssplit"/>
						<combo id="sp_src" pad.h="6" visibility=":ssplit"/>
						<combo id="sc_ext" fill="true" pad.t="4" pad.h="6"/>
					</vbox>
					<hsep pad.v="2" bg.color="bg" vreduce="true"/>

					<label text="labels.sc.preamp" pad.h="6" pad.v="8" vreduce="true"/>
					<knob id="sc_pamp" scolor="kscale"/>
					<value id="sc_pamp" sline="true" pad.b="8"/>
					<hsep pad.v="2" bg.color="bg" vreduce="true"/>

					<label text="labels.sc.reactivity" pad.h="6" pad.v="8" vreduce="true"/>
					<knob id="sc_rea" scolor="kscale"/>
					<value id="sc_rea" sline="true" pad.b="8"/>
					<hsep pad.v="2" bg.color="bg" vreduce="true"/>

					<label text="labels.sc.lookahead" pad.h="6" pad.v="8" vreduce="true"/>
					<knob id="lkahead"/>
					<value id="lkahead" sline="true" pad.b="8"/>

					<hsep pad.v="2" bg.color="bg" vreduce="true"/>
					<void vexpand="true"/>
				</grid>

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

			<!-- Bands part -->
			<cell>
				<group id="csel" hexpand="true" ipadding="0" text="labels.controls">

					<grid rows="17" cols="12">
						<cell cols="3">
							<label text="labels.band" pad.v="4"/>
						</cell>
						<vsep pad.h="2" bg.color="bg" hreduce="true"/>
						<label text="labels.upward" pad.v="4"/>
						<vsep pad.h="2" bg.color="bg" hreduce="true"/>
						<label text="labels.downward" pad.v="4"/>
						<vsep pad.h="2" bg.color="bg" hreduce="true"/>
						<void/>
						<void/>
						<vsep pad.h="2" bg.color="bg" hreduce="true"/>
						<label text="labels.compression_curve" pad.v="4"/>

						<!-- Row 2 horizontal separator -->
						<cell cols="12">
							<hsep pad.v="2" bg.color="bg" vreduce="true"/>
						</cell>

						<ui:for id="i" first="1" count="4">
							<ui:set id="act_ch" value="(!:bm_${i} and ((${has_solo}) ? :bs_${i} : true) and (:ebe or (${i} ilt 4)))"/>
							<ui:with bg.bright="(!${act_ch}) ? :const_bg_darken : 1.0" bright="(!${act_ch}) ? 0.75 : 1.0">

								<ui:if test=":i ieq 1">
									<hbox vreduce="true" pad.b="4">
										<align halign="-1" valign="-1">
											<bevel width.min="72" height.min="46" ui:inject="Bevel_cycle" dir.deg="32"/>
										</align>
									</hbox>
								</ui:if>
								<ui:if test=":i ieq 2">
									<knob id="sf1" scolor="(!${act_ch}) ? 'cycle_inactive' : 'graph_mesh_cycle'" scolor.hue="0.25"/>
								</ui:if>
								<ui:if test=":i ieq 3">
									<knob id="sf2" scolor="(!${act_ch}) ? 'cycle_inactive' : 'graph_mesh_cycle'" scolor.hue="0.5"/>
								</ui:if>
								<ui:if test=":i ieq 4">
									<knob id="sf3" scolor="(!${act_ch}) ? 'cycle_inactive' : 'graph_mesh_cycle'" scolor.hue="0.75"/>
								</ui:if>

								<void/>

								<hbox hfill="false" pad.h="6" width.min="110">
									<ui:if test=":i ieq 1">
										<vbox vfill="false" pad.l="4">
											<label text="labels.bands.frequency_low"/>
											<hbox fill="false">
												<label text="0"/>
												<label text=" - "/>
												<value id="sf1" sline="true"/>
											</hbox>
										</vbox>
									</ui:if>
									<ui:if test=":i ieq 2">
										<vbox vfill="false" pad.l="4">
											<label text="labels.bands.frequency_mid"/>
											<hbox fill="false">
												<value id="sf1" detailed="false"/>
												<label text=" - "/>
												<value id="sf2" sline="true"/>
											</hbox>
										</vbox>
									</ui:if>
									<ui:if test=":i ieq 3">
										<vbox vfill="false" pad.l="4">
											<label text="labels.bands.frequency_hi"/>
											<hbox fill="false">
												<value id="sf2" detailed="false"/>
												<label text=" - "/>
												<value id="sf3" sline="true" visibility=":ebe"/>
												<label text="labels.gott_comp.freq_range" text:end=":_time_sr * 0.5" sline="true" visibility="!:ebe" text.evaluate="true"/>
											</hbox>
										</vbox>
									</ui:if>
									<ui:if test=":i ieq 4">
										<vbox vfill="false" pad.l="4">
											<label text="labels.bands.frequency_hi_e"/>
											<label text="labels.gott_comp.band_is_off" visibility="!:ebe"/>
											<hbox fill="false" visibility=":ebe">
												<value id="sf3" detailed="false"/>
												<label text=" - "/>
												<label text="labels.gott_comp.freq_range" text:end=":_time_sr * 0.5" sline="true" text.evaluate="true"/>
											</hbox>
										</vbox>
									</ui:if>
								</hbox>
							</ui:with>

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

							<ui:with bg.bright="(!${act_ch}) ? :const_bg_darken : 1.0" bright="(!${act_ch}) ? 0.75 : 1.0">
								<hbox hfill="false" pad.h="6">
									<knob id="tu_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'threshold'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.threshold"/>
										<value id="tu_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>

								<void/>

								<hbox hfill="false" pad.h="6">
									<knob id="td_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'threshold'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.threshold"/>
										<value id="td_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>

								<void/>

								<hbox hfill="false" pad.h="6">
									<knob id="ta_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'attack'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.attack"/>
										<value id="ta_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>

								<hbox hfill="false" pad.h="6">
									<knob id="mk_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'kscale'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.makeup"/>
										<value id="mk_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>
							</ui:with>
							<cell rows="4">
								<vsep pad.h="2" bg.color="bg" hreduce="true"/>
							</cell>

							<cell rows="3" fill="false" expand="false" hreduce="true">
								<grid rows="2" cols="2" expand="false">
									<cell rows="2">
										<graph width="102" height="102" expand="false" hreduce="true">
											<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 -->
											<ui:set id="act_cg" value="(!:bm_${i} and ((${has_solo}) ? :bs_${i} : true) and (:ebe or (${i} ilt 4)))"/>

											<mesh id="ccg_${i}" width="2" color="graph_mesh" color.a="0.3" smooth="true" visibility="${act_cg}"/>
											<dot x.id="elm_${i}l" y.id="clm_${i}l" color="graph_mesh" bcolor="graph_mesh" size="3" border.size="0" visibility="(!:ssplit) and (${act_cg})"/>
											<dot x.id="elm_${i}l" y.id="clm_${i}l" color="left" bcolor="left" size="3" border.size="0" visibility="(:ssplit) and (${act_cg})"/>
											<dot x.id="elm_${i}r" y.id="clm_${i}r" color="right" bcolor="right" size="3" border.size="0" visibility="(:ssplit) and (${act_cg})"/>

											<!-- 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>
									</cell>
									<ui:with bg.bright="(!${act_ch}) ? :const_bg_darken : 1.0" bright="(!${act_ch}) ? 0.75 : 1.0">
										<void/>
										<ledmeter vexpand="true" angle="1">
											<ledchannel id="rlm_${i}l" min="-48 db" max="48 db" log="true" balance="0 db" balance.visibility="true" type="peak" value.color="(!${act_ch}) ? 'cycle_inactive' : 'bright_blue'"/>
											<ledchannel id="rlm_${i}r" min="-48 db" max="48 db" log="true" balance="0 db" balance.visibility="true" type="peak" value.color="(!${act_ch}) ? 'cycle_inactive' : 'bright_blue'"/>
										</ledmeter>
									</ui:with>
								</grid>
							</cell>

							<ui:with bg.bright="(!${act_ch}) ? :const_bg_darken : 1.0" bright="(!${act_ch}) ? 0.75 : 1.0">
								<cell rows="2" hexpand="false" hreduce="true">
									<vbox>
										<hbox pad.b="4">
											<ui:if test=":i ige 4">
												<button id="ebe" text="labels.chan.on" height="19" width="27" hfill="true" pad.l="6" ui:inject="Button_cyan_8"/>
											</ui:if>
											<ui:if test=":i ieq 1">
												<button
													id="be_${i}"
													text="labels.bands.low"
													height="19"
													hfill="true"
													pad.h="6"
													ui:inject="Button_Cycle_8"
													down.color.hue="0"
													down.hover.color.hue="0"
													text.down.color.hue="0"
													text.down.hover.color.hue="0"
													border.down.color.hue="0"
													border.down.hover.color.hue="0"/>
											</ui:if>
											<ui:if test=":i ieq 2">
												<button
													id="be_${i}"
													text="labels.bands.mid"
													height="19"
													hfill="true"
													pad.h="6"
													ui:inject="Button_Cycle_8"
													down.color.hue="0.25"
													down.hover.color.hue="0.25"
													text.down.color.hue="0.25"
													text.down.hover.color.hue="0.25"
													border.down.color.hue="0.25"
													border.down.hover.color.hue="0.25"/>
											</ui:if>
											<ui:if test=":i ieq 3">
												<button
													id="be_${i}"
													text="labels.bands.hi"
													height="19"
													hfill="true"
													pad.h="6"
													ui:inject="Button_Cycle_8"
													down.color.hue="0.5"
													down.hover.color.hue="0.5"
													text.down.color.hue="0.5"
													text.down.hover.color.hue="0.5"
													border.down.color.hue="0.5"
													border.down.hover.color.hue="0.5"/>
											</ui:if>
											<ui:if test=":i ieq 4">
												<button
													id="be_${i}"
													text="labels.bands.hi_e"
													height="19"
													hfill="true"
													pad.h="6"
													ui:inject="Button_Cycle_8"
													down.color.hue="0.75"
													down.hover.color.hue="0.75"
													text.down.color.hue="0.75"
													text.down.hover.color.hue="0.75"
													border.down.color.hue="0.75"
													border.down.hover.color.hue="0.75"/>
											</ui:if>
										</hbox>
										<hbox pad.b="4">
											<button id="bs_${i}" text="labels.chan.S_olo" height="19" hfill="true" pad.l="6" ui:inject="Button_green_8"/>
											<button id="bm_${i}" text="labels.chan.M_ute" height="19" hfill="true" pad.h="6" ui:inject="Button_red_8"/>
										</hbox>
									</vbox>
								</cell>
							</ui:with>
							<cell cols="3">
								<hsep pad.v="2" bg.color="bg" vreduce="true"/>
							</cell>

							<cell cols="6" bg.bright="(!${act_ch}) ? :const_bg_darken : 1.0" bright="(!${act_ch}) ? 0.75 : 1.0">
								<void/>
							</cell>

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

							<ui:with bg.bright="(!${act_ch}) ? :const_bg_darken : 1.0" bright="(!${act_ch}) ? 0.75 : 1.0">
								<hbox hfill="false" pad.h="6">
									<knob id="tm_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'threshold'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.bottom"/>
										<value id="tm_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>
								<void/>

								<hbox hfill="false" pad.h="6">
									<knob id="ru_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'kscale'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.ratio"/>
										<align width.min="50" hreduce="true">
											<hbox hfill="false">
												<value id="ru_${i}"/>
												<label text=":"/>
												<label text="1"/>
											</hbox>
										</align>
									</vbox>
								</hbox>
								<void/>
								<hbox hfill="false" pad.h="6">
									<knob id="rd_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'kscale'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.ratio"/>
										<align width.min="50" hreduce="true">
											<hbox hfill="false">
												<label text="1"/>
												<label text=":"/>
												<value id="rd_${i}"/>
											</hbox>
										</align>
									</vbox>
								</hbox>
								<void/>
								<hbox hfill="false" pad.h="6">
									<knob id="tr_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'release'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.release"/>
										<value id="tr_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>
								<hbox hfill="false" pad.h="6">
									<knob id="kn_${i}" scolor="(!${act_ch}) ? 'cycle_inactive' : 'kscale'"/>
									<vbox vfill="false" pad.l="4">
										<label text="labels.knee"/>
										<value id="kn_${i}" width.min="50" sline="true" halign="0"/>
									</vbox>
								</hbox>
							</ui:with>
							<ui:if test=":i ine 4">
								<cell cols="10" bg.color="bg">
									<hsep pad.v="2" bg.color="bg" vreduce="true"/>
								</cell>
								<hsep pad.v="2" bg.color="bg" vreduce="true"/>
							</ui:if>

						</ui:for>
					</grid>
				</group>
			</cell>
		</grid>
	</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>
