<plugin resizable="true">
	<vbox spacing="4" width.min="1065" height.min="716">
		<!-- Head settings -->
		<hbox fill="true" bg.color="bg_schema">
			<label text="labels.mode" pad.l="6" pad.v="4"/>
			<combo id="mode" pad.h="6" pad.v="4"/>
			<vsep bg.color="bg" pad.h="2" hreduce="true" hexpand="false"/>
			<button ui:inject="Button_cyan" text="actions.freeze" size="16" width="64" id="freeze" pad.h="6" pad.v="4"/>
			<vsep bg.color="bg" pad.h="2" hreduce="true" hexpand="false"/>
			<button ui:inject="Button_magenta" text="actions.linear_frequency" size="16" width="64" id="linfreq" pad.h="6"/>
			<vsep bg.color="bg" pad.h="2" hreduce="true" hexpand="false"/>
			<button ui:inject="Button_orange" text="labels.chan.inspect" size="16" width="64" id="insp_on" pad.h="6"/>
			<knob id="insp_r" scale.size="3" scolor="orange" size="10" pad.h="6"/>
			<value id="insp_r" width.min="48" same_line="true" fill="true" halign="1" pad.r="6"/>
			<void hexpand="true" hfill="true"/>
		</hbox>

		<hbox expand="true" spacing="4">
			<vbox spacing="4" expand="true">

				<!-- Analyzer, Mastering -->
				<group ui:inject="GraphGroup" ipadding="0" text="labels.graphs.frequency" expand="true" visibility=":mode ilt 4">
					<graph ui:id="main_graph" width.min="832" height.min="360" expand="true" fill="true">
						<origin hpos="-1" vpos="-1" visibility="false"/>

						<!-- Secondary grid -->
						<ui:with color="graph_sec">
							<ui:with visibility="!:linfreq">
								<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>

							<ui:for id="f" first="1000" last="23000" step="1000">
								<marker v="${:f}" visibility=":linfreq"/>
							</ui:for>

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

							<ui:for id="t" first="-42" last="-6" step="12">
								<marker v="${t} db" ox="1" oy="0" visibility=":zoom le -18 db"/>
							</ui:for>
							<ui:for id="t" first="-33" last="-15" step="6">
								<marker v="${t} db" ox="1" oy="0" visibility=":zoom le -33 db"/>
							</ui:for>
						</ui:with>

						<!-- Primary Grid -->
						<ui:with color="graph_prim">
							<marker v="100" visibility="!:linfreq"/>
							<marker v="1000" visibility="!:linfreq"/>
							<marker v="10000" visibility="!:linfreq"/>

							<marker v="0 db" ox="1" oy="0"/>
							<marker v="-24 db" ox="1" oy="0"/>
							<marker v="-48 db" ox="1" oy="0"/>

							<marker v="1" ox="2" oy="0" visibility="false"/>
							<marker v="24000" visibility="false"/>
						</ui:with>

						<!-- Piano keys -->
						<embed oy="3" 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 and !:linfreq">
							<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="3" y="44" halign="1" valign="1" pgroup="0" priority="10" visibility=":_ui_graph_piano_layout and !:linfreq" 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>

						<!-- Meshes -->
						<mesh xi="0" yi="33" id="spd" width="1" color="cyan" fill.color="cyan" fill.color.a="0.9" color.a="0.5" fill="true" visibility=":mtrack"/>
						<ui:for id="i" first="0" count="16">
							<mesh
								xi="0"
								yi="${:i + 17}"
								id="spd"
								width="1"
								color="graph_mesh_cycle"
								color.hue="${i} / 16.0"
								color.a="0.5"
								fill.color="graph_mesh_cycle"
								fill.color.hue="${i} / 16.0"
								fill.color.a="0.9"
								fill="true"
								visibility=":ctrack and (((:mode ieq 0) or (:mode ieq 2)) and (:on_${i})) or ((:mode ieq 1) or (:mode ieq 3) and ((:spc0 ieq ${i}) or (:spc1 ieq ${i})))"/>
						</ui:for>
						<ui:for id="i" first="0" count="16">
							<mesh
								xi="0"
								yi="${:i + 1}"
								id="spd"
								width=":lthick+1"
								color="graph_mesh_cycle"
								color.hue="${i} / 16.0"
								color.a="0.2"
								visibility="(((:mode ieq 0) or (:mode ieq 2)) and (:on_${i})) or ((:mode ieq 1) or (:mode ieq 3) and ((:spc0 ieq ${i}) or (:spc1 ieq ${i})))"/>
						</ui:for>
						<mesh id="ifmesh" width="3" color="cyan" fill.color="cyan" fill.color.a="0.8" fill="true" visibility=":insp_id > 0.5"/>

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

						<!-- Marker horizontal line -->
						<marker id="mlval" ox="1" oy="0" width="2" hwidth="2" color="graph_marker_line" hcolor="graph_marker_line_hover" pointer="vsize" visibility=":mline" editable="true"/>

						<!-- Marker -->
						<ui:for id="i" first="0" last="15">
							<marker
								id="sel"
								ox="0"
								oy="1"
								width="2"
								hwidth="2"
								color="graph_marker_cycle"
								hcolor="graph_marker_cycle"
								color.hue="${i} / 16.0"
								hcolor.hue="${i} / 16.0"
								pointer="hsize"
								visibility="(((:mode ieq 0) or (:mode ieq 2)) and ((:on_${i}) and (:chn ieq ${i})))"
								editable="true"/>
						</ui:for>

						<marker id="sel" ox="0" oy="1" width="2" hwidth="2" color="graph_marker_line" hcolor="graph_marker_line" pointer="hsize" visibility="((:mode ieq 1) or (:mode ieq 3))" editable="true"/>

						<!-- Text -->
						<ui:with ox="0" oy="2" y="0" halign="1" valign="1" visibility="!:linfreq">
							<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 ox="0" oy="2" y="0" halign="1" valign="1">
							<text x="10" text="graph.units.hz"/>
							<ui:for id="f" first="1" last="23">
								<text x="${:f * 1000}" text="graph.values.x_k" text:value="${f}" visibility=":linfreq"/>
							</ui:for>
						</ui:with>

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

						<!-- Measure text -->
						<text ui:id="mline_level" visibility=":mline" valign="(:mlval lt 0 db) ? 1 : -1" text.valign="(:mlval lt 0 db) ? -1 : 1" ox="0" oy="1" x="24000" y=":mlval" halign="-1" color="graph_marker_line" font.bold="true"/>

						<!-- Selector text -->
						<ui:for id="i" first="0" count="16">
							<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="selector_freq_${i}" x=":sel" visibility="(((:mode ieq 0) or (:mode ieq 2)) and ((:on_${i}) and (:chn ieq ${i})))" halign="(:sel lt 500) ? 1 : -1" text.halign="(:sel lt 500) ? -1 : 1" color.hue="${i} / 16.0"/>
							</ui:with>
						</ui:for>

						<text ox="0" oy="2" y="1" valign="-1" color="graph_marker_line" pad.h="4" font.bold="true" ui:id="global_selector" x=":sel" visibility="((:mode ieq 1) or (:mode ieq 3))" halign="(:sel lt 500) ? 1 : -1" text.halign="(:sel lt 500) ? -1 : 1"/>
					</graph>
				</group>

				<!-- Spectralizer (1 channel) -->
				<group ui:inject="GraphGroup" ipadding="0" text="labels.graphs.frequency" expand="true" visibility=":mode ieq 4">
					<graph ui:id="spc_single_graph" width.min="780" height.min="360" expand="true" fill="true">
						<origin hpos="-1" vpos="1" visibility="false"/>
						<origin hpos="-1" vpos="-1" visibility="false"/>

						<!-- Frame buffer -->
						<fbuffer id="fb0" width="1" height="1" hpos="-1" vpos="1" transparency="0.25" angle="0" mode=":spm" color="red" color.hue=":spc0 / 16.0"/>

						<!-- Secondary grid -->
						<ui:with color="graph_prim" color.a="0.5">
							<ui:with visibility="!:linfreq">
								<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" color="graph_sec"/>
							</ui:with>

							<ui:for id="f" first="1000" last="23000" step="1000">
								<marker v="${:f}" visibility=":linfreq"/>
							</ui:for>

							<ui:for id="t" first="1" last="7" step="2">
								<marker v="${t}" ox="1" oy="0"/>
							</ui:for>
						</ui:with>

						<!-- Primary grid -->
						<ui:with color="graph_prim">
							<marker v="100" visibility="!:linfreq"/>
							<marker v="1000" visibility="!:linfreq"/>
							<marker v="10000" visibility="!:linfreq"/>
							<ui:for id="t" first="2" last="6" step="2">
								<marker v="${t}" ox="1" oy="0"/>
							</ui:for>
							<marker v="8" ox="1" oy="0" visibility="false"/>
							<marker v="24000" ox="0" oy="1" visibility="false"/>
						</ui:with>

						<!-- Piano keys -->
						<embed ox="0" oy="2" o="1" start.x="midi_freq_start(12, 127)" start.y="20" end.x="midi_freq_end(12, 127)" end.y="44" valign="1" alpha="0.35" visibility=":_ui_graph_piano_layout and !:linfreq">
							<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="2" o="1" y="44" halign="1" valign="1" pgroup="0" priority="10" visibility=":_ui_graph_piano_layout and !:linfreq" 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>

						<!-- Axis -->
						<axis angle="0.0" ui:id="spc_single_graph_ox" min="10" max="24000" log="!:linfreq" visibility="false"/>
						<axis angle="1.5" min="0" max="8" log="false" visibility="false"/>
						<axis min="0" max=":_a_scaled_height" visibility="false" angle="0.5"/>

						<marker id="sel" ox="0" oy="1" width="2" hwidth="2" color="graph_marker_line" hcolor="graph_marker_line" pointer="hsize" editable="true"/>

						<!-- Text -->
						<ui:with y="8" halign="1" valign="1" color="graph_prim" visibility="!:linfreq">
							<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>

						<text
							ox="0"
							oy="1"
							y="0"
							valign="-1"
							color="graph_marker_line"
							pad.h="4"
							font.bold="true"
							ui:id="global_selector_spc"
							text="xxx"
							x=":sel"
							halign="(:sel lt (:linfreq ? 12000 : 500)) ? 1 : -1"
							text.halign="(:sel lt (:linfreq ? 12000 : 500)) ? -1 : 1"/>

						<ui:with y="8" halign="1" valign="1" color="graph_prim" visibility=":linfreq">
							<text x="10" text="graph.units.hz"/>
							<ui:for id="f" first="1" last="23">
								<text x="${:f * 1000}" text="graph.values.x_k" text:value="${f}"/>
							</ui:for>
						</ui:with>

						<text x="10" y="0" text="graph.axis.time" halign="1" valign="-1" color="graph_prim"/>
						<ui:for id="t" first="1" last="7">
							<text x="10" y="${t}" text="${t}" halign="1" valign="1" color="graph_prim"/>
						</ui:for>
					</graph>
				</group>

				<!-- Spectralizer (2 channels) -->
				<group ui:inject="GraphGroup" ipadding="0" text="labels.graphs.frequency" expand="true" visibility=":mode ieq 5">
					<graph ui:id="spc_dual_graph" width.min="780" height.min="360" expand="true" fill="true">
						<origin hpos="-1" vpos="1" visibility="false"/>
						<origin hpos="0" vpos="1" visibility="false"/>

						<!-- Frame buffer -->
						<fbuffer id="fb0" x="-1" y="1" width="0.5" height="1" transparency="0.25" angle="0" mode=":spm" color="red" color.hue=":spc0 / 16.0"/>
						<fbuffer id="fb1" x="0" y="1" width="0.5" height="1" transparency="0.25" angle="0" mode=":spm" color="red" color.hue=":spc1 / 16.0"/>

						<!-- Secondary grid -->
						<ui:with color="graph_prim" color.a="0.6" visibility="!:linfreq">
							<ui:for id="f" first="20" last="90" step="10">
								<marker v="${:f}"/>
								<marker v="${:f * 10}"/>
								<marker v="${:f * 100}"/>

								<marker v="${:f}" o="1" ox="2" oy="1"/>
								<marker v="${:f * 10}" o="1" ox="2" oy="1"/>
								<marker v="${:f * 100}" o="1" ox="2" oy="1"/>
							</ui:for>
							<marker v="20000"/>
							<marker v="20000" o="1" ox="2" oy="1"/>
						</ui:with>
						<ui:with color="graph_prim" color.a="0.6" visibility=":linfreq">
							<ui:for id="f" first="1000" last="23000" step="1000">
								<marker v="${:f}"/>
								<marker v="${:f}" o="1" ox="2" oy="1"/>
							</ui:for>
						</ui:with>

						<ui:with color="graph_prim" color.a="0.6">
							<ui:for id="t" first="1" last="7" step="2">
								<marker v="${t}" ox="1" oy="0"/>
							</ui:for>
						</ui:with>

						<!-- Primary grid -->
						<ui:with color="graph_prim">
							<ui:for id="c" first="0" last="1">
								<marker v="100" o="${c}" visibility="!:linfreq"/>
								<marker v="1000" o="${c}" visibility="!:linfreq"/>
								<marker v="10000" o="${c}" visibility="!:linfreq"/>
							</ui:for>
							<ui:for id="t" first="2" last="6" step="2">
								<marker v="${t}" ox="1" oy="0"/>
							</ui:for>
							<marker v="8" ox="1" oy="0" visibility="false"/>
							<marker v="24000"/>
							<marker v="24000" o="1" ox="2" oy="1" visibility="false"/>
						</ui:with>

						<!-- Axis -->
						<axis ui:id="spc_dual_graph_ox_1" angle="0.0" min="10" max="24000" length=":_a_width idiv 2" log="!:linfreq" visibility="false"/>
						<axis angle="1.5" min="0" max="8" log="false" visibility="false"/>
						<axis ui:id="spc_dual_graph_ox_2" zero="10" o="1" angle="0.0" min="10" max="24000" length=":_a_width idiv 2" log="!:linfreq" visibility="false"/>

						<marker id="sel" ox="0" oy="1" width="2" hwidth="2" color="graph_marker_line" hcolor="graph_marker_line" pointer="hsize" editable="true"/>
						<marker id="sel" ox="2" oy="1" o="1" width="2" hwidth="2" color="graph_marker_line" hcolor="graph_marker_line" pointer="hsize" editable="true"/>

						<text
							ox="0"
							oy="1"
							y="0"
							valign="-1"
							color="graph_marker_line"
							pad.h="4"
							font.bold="true"
							ui:id="global_selector_spc_d1"
							text="xxx"
							x=":sel"
							halign="(:sel lt (:linfreq ? 12000 : 500)) ? 1 : -1"
							text.halign="(:sel lt (:linfreq ? 12000 : 500)) ? -1 : 1"/>

						<text
							ox="2"
							oy="1"
							y="0"
							o="1"
							valign="-1"
							color="graph_marker_line"
							pad.h="4"
							font.bold="true"
							ui:id="global_selector_spc_d2"
							text="xxx"
							x=":sel"
							halign="(:sel lt (:linfreq ? 12000 : 500)) ? 1 : -1"
							text.halign="(:sel lt (:linfreq ? 12000 : 500)) ? -1 : 1"/>

						<!-- Text -->
						<ui:for id="c" first="0" last="1">
							<ui:with y="8" halign="1" valign="1" visibility="!:linfreq">
								<text x="10" o="${c}" text="graph.units.hz"/>
								<text x="100" o="${c}" text="100"/>
								<text x="1000" o="${c}" text="graph.values.1k"/>
								<text x="10000" o="${c}" text="graph.values.10k"/>
							</ui:with>

							<ui:with y="8" halign="1" valign="1" visibility=":linfreq">
								<text x="10" o="${c}" text="graph.units.hz"/>
								<ui:for id="f" first="1" last="23">
									<text x="${:f * 1000}" o="${c}" text="graph.values.x_k" text:value="${f}"/>
								</ui:for>
							</ui:with>

							<ui:for id="t" first="1" last="7">
								<text o="${c}" text="${t}" x="10" y="${t}" halign="1" valign="1"/>
							</ui:for>
							<text o="${c}" text="graph.axis.time" x="10" y="0" halign="1" valign="-1"/>
						</ui:for>
					</graph>
				</group>

				<!-- Bottom menu -->
				<hbox pad.l="6" pad.r="6" pad.t="4" pad.b="4" bg.color="bg_schema">
					<hbox spacing="8">
						<label text="labels.fft.window"/>
						<combo id="wnd" pad.r="15"/>
						<label text="labels.fft.tolerance"/>
						<combo id="tol" pad.r="15"/>
						<label text="labels.fft.envelope"/>
						<combo id="env" pad.r="15"/>
					</hbox>

					<void hexpand="true"/>
					<hbox spacing="8">
						<label text="labels.line_size" visibility=":mode ilt 4"/>
						<combo id="lthick" visibility=":mode ilt 4"/>
						<hbox fill="false" spacing="4" pad.h="4">
							<button ui:inject="Button_cyan" text="labels.history" id="mtrack" size="16" visibility=":mode ilt 4"/>
							<button ui:inject="Button_cyan" text="labels.signal.max" id="ctrack" size="16" visibility=":mode ilt 4"/>
							<button ui:inject="Button_cyan" text="labels.clear" id="mreset" size="16" visibility=":mode ilt 4"/>
						</hbox>
						<button ui:inject="Button_cyan" text="labels.metering.measure_line" id="mline" size="16" visibility=":mode ilt 4" pad.l="15"/>
						<label text="labels.spectrogram" visibility=":mode ige 4"/>
						<combo id="spm" visibility=":mode ige 4"/>
						<button ui:inject="Button_yellow" text="labels.log_scale" id="splog" size="16" visibility=":mode ige 4" pad.l="15"/>
					</hbox>
				</hbox>
			</vbox>

			<!-- Zoom Fader -->
			<vbox visibility=":mode ilt 4" 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>

			<!-- Metering -->
			<group text="groups.metering" visibility="(:mode ieq 0) or (:mode ieq 2)" bg.color="bg" ipadding="0">
				<grid rows="5" cols="2" expand="true" spacing="4">
					<cell rows="1" cols="2">
						<vbox bg.color="bg_schema">
							<label text="labels.metering.preamp"/>
							<hbox fill="false">
								<knob id="pamp" width="60"/>
								<value id="pamp" sline="true" width="60"/>
							</hbox>
						</vbox>
					</cell>

					<cell rows="1" cols="2">
						<vbox bg.color="bg_schema">
							<label text="labels.metering.reactivity"/>
							<hbox fill="false">
								<knob id="react" width="60"/>
								<value id="react" sline="true" width="60"/>
							</hbox>
						</vbox>
					</cell>

					<cell rows="1" cols="2">
						<grid rows="3" cols="3" hfill="true" spacing="0">
							<label text="labels.metering.channel" width="58" bg.color="bg_schema" bright="(:on[chn]) ? 1.0 : 0.75" bg.bright="(:on[chn]) ? 1.0 : :const_bg_darken"/>
							<cell rows="3" bg.color="bg">
								<label width.min="4" expand="false"/>
							</cell>
							<ui:with bg.color="bg_schema" bright="(:on[chn]) ? 1.0 : 0.75" bg.bright="(:on[chn]) ? 1.0 : :const_bg_darken">
								<label text="labels.metering.selector" width="58"/>
								<cell>
									<vbox>
										<combo id="chn" width="48"/>
										<button
											ui:inject="Button_Cycle"
											text="labels.chan.on"
											id="on[chn]"
											width="48"
											height="10"
											down.color.hue=":chn / 16.0"
											down.hover.color.hue=":chn / 16.0"
											text.down.color.hue=":chn / 16.0"
											text.down.hover.color.hue=":chn / 16.0"
											border.down.color.hue=":chn / 16.0"
											border.down.hover.color.hue=":chn / 16.0"/>
									</vbox>
								</cell>
								<knob id="sel" scolor="(:on[chn]) ? 'cycle' : 'cycle_inactive'" scolor.hue=":chn / 16.0"/>
								<void/>
								<value id="sel" sline="true"/>
							</ui:with>
						</grid>
					</cell>

					<ui:with bg.color="bg_schema" bright="(:on[chn]) ? 1.0 : 0.75" bg.bright="(:on[chn]) ? 1.0 : :const_bg_darken">
						<cell rows="1" cols="2">
							<vbox bg.color="bg_schema" vfill="false">
								<label text="labels.metering.fft_frequency:hz"/>
								<indicator id="freq" format="f6.1!" tcolor="(:on[chn]) ? 'cycle' : 'cycle_inactive'" tcolor.hue=":chn / 16.0" padding="6"/>
							</vbox>
						</cell>
						<cell rows="1" cols="2">
							<vbox bg.color="bg_schema" vfill="false">
								<label text="labels.metering.level:db"/>
								<indicator id="lvl" format="+-f5.1!" tcolor="(:on[chn]) ? 'cycle' : 'cycle_inactive'" tcolor.hue=":chn / 16.0" padding="6"/>
							</vbox>
						</cell>
					</ui:with>
				</grid>
			</group>
		</hbox>

		<!-- Channel for metering configuration -->
		<group text="groups.channels" visibility="(:mode ieq 0) or (:mode ieq 2)" vspacing="4" bg.color="bg" ipadding="0">
			<grid rows="10" cols="33" transpose="true" hspacing="2">
				<ui:with padding="6" bg.color="bg_schema">
					<void/>
					<hsep bg.color="bg" pad.v="2" vreduce="true" vexpand="false"/>
					<void/>
					<label text="labels.chan.correlation" pad.v="0"/>
					<void padding="0"/>
					<label text="labels.specials.num"/>
					<label text="labels.chan.on"/>
					<label text="labels.chan.solo_hold" pad.b="10"/>
					<label text="labels.chan.shift"/>
					<label text="labels.chan.:db"/>
				</ui:with>

				<ui:for id="i" first="0" count="16">
					<cell rows="${10 - (:i % 2) * 3}" cols="1" expand="false" padding="0" bg.color="bg">
						<vsep/>
					</cell>

					<ui:if test=":i % 2 ieq 0">
						<cell cols="3" pad.h="6" pad.v="4" bg.color="bg_schema">
							<shmlink id="ret_${:i idiv 2}" value.maxlen="6" text.clip="true" hfill="true"/>
						</cell>
						<cell cols="3">
							<hsep bg.color="bg" pad.v="2" vreduce="true" vexpand="false"/>
						</cell>
						<cell cols="3" pad.h="6" pad.v="4" bg.color="bg_schema">
							<button bg.color="bg_schema" text="labels.chan.mid_side" id="ms_${:i idiv 2}" height="19" hfill="true"/>
						</cell>
						<cell cols="3" pad.h="6" pad.v="4" bg.color="bg_schema">
							<hbox>
								<label text="-1" font.size="8" hfill="true" text.halign="-1" pad.t="2" pad.r="1"/>
								<ledchannel
									id="cm_${:i / 2}"
									width.min="13"
									width.max="13"
									min="-100"
									max="100"
									balance="0"
									balance.visibility="true"
									log="false"
									type="peak"
									text.visibility="false"
									hexpand="true"
									bg.color="bg_schema"
									balance.color="bright_cyan"
									value.color="cyan"
									inactive.brightness="1.0"
									inactive.bg.brightness="1.0"
									inactive.bg.color="bg_schema"
									activity=":on_${:i} and :on_${:i + 1}"/>
								<label text="+1" font.size="8" hfill="true" text.halign="1" pad.t="2"/>
							</hbox>
						</cell>
						<cell cols="3">
							<hsep hfill="true" vreduce="true" pad.v="2"/>
						</cell>
					</ui:if>

					<ui:with bg.color="bg_schema" bright="(:on_${i}) ? 1.0 : 0.75" bg.bright="(:on_${i}) ? 1.0 : :const_bg_darken" hexpand="true">
						<label text="labels.specials.idx" text:id="${:i+1}"/>
						<button
							ui:inject="Button_Cycle"
							text="labels.chan.on"
							id="on_${i}"
							height="10"
							hfill="true"
							down.color.hue="${i} / 16.0"
							down.hover.color.hue="${i} / 16.0"
							text.down.color.hue="${i} / 16.0"
							text.down.hover.color.hue="${i} / 16.0"
							border.down.color.hue="${i} / 16.0"
							border.down.hover.color.hue="${i} / 16.0"
							pad.h="6"/>
						<hbox hfill="true" spacing="4" pad.b="14">
							<button ui:inject="Button_green_8" id="solo_${i}" text="labels.chan.S_olo" height="10" hfill="true" pad.l="6"/>
							<button ui:inject="Button_cyan_8" id="frz_${i}" text="labels.chan.H_old" height="10" hfill="true" pad.r="6"/>
						</hbox>
						<knob id="sh_${i}" scolor="(:on_${i}) ? 'cycle' : 'cycle_inactive'" scolor.hue="${i} / 16.0" size="20"/>
						<value id="sh_${i}" detailed="false"/>
					</ui:with>
				</ui:for>
			</grid>
		</group>

		<!-- Channels for mastering -->
		<hbox spacing="4" visibility="(:mode ine 0) and (:mode ine 2)">
			<group text="groups.channels" expand="true" fill="true" spacing="4" bg.color="bg" ipadding="0">
				<grid rows="7" cols="33" transpose="true" fill="true" hspacing="2">
					<ui:with padding="6" bg.color="bg_schema">
						<void/>
						<hsep bg.color="bg" pad.v="2" vreduce="true" vexpand="false"/>
						<label text="labels.channel"/>
						<label text="labels.chan.hold"/>
						<label text="labels.chan.shift"/>
						<label text="labels.chan.:db"/>
					</ui:with>
					<cell rows="1" cols="33" expand="true" hspacing="0">
						<vbox>
							<void bg.color="bg" height="4"/>
							<hsep/>
							<void bg.color="bg_schema" expand="true" height.min="10"/>
						</vbox>
					</cell>

					<ui:for id="i" first="0" last="15">
						<cell rows="${6 - (:i % 2) * 2}" cols="1" expand="false" padding="0" bg.color="bg">
							<vsep/>
						</cell>
						<ui:if test=":i % 2 ieq 0">
							<cell cols="3" pad.h="6" pad.v="4" bg.color="bg_schema">
								<shmlink id="ret_${:i idiv 2}" value.maxlen="6" text.clip="true" hfill="true"/>
							</cell>
							<cell cols="3">
								<hsep bg.color="bg" pad.v="2" vreduce="true" vexpand="false"/>
							</cell>
						</ui:if>
						<ui:with bg.color="bg_schema" bright="(:spc0 ieq ${i}) or ((:spc1 ieq ${i}) and (:mode ine 4)) ? 1.0 : 0.75" bg.bright="(:spc0 ieq ${i}) or ((:spc1 ieq ${i}) and (:mode ine 4)) ? 1.0 : :const_bg_darken">
							<ui:with bg.color="bg_schema">
								<label text="labels.specials.idx" text:id="${:i+1}" width="43"/>
								<button
									ui:inject="Button_Cycle"
									text="labels.chan.hold"
									id="frz_${i}"
									width="37"
									height="10"
									down.color.hue="${i} / 16.0"
									down.hover.color.hue="${i} / 16.0"
									text.down.color.hue="${i} / 16.0"
									text.down.hover.color.hue="${i} / 16.0"
									border.down.color.hue="${i} / 16.0"
									border.down.hover.color.hue="${i} / 16.0"/>
								<knob id="sh_${i}" scolor="(:spc0 ieq ${i}) or ((:spc1 ieq ${i}) and (:mode ine 4)) ? 'cycle' : 'cycle_inactive'" scolor.hue="${i} / 16.0" size="20"/>
								<value id="sh_${i}" detailed="false"/>
							</ui:with>
						</ui:with>
					</ui:for>
				</grid>
			</group>

			<group text="groups.metering" bg.color="bg" ipadding="0">
				<grid rows="2" cols="2" expand="true" spacing="4">
					<ui:with bg.color="bg_schema">
						<cell rows="1" cols="2" padding="6">
							<vbox>
								<label text="labels.channel" visibility=":mode ieq 4" pad.b="4"/>
								<label text="labels.channels" visibility=":mode band 1" pad.b="4"/>
								<button bg.color="bg_schema" text="labels.chan.mid_side" id="ms" height="19" hfill="true" pad.b="4" visibility="(:mode ieq 1) or (:mode ieq 3) or (:mode ieq 5)"/>
								<hbox visibility="(:mode ieq 1) or (:mode ieq 3) or (:mode ieq 5)">
									<label text="-1" font.size="8" hfill="true" text.halign="-1" pad.t="2" pad.r="2"/>
									<ledchannel id="cccm" width.min="13" width.max="13" min="-100" max="100" balance="0" balance.visibility="true" log="false" type="peak" text.visibility="false" hexpand="true" bg.color="bg_schema" balance.color="bright_cyan" value.color="cyan"/>
									<label text="+1" font.size="8" hfill="true" text.halign="1" pad.t="2"/>
								</hbox>
								<hbox spacing="4" pad.t="4">
									<combo id="spc0" fill="true" visibility="(:mode ine 0) and (:mode ine 2)"/>
									<combo id="spc1" fill="true" visibility="(:mode ieq 1) or (:mode ieq 3) or (:mode ieq 5)"/>
								</hbox>
							</vbox>
						</cell>

						<vbox width="61" padding="6">
							<label text="labels.metering.preamp" pad.b="4"/>
							<knob id="pamp" pad.b="4"/>
							<value id="pamp" sline="true"/>
						</vbox>

						<vbox width="61" padding="6">
							<label text="labels.metering.reactivity" pad.b="4"/>
							<knob id="react" pad.b="4"/>
							<value id="react" sline="true"/>
						</vbox>
					</ui:with>
				</grid>
			</group>
		</hbox>
	</vbox>
</plugin>
