<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="_c74_vig.xsl" type="text/xsl"?>

<vignette name="MIAP Map Elements" package="MIAP">

	<metadatalist>
		<metadata name="author">Zachary Seldess</metadata>
		<metadata name="tag">MIAP</metadata>
	</metadatalist>
	
	
	<h1>MIAP Map Elements</h1>
	<p>
		From Meyer Sound’s CueStation User Guide:
		<br />
		“A SpaceMap design is constructed from two basic elements: nodes and trisets. Nodes commonly represent the positions of loudspeakers or groups of speakers, and may be of several types. Trisets link three nodes together, providing the means to distribute signal proportionally among them.” 
		<br />
		<br />
		<b>Node Types:</b>
		<br />
		<br />
		Each node in a map represents a signal output or gain coefficient in a list (Speaker and Derived node), a group of signal outputs or gain coefficients in a list (Virtual node), or a point of silence (Silent node). 
		<br />
		<br />
		<ul>
			<li>
				<b>Speaker nodes</b>
				<br />
				represent single signal outlets (for <o>MIAP~</o>) or single gain coefficient in a list (for <o>MIAP</o>). These signals/gains can be used directly, or passed to other objects and systems. Multiple <b>Speaker nodes</b> in a map can be bound to the same channel, which maps to a single signal outlet for <o>MIAP~</o> or single gain coefficient in a list for <o>MIAP</o>. There is no inherent relationship between a speaker's physical location in real space and a <b>Speaker node's</b> location in mapped space.
			</li>
			<li>
				<b>Silent nodes</b>
				<br /> 
				represent points in the map that, when forming part of a <b>Triset</b>, behave similarly to a <b>Speaker node</b>. In contrast to a <b>Speaker node</b>, which sends its panned signal/gain out via a signal outlet or list, signal/gain panned to a <b>Silent node</b> is simply ignored (i.e. silent). <b>Silent nodes</b> provide a convenient way to create fade-ins and fade-outs within a map.
			</li>
			<li>
				<b>Virtual nodes</b>
				<br />
				represent points in the mapped space whose existence is “virtualized” via weighted links to one or more of a map’s <b>Speaker</b> or <b>Silent nodes</b>. <b><i>Signal/gain routed to linked nodes can either be power-preserving (default) or linearly summing.</i></b> Signal/gain routed to linked <b>Speaker</b> or <b>Silent nodes</b> is weighted equally between all nodes by default, though weightings can be customized to bias the signal/gain of one node over another.
			</li>
			<li>
				<b>Derived nodes</b>
				<br />
				as the name implies, derive their signal/gain from <b>Speaker nodes</b>, and like <b>Speaker nodes</b>, represent single signal outlets (<o>MIAP~</o>) or single gain coefficient in a list (<o>MIAP</o>). <b><i>Signal/gain derived from linked nodes can either be power-preserving or linearly summing (default).</i></b> Signal/gain derived from linked <b>Speaker nodes</b> is weighted equally from all nodes by default, though weightings can be customized to bias the signal/gain of one node over another. This is the only node type that cannot be part of a <b>Triset</b>, and therefore its physical placement in the mapped space has no functional purpose (aside from visual clarity).
			</li>
		</ul>
		<illustration>
			<img width="500" src="images/5.1ch_map.png"/>
			<b>A map employing the four node types:</b> <br />
			Five <b>Speaker nodes</b> (black) form the primary panning reference points. <br />
			One <b>Virtual node</b> in the center of the map (red) represents a power-preserving distribution to the five <b>Speaker nodes</b> to which it is linked. <br />
			One <b>Derived node</b> (green) receives a linear sum from the <b>Speaker nodes</b> to which it is linked. <br />
			Eight <b>Silent nodes</b> (grey) border the map, providing the ability to gradually fade in and out.
		</illustration>
		<br />
		<br />
		<b>Trisets and Barycentric Panning:</b>
		<br />
		<br />
		<b>Trisets</b> in a map are formed out of a combination of three <b>Speaker</b>, <b>Virtual</b>, and/or <b>Silent nodes</b>. <b>Trisets</b> provide a space within which a constant-power panning algorithm can be applied. <o>MIAP</o> and <o>MIAP~</o> use barycentric coordinates to efficiently compute constant-power gains for each of the three nodes in a <b>Trisets</b>. When dealing with triangles, barycentric coordinates, also known as <i>areal coordinates</i>, describe the location of a point <i>P</i> within a triangle <i>ABC</i> via the signed areas of the three sub-triangles <i>PBC</i>, <i>PCA</i> and <i>PAB</i> (see figure below). Power-preserving gains can be derived from barycentric coordinates as follows:
		<ol>
			<li>
				Normalize the areas of all sub-triangles so that they sum to 1.
			</li>
			<li>
				Apply the square root of each normalized sub-triangle area as a gain value to the node of the parent triangle not included in that sub-triangle (see figure below).
			</li>
		</ol>
		<illustration>
			<img width="500" src="images/barycentric_panning.png"/>
			This diagram displays the triangular subdivisions formed by triangle <i>ABC</i> and point <i>P</i>. <br />
			Normalized areas are displayed for each sub-triangle (1/6, 1/6, 2/3). <br />
			The resulting “gains” applied to each node would be: A = √(2/3), B = √(1/6), C = √(1/6)
		</illustration>
	</p>


	<seealsolist>
		<seealso name="miap_overview" module="topics" type="vignette"/>
		<!-- <seealso name="miap_map_elements" module="topics" type="vignette"/> -->
		<seealso name="miap_tutorials" module="miap-tut" type="tutorial"/>
		<seealso name="MIAP"/>
		<seealso name="MIAP~"/>
		<seealso name="MIAP.map"/>
		<seealso name="MIAP.meyer"/>
	</seealsolist>
	
</vignette>
