abc2svg
Check-in [593e3e7ba5]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:modules: MIDI: fix: bug in the previous commit giving error on %%MIDI gchord + Reported by Sergio Di Mico.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1: 593e3e7ba51616b0c237410ed8122e5d2d4b57fa
User & Date: jef 2026-03-23 18:16:13.302
Context
2026-03-23
18:16
modules: MIDI: fix: bug in the previous commit giving error on %%MIDI gchord + ... (Leaf check-in: 593e3e7ba5 user: jef tags: trunk)
10:28
module: MIDI: check the content of the list in %%MIDI gchord ... (check-in: 2896924958 user: jef tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/MIDI.js.
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
//				//	M:6/8	fzcfzc
//				//	M:9/8	fzcfzcfzc
		// fall thru
	case "gchordbars":	// %%MIDI gchordbars n
	case "gchordon":	// %%MIDI gchordon
	case "gchordoff":	// %%MIDI gchordoff
		if (a[1].length == 6			// if %%MIDI gchord <list>
		 && !/^[0-9bcf-kG-Kz]+$/.test(a[2])) {
			abc.syntax(1, abc.errs.bad_val, "%%MIDI gchord")
			break
		}
		if (!cfmt.chord)
			cfmt.chord = {}
		if (parse.state >= 2
		 && curvoice) {







|







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
//				//	M:6/8	fzcfzc
//				//	M:9/8	fzcfzcfzc
		// fall thru
	case "gchordbars":	// %%MIDI gchordbars n
	case "gchordon":	// %%MIDI gchordon
	case "gchordoff":	// %%MIDI gchordoff
		if (a[1].length == 6			// if %%MIDI gchord <list>
		 && !/^[0-9bcf-kG-Kz+]+$/.test(a[2])) {
			abc.syntax(1, abc.errs.bad_val, "%%MIDI gchord")
			break
		}
		if (!cfmt.chord)
			cfmt.chord = {}
		if (parse.state >= 2
		 && curvoice) {