 					jsonPart[lastString][i] = "\\"
 				else if part.match(chordPattern)
 					# chord
-					jsonPart = this.parseChord(part, i)
+					jsonPart = this.parseChord(part)
 				else
 					throw "unknown pattern: " + part
-				this.mergeMaps(json, jsonPart)
-				# console.log(json)
+				this.addFrame(json, jsonPart)
 			this.parseJson(json)
 		json
 
+	# adds another frame to a tabMap
+	addFrame: (json, frame) ->
+		idx = this.longestString(json)
+		for stringNum, stringNotes of frame
+			for fret, i in stringNotes
+				json[stringNum] ?= []
+				json[stringNum][idx] = fret
+		json
+
+	longestString: (tabMap = {}) ->
+		max = 0
+		for stringNum, stringNotes of tabMap
+			size = _.size(stringNotes)
+			max = size if size > max
+		max
+	
 	# merges two tabMaps together, with the source overwriting the destination
 	mergeMaps: (dest, source) ->
 		for stringNum, stringNotes of source

			notes = tabMap[stringNum]
			line = stringDefaults[stringNum] + "|-"
			for note in notes
				line += (note || '-') + "-"
			line += "|"
			@lines.push(line)
		@lines

	# makes each string's notes array the same length
	normalizeJson: (json = {}) ->
		result = this.cloneTabMap(json)
		max = this.longestString(json)
		for stringNum in [1..6]
			result[stringNum] ?= []
			result[stringNum][max-1] ?= undefined if max > 0
