<plugin resizable="true">

	<ui:for id="port" list="'lcm'; 'hcm'; 'lcf'; 'hcf'">
		<ctl:link id.1="${port}" value.1=":${port}r" id.2="${port}r" value.2=":${port}" activity="!:ssplit"/>
	</ui:for>
	<ui:for id="port" first="0" count="8">
		<ctl:link id.1="eq_${port}" value.1=":eq_${port}r" id.2="eq_${port}r" value.2=":eq_${port}" activity="!:ssplit"/>
	</ui:for>

	<vbox spacing="4">
		<!-- IR editor -->
		<align halign="-1" hfill="true" vreduce="true">
			<hbox pad.l="6" pad.r="6" pad.t="4" pad.b="4" spacing="4" fill="false" bg.color="bg_schema">
				<label text="labels.fft.frame"/>
				<combo id="fft" pad.r="10"/>
				<combo id="fsel" pad.r="10"/>
				<button id="eqv" ui:id="eq_trigger" ui:inject="Button_yellow" text="labels.ir_equalizer" size="16"/>
				<button id="wpp" ui:inject="Button_green" text="labels.enable" size="16"/>
			</hbox>
		</align>

		<group text="groups.impulse_response" expand="true" bg.color="bg" spacing="0" ipadding="0">
			<vbox>
				<!-- File editor -->

				<hbox width.min="803" height.min="256" expand="true">
					<ui:for id="i" first="0" last="1">
						<asample
							expand="true"
							id="ifn${i}"
							mesh_id="ifd${i}"
							path.id="_ui_dlg_ir_path"
							ftype.id="_ui_dlg_ir_ftype"
							hcut=":ihc${i}"
							tcut=":itc${i}"
							fadein=":ifi${i}"
							fadeout=":ifo${i}"
							length=":ifl${i}"
							status=":ifs${i}"
							load.preview="true"
							clipboard.head_cut="ihc${i}"
							clipboard.tail_cut="itc${i}"
							clipboard.fade_in="ifi${i}"
							clipboard.fade_out="ifo${i}"
							format="audio_lspc,audio,all"
							visibility=":fsel ieq ${i}"/>

						<void bg.color="bg_graph" pad.h="2" hreduce="true" visibility="(:fsel ieq ${i}) and (:ifs${i} ine 1)"/>

						<vbox vexpand="true" visibility="(:fsel ieq ${i}) and (:ifs${i} ine 1)">
							<void bg.color="bg_graph" pad.v="2" vreduce="true"/>
							<afolder id="ifn${i}" expand="true" width.min="199"
								autoload=":_ui_ir_list_navigation_autoload"
								autoplay=":_ui_ir_list_navigation_autoplay" />
							<void bg.color="bg_graph" pad.v="2" vreduce="true"/>

							<ui:with fill="true">
								<hbox pad.h="6" pad.v="4" spacing="4" bg.color="bg_schema">
									<ui:with height="22">
										<anavigator id="ifn${i}" text="icons.navigation_big.first_alt" action="first"/>
										<anavigator id="ifn${i}" text="icons.navigation_big.last_alt" action="last"/>
										<void hexpand="true"/>
										<anavigator id="ifn${i}" text="icons.navigation_big.previous" action="previous"/>
										<anavigator id="ifn${i}" text="icons.navigation_big.next" action="next"/>
										<void hexpand="true"/>

										<anavigator id="ifn${i}" text="icons.random.dice_fill" action="random"/>
										<void hexpand="true"/>
										<anavigator id="ifn${i}" text="icons.actions.cancel_alt" action="clear"/>
									</ui:with>
								</hbox>
							</ui:with>
						</vbox>
					</ui:for>
				</hbox>

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

				<ui:for id="i" first="0" last="1">
					<grid rows="4" cols="7" bg.color="bg_schema" visibility=":fsel ieq ${i}">
						<ui:with pad.h="6" pad.v="4" vreduce="true">
							<label text="labels.sedit.reverse"/>
							<label text="labels.sedit.pitch"/>
							<label text="labels.sedit.head_cut"/>
							<label text="labels.sedit.tail_cut"/>
							<label text="labels.sedit.fade_in"/>
							<label text="labels.sedit.fade_out"/>
							<label text="labels.listen"/>
						</ui:with>

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

						<ui:with pad.h="6" pad.v="4">
							<cell rows="2">
								<button id="irv${i}" bg.color="bg_schema" font.size="14" size="32" ui:inject="Button_cyan" font.name="lsp-icons" text="icons.actions.reverse"/>
							</cell>
							<knob id="psh${i}" size="20"/>
							<knob id="ihc${i}" size="20"/>
							<knob id="itc${i}" size="20"/>
							<knob id="ifi${i}" size="20" scolor="fade_in"/>
							<knob id="ifo${i}" size="20" scolor="fade_out"/>
							<cell rows="2">
								<hbox fill="false">
									<ui:with font.name="lsp-icons" font.size="10" size="32" ui:inject="Button_cyan" toggle="false">
										<button id="ils${i}" text="icons.playback_big.play"/>
										<button id="ilc${i}" text="icons.playback_big.stop"/>
									</ui:with>
								</hbox>
							</cell>
						</ui:with>

						<ui:with pad.h="6" pad.b="4" width.min="48" sline="true">
							<value id="psh${i}"/>
							<value id="ihc${i}"/>
							<value id="itc${i}"/>
							<value id="ifi${i}"/>
							<value id="ifo${i}"/>
						</ui:with>
					</grid>
				</ui:for>

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

				<grid rows="3" cols="12" bg.color="bg_schema">
					<!-- row 1 -->
					<ui:with bright=":ca_l and (:cs_l ine 0) ? 1 : 0.75" bg.bright=":ca_l and (:cs_l ine 0) ? 1 : :const_bg_darken">
						<label text="labels.source"/>
						<ui:with pad.h="6" pad.v="4" vreduce="true">
							<label text="labels.predelay"/>
							<label text="labels.makeup"/>
						</ui:with>
					</ui:with>
					<cell rows="4"><vsep bg.color="bg" pad.h="2" hreduce="true"/></cell>
					<ui:with bright=":ca_r and (:cs_r ine 0) ? 1 : 0.75" bg.bright=":ca_r and (:cs_r ine 0) ? 1 : :const_bg_darken">
						<label text="labels.source"/>
						<ui:with pad.h="6" pad.v="4" vreduce="true">
							<label text="labels.predelay"/>
							<label text="labels.makeup"/>
						</ui:with>
					</ui:with>
					<cell rows="4"><vsep bg.color="bg" pad.h="2" hreduce="true"/></cell>
					<ui:with pad.h="6" pad.v="4" vreduce="true">
						<label text="labels.signal.dry"/>
						<label text="labels.signal.wet"/>
						<label text="labels.signal.drywet"/>
						<label text="labels.output"/>
					</ui:with>

					<!-- row 2 -->
					<ui:with bright=":ca_l and (:cs_l ine 0) ? 1 : 0.75" bg.bright=":ca_l and (:cs_l ine 0) ? 1 : :const_bg_darken">
						<combo id="cs_l" hfill="false" pad.h="6"/>
						<ui:with pad.h="6" pad.v="4">
							<knob id="pd_l" scolor=":ca_l and (:cs_l ine 0) ? 'left' : 'cycle_inactive'"/>
							<knob id="mk_l" scolor=":ca_l and (:cs_l ine 0) ? 'left' : 'cycle_inactive'"/>
						</ui:with>
					</ui:with>
					<ui:with bright=":ca_r and (:cs_r ine 0) ? 1 : 0.75" bg.bright=":ca_r and (:cs_r ine 0) ? 1 : :const_bg_darken">
						<combo id="cs_r" hfill="false" pad.h="6"/>
						<ui:with pad.h="6" pad.v="4">
							<knob id="pd_r" scolor=":ca_r and (:cs_r ine 0) ? 'right' : 'cycle_inactive'"/>
							<knob id="mk_r" scolor=":ca_r and (:cs_r ine 0) ? 'right' : 'cycle_inactive'"/>
						</ui:with>
					</ui:with>

					<ui:with pad.h="6" pad.v="4">
						<knob id="dry" scolor="dry"/>
						<knob id="wet" scolor="wet"/>
						<knob id="drywet" scolor="drywet"/>
						<knob id="g_out"/>
					</ui:with>

					<!-- row 3 -->
					<ui:with bright=":ca_l and (:cs_l ine 0) ? 1 : 0.75" bg.bright=":ca_l and (:cs_l ine 0) ? 1 : :const_bg_darken">
						<hbox fill="false" spacing="4">
							<led id="ca_l" size="10" pad.b="1"/>
							<label text="labels.active"/>
						</hbox>
						<ui:with pad.h="6" pad.b="4">
							<value id="pd_l"/>
							<value id="mk_l"/>
						</ui:with>
					</ui:with>
					<ui:with bright=":ca_r and (:cs_r ine 0) ? 1 : 0.75" bg.bright=":ca_r and (:cs_r ine 0) ? 1 : :const_bg_darken">
						<hbox fill="false" spacing="4">
							<led id="ca_r" size="10" pad.b="1"/>
							<label text="labels.active"/>
						</hbox>
						<ui:with pad.h="6" pad.b="4">
							<value id="pd_r"/>
							<value id="mk_r"/>
						</ui:with>
					</ui:with>
					<ui:with pad.h="6" pad.b="4">
						<value id="dry"/>
						<value id="wet"/>
						<value id="drywet"/>
						<value id="g_out"/>
					</ui:with>

				</grid>
			</vbox>
		</group>
	</vbox>

	<overlay id="eqv" trigger="eq_trigger" hpos="0" vpos="1" halign="1" valign="1" ipadding.t="4" padding.l="0" ipadding.l="0" padding.r="0" ipadding.r="0">
		<group text="groups.wet_signal_eq" ipadding="0">
			<vbox>
				<!-- Combined -->
				<grid rows="7" cols="12" visibility="!:ssplit">

					<cell cols="12">
						<hbox pad.l="6" pad.r="6" pad.t="4" pad.b="4" spacing="4" bg.color="bg_schema">
							<void hfill="true" hexpand="true"/>
							<button id="wpp" ui:inject="Button_green" text="labels.enable" size="16"/>
							<button id="ssplit" ui:inject="Button_blue" text="labels.stereo_split" size="16"/>
						</hbox>
					</cell>

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

					<label text="labels.flt.low_cut" pad.h="6" pad.v="4" bright="(:wpp) and (:lcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>

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

					<ui:with pad.h="6" pad.v="4" bright="(:wpp) ? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken">
						<label text="50"/>
						<label text="107"/>
						<label text="227"/>
						<label text="484"/>
						<label text="labels.flt.1k"/>
						<label text="labels.flt.2_2k"/>
						<label text="labels.flt.4_7k"/>
						<label text="labels.flt.10k"/>
					</ui:with>

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

					<label text="labels.flt.high_cut" bright="(:wpp) and (:hcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>

					<combo id="lcm" pad.h="6" fill="false" bright="(:wpp) and (:lcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>

					<ui:with pad.h="6" pad.v="4" bright="(:wpp)? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken">
						<ui:for id="f" first="0" last="7">
							<cell rows="3">
								<fader id="eq_${f}" size="100" angle="1" scolor="(:wpp) ? 'fader' : 'fader_inactive'"/>
							</cell>
						</ui:for>
					</ui:with>

					<combo id="hcm" pad.h="6" fill="false" bright="(:wpp) and (:hcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>

					<ui:with pad.h="6" pad.v="4">
						<void bright="(:wpp) and (:lcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
						<void bright="(:wpp) and (:hcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
						<knob id="lcf" scolor="(:wpp) and (:lcm igt 0)? 'kscale' : 'cycle_inactive'" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
						<knob id="hcf" scolor="(:wpp) and (:hcm igt 0)? 'kscale' : 'cycle_inactive'" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
						<value id="lcf" bright="(:wpp) and (:lcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
						<ui:for id="f" first="0" last="7">
							<value width.min="32" id="eq_${f}" bright="(:wpp) ? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken"/>
						</ui:for>
						<value id="hcf" bright="(:wpp) and (:hcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
					</ui:with>
				</grid>

				<!-- Stereo split -->
				<grid rows="8" cols="16" visibility=":ssplit">

					<cell cols="16">
						<hbox pad.l="6" pad.r="6" pad.t="4" pad.b="4" spacing="4" bg.color="bg_schema">
							<void hfill="true" hexpand="true"/>
							<button id="wpp" ui:inject="Button_green" text="labels.enable" size="16"/>
							<button id="ssplit" ui:inject="Button_blue" text="labels.stereo_split" size="16"/>
						</hbox>
					</cell>

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

					<cell cols="3">
						<label text="labels.flt.low_cut" pad.h="6" pad.v="4" bright="(:wpp) and ((:lcm + :lcmr) igt 0) ? 1 : 0.75" bg.bright="(:wpp) and ((:lcm + :lcmr) igt 0) ? 1 : :const_bg_darken"/>
					</cell>

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

					<ui:with pad.h="6" pad.v="4" bright="(:wpp) ? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken">
						<label text="50"/>
						<label text="107"/>
						<label text="227"/>
						<label text="484"/>
						<label text="labels.flt.1k"/>
						<label text="labels.flt.2_2k"/>
						<label text="labels.flt.4_7k"/>
						<label text="labels.flt.10k"/>
					</ui:with>

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

					<cell cols="3">
						<label text="labels.flt.high_cut" bright="(:wpp) and ((:hcm + :hcmr) igt 0) ? 1 : 0.75" bg.bright="(:wpp) and ((:hcm + :hcmr) igt 0) ? 1 : :const_bg_darken"/>
					</cell>

					<cell cols="3">
						<hsep bg.color="bg" pad.v="2" vreduce="true"/>
					</cell>
					<ui:with bright="(:wpp)? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken">
						<ui:for id="f" first="0" last="7">
							<cell rows="3">
								<hbox fill="false">
									<fader id="eq_${f}" pad.r="4" size="100" angle="1" scolor="(:wpp) ? 'left' : 'fader_inactive'"/>
									<fader id="eq_${f}r" size="100" angle="1" scolor="(:wpp) ? 'right' : 'fader_inactive'"/>
								</hbox>
							</cell>
						</ui:for>
					</ui:with>

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

					<combo id="lcm" pad.h="6" fill="false" bright="(:wpp) and (:lcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
					<cell rows="4">
						<vsep bg.color="bg" pad.h="2" hreduce="true"/>
					</cell>
					<combo id="lcmr" pad.h="6" fill="false" bright="(:wpp) and (:lcmr igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcmr igt 0) ? 1 : :const_bg_darken"/>

					<combo id="hcm" pad.h="6" fill="false" bright="(:wpp) and (:hcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
					<cell rows="4">
						<vsep bg.color="bg" pad.h="2" hreduce="true"/>
					</cell>
					<combo id="hcmr" pad.h="6" fill="false" bright="(:wpp) and (:hcmr igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcmr igt 0) ? 1 : :const_bg_darken"/>

					<ui:with pad.h="6" pad.t="4" pad.b="4">
						<knob id="lcf" scolor="(:wpp) and (:lcm igt 0) ? 'left' : 'cycle_inactive'" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
						<knob id="lcfr" scolor="(:wpp) and (:lcmr igt 0) ? 'right' : 'cycle_inactive'" bg.bright="(:wpp) and (:lcmr igt 0) ? 1 : :const_bg_darken"/>

						<knob id="hcf" scolor="(:wpp) and (:hcm igt 0)? 'left' : 'cycle_inactive'" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
						<knob id="hcfr" scolor="(:wpp) and (:hcmr igt 0)? 'right' : 'cycle_inactive'" bg.bright="(:wpp) and (:hcmr igt 0) ? 1 : :const_bg_darken"/>

						<void bg.color="bg_schema" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
						<void bg.color="bg_schema" bg.bright="(:wpp) and (:lcmr igt 0) ? 1 : :const_bg_darken"/>

						<ui:for id="f" first="0" last="7">
							<value id="eq_${f}" width.min="32" pad.b="0" bright="(:wpp) ? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken" detailed="false"/>
						</ui:for>

						<void bg.color="bg_schema" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
						<void bg.color="bg_schema" bg.bright="(:wpp) and (:hcmr igt 0) ? 1 : :const_bg_darken"/>

						<value id="lcf" pad.t="0" bright="(:wpp) and (:lcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcm igt 0) ? 1 : :const_bg_darken"/>
						<value id="lcfr" pad.t="0" bright="(:wpp) and (:lcmr igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:lcmr igt 0) ? 1 : :const_bg_darken"/>

						<ui:for id="f" first="0" last="7">
							<value id="eq_${f}r" width.min="32" pad.t="0" bright="(:wpp) ? 1 : 0.75" bg.bright="(:wpp) ? 1 : :const_bg_darken"/>
						</ui:for>

						<value id="hcf" pad.t="0" bright="(:wpp) and (:hcm igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcm igt 0) ? 1 : :const_bg_darken"/>
						<value id="hcfr" pad.t="0" bright="(:wpp) and (:hcmr igt 0) ? 1 : 0.75" bg.bright="(:wpp) and (:hcmr igt 0) ? 1 : :const_bg_darken"/>

					</ui:with>
				</grid>
			</vbox>
		</group>
	</overlay>
</plugin>
