 		result
 
 	# parses marktab chords into json
-	parseChord: (chord) ->
+	parseChord: (chord, i = 0) ->
 		""
 
 	# parses marktab riffs into json

			for part, i in parts
				jsonPart = {}
				if part.match(notePattern) 
					jsonPart = this.parseNotes(part, i)
					lastString = parseInt(_.keys(jsonPart), 10)
				else if part.match(restPattern)
					# rest
				else if part.match(hammerPattern)
					if !lastString
						throw "invalid hammer-on"
					jsonPart[lastString] = []
					jsonPart[lastString][i] = "h"
				else if part.match(pullOffPattern)
					if !lastString
						throw "invalid pull-off"
					jsonPart[lastString] = []
					jsonPart[lastString][i] = "p"
				else if part.match(slideUpPattern)
					if !lastString
						throw "invalid slide-up"
					jsonPart[lastString] = []
					jsonPart[lastString][i] = "/"
				else if part.match(slideDownPattern)
					if !lastString
						throw "invalid slide-down"
					jsonPart[lastString] = []
					jsonPart[lastString][i] = "\\"
				else
					throw "unknown pattern: " + part
				this.mergeMaps(json, jsonPart)

		pullOffPattern = /p/
		slideUpPattern = /\//
		slideDownPattern = /\\/
		chordPattern = /\(([0-9]:[0-9])+\)/
		lines = input.split("\n")
		for line in lines
			parts = line.split(" ")
