<plugin resizable="true">
	<vbox spacing="4">
		<!-- Area selector -->
		<align hpos="0">
			<hbox spacing="8">
				<label text="labels.working_area" />
				<combo id="asel" halign="1" />
			</hbox>
		</align>
		
		<!-- Trigger -->
		<grid visibility=":asel ieq 0" rows="2" cols="4" transpose="true" expand="true">
			<graph width="640" height="256" expand="true">
				<center hpos="1" vpos="-1" visible="false" />
				
				<!-- Gray grid -->
				<ui:for id="t" first="0" last="4" step="1">
					<marker value="${t}.25" color="g_dark_gray" basis="0" parallel="1" />
					<marker value="${t}.5" color="g_gray" basis="0" parallel="1" />
					<marker value="${t}.75" color="g_dark_gray" basis="0" parallel="1" />
				</ui:for>
			
				<marker value="3.98107" color="g_gray" basis="1" parallel="0" /> <!-- +12 dB -->
				<marker value="0.251189" color="g_gray" basis="1" parallel="0" /> <!-- -12 dB -->
				<marker value="0.0158489" color="g_gray" basis="1" parallel="0" /> <!-- -36 dB -->
				<marker value="0.001" color="g_gray" basis="1" parallel="0" /> <!-- -60 dB -->

				<!-- Yellow grid -->
				<ui:for id="t" first="1" last="4" step="1">
					<marker value="${t}" color="g_yellow" basis="0" parallel="1" />
				</ui:for>

				<marker value="1" color="g_yellow" basis="1" parallel="0" /> <!-- 0 dB -->
				<marker value="0.0630957" color="g_yellow" basis="1" parallel="0" /> <!-- -24 dB -->
				<marker value="0.00398107" color="g_yellow" basis="1" parallel="0" /> <!-- -48 dB -->

				<!-- Meshes -->
				<mesh id="isg" width="2" color="middle_channel" visibility_id="isv" />
				<mesh id="tlg" width="2" color="medium_green" visibility_id="tlv" />
				<mesh id="tfg" width="2" color="green" visibility_id="tfv" />
				
				<!-- Boundaries -->
				<marker value="15.8489" color="g_white" basis="1" parallel="0" /> <!-- +24 dB -->
				<marker value="5" color="g_white" basis="0" parallel="1" /> <!-- 5 sec -->
				
				<!-- Axis -->
				<axis min="0" max="5" color="g_white" angle="1.0" logarithmic="false" />
				<axis min="0.000251189" max="15.8489" color="g_white" angle="0.5" logarithmic="true" />
				
				<!-- Text -->
				<text text="graph.units.s" coord="5;2.51e-4" halign="1" valign="1" />
				<ui:for id="t" first="0" last="4" step="1">
					<text text="${t}" coord="${t};2.51e-4" halign="-1" valign="1" color="white" />
					<text text="${t}.5" coord="${t}.5;2.51e-4" halign="-1" valign="1" color="white" />
				</ui:for>
				
				<text text="+12" coord="5;3.98107" halign="1" valign="-1" />
				<text text="0" coord="5;1" halign="1" valign="1" />
				<text text="-12" coord="5;0.251189" halign="1" valign="1" />
				<text text="-24" coord="5;0.0630957" halign="1" valign="1" />
				<text text="-36" coord="5;0.0158489" halign="1" valign="1" />
				<text text="-48" coord="5;0.00398107" halign="1" valign="1" />
				<text text="-60" coord="5;0.001" halign="1" valign="1" />
				<text text="graph.units.db" coord="5;15.8489" halign="1" valign="-1" />
				
				<!-- Markers -->
				<marker id="dtr1" color="#0080ff" basis="1" parallel="0" />
				<marker id="dtr2" color="#0080ff" basis="1" parallel="0" />
				<marker id="dl" color="g_magenta" basis="1" parallel="0" />
				<marker id="rl" color="g_magenta" basis="1" parallel="0" />
			</graph>
			<hbox fill="true">
				<button id="pause" size="16" color="green" led="true" />
				<label text="labels.pause" />
				<button id="clear" size="16" color="red" led="true" />
				<label text="labels.clear" />
				
				<!-- MIDI settings -->
				<align expand="true" hpos="0.5">
					<hbox spacing="4" visibility="ex :note">
						<label text="labels.channel" />
						<combo id="chan" fill="true" width="20" />
						<label text="labels.mus.note" />
						<combo id="note" width="20" />
						<combo id="oct" width="20" />
						<label text="labels.midi.midi_num" />
						<midinote id="mn" note_id="note" octave_id="oct" format="i3" text_color="green" />
					</hbox>
				</align>
				
				<align pad_right="4" hpos="1">
					<label text="labels.graphs.trigger" />
				</align>
			</hbox>
			
			<!-- Input signal meters -->
			<vbox>
				<button id="isv" size="16" color="middle_channel" led="true" />
				<meter expand="true"
					id="ism" angle="1" type="rms_peak" logarithmic="true"
					min="0.000251189" max="15.8489" height="256" color="middle_channel"
					pad_left="4" pad_right="4" activity_id="isv" />
			</vbox>
			<label text="labels.chan.in" />
			
			<!-- Sidechain signal meter -->
			<vbox>
				<button id="tfv" size="16" color="green" led="true" />
				<meter expand="true"
					id="tfm" angle="1" logarithmic="true"
					min="0.000251189" max="15.8489" height="256" color="green"
					pad_left="4" pad_right="4" activity_id="tfv" />
			</vbox>
			<label text="labels.sc.SC" />
			
			<!-- Trigger signal meter -->
			<vbox>
				<button id="tlv" size="16" color="medium_green" led="true" />
				<meter expand="true"
					id="tlm" angle="1" logarithmic="true"
					min="0.000251189" max="15.8489" height="256" color="medium_green"
					pad_left="4" pad_right="4" activity_id="tlv" />
			</vbox>
			<label text="labels.Tri_gger" />
		</grid>
		
		<!-- Instrument editor -->
		<hbox visibility=":asel ieq 1" spacing="4" expand="true">
			<cgroup id="ssel" expand="true">
				<vbox>
					<!-- File editor -->
					<file expand="true"
						id="sf[ssel]" head_id="hc[ssel]" tail_id="tc[ssel]"
						fadein_id="fi[ssel]" fadeout_id="fo[ssel]" length_id="fl[ssel]"
						status_id="fs[ssel]" mesh_id="fd[ssel]"
						width="320" height="160"
						path_id="ui:dlg_sample_path"
						bind="makeup=mk[ssel],predelay=pd[ssel]"
					/>
					
					<grid rows="3" cols="8" vspacing="2">
						<label text="labels.sedit.reverse" />
						<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.sedit.makeup" />
						<label text="labels.sedit.predelay" />
						<label text="labels.sedit.listen" />
						
						<button id="rs[ssel]" size="32" />
						<knob id="hc[ssel]" size="20" />
						<knob id="tc[ssel]" size="20" />
						<knob id="fi[ssel]" size="20" scale_color="yellow" />
						<knob id="fo[ssel]" size="20" scale_color="yellow" />
						<knob id="mk[ssel]" size="20" />
						<knob id="pd[ssel]" size="20" />
						<button id="ls[ssel]" size="32" toggle="false" />
						
						<led id="rs[ssel]" />
						<value id="hc[ssel]" />
						<value id="tc[ssel]" />
						<value id="fi[ssel]" />
						<value id="fo[ssel]" />
						<value id="mk[ssel]" />
						<value id="pd[ssel]" />
						<led id="ls[ssel]" />
					</grid>
				</vbox>
			</cgroup>
			<group text="groups.sample_matrix" expand="true">
				<!-- Sample matrix -->
				<grid rows="9" cols="9" transpose="true">
					<label text="labels.sedit.sample_num" fill="true" halign="0" />
					<label text="labels.sedit.enabled" fill="true" halign="0" />
					<label text="labels.sedit.active" fill="true" halign="0" />
					<label text="labels.midi.velocity" fill="true" halign="0" />
					<label text="labels.units.:pc" fill="true" halign="0" />
					<label text="labels.gain" fill="true" halign="0" />
					<label text="labels.units.:db" fill="true" halign="0" />
					<label text="labels.sedit.listen" fill="true" halign="0" />
					<label text="labels.midi.note_on" fill="true" halign="0" />
				
					<ui:for id="i" first="0" last="7" >
						<label text="${i}" />
						<button id="on_${i}" color="yellow" led="true" size="16" />
						<led id="ac_${i}" color="yellow" size="6"/>
						<knob id="vl_${i}" size="20" scale_color="magenta" />
						<value id="vl_${i}" detailed="false" />
						<knob id="mx_${i}" size="20" scale_color="cyan" />
						<value id="mx_${i}" detailed="false" />
						<button id="ls_${i}" size="32" toggle="false" />
						<led id="no_${i}" />
					</ui:for>
				</grid>
			</group>
		</hbox>
		
		<!-- Common parameters -->
		<hbox spacing="4">
			<!-- Controls -->
			<group text="groups.plug.trigger">
				<hbox expand="true">
					<!-- Sidechain -->
					<grid rows="3" cols="5" expand="true" spacing="2">
						<label text="labels.sc.preamp" />
						<label text="labels.mode" />
						<label text="labels.sc.reactivity" />
						<label text="labels.flt.HPF" />
						<label text="labels.flt.LPF" />
						
						<knob id="preamp" />
						<combo id="mode" fill="true" />
						<knob id="react" />
						<vbox>
							<combo id="shpm" />
							<knob id="shpf" size="20" bright="(:shpm igt 0) ? 1 : 0.5" />
						</vbox>
						<vbox>
							<combo id="slpm" />
							<knob id="slpf" size="20" bright="(:slpm igt 0) ? 1 : 0.5" />
						</vbox>
						
						<value id="preamp" />
						<hbox fill="false">
							<led id="tla" />
							<label text="labels.active" />
						</hbox>
						<value id="react" />
						<value id="shpf" bright="(:shpm igt 0) ? 1 : 0.5" />
						<value id="slpf" bright="(:slpm igt 0) ? 1 : 0.5" />
					</grid>
					
					<vsep />
					
					<grid rows="4" cols="2" expand="true" spacing="2">
						<cell cols="2"><label text="labels.attack" /></cell>
						<label text="labels.thresh_old" />
						<label text="labels.time" />
						
						<knob id="dl" scale_color="magenta" size="20" />
						<knob id="dt" size="20" />
						
						<value id="dl" />
						<value id="dt" />
					</grid>
					
					<vsep />
					
					<grid rows="4" cols="2" expand="true" spacing="2">
						<cell cols="2"><label text="labels.release" /></cell>
						<label text="labels.thresh_old" />
						<label text="labels.time" />
						
						<knob id="rrl" scale_color="magenta" size="20" />
						<knob id="rt" size="20" />
						
						<value id="rrl" />
						<value id="rt" />
					</grid>
					
					<vsep />
					
					<grid rows="4" cols="3" expand="true" spacing="2">
						<cell cols="3"><label text="labels.dynamics" /></cell>
						<label text="labels.spread" />
						<label text="labels.range_id" text:id="1" />
						<label text="labels.range_id" text:id="2" />
						
						<knob id="dyna" scale_color="#0080ff" size="20" />
						<knob id="dtr1" scale_color="#0080ff" size="20" />
						<knob id="dtr2" scale_color="#0080ff" size="20" />
						
						<value id="dyna" />
						<value id="dtr1" />
						<value id="dtr2" />
					</grid>
				</hbox>
			</group>
			<group text="groups.audio_channel">
				<grid rows="3" cols="3">
					<label text="labels.signal.dry" />
					<label text="labels.signal.wet" />
					<label text="labels.output" />
					
					<knob id="dry" />
					<knob id="wet" />
					<knob id="g_out" />
					
					<value id="dry" />
					<value id="wet" />
					<value id="g_out" />
				</grid>
			</group>
		</hbox>
	</vbox>
</plugin>