<dance name="Fandango">

	<abc>
M: 6/8
L: 1/8
K: C
|: "C"c2c cBc | "F"A2F "G7"EFG | "C"c2c "F"c2d | "G7"ecg "C"e2G \
|  "C"c2c cBc | "F"A2F "G7"EFG | "C"c2c "F"c2f | "G7"d2g "C"e3 :|
|: "C"gag e2c | G2c G2c | gag e2c | "F"A2c A2c \
|  "C"gag e2c | "F"A2F "C"E2G | "F"A2c "G7"d2B | "C"c3- cz2 :|
	</abc>
 
<!-- in D
K: D
|: "D"d2d dcd | "G"B2G "A7"FGA | "D"d2d "G"d2e | "A7"fda "D"f2A \
|  "D"d2d dcd | "G"B2G "A7"FGA | "D"d2d "G"d2g | "A7"e2a "D"f3 :|
|: "D"aba f2d | A2d A2d | aba f2d | "G"B2d B2d \
|  "D"aba f2d | "G"B2G "D"F2A | "G"B2d "A7"e2c | "D"d3- dz2 :|
-->
 
	<define_person name="man1"   place="100, -100" facing="90" gender="male"/>
	<define_person name="man2"   place="200, -100" facing="90" gender="male"/>
	<define_person name="man3"   place="300, -100" facing="90" gender="male"/>
	<define_person name="woman1" place="100, 100"  facing="270" gender="female"/>
	<define_person name="woman2" place="200, 100"  facing="270" gender="female"/>
	<define_person name="woman3" place="300, 100"  facing="270" gender="female"/>

	<figure name="turn giving hands in four bars" participants="man1,woman1" placement="hands=right"/>

	<move person="man1" place="200, -100" direction="90" bar="9"/>
	<move person="woman1" place="200, 100" direction="270" bar="9"/>

	<wait participants="man2,woman2" bar="5"/>
	<shift person="man2" place="100, -100" bar="9"/>
	<shift person="woman2" place="100, 100" bar="9"/>

	<figure name="turn giving hands in four bars" participants="man1,woman1" placement="hands=left"/>

	<move person="man1" place="300, -100" direction="90" bar="17"/>
	<move person="woman1" place="300, 100" direction="270" bar="17"/>

	<wait participants="man3,woman3" bar="13"/>
	<shift person="man3" place="200, -100" bar="17"/>
	<shift person="woman3" place="200, 100" bar="17"/>

	<wait participants="man1,man2,man3,woman3,woman2,woman1" bar="17"/>
	<transition participants="man1,man2,man3,woman3,woman2,woman1" after="1"/>
	
	<figure name="six hands around in four bars" participants="man2,man3,man1,woman1,woman3,woman2" 
			placement="center=(200,0),person1Facing=30,direction=left"/>
	<figure name="six hands around in four bars" participants="man2,woman2,woman3,woman1,man1,man3" 
			placement="center=(200,0),person1Facing=30,direction=right"/>

	<transition participants="man1,man2,man3,woman3,woman2,woman1" before="1"/>
	
	<finishing person="man2" place="100, -100" facing="90"/>
	<finishing person="woman2" place="100, 100" facing="270"/>
	<finishing person="man3" place="200, -100" facing="90"/>
	<finishing person="woman3" place="200, 100" facing="270"/>
	<finishing person="man1" place="300, -100" facing="90"/>
	<finishing person="woman1" place="300, 100" facing="270"/>

	<!-- first couple lead to top -->

	<!-- following bar count of 4 is a guess.  Should we drop hands
		when the element is closed?  -->
	
	<hand_hold bars="4">
		<hand person="man1" which="right"/>
		<hand person="woman1" which="right"/>
	</hand_hold>	

	<move person="man1" place="100, -20" direction="180"/>
	<move person="woman1" place="100, 20" direction="180"/>

	<move person="man1" place="200, -100" direction="90" bar="31"/>
	<move person="woman1" place="200, 100" direction="270" bar="31"/>
	
	<wait participants="man3,woman3" bar="29"/>
	<shift person="man3" place="300, -100" bar="31"/>
	<shift person="woman3" place="300, 100" bar="31"/>

	<move person="man1" place="250, -100" direction="270"/>
	<move person="man1" place="225, -125" direction="180" bar="32"/>
	<move person="man1" place="260, 60" direction="45" bar="33"/>

	<move person="woman1" place="250, 100" direction="90"/>
	<move person="woman1" place="225, 125" direction="180" bar="32"/>
	<move person="woman1" place="140, -60" direction="225" bar="33"/>

	<!-- first couple turn corners, partners both hands -->

	<wait participants="man2,woman3" bar="33"/>

	<transition participants="man1,woman1" before="2"/>
	<transition participants="man2,woman3" before="1"/>

	<form_unit name="coupleA1" participants="man1,woman3" type="two hand hold" place="275, 75" facing="45" bar="33"/>
	<rotate person="coupleA1" facing="90" turn="-270" bar="37"/>
	<disband_unit name="coupleA1" bar="37"/>
	<transition participants="woman3" after="1"/>
	<finishing person="woman3" place="300, 100" facing="270"/>

	<form_unit name="coupleB1" participants="woman1,man2" type="two hand hold" place="125, -75" facing="225" bar="33"/>
	<rotate person="coupleB1" facing="270" turn="-270" bar="37"/>
	<disband_unit name="coupleB1" bar="37"/>
	<transition participants="man2" after="1"/>
	<finishing person="man2" place="100, -100" facing="90"/>

	<!-- active couple must transition to turn each other -->
	<transition participants="man1,woman1" before="1" after="1" type="shifting"/>

	<form_unit name="activeCouple" participants="man1,woman1" type="two hand hold" place="200, 0" facing="180" bar="37"/>
	<rotate person="activeCouple" facing="0" turn="-180" bar="41"/>
	<disband_unit name="activeCouple" bar="41"/>

	<wait participants="woman2,man3" bar="41"/>

	<transition participants="man1,woman1" before="1" after="1" type="shifting"/>
	<transition participants="woman2,man3" before="1"/>

	<form_unit name="coupleA2" participants="man1,woman2" type="two hand hold" place="125, 75" facing="90" bar="41"/>
	<rotate person="coupleA2" facing="180" turn="-270" bar="45"/>
	<disband_unit name="coupleA2" bar="45"/>
	<transition participants="woman2" after="1"/>
	<finishing person="woman2" place="100, 100" facing="270"/>

	<form_unit name="coupleB2" participants="woman1,man3" type="two hand hold" place="275, -75" facing="270" bar="41"/>
	<rotate person="coupleB2" facing="0" turn="-270" bar="45"/>
	<disband_unit name="coupleB2" bar="39"/>
	<transition participants="man3" after="1"/>
	<finishing person="man3" place="300, -100" facing="90"/>

	<transition participants="man1,woman1" before="1" after="1" type="shifting"/>

	<form_unit name="activeCouple" participants="man1,woman1" type="two hand hold" place="200, 0" facing="270" bar="45"/>
	<rotate person="activeCouple" facing="45" turn="-540" bar="49"/>
	<disband_unit name="activeCouple" bar="49"/>

	<!-- figures of 8 -->

	<transition participants="man1,woman1" before="0.2" after="1"/>

	<figure name="figure of eight" participants="man1" placement="frontPost=(100, 100),backPost=(100, -100),shoulder=right"/> 	 	
	<figure name="figure of eight" participants="woman1" placement="frontPost=(300, -100),backPost=(300, 100),shoulder=right"/> 	 	

	<transition participants="man1,woman1" before="1" type="moving"/>
	<finishing person="man1" place="240, -30" facing="35"/>
	<finishing person="woman1" place="160, 30" facing="215"/>
	<transition participants="man1,woman1" after="2" type="moving"/>

	<!-- heys -->

	<!-- may not be necessary if transitioning can cope???
	<wait participants="man2,woman2,man3,woman3" bar="57"/>
	<rotate person="man2" facing="0" turn="-90" bar="57"/>
	<rotate person="woman2" facing="180" turn="-90" bar="57"/>
	<rotate person="man3" facing="0" turn="-90" bar="57"/>
	<rotate person="woman3" facing="180" turn="-90" bar="57"/>
 -->	

	<wait participants="man2,woman2,man3,woman3" bar="57"/>
	<transition participants="man2,woman2,man3,woman3" before="1"/>

	<figure name="hey" participants="man1,woman3,man3" placement="frontEndPoint=(300, 100),backEndPoint=(300, -100),shoulder=left">
		<cut participants="man1" bars="1.5"/>
	</figure>
	<figure name="hey" participants="woman1,man2,woman2" placement="frontEndPoint=(100, -100),backEndPoint=(100, 100),shoulder=left"> 	 	
		<cut participants="woman1" bars="1.5"/>
	</figure>

	<!-- couple 1 lead to bottom in the time we now have because we cut them
		out of the heys early.
	 -->

	<hand_hold bars="1.5">
		<hand person="man1" which="right"/>
		<hand person="woman1" which="right"/>
	</hand_hold>	

	<move person="man1" place="200, -20" direction="0"/>
	<move person="woman1" place="200, 20" direction="0"/>

	<move person="man1" place="290, -100" direction="270"/>
	<move person="woman1" place="290, 100" direction="90"/>
	
	<move person="man1" place="300, -100" direction="90" bar="65"/>
	<move person="woman1" place="300, 100" direction="270" bar="65"/>
	

	<transition participants="man2,woman2" before="0.2"/>
	<transition participants="man3,woman3" before="1"/>

	<finishing person="man1" place="300, -100" facing="90"/>
	<finishing person="woman1" place="300, 100" facing="270"/>
	<finishing person="man2" place="100, -100" facing="90"/>
	<finishing person="woman2" place="100, 100" facing="270"/>
	<finishing person="man3" place="200, -100" facing="90"/>
	<finishing person="woman3" place="200, 100" facing="270"/>


	<define_figure name="turn giving hands in four bars" bars="4">
		<define_person name="person1" place="100, -100" facing="90"/>
		<define_person name="person2" place="100, 100" facing="270"/>		

		<define_fix name="person1Fix" type="point" value="100, -100" default="person1"/>
		<define_fix name="person2Fix" type="point" value="100, 100" default="person2"/>
		<define_fix name="hands" type="chirality" value="right"/>

		<hand_hold bars="2">
			<hand person="person1" which="right"/>
			<hand person="person2" which="right"/>
		</hand_hold>	
		
		<move person="person1" place="70, 0" direction="90"/>
		<move person="person2" place="130, 0" direction="270"/>

		<move person="person1" place="130, 0" direction="270"/>
		<move person="person2" place="70, 0" direction="90"/>

		<move person="person1" place="100, -100" direction="270" bar="5"/>
		<move person="person2" place="100, 100" direction="90" bar="5"/>
	</define_figure>

	<define_figure name="six hands around in four bars" bars="4">
		<define_person name="person1"/>		
		<define_person name="person2"/>
		<define_person name="person3"/>		
		<define_person name="person4"/>
		<define_person name="person5"/>		
		<define_person name="person6"/>

		<define_fix name="center" type="point" value="0, 0"/>
		<define_fix name="person1Facing" type="orientation" value="0"/>
		<define_fix name="direction" type="chirality" value="left"/>

		<form_unit name="circle" participants="person1,person2,person3,person4,person5,person6" type="six hands in a circle" place="0, 0" facing="0" bar="1"/>

		<rotate person="circle" facing="0" turn="-360" bar="5"/>

		<disband_unit name="circle" bar="5"/>
	</define_figure>

	<define_unit_type name="six hands in a circle">
		<define_person name="person1" place="-100, 0" facing="0"/>		
		<define_person name="person2" place="-50, -86" facing="60"/>		
		<define_person name="person3" place="50, -86" facing="120"/>		
		<define_person name="person4" place="100, 0" facing="180"/>		
		<define_person name="person5" place="50, 86" facing="240"/>		
		<define_person name="person6" place="-50, 86" facing="300"/>		

		<hand_hold place="-86, -50">
			<hand person="person1" which="right"/>
			<hand person="person2" which="left"/>
		</hand_hold>
		<hand_hold place="0, -100">
			<hand person="person2" which="right"/>
			<hand person="person3" which="left"/>
		</hand_hold>
		<hand_hold place="86, -50">
			<hand person="person3" which="right"/>
			<hand person="person4" which="left"/>
		</hand_hold>
		<hand_hold place="86, 50">
			<hand person="person4" which="right"/>
			<hand person="person5" which="left"/>
		</hand_hold>
		<hand_hold place="0, 100">
			<hand person="person5" which="right"/>
			<hand person="person6" which="left"/>
		</hand_hold>
		<hand_hold place="-86, 50">
			<hand person="person6" which="right"/>
			<hand person="person1" which="left"/>
		</hand_hold>

	</define_unit_type>

	<define_figure name="figure of eight" bars="8">
		<define_person name="person" place="0, 0" facing="40"/>

		<define_fix name="frontPost" type="point" value="100, 0"/>
		<define_fix name="backPost" type="point" value="-100, 0"/>
		<define_fix name="shoulder" type="chirality" value="right"/>

		<move person="person" place="100, 80" direction="0"/>
		<move person="person" place="100, -80" direction="180"/>
		<move person="person" place="-100, 80" direction="180"/>
		<move person="person" place="-100, -80" direction="0"/>
		<move person="person" place="0, 0" direction="40" bar="9"/>
	</define_figure>

	<define_figure name="hey" bars="8">
		<define_person name="centerPerson" place="0, 0" facing="40"/>
		<define_person name="frontPerson" place="100, 0" facing="220"/>
		<define_person name="backPerson" place="-100, 0" facing="40"/>

		<define_fix name="frontEndPoint" type="point" value="100, 0"/>
		<define_fix name="backEndPoint" type="point" value="-100, 0"/>
		<define_fix name="shoulder" type="chirality" value="right"/>
<!--
		<move person="centerPerson" place="100, 0" direction="270" bar="3"/>
		<move person="centerPerson" place="0, 0" direction="140" bar="5"/>
		<move person="centerPerson" place="-100, 0" direction="270" bar="7"/>
		<move person="centerPerson" place="0, 0" direction="40" bar="9"/>

		<move person="frontPerson" place="0, 0" direction="140" bar="2.5"/>
		<move person="frontPerson" place="-100, 0" direction="270" bar="5"/>
		<move person="frontPerson" place="0, 0" direction="40" bar="6.5"/>
		<move person="frontPerson" place="100, 0" direction="270" bar="9"/>

		<move person="backPerson" place="0, 0" direction="40" bar="3.5"/>
		<move person="backPerson" place="100, 0" direction="270" bar="5"/>
		<move person="backPerson" place="0, 0" direction="140" bar="7.5"/>
		<move person="backPerson" place="-100, 0" direction="270" bar="9"/>
-->
		<move person="centerPerson" place="60, 40" direction="0"/>
		<move person="centerPerson" place="100, 0" direction="270" bar="3"/>
		<move person="centerPerson" place="60, -40" direction="180"/>
		<move person="centerPerson" place="-60, 40" direction="180"/>
		<move person="centerPerson" place="-100, 0" direction="270" bar="7"/>
		<move person="centerPerson" place="-60, -40" direction="0"/>
		<move person="centerPerson" place="0, 0" direction="40" bar="9"/>

		<move person="frontPerson" place="60, -40" direction="180"/>
		<move person="frontPerson" place="0, 0" direction="140" bar="2.5"/>
		<move person="frontPerson" place="-60, 40" direction="180"/>
		<move person="frontPerson" place="-100, 0" direction="270" bar="5"/>
		<move person="frontPerson" place="-60, -40" direction="0"/>
		<move person="frontPerson" place="0, 0" direction="40" bar="6.5"/>
		<move person="frontPerson" place="60, 40" direction="0"/>
		<move person="frontPerson" place="100, 0" direction="270" bar="9"/>

		<move person="backPerson" place="-60, -40" direction="0"/>
		<move person="backPerson" place="0, 0" direction="40" bar="3.5"/>
		<move person="backPerson" place="60, 40" direction="0"/>
		<move person="backPerson" place="100, 0" direction="270" bar="5"/>
		<move person="backPerson" place="60, -40" direction="180"/>
		<move person="backPerson" place="0, 0" direction="140" bar="7.5"/>
		<move person="backPerson" place="-60, 40" direction="180"/>
		<move person="backPerson" place="-100, 0" direction="270" bar="9"/>
	</define_figure>

	<define_unit_type name="two hand hold">
		<define_person name="man" place="-20, 0" facing="0"/>		
		<define_person name="woman" place="20, 0" facing="180"/>

		<hand_hold place="0, 20">
			<hand person="man" which="left"/>
			<hand person="woman" which="right"/>
		</hand_hold>	

		<hand_hold place="0, -20">
			<hand person="man" which="right"/>
			<hand person="woman" which="left"/>
		</hand_hold>	
	</define_unit_type>
</dance>