"use strict";

/* --------------------------------------------------- */
/* SkyDragon Story track 20 (10a)                      */
/* Forced Fit                                          */
/* (Raviene's battle theme)                            */
/* (c) Sean Kelly, 2017                                */
/* --------------------------------------------------- */
DATA_CHIPTUNES["Forced Fit"] = {
		"chip": "oneofeach"
	,	"bpm": 140 // beats per minute; in this case, value is nominal
	,	"priority": 1 // baseline nonzero for BGM
	,	"songdata" : {
			"sq":	// name of a channel on the chip	
				[
					{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.25, "dur": 0}
					}
				//,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
				//		"data": {"start": 1.0, "end": 1.0, "dur": 0}
				//	}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.075}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 280} // 140 in 8ths
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 0}
					}

				// Section A
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}

				,	{"command": "notes", 
						"data": [
							"An2 1"
						,	"An2 1"
						,	"An2 2"
						,	"Rst 2"
						,	"Gn2 1"
						,	"An2 2"
						,	"An2 1"
						,	"An2 1"
						,	"En2 1"
						,	"Gn2 2"
						,	"En2 2"
						]
					}
				,	{"command": "notes", 
						"data": [
							"Gn2 1"
						,	"Gn2 1"
						,	"Gn2 2"
						,	"Rst 2"
						,	"Fn2 1"
						,	"Gn2 2"
						,	"Gn2 1"
						,	"Gn2 1"
						,	"Dn2 1"
						,	"Fn2 2"
						,	"Dn2 2"
						]
					}
				,	{"command": "notes", 
						"data": [
							"Fn2 1"
						,	"Fn2 1"
						,	"Cn2 2"
						,	"Ef2 2"
						,	"Cn2 1"
						,	"Fn2 2"
						,	"Fn2 1"
						,	"Fn2 1"
						,	"Cn2 1"
						,	"Ef2 2"
						,	"Cn2 2"
						]
					}
				,	{"command": "notes", 
						"data": [
							"En2 2"
						,	"Bn1 2"
						,	"Df2 1"
						,	"Df2 1"
						,	"Bn1 1"
						,	"En2 2"
						,	"En2 1"
						,	"En2 1"
						,	"Bn1 1"
						,	"Fn2 2"
						,	"Bn1 2"
						]
					}

				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -4, "times": 1}
					}


				// section B
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 4}
					}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.05}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 1.0, "end": 0.25, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 560} // 140 in 16ths
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						//"data": {"position": 0.25, "travel": 0.5, "dur": 2.0/(140/60), "alternate":true}
						"data": {"position": 0.25, "travel": 0.5, "dur": 0.85714286, "alternate":true} // less precise, but easier for SoundEdit JSON
					}

				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"En5 1"
						,	"Rst 1"
						,	"An4 1"
						,	"Rst 1"
						,	"En5 2"
						,	"En5 1"
						,	"Fn5 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 7}
					}

				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"Gn5 1"
						,	"Rst 1"
						,	"Cn5 1"
						,	"Rst 1"
						,	"Gn5 2"
						,	"Gn5 1"
						,	"Af5 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 7}
					}



				// section C
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 280} // 140 in 8ths
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 1.0, "end": 0.25, "dur": 0.5}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5}
					}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.075}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"Fn5 3"
						,	"Ef5 1"
						,	"Dn5 3"
						,	"Ef5 1"
						,	"Dn5 2"
						]
					}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.05}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"Bn4 1"
						,	"Cn5 1"
						,	"Dn5 1"
						,	"Cn5 1"
						,	"Bn4 1"
						,	"Cn5 1"
						]
					}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.075}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"Fn4 3"
						,	"Ef4 1"
						,	"Dn4 3"
						,	"Cn4 1"
						,	"Bn3 2"
						]
					}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.05}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"Gn3 2"
						,	"An3 2"
						,	"Bn3 2"
						]
					}

				]
		,	"st":	// name of a channel on the chip	
				[
					{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 1.0, "end": 0.0, "dur": 0.25}
					}
				//,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
				//		"data": {"start": 1.0, "end": 1.0, "dur": 0}
				//	}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.0375}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 420} // 140 in 8th-triples
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 4}
					}

				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						//"data": {"position": 0.25, "travel": 0.5, "dur": 4.0/(140/60), "alternate":true}
						"data": {"position": 0.25, "travel": 0.5, "dur": 1.71428571, "alternate":true} // less precise, but easier for SoundEdit JSON
					}
				// section A
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"An3 1"
						,	"Cn4 1"
						,	"En4 1"
						,	"An4 1"
						,	"Cn5 1"
						,	"En5 1"
						,	"An5 1"
						,	"En5 1"
						,	"Cn5 1"
						,	"An4 1"
						,	"En4 1"
						,	"Cn4 1"

						,	"An3 1"
						,	"Cn4 1"
						,	"En4 1"
						,	"An4 1"
						,	"Cn5 1"
						,	"En5 1"
						,	"An5 1"
						,	"En5 1"
						,	"Cn5 1"
						,	"An4 1"
						,	"En4 1"
						,	"Cn4 1"
						]
					}
				
				,	{"command": "notes",
						"data": [
							"Gn3 1"
						,	"Bn3 1"
						,	"Dn4 1"
						,	"Gn4 1"
						,	"Bn4 1"
						,	"Dn5 1"
						,	"Gn5 1"
						,	"Dn5 1"
						,	"Bn4 1"
						,	"Gn4 1"
						,	"Dn4 1"
						,	"Bn3 1"

						,	"Gn3 1"
						,	"Bn3 1"
						,	"Dn4 1"
						,	"Gn4 1"
						,	"Bn4 1"
						,	"Dn5 1"
						,	"Gn5 1"
						,	"Dn5 1"
						,	"Bn4 1"
						,	"Gn4 1"
						,	"Dn4 1"
						,	"Bn3 1"
						]
					}

				,	{"command": "notes",
						"data": [
							"Fn3 1"
						,	"An3 1"
						,	"Cn4 1"
						,	"Fn4 1"
						,	"An4 1"
						,	"Cn5 1"
						,	"Fn5 1"
						,	"Cn5 1"
						,	"An4 1"
						,	"Fn4 1"
						,	"Cn4 1"
						,	"An3 1"

						,	"Fn3 1"
						,	"An3 1"
						,	"Cn4 1"
						,	"Fn4 1"
						,	"An4 1"
						,	"Cn5 1"
						,	"Fn5 1"
						,	"Cn5 1"
						,	"An4 1"
						,	"Fn4 1"
						,	"Cn4 1"
						,	"An3 1"
						]
					}

				,	{"command": "notes",
						"data": [
							"En3 1"
						,	"Af3 1"
						,	"Bn3 1"
						,	"En4 1"
						,	"Af4 1"
						,	"Bn4 1"
						,	"En5 1"
						,	"Bn4 1"
						,	"Af4 1"
						,	"En4 1"
						,	"Bn3 1"
						,	"Af3 1"

						,	"En3 1"
						,	"Af3 1"
						,	"Bn3 1"
						,	"En4 1"
						,	"Af4 1"
						,	"Bn4 1"
						,	"En5 1"
						,	"Bn4 1"
						,	"Af4 1"
						,	"En4 1"
						,	"Bn3 1"
						,	"Af3 1"
						]
					}

				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -4, "times": 1}
					}

				// Section B
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 280} // 140 in 8ths
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 0}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.375, "dur": 0}
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0625}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						//"data": {"position": 0.25, "travel": 0.5, "dur": 0.5/(140/60), "alternate":true}
						"data": {"position": 0.625, "travel": -0.25, "dur": 0.21428571, "alternate":true} // less precise, but easier for SoundEdit JSON
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", 
						"data": [
							"An2 1"
						,	"An2 1"
						,	"Bn2 1"
						,	"Cn3 1"
						,	"Dn3 1"
						,	"Bn2 1"
						,	"Cn3 1"
						,	"Dn3 1"
						,	"En3 1"
						,	"Dn3 1"
						,	"Cn3 1"
						,	"En3 1"
						,	"Dn3 1"
						,	"Cn3 1"
						,	"Bn2 1"
						,	"Af2 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 1}
					}

				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", 
						"data": [
							"Cn3 1"
						,	"Cn3 1"
						,	"Dn3 1"
						,	"Ef3 1"
						,	"Fn3 1"
						,	"Ef3 1"
						,	"Dn3 1"
						,	"Fn3 1"
						,	"Ef3 1"
						,	"Dn3 1"
						,	"Cn3 1"
						,	"Ef3 1"
						,	"Dn3 1"
						,	"Cn3 1"
						,	"Bn2 1"
						,	"Dn3 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 1}
					}

				// Section C
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.0, "dur": 1.75}
					}

				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.05}
					}
				,	{"command": "notes", 
						"data": [
							"Gn2 4"
						,	"Gn2 4"
						,	"Gn2 8"
						]
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0375}
					}
				,	{"command": "notes", 
						"data": [
							"Gn2 4"
						,	"Gn2 4"
						,	"Gn2 8"
						]
					}
				]
		,	"sin":	// name of a channel on the chip	
				[
					{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 0.25, "end": 1.0, "dur": 0}
					}
				//,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
				//		"data": {"start": 1.0, "end": 1.0, "dur": 0}
				//	}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0625}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5625}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 280} // 140 in 8ths
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": -2}
					}

				// section A
				,	{"command": "notes", 
						"data": [
							"An3 4"
						,	"Bn3 4"
						,	"Cn4 4"
						,	"An3 4"

						,	"Gn4 4"
						,	"Fn4 8"
						,	"En4 2"
						,	"Dn4 2"

						,	"Cn4 8"

						,	"Bn3 6"
						,	"Dn4 1"
						,	"En4 1"

						,	"Dn4 8"

						,	"En4 4"
						,	"Af3 4"
						]
					}

				,	{"command": "notes", 
						"data": [
							"An3 4"
						,	"Bn3 4"
						,	"Cn4 4"
						,	"An3 4"

						,	"Gn4 4"
						,	"Fn4 8"
						,	"En4 2"
						,	"Dn4 2"

						,	"An4 8"

						,	"En4 6"
						,	"Af3 1"
						,	"An3 1"

						,	"Af3 8"

						,	"Bn3 8"
						]
					}
				
				// Section B
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 420} // 140 in 8th-triplets
					}

				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1, "end": 0.0, "dur": 0.25}
					}
				,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
						"data": {"start": 1.0, "end": 0.25, "dur": 0.25}
					}

				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.075}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.625}
					}
				,	{"command": "notes", 
						"data": [
							"Rst 12"

						,	"Cn5 1"
						,	"Cn5 1"
						,	"Cn5 1"
						,	"Cn5 3"
						]
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5625}
					}
				,	{"command": "notes", 
						"data": [
							"Gn4 1"
						,	"Gn4 1"
						,	"Gn4 1"
						,	"Gn4 3"
						]
					}

				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -4, "times": 3}
					}

				// section C
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 280} // 140 in 8ths
					}
				,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
						"data": {"start": 1.0, "end": 1.0, "dur": 0}
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.05}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5}
					}

				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 1.0, "dur": 0}
					}
				,	{"command": "notes", // strings of the form "NnO L" where NnO is the Note-modifier-Octave note to play (from DEF_CHIPTUNE_PITCHES) and L is the length in beats or fractions (can be multiple characters as long as parseFloat will take it)
						"data": [
							"Fn5 3"
						,	"Ef5 1"
						,	"Dn5 3"
						,	"Ef5 1"
						,	"Dn5 8"

						,	"Fn4 3"
						,	"Ef4 1"
						,	"Dn4 3"
						,	"Cn4 1"
						,	"Bn3 8"
						]
					}
				
				]

		,	"tri":	// name of a channel on the chip	
				[
					{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1, "end": 0.5, "dur": 0}
					}
				//,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
				//		"data": {"start": 1.0, "end": 1.0, "dur": 0}
				//	}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.1}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.375}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 280} // 140 in 8ths
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": -2}
					}

				// section A
				,	{"command": "notes", 
						"data": [
							"An4 4"
						,	"Bn4 4"
						,	"Cn5 4"
						,	"An4 4"

						,	"Gn5 4"
						,	"Fn5 8"
						,	"En5 2"
						,	"Dn5 2"

						,	"Cn5 8"

						,	"Bn4 6"
						,	"Dn5 1"
						,	"En5 1"

						,	"Dn5 8"

						,	"En5 4"
						,	"Af4 4"
						]
					}

				,	{"command": "notes", 
						"data": [
							"An4 4"
						,	"Bn4 4"
						,	"Cn5 4"
						,	"An4 4"

						,	"Gn5 4"
						,	"Fn5 8"
						,	"En5 2"
						,	"Dn5 2"

						,	"An5 8"

						,	"En5 6"
						,	"Af4 1"
						,	"An4 1"

						,	"Af4 8"

						,	"Bn4 8"
						]
					}
				
				// Section B
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1, "end": 0.5, "dur": 0}
					}

				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0875}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", 
						"data": [
							"An4 1"
						,	"An4 1"
						,	"En5 2"
						,	"Gn4 2"
						,	"Dn5 2"
						,	"Fn4 2"
						,	"Cn5 2"
						,	"En4 2"
						,	"Bn4 2"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 1}
					}

				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.1}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", 
						"data": [
							"Cn5 1"
						,	"Cn5 1"
						,	"Gn5 2"
						,	"Bf4 2"
						,	"Fn5 2"
						,	"Af4 2"
						,	"Ef5 2"
						,	"Gn4 2"
						,	"Dn5 2"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 1}
					}

				// section C
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.05}
					}

				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.75, "dur": 0}
					}
				,	{"command": "notes", 
						"data": [
							"Af5 4"
						,	"Af5 4"
						,	"Gn5 8"

						,	"Af5 4"
						,	"Af5 4"
						,	"Gn5 8"
						]
					}
				
				]
		,	"nz":	// name of a channel on the chip	
				[
					
				//,	{"command": "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
				//		"data": {"start": 1.0, "end": 1.0, "dur": 0}
				//	}
					{"command": "vol", // set overall volume of channel
						"data": {"level": 0.05}
					}
				,	{"command": "pan", 
						"data": {"position": 0.625}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 560} // 140 in 16tha
					}
				//,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
				//		"data": {"cents": 0}
				//	}

				// section A
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.0, "dur": 0.125}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "notes", 
						"data": [
							"Cn6 1" //hat1
						,	"Cn4 2" //snare
						,	"Cn4 1" //snare
						,	"Cn4 1" //snare
						,	"Cn4 1" //snare
						,	"Cn4 2" //snare
						,	"Cn6 1" //hat1
						,	"Cn4 2" //snare
						,	"Cn4 1" //snare
						,	"Cn4 1" //snare
						,	"Cn4 1" //snare
						,	"Cn4 2" //snare

						,	"Cn6 1" //hat1
						,	"Cn4 2" //snare
						,	"Cn4 1" //snare
						,	"Cn4 1" //snare
						,	"Cn4 1" //snare
						,	"Cn4 2" //snare
						,	"Cn4 2" //snare
						,	"Cn4 2" //snare
						,	"Cn4 2" //snare
						,	"Cn4 2" //snare
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -1, "times": 7}
					}

				// section B
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 840} // 140 in 6th-quarters
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0625}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0625}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.0, "dur": 0.75}
					}
				,	{"command": "pan", 
						"data": {"position": 0.625}
					}
				,	{"command": "notes", 
						"data": [
							"Fn5 12" //hat2 crash
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.0, "dur": 0.125}
					}
				,	{"command": "notes", 
						"data": [
							"Cn6 3" //hat1
						,	"Cn6 3" //hat1
						,	"Cn6 3" //hat1
						,	"Cn6 3" //hat1
						]
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0375}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.0, "dur": 0}
					}
				,	{"command": "pan", 
						"data": {"position": 0.375}
					}
				,	{"command": "notes", 
						"data": [
							"Rst 6"
						,	"Fn5 12" //hat2 crash
						,	"Cn6 6" //hat1 crash
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -10, "times": 3}
					}

				// section C
				,	{"command": "pan", 
						"data": {"position": 0.5}
					}
				,	{"command": "vol", // set overall volume of channel
						"data": {"level": 0.0625}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note
						"data": {"start": 1.0, "end": 0.0, "dur": 0.75}
					}
				,	{"command": "notes", 
						"data": [
							"Fn5 12" //hat2 crash
						,	"Fn5 12" //hat2 crash
						,	"Fn5 24" //hat2 crash
						,	"Rst 48" 
						]
					}				
				
				]
	}
};
