"use strict";

/* --------------------------------------------------- */
/* SkyDragon Story track 25c                           */
/* Seeking the Darkness Within - III - Defiance        */
/* (Underdark late)                                    */
/* (c) Sean Kelly, 2020                                */
/* --------------------------------------------------- */
DATA_CHIPTUNES["Seeking the Darkness III"] = {
		"chip": "oneofeach"
	,	"bpm": 480 // beats per minute; 120 in 16ths
	,	"priority": 1 // baseline nonzero for BGM
	,	"songdata" : {
			"st":	// 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": "tempo", // change tempo mid-tune - need this redundancy for queueing
						"data": {"bpm": 480}
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 0}
					}

				// (3)
				,	{"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.0625}
					}
				

				// 4
				,	{"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.25}
					}
				,	{"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": [
							"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 2"
						,	"Bf3 2"

						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 4"
						]
					}
				,	{"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": [
							"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 2"
						,	"Bf3 2"

						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 3"
						,	"Bf3 4"
						]
					}

				,	{"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.5, "dur": 0.25}
					}
				,	{"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": [
							"Bf3 16"

						,	"Bf3 16"
						]
					}

				// 5a
				,	{"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": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"Bn3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bn3 1"
						,	"Bn3 1"
						,	"Bn3 1"

						,	"Bf3 3"
						,	"Bn3 1"
						,	"Bn3 1"
						,	"Bn3 1"
						,	"Bf3 3"
						,	"Bn3 1"
						,	"Bn3 1"
						,	"Bn3 1"
						]
					}

				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"Bf3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bf3 1"
						,	"Bf3 1"
						,	"Bf3 1"

						,	"An3 3"
						,	"Bf3 1"
						,	"Bf3 1"
						,	"Bf3 1"
						,	"An3 3"
						,	"Bf3 1"
						,	"Bf3 1"
						,	"Bf3 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -12, "times": 1}
					}

				// 5b
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"Bf3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bf3 1"
						,	"Bf3 1"
						,	"Bf3 1"

						,	"An3 3"
						,	"Bf3 1"
						,	"Bf3 1"
						,	"Bf3 1"
						,	"An3 3"
						,	"Bf3 1"
						,	"Bf3 1"
						,	"Bf3 1"
						]
					}

				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"An3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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"
						,	"An3 1"
						,	"An3 1"

						,	"Af3 3"
						,	"An3 1"
						,	"An3 1"
						,	"An3 1"
						,	"Af3 3"
						,	"An3 1"
						,	"An3 1"
						,	"An3 1"
						]
					}

				// 5c
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Gf3 16"
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.5, "end": 1.25, "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": [
							"Gf3 16"
						]
					}


				// 5ar
				,	{"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": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"Bn3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bn2 1"
						,	"Bn2 1"
						,	"Bn2 1"

						,	"Bf2 3"
						,	"Bn2 1"
						,	"Bn2 1"
						,	"Bn2 1"
						,	"Bf2 3"
						,	"Bn2 1"
						,	"Bn2 1"
						,	"Bn2 1"
						]
					}

				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"Bf3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bf2 1"
						,	"Bf2 1"
						,	"Bf2 1"

						,	"An2 3"
						,	"Bf2 1"
						,	"Bf2 1"
						,	"Bf2 1"
						,	"An2 3"
						,	"Bf2 1"
						,	"Bf2 1"
						,	"Bf2 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -12, "times": 1}
					}

				// 5br
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"Bf3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bf2 1"
						,	"Bf2 1"
						,	"Bf2 1"

						,	"An2 3"
						,	"Bf2 1"
						,	"Bf2 1"
						,	"Bf2 1"
						,	"An2 3"
						,	"Bf2 1"
						,	"Bf2 1"
						,	"Bf2 1"
						]
					}

				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"An3 4"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"An2 1"
						,	"An2 1"
						,	"An2 1"

						,	"Af2 3"
						,	"An2 1"
						,	"An2 1"
						,	"An2 1"
						,	"Af2 3"
						,	"An2 1"
						,	"An2 1"
						,	"An2 1"
						]
					}

				// 5cr
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Gf3 16"
						]
					}

				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5} // less precise, but easier for SoundEdit JSON
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.5, "end": 1.25, "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": [
							"Gf4 16"
						]
					}

				
				]
		,	"sq":	// 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": "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 - need this redundancy for queueing
						"data": {"bpm": 480}
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": -2}
					}

				// (3)
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.0, "travel": 1.0, "dur": 0.5, "alternate":true} // less precise, but easier for SoundEdit JSON
					}
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.0375}
					}
				,	{"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.0}
					}

				// 4
				,	{"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": [
							"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"

						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 1"
						,	"Ef4 2"
						,	"Ef4 2"
						]
					}
				,	{"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": [
							"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"

						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 4"
						]
					}

				,	{"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": [
							"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"
						,	"Bf4 2"
						,	"Bf4 1"

						,	"Bf4 3"
						,	"Bf4 3"
						,	"Bf4 10"
						]
					}

				// 5a
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.25}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 3"
						,	"Ef4 9"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Ef4 1"
						,	"Ef4 1"
						,	"Ef4 1"

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

				// 5b
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 3"
						,	"Dn4 9"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Dn4 1"
						,	"Dn4 1"
						,	"Dn4 1"

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

				// 5c
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 3"
						,	"Cn4 13"
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.5, "end": 1.25, "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": [
							"Cn4 16"
						]
					}


				// 5ar
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.25}
					}
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 3"
						,	"Ef4 9"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Ef4 1"
						,	"Ef4 1"
						,	"Ef4 1"

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

				// 5br
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 3"
						,	"Dn4 9"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Dn4 1"
						,	"Dn4 1"
						,	"Dn4 1"

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

				// 5cr
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 3"
						,	"Cn4 13"
						]
					}

				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5} // less precise, but easier for SoundEdit JSON
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.5, "end": 1.25, "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": [
							"Cn4 16"
						]
					}
				

				
				]
		,	"tri":	// 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": "tempo", // change tempo mid-tune - need this redundancy for queueing
						"data": {"bpm": 480}
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 2}
					}

				// (3)
				//,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
				//		"data": {"level": 0.1}
				//	}
				,	{"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": 1.0, "dur": 0.0}
					}

				// 4
				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.125}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5} // less precise, but easier for SoundEdit JSON
					}
				,	{"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": [
							"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 1"
						,	"Rst 1"
						,	"Ef2 1"
						,	"Rst 1"

						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 3"
						,	"Rst 1"
						]
					}
				,	{"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": [
							"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 1"
						,	"Rst 1"
						,	"Ef2 1"
						,	"Rst 1"

						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 3"
						,	"Rst 1"
						]
					}

				,	{"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": [
							"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 1"
						,	"Rst 1"
						,	"Ef2 1"
						,	"Rst 1"

						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 2"
						,	"Rst 1"
						,	"Ef2 10"
						]
					}

				,	{"command": "vol", // set overall volume of channel; 0.1 is a sane "loud" level
						"data": {"level": 0.1}
					}
				// 5a
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.75}
					}

				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 6"
						,	"Af4 6"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Af4 1"
						,	"Af4 1"
						,	"Af4 1"

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

				// 5b
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 6"
						,	"Gf4 6"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Gf4 1"
						,	"Gf4 1"
						,	"Gf4 1"

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

				// 5c
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 6"
						,	"Af4 10"
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.5, "end": 1.25, "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": [
							"Dn4 16"
						]
					}


				// 5ar
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.75}
					}

				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 6"
						,	"Af4 6"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Af3 1"
						,	"Af3 1"
						,	"Af3 1"

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

				// 5br
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 6"
						,	"Gf4 6"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Gf3 1"
						,	"Gf3 1"
						,	"Gf3 1"

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

				// 5cr
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 6"
						,	"Af4 10"
						]
					}

				,	{"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": 1.0, "dur": 0.0}
					}
				,	{"command": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.5} // less precise, but easier for SoundEdit JSON
					}
				,	{"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": [
							"Dn2 3"
						,	"Rst 1"
						,	"Dn2 3"
						,	"Rst 1"
						,	"Dn2 3"
						,	"Rst 1"
						,	"Dn2 3"
						,	"Rst 1"
						]
					}

				]

		,	"sin":	// 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": "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						"data": {"position": 0.75}
					}
				,	{"command": "tempo", // change tempo mid-tune - need this redundancy for queueing
						"data": {"bpm": 480}
					}
				,	{"command": "detune", // detune in cents to be applied to the oscillator (for "richer" sound when 2 similar frequencies overlap)
						"data": {"cents": 0}
					}

				
				// (3)
				,	{"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.125}
					}

				// 4
				,	{"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.75, "dur": 0.25}
					}
				,	{"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": [
							"Bf6 3"
						,	"Ef6 3"
						,	"Af6 3"
						,	"Bn5 3"
						,	"Bf5 2"
						,	"Fn6 2"

						,	"An5 3"
						,	"En6 3"
						,	"Gn5 3"
						,	"Dn6 3"
						,	"Ef6 4"
						]
					}
				,	{"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": [
							"Bf5 3"
						,	"Ef5 3"
						,	"Af5 3"
						,	"Bn4 3"
						,	"Bf4 2"
						,	"Fn5 2"

						,	"An4 3"
						,	"En5 3"
						,	"Gn4 3"
						,	"Dn5 3"
						,	"Ef5 4"
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.25, "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": [
							"Ef5 16"
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 1.25, "end": 0.5, "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": [
							"Ef5 16"
						]
					}

				// 5a
				,	{"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": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Bf4 16"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bf4 3"
						,	"Bf4 1"
						,	"Bf4 1"
						,	"Bf4 1"
						,	"Bf4 3"
						,	"Bf4 1"
						,	"Bf4 1"
						,	"Bf4 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -6, "times": 3}
					}

				// 5b
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Af4 16"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Af4 3"
						,	"Af4 1"
						,	"Af4 1"
						,	"Af4 1"
						,	"Af4 3"
						,	"Af4 1"
						,	"Af4 1"
						,	"Af4 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -6, "times": 1}
					}

				// 5c
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"An4 8"
						]
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.5, "end": 1.25, "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": [
							"Af4 16"
						]
					}


				// 5ar
				,	{"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": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Bf4 16"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Bf4 3"
						,	"Bf4 1"
						,	"Bf4 1"
						,	"Bf4 1"
						,	"Bf4 3"
						,	"Bf4 1"
						,	"Bf4 1"
						,	"Bf4 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -6, "times": 3}
					}

				// 5br
				,	{"command": "jump", // reset the loop counter
						"data": {"reset": true}
					}
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Af4 16"
						]
					}
				,	{"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.5, "dur": 0}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 360} // 8th-tuples
					}
				,	{"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": [
							"Af4 3"
						,	"Af4 1"
						,	"Af4 1"
						,	"Af4 1"
						,	"Af4 3"
						,	"Af4 1"
						,	"Af4 1"
						,	"Af4 1"
						]
					}
				,	{"command": "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						"data": {"delta": -6, "times": 1}
					}

				// 5cr
				,	{"command": "env", // set linear ramp envelope applied to every note; dur is measured in seconds, 0 means length of current note
						"data": {"start": 0.75, "end": 1.0, "dur": 0.25}
					}
				,	{"command": "tempo", // change tempo mid-tune
						"data": {"bpm": 480} // 16ths
					}
				,	{"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": [
							"Rst 8"
						,	"An4 8"
						]
					}
				,	{"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.125}
					}
				,	{"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.75, "dur": 0.25}
					}
				,	{"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": [
							"Af4 4"
						,	"An4 4"
						,	"Af5 4"
						,	"An5 4"
						]
					}
				
				]
		}
	};
