"use strict";

/* --------------------------------------------------- */
/* By AHA!, arranged by Sean Kelly.                    */
/* First "full" chiptune.js track ever written         */
/* --------------------------------------------------- */

DATA_CHIPTUNES["TakeOnMe"] = {
		chip: "oneofeach",
		bpm: 360, // beats per minute
		priority: 1, // baseline nonzero for BGM
		songdata : {
			tri:	// name of a channel on the chip	
				[
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.0, dur: 0.5}
					},
					//{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.2}
					},
					{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: 120}
					//},
					//{command: "detune", // detune in cents to be applied to the oscillator (for "richer" cound when 2 similar frequencies overlap)
					//	data: {cents: 0}
					//},

					// BAR 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: [
							"Bn2 1",
							"Rst 2",
							"Bn1 1",
							"Rst 2",
							"Bn2 1",
							"Bn1 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: [
							"Bn2 1",
							"Bn2 1",
							"Rst 1",
							"Bn1 1",
							"Rst 2",
							"Bn2 1",
							"Bn1 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: [
							"Bn2 1",
							"Rst 2",
							"Bn1 1",
							"Rst 2",
							"Bn2 1",
							"Bn1 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: [
							"Bn2 1",
							"Bn2 1",
							"Rst 1",
							"Bn1 1",
							"Rst 4"
						]
					},

					//BAR 5
					{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",
							"Rst 1",
							"Bn2 1",
							"Rst 3",
							"En3 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: [
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 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: [
							"An2 1",
							"An2 1",
							"Rst 1",
							"An2 1",
							"Rst 3",
							"Dn3 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: [
							"Rst 1",
							"Dn3 1",
							"Dn3 1",
							"Rst 1",
							"Cs3 1",
							"Cs3 1",
							"Rst 2"
						]
					},

					//BAR 9
					{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",
							"Rst 1",
							"Bn2 1",
							"Rst 3",
							"En3 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: [
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 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: [
							"An2 1",
							"An2 1",
							"Rst 1",
							"An2 1",
							"Rst 3",
							"Dn3 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: [
							"Rst 1",
							"Dn3 1",
							"Dn3 1",
							"Rst 1",
							"Cs3 1",
							"Cs3 1",
							"Rst 2"
						]
					},

					//BAR 13
					{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",
							"Rst 5",
							"En3 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: [
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 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: [
							"Bn2 1",
							"Bn2 1",
							"Rst 5",
							"En3 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: [
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 2"
						]
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 17, 21
					{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",
							"Rst 4",
							"En3 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: [
							"Rst 1",
							"En3 1",
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 3"
						]
					},
					{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",
							"Rst 4",
							"Dn3 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: [
							"Rst 1",
							"Dn3 1",
							"Rst 1",
							"Dn3 1",
							"Cs3 1",
							"Rst 2",
							"Cs3 1"
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					// BAR 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: [
							"Bn2 1",
							"Bn2 1",
							"Bn2 1",
							"Rst 4",
							"En3 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: [
							"Rst 1",
							"En3 1",
							"Rst 1",
							"En3 1",
							"En3 1",
							"Rst 2",
							"En3 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: [
							"Fs3 1",
							"Fs3 1",
							"Fs3 1",
							"Rst 3",
							"Dn3 1",
							"Dn3 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: [
							"Rst 1",
							"En3 1",
							"Fs3 1",
							"En3 1",
							"Dn3 1",
							"Cs3 1",
							"Bn2 1",
							"Rst 1",
						]
					},

					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 0.0, end: 1.0, dur: 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.7}
					},
					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 29, 33
					{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: [
							"An4 8",
						]
					},
					{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: [
							"Gs4 8",
						]
					},
					{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: [
							"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: "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: [
							"En4 3",
							"Fs4 3",
							"En4 2",
						]
					},
					{command: "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						data: {position: 0.7}
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -6, times: 1}
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 37, 41
					{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: [
							"An4 8",
						]
					},
					{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: [
							"Gs4 8",
						]
					},
					{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: [
							"An4 8",
						]
					},
					{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",
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.0, 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}
					},
					// and as a hat trick, back to bar 17
					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -29, times: 1}
					},

					
				],


			nz:	// name of a channel on the chip	
				[
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.2, dur: 0.0}
					},
					{command: "sweep", // set linear frequency sweep applied to every note (start and end multiply base note frequency)
						data: {start: 1.0, end: 1.2, dur: 0.3}
					},
					{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: 120}
					//},
					//{command: "detune", // detune in cents to be applied to the oscillator (for "richer" cound when 2 similar frequencies overlap)
					//	data: {cents: 0}
					//},

					// BAR 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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn6 2", //hat
							"En4 1", //snare
							"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: [
							"Cn2 2",
							"En4 1", //snare
							"Rst 1",
							"Cn6 1",
							"Cn2 1",
							"En4 1", //snare
							"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: [
							"Cn2 2",
							"En4 1", //snare
							"Rst 1",
							"Cn6 2",
							"En4 1", //snare
							"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: [
							"Cn2 2",
							"En4 1", //snare
							"Rst 1",
							"Cn6 1",
							"Cn6 1",
							"Gn4 1",
							"Gn4 1"
						]
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 5, 9
					{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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Cn2 1", //bd
							"Cn6 2", //hat
							"En4 1", //snare
							"Cn2 1" //bd
						]
					},
					{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 1",
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1" //snare
						]
					},
					{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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Cn2 1", //bd
							"Cn6 2", //hat
							"En4 1", //snare
							"Cn2 1" //bd
						]
					},
					{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 1",
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1" //snare
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					// BAR 13
					{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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Cn2 1", //bd
							"Cn6 2", //hat
							"En4 1", //snare
							"Cn2 1" //bd
						]
					},
					{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 1",
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1" //snare
						]
					},
					{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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Cn2 1", //bd
							"Cn6 2", //hat
							"En4 1", //snare
							"Cn2 1" //bd
						]
					},
					{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 1",
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"En4 1", //snare
							"En4 1", //snare
							"Cn2 1", //bd
							"Cn2 1" //bd
						]
					},


					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 17, 19, 21, 23, 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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn6 2", //hat
							"En4 1", //snare
							"Cn2 1" //bd
						]
					},
					{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 1",
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn6 2", //hat
							"En4 1", //snare
							"Rst 1" //snare
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -2, times: 4}
					},

					// BAR 27
					{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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn6 2", //hat
							"En4 1", //snare
							"Gn4 1" //snare
						]
					},
					{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 1",
							"En4 1", //snare
							"En4 1", //snare
							"Rst 1",
							"En4 1", //snare
							"En4 1", //snare
							"En4 1", //snare
							"Gn4 1" //snare
						]
					},


					{command: "vol", // set overall volume of channel
						data: {level: 0.09}
					},
					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 29, 33
					{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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					// BAR 37
					{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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"Cn2 1", //bd
							"Rst 1",
							"En4 2", //snare
							"Rst 1",
							"Cn2 1", //bd
						]
					},
					{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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"Cn2 1", //bd
							"Rst 1",
							"En4 2", //snare
							"Rst 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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"Cn2 1", //bd
							"Rst 1",
							"En4 1", //snare
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 2", //snare overflow
						]
					},
					{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: [
							"Cn2 1", //bd
							"En4 1", //snare
							"Cn2 1", //bd
							"En4 1", //snare
							"En4 1", //snare
							"En4 1", //snare
							"En4 1", //snare
						]
					},

					// BAR 41
					{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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"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: [
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"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: [
							"Cn2 1", //bd
							"Cn2 1", //bd
							"En4 1", //snare
							"Rst 1",
							"Cn2 2", //bd
							"En4 1", //snare
							"Rst 1",
						]
					},

					{command: "vol", // set overall volume of channel
						data: {level: 0.075}
					},

					// and as a hat trick, back to bar 17
					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -23, times: 1}
					},

				],



			st:	// name of a channel on the chip	
				[
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.0, dur: 0.3}
					},
					//{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.12}
					},
					{command: "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						data: {position: 0.6}
					},
					//{command: "tempo", // change tempo mid-tune
					//	data: {bpm: 120}
					//},
					{command: "detune", // detune in cents to be applied to the oscillator (for "richer" cound when 2 similar frequencies overlap)
						data: {cents: -5}
					},

					// BAR 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: [
							"Rst 8"
						]
					},
					{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"
						]
					},
					{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"
						]
					},
					{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"
						]
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 5, 9
					{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: [
							"Fs4 1",
							"Fs4 1",
							"Dn4 1",
							"Bn3 2",
							"Bn3 2",
							"En4 2",//overflow
						]
					},
					{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: [
							"En4 2",
							"En4 1",
							"Gs4 1",
							"Gs4 1",
							"An4 1",
							"Bn4 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: [
							"An4 1",
							"An4 1",
							"An4 1",
							"En4 2",
							"Cs4 2",
							"Fs4 2",//overflow
						]
					},
					{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: [
							"Fs4 2",
							"Fs4 1",
							"En4 1",
							"En4 1",
							"Fs4 1",
							"En4 1",
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					// BAR 13
					{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: [
							"Fs4 1",
							"Fs4 1",
							"Dn4 1",
							"Bn3 2",
							"Bn3 2",
							"En4 2",//overflow
						]
					},
					{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: [
							"En4 2",
							"En4 1",
							"Gs4 1",
							"Gs4 1",
							"An4 1",
							"Bn4 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: [
							"An4 1",
							"An4 1",
							"An4 1",
							"Fs4 2",
							"Dn4 2",
							"Fs4 2",//overflow
						]
					},
					{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: [
							"Fs4 2",
							"Fs4 1",
							"En4 1",
							"En4 1",
							"En4 2",
						]
					},

					
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.0, dur: 0.3}
					},
					{command: "vol", // set overall volume of channel
						data: {level: 0.08}
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 17, 21
					{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 1",
							"Fs5 1",
							"Dn5 1",
							"Bn4 1",
							"Rst 1",
							"Bn4 1",
							"Dn5 1",
							"Fs5 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: [
							"Rst 1",
							"En5 1",
							"Bn4 1",
							"Gs4 1",
							"Rst 1",
							"Gs4 1",
							"Bn4 1",
							"En5 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: [
							"En5 1",
							"Cs5 1",
							"An4 1",
							"Rst 2",
							"An4 1",
							"Cs5 1",
							"En5 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: [
							"Fs5 1",
							"Bn4 1",
							"Dn5 1",
							"Rst 2",
							"Gs4 1",
							"Bn4 1",
							"Dn5 1",
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					// BAR 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: [
							"Rst 1",
							"Fs5 1",
							"Dn5 1",
							"Bn4 1",
							"Rst 1",
							"Bn4 1",
							"Dn5 1",
							"Fs5 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: [
							"Rst 1",
							"En5 1",
							"Bn4 1",
							"Gs4 1",
							"Rst 1",
							"Gs4 1",
							"Bn4 1",
							"En5 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: [
							"Fs5 1",
							"Rst 1",
							"Cs5 1",
							"Fs5 1",
							"Rst 2",
							"Cs5 1",
							"Fs5 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: [
							"Dn5 1",
							"Dn5 1",
							"Fs5 1",
							"En5 1",
							"Rst 4",
						]
					},


					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.0, dur: 0.4}
					},
					{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
						data: {level: 0.08}
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 29
					{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 2",
							"An2 2",
							"An2 2",
							"An2 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: [
							"Gs2 2",
							"Gs2 2",
							"Gs2 2",
							"Gs2 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: [
							"Fs2 2",
							"Fs2 2",
							"Fs2 2",
							"Fs2 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: [
							"Dn2 2",
							"Dn2 2",
							"Dn2 2",
							"En2 2",
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 3}
					},
					{command: "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						data: {position: 0.6}
					},


					// and as a hat trick, back to bar 17
					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -23, times: 1}
					},

				],



			sq:	// name of a channel on the chip	
				[
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 0.5, end: 1.0, dur: 0.5}
					},
					//{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.08}
					},
					{command: "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						data: {position: 0.4}
					},
					//{command: "tempo", // change tempo mid-tune
					//	data: {bpm: 120}
					//},
					{command: "detune", // detune in cents to be applied to the oscillator (for "richer" cound when 2 similar frequencies overlap)
						data: {cents: 5}
					},

					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					// BAR 1, 5
					{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"
						]
					},
					{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"
						]
					},
					{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"
						]
					},
					{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"
						]
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -4, times: 1}
					},

					
					// BAR 9
					{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"
						]
					},
					{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 5",
							"En4 1",
							"Rst 1",
							"Dn4 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: [
							"Cs4 1",
							"En4 1",
							"Rst 6"
						]
					},
					{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"
						]
					},

					// BAR 13
					{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: [
							"Fs4 8"
						]
					},
					{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: [
							"Gs4 8"
						]
					},
					{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: [
							"An4 8"
						]
					},
					{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 8"
						]
					},


					// BAR 17
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0.0, dur: 0.7}
					},
					{command: "vol", // set overall volume of channel
						data: {level: 0.12}
					},
					{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 3",
							"Dn4 2",
							"Cs4 1",
							"Bn3 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: [
							"Rst 7",
							"Bn3 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: [
							"Cs4 1",
							"Cs4 2",
							"Cs4 2",
							"An3 2",
							"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: [
							"Rst 1",
							"Fs4 2",
							"Fs4 1",
							"Fs4 2",
							"En4 2"
						]
					},

					// BAR 21
					{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 3",
							"Dn4 1",
							"Dn4 1",
							"Cs4 2",
							"Bn3 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: [
							"Rst 7",
							"Bn3 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: [
							"Cs4 1",
							"Cs4 2",
							"Cs4 2",
							"Bn3 2",
							"An3 2" //overflow
						]
					},
					{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 2",
							"Cs4 1",
							"Bn3 1",
							"Cs4 .5",
							"Bn3 .5",
							"An3 2"
						]
					},

					// BAR 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: [
							"Dn4 3",
							"Dn4 2",
							"Dn4 1",
							"Dn4 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: [
							"Rst 8"
						]
					},
					{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 1",
							"An3 2",
							"An3 1",
							"An3 1",
							"An3 1",
							"An3 1",
							"An3 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: [
							"An3 1",
							"Gs3 3",
							"Gs3 1",
							"Fs3 3"
						]
					},


					// BAR 29
					{command: "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						data: {position: 0.3}
					},
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 0.5, end: 1.0, dur: 0.5}
					},
					{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 8"
						]
					},
					{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: [
							"Gs4 8"
						]
					},
					{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: [
							"An4 8"
						]
					},
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0, dur: 0.5}
					},
					{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: [
							"An4 8"
						]
					},

					// BAR 33
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 0.5, end: 1.0, dur: 0.5}
					},
					{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: [
							"An4 8"
						]
					},
					{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 8"
						]
					},
					{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: [
							"Fs5 8"
						]
					},
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0, dur: 0.5}
					},
					{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: [
							"Fs5 8"
						]
					},

					// BAR 37
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 0.5, end: 1.0, dur: 0.5}
					},
					{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: [
							"Cs5 8"
						]
					},
					{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: [
							"Gs5 8"
						]
					},
					{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: [
							"An5 8"
						]
					},
					{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 2",
							"Bn5 1",
							"Cs6 2",
							"Bn5 1",
							"An5 2",
						]
					},


					// BAR 41
					{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 2",
							"En6 14",//overflow
						]
					},
					//bar omitted
					{command: "env", // set linear ramp envelope applied to every note
						data: {start: 1.0, end: 0, dur: 1.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: [
							"En6 16",//overflow
						]
					},
					//bar omitted
					{command: "pan", // linearly-divided fraction of the audio going to the right channel, with the remainder going to the left
						data: {position: 0.4}
					},


					// and as a hat trick, back to bar 17
					{command: "jump", // reset the loop counter
						data: {reset: true}
					},
					{command: "jump", // go forwards/backwards delta commands if loop counter < times; increase loop counter
						data: {delta: -37, times: 1}
					},

				]
			
		}
	};