<plugin resizable="true">
	<vbox spacing="4">
		<align hpos="0" fill="true">
			<hbox spacing="8" border="4" fill="false">
				<label text="labels.mode" />
				<combo id="mode" />
				
				<button text="actions.freeze" size="16" width="64" led="true" id="freeze" color="yellow" />
				
				<label text="labels.spectrogram" visibility=":mode ige 2" />
				<combo id="spm" visibility=":mode ige 2" />
				
				<label text="labels.log_scale" visibility=":mode ige 2" />
				<button id="splog" size="16" color="yellow" led="true" visibility=":mode ige 2" />
			</hbox>
		</align>
		
		<hbox expand="true">
			<vbox expand="true" fill="true" spacing="4">
				<!-- Analyzer, mastering -->
				<graph width="640" height="360" expand="true" fill="true" visibility=":mode ile 1">
					<center hpos="-1" vpos="-1" visible="false" />
					
					<!-- Gray grid -->
					<ui:for id="f" first="20" last="90" step="10"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
					<ui:for id="f" first="200" last="900" step="100"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
					<ui:for id="f" first="2000" last="9000" step="1000"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
					<marker value="20000" color="g_gray" basis="0" parallel="1" />
					
					<marker value="+12 db" color="g_gray" basis="1" parallel="0" /> <!-- +12 dB -->
					<marker value="-12 db" color="g_gray" basis="1" parallel="0" /> <!-- -12 dB -->
					<marker value="-36 db" color="g_gray" basis="1" parallel="0" /> <!-- -36 dB -->
					<marker value="-60 db" color="g_gray" basis="1" parallel="0" /> <!-- -60 dB -->
					
					<!-- Additional markers for zoom -->
					<marker value="-6 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
					<marker value="-18 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
					<marker value="-30 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
					<marker value="-42 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -18 db" />
					
					<marker value="-15 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
					<marker value="-21 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
					<marker value="-27 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
					<marker value="-33 db" color="g_gray" basis="1" parallel="0" visibility=":zoom le -33 db" />
					
					<!-- Yellow grid -->
					<marker value="100" color="g_yellow" basis="0" parallel="1" /> <!-- 100 Hz -->
					<marker value="1000" color="g_yellow" basis="0" parallel="1" /> <!-- 1 kHz -->
					<marker value="10000" color="g_yellow" basis="0" parallel="1" /> <!-- 10 kHz -->
	
					<marker value="0 db" color="g_yellow" basis="1" parallel="0" /> <!-- 0 dB -->
					<marker value="-24 db" color="g_yellow" basis="1" parallel="0" /> <!-- -24 dB -->
					<marker value="-48 db" color="g_yellow" basis="1" parallel="0" /> <!-- -48 dB -->
		
					<!-- Meshes -->
					<mesh id="spd" x_index="0" y_index="1" width="3" visibility_id="on_0" hue_id="hue_0" />
					
					<!-- Boundaries -->
					<marker value="1" color="g_white" basis="2" parallel="0" /> <!-- +48 dB -->
					<marker value="24000" color="g_white" basis="0" parallel="1" />
					
					<!-- Axis -->
					<axis min="10" max="24000" angle="0.0" color="g_white" logarithmic="true" />
					<axis min="-72 db / :zoom" max="24 db * :zoom" color="g_white" angle="0.5" logarithmic="true" /> <!-- -72..+24 dB -->
					<axis min="-1" max="1" visible="false" angle="0.5" />
					
					<!-- Marker -->
					<marker id="freq" color="g_red" basis="0" parallel="1" />
					<marker id="lvl" color="g_red" basis="1" parallel="0" />
					
					<!-- Text -->
					<text text="graph.units.hz" basis="0;2" coord="10;0" halign="1" valign="1" />
					<text text="100" basis="0;2" coord="100;0" halign="1" valign="1" />
					<text text="graph.values.1k" basis="0;2" coord="1000;0" halign="1" valign="1" />
					<text text="graph.values.10k" basis="0;2" coord="10000;0" halign="1" valign="1" />
					
					<text text="0" coord="10;0 db" halign="1" valign="1" />
					<text text="12" coord="10;12 db" halign="1" valign="1" />
					<text text="-12" coord="10;-12 db" halign="1" valign="1" />
					<text text="-24" coord="10;-24 db" halign="1" valign="1" />
					<text text="-36" coord="10;-36 db" halign="1" valign="1" />
					<text text="-48" coord="10;-48 db" halign="1" valign="1" />
					<text text="-60" coord="10;-60 db" halign="1" valign="1" />
					<text text="graph.units.db" basis="0;2" coord="10;1" halign="1" valign="-1" />
					
					<!-- Additional text -->
					<text text="-6" coord="10;-6 db" halign="1" valign="1" visibility=":zoom le -18 db" />
					<text text="-18" coord="10;-18 db" halign="1" valign="1" visibility=":zoom le -18 db" />
					<text text="-30" coord="10;-30 db" halign="1" valign="1" visibility=":zoom le -18 db" />
					<text text="-42" coord="10;-42 db" halign="1" valign="1" visibility=":zoom le -18 db" />
	
					<text text="-15" coord="10;-15 db" halign="1" valign="1" visibility=":zoom le -33 db" />
					<text text="-21" coord="10;-21 db" halign="1" valign="1" visibility=":zoom le -33 db" />
					<text text="-27" coord="10;-27 db" halign="1" valign="1" visibility=":zoom le -33 db" />
					<text text="-33" coord="10;-33 db" halign="1" valign="1" visibility=":zoom le -33 db" />
				</graph>
			
				<!-- Spectralizer (1 channel) -->
				<graph width="640" height="360" expand="true" fill="true" visibility=":mode ieq 2">
					<center hpos="-1" vpos="1" visible="false" />
		
					<!-- Gray grid -->
					<ui:for id="f" first="20" last="90" step="10"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
					<ui:for id="f" first="200" last="900" step="100"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
					<ui:for id="f" first="2000" last="9000" step="1000"><marker value="${f}" color="g_gray" basis="0" parallel="1" /></ui:for>
					<marker value="20000" color="g_gray" basis="0" parallel="1" />
					
					<ui:for id="t" first="1" last="7" step="2"><marker value="${t}" color="g_gray" basis="1" parallel="0" /></ui:for>
					
					<!-- Yellow grid -->
					<marker value="100" color="g_yellow" basis="0" parallel="1" /> <!-- 100 Hz -->
					<marker value="1000" color="g_yellow" basis="0" parallel="1" /> <!-- 1 kHz -->
					<marker value="10000" color="g_yellow" basis="0" parallel="1" /> <!-- 10 kHz -->
		
					<ui:for id="t" first="2" last="6" step="2"><marker value="${t}" color="g_yellow" basis="1" parallel="0" /></ui:for>

					<!-- Frame buffer -->
					<fbuffer id="fb" width="1" height="1" hpos="-1" vpos="1" opacity="0.75" angle="0"
						mode=":spm" color="left_channel" hue_id="hue_0" />
		
					<!-- Boundaries -->
					<marker value="8" color="g_white" basis="1" parallel="0" />
					<marker value="24000" color="g_white" basis="0" parallel="1" />
					
					<!-- Axis -->
					<axis min="10" max="24000" angle="0.0" color="g_white" logarithmic="true" />
					<axis min="0" max="8" color="g_white" angle="1.5" logarithmic="false" />
					
					<!-- Text -->
					<text text="graph.units.hz" basis="0;1" coord="10;8" halign="1" valign="1" />
					<text text="100" basis="0;1" coord="100;8" halign="1" valign="1" />
					<text text="graph.values.1k" basis="0;1" coord="1000;8" halign="1" valign="1" />
					<text text="graph.values.10k" basis="0;1" coord="10000;8" halign="1" valign="1" />
					
					<ui:for id="t" first="1" last="7"><text text="${t}" coord="10;${t}" halign="1" valign="1" /></ui:for>
					<text text="graph.axis.time" basis="0;1" coord="10;0" halign="1" valign="-1" />
				</graph>
				
				<!-- FFT settings -->
				<hbox spacing="8" border="4">
					<align pad_right="4" fill="true" hpos="0">
						<label text="labels.graphs.frequency" />
					</align>
					<label text="labels.fft.window" />
					<combo id="wnd" />
					<label text="labels.fft.tolerance" />
					<combo id="tol" />
					<label text="labels.fft.envelope" />
					<combo id="env" />
				</hbox>
			</vbox>
			
			<vbox visibility=":mode ile 1">
				<label text="labels.zoom" />
				<fader id="zoom" angle="1" expand="true" />
				<value id="zoom" />
			</vbox>
		</hbox>
	
		<hbox spacing="4" visibility=":mode ile 1">
			<group text="groups.channel" expand="true">
				<grid rows="3" cols="4" expand="true">
					<label text="labels.chan.on" />
					<label text="labels.chan.hold" />
					<label text="labels.chan.hue" />
					<label text="labels.chan.shift" />
					
					<button id="on_0" size="32" color="red" led="true" hue_id="hue_0" />
					<button id="frz_0" size="32" color="red" led="true" hue_id="hue_0"  />
					<knob id="hue_0" scale_hue_id="hue_0" />
					<knob id="sh_0" scale_hue_id="hue_0" />
					
					<led id="on_0" size="6" hue_id="hue_0" />
					<led id="frz_0" size="6" hue_id="hue_0" />
					<value id="hue_0" />
					<value id="sh_0" />
				</grid>
			</group>
			
			<group text="groups.metering" expand="true">
				<grid rows="43" cols="4" expand="true">
					<label text="labels.metering.preamp" />
					<label text="labels.metering.selector" />
					<label text="labels.metering.reactivity" />
					<label text="labels.metering.frequency:hz" />
					
					<knob id="pamp" />
					<knob id="sel" />
					<knob id="react" />
					<vbox>
						<indicator id="freq" format="f6.1!" text_color="green" />
						<indicator id="lvl" format="+-f5.2!" text_color="green" />
					</vbox>

					<value id="pamp" />
					<value id="sel" />
					<value id="react" />						
					<label text="labels.metering.level:db" />
				</grid>
			</group>
		</hbox>
		
		<group text="groups.channel" visibility=":mode ige 2">
			<grid rows="3" cols="6" transpose="true" fill="true">
				<label text="labels.chan.hold" />
				<button id="frz_0" size="32" color="red" led="true" hue_id="hue_0" />
				<label />

				<label text="labels.chan.hue" />
				<knob id="hue_0" scale_hue_id="hue_0" size="20" />
				<value id="hue_0" detailed="false" />

				<label text="labels.chan.shift" />
				<knob id="sh_0" scale_hue_id="hue_0" size="20" />
				<value id="sh_0" same_line="true" />

				<cell rows="3" expand="false">
					<vsep />
				</cell>
				
				<label text="labels.metering.preamp" />
				<knob id="pamp" />
				<value id="pamp" same_line="true" />

				<label text="labels.metering.reactivity" />
				<knob id="react" />
				<value id="react" same_line="true" />
			</grid>
		</group>
	</vbox>
</plugin>