From eaf60de68e84d860e84a09bb5e89f2e7ab4e9178 Mon Sep 17 00:00:00 2001 From: Michael Eskin Date: Sun, 1 Sep 2024 08:59:56 -0700 Subject: [PATCH 01/10] Bring bass note in range if transposed out-of-range by a visual transpose --- src/synth/chord-track.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/synth/chord-track.js b/src/synth/chord-track.js index 32f2c683..063654a5 100644 --- a/src/synth/chord-track.js +++ b/src/synth/chord-track.js @@ -198,6 +198,15 @@ ChordTrack.prototype.interpretChord = function (name) { while (chordTranspose > 8) chordTranspose -= 12; bass += chordTranspose; + + // MAE 31 Aug 2024 - For visual transpose backup range issue + // If transposed below A or above G, bring it back in the normal backup range + if (bass < 33){ + bass += 12; + } + else if (bass > 44){ + bass -= 12; + } // MAE 17 Jun 2024 - Supporting octave shifted bass and chords var unshiftedBass = bass; From bfa12adb3ffc4c2b5518a3802c18e89674494f21 Mon Sep 17 00:00:00 2001 From: paulrosen Date: Tue, 10 Sep 2024 10:47:38 -0400 Subject: [PATCH 02/10] Fix call of getBpm() to use the specified tempo if it isn't supplied. --- docs/visual/render-abc-result.md | 2 +- src/data/abc_tune.js | 2 ++ types/index.d.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/visual/render-abc-result.md b/docs/visual/render-abc-result.md index a3cfcf91..f8b39ba1 100644 --- a/docs/visual/render-abc-result.md +++ b/docs/visual/render-abc-result.md @@ -84,7 +84,7 @@ Durations have units where a whole note is 1. This returns how long a beat is. F This returns how many beats are in a measure. For example, 4/4 time returns `4`, 6/8 time returns `2` since a beat is three eighth notes. -### getBpm() +### getBpm(tempo?: TempoProperties) This is the starting beats per minute. Tempo changes could appear later in the tune, but this is the value that was set with the `Q:` statement, or if that statement doesn't exist, it is the default tempo of 180. diff --git a/src/data/abc_tune.js b/src/data/abc_tune.js index 16fd18e1..fd472033 100644 --- a/src/data/abc_tune.js +++ b/src/data/abc_tune.js @@ -551,6 +551,8 @@ var Tune = function() { this.getBpm = function(tempo) { var bpm; + if (!tempo) + tempo = this.metaText ? this.metaText.tempo : null; if (tempo) { bpm = tempo.bpm; var beatLength = this.getBeatLength(); diff --git a/types/index.d.ts b/types/index.d.ts index f1eb02c1..c89249f9 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -886,7 +886,7 @@ declare module 'abcjs' { getBarLength: NumberFunction; getBeatLength: NumberFunction; getBeatsPerMeasure: NumberFunction; - getBpm: NumberFunction; + getBpm: (tempo?:TempoProperties) => number; getMeter: () => Meter; getMeterFraction: () => MeterFraction; getPickupLength: NumberFunction; From 5504a9226fdfb698ca75d3d4b1dbd69d0438f2b1 Mon Sep 17 00:00:00 2001 From: paulrosen Date: Tue, 10 Sep 2024 10:50:08 -0400 Subject: [PATCH 03/10] update version --- package-lock.json | 4 ++-- package.json | 2 +- version.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3aa7ea07..f983fddc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "abcjs", - "version": "6.4.2", + "version": "6.4.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "abcjs", - "version": "6.4.2", + "version": "6.4.3", "license": "MIT", "devDependencies": { "@babel/core": "7.20.12", diff --git a/package.json b/package.json index 0a70b23d..ab110c5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abcjs", - "version": "6.4.2", + "version": "6.4.3", "description": "Renderer for abc music notation", "main": "index.js", "types": "types/index.d.ts", diff --git a/version.js b/version.js index c90c3044..5579fd41 100644 --- a/version.js +++ b/version.js @@ -1,3 +1,3 @@ -var version = '6.4.2'; +var version = '6.4.3'; module.exports = version; From 8cd3fde2eeeb91c67bd82d43492fd286f7e1b0f2 Mon Sep 17 00:00:00 2001 From: paulrosen Date: Tue, 10 Sep 2024 17:37:07 -0400 Subject: [PATCH 04/10] remove DS_Store --- src/write/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/write/.DS_Store diff --git a/src/write/.DS_Store b/src/write/.DS_Store deleted file mode 100644 index 8d4a49e521753bda1501bf1c36b5a71f10bcb47f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKK}y6x5Ukc90WW*>IA8Dw!?M1>54dg=gvEgFBHnWI+gA6q5{Y{BAXU&)*`BT$ zQit?509zl2OJD_{XE@`{mnD4PV}X;*oRTfhIN$*z9`A?e-J<&Ygll{3@Ps>TG1K3U zre1m15r_GPD+D z{QFQC&NX>z9G?y@F#?b~rUQJAS%O?VL9WSDV`d0zQgV}8ju_VD%$KaI$y4Jdhvo2L zd9&q&VsSgqFHsJwjkU@FIq=m1pS_8d_x~%#5A(m*2y#FU{8I<4+gxwfe7Wqci`VpC vTNpQt53n}MxkM`_M=RzJZ^ak0y5i5=ugO#6kTV~0vi=CTFM=HS3kTi-E=M26 From 08a798e1b8995442b408bf4f15f37a3e51e468d5 Mon Sep 17 00:00:00 2001 From: Michael Eskin Date: Tue, 10 Sep 2024 16:06:17 -0700 Subject: [PATCH 05/10] Fix for crash on malformed @ positioned annotations If a malformed "@"-style absolute positioned annotation was encountered, the renderer would throw an exception. This change returns a reasonable chord value that that won't crash the rendering while a malformed absolute positioned annotation is being edited, which is a very common occurrence. For example lets say user intends to add an annotation: "@-30,20Hello" While they are typing this, "@-30Hello" won't crash as it would before with this change in place. Once the user finally finished typing the full annotation: "@-30,20Hello" then it will be rendered at the absolute position requested. --- src/parse/abc_parse_music.js | 49 +++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/src/parse/abc_parse_music.js b/src/parse/abc_parse_music.js index b42a37bd..aad17148 100644 --- a/src/parse/abc_parse_music.js +++ b/src/parse/abc_parse_music.js @@ -615,23 +615,38 @@ var letter_to_chord = function(line, i) { chord[1] = chord[1].substring(1); chord[2] = 'right'; } else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '@') { - // @-15,5.7 - chord[1] = chord[1].substring(1); - var x = tokenizer.getFloat(chord[1]); - if (x.digits === 0) - warn("Missing first position in absolutely positioned annotation.", line , i); - chord[1] = chord[1].substring(x.digits); - if (chord[1][0] !== ',') - warn("Missing comma absolutely positioned annotation.", line , i); - chord[1] = chord[1].substring(1); - var y = tokenizer.getFloat(chord[1]); - if (y.digits === 0) - warn("Missing second position in absolutely positioned annotation.", line , i); - chord[1] = chord[1].substring(y.digits); - var ws = tokenizer.skipWhiteSpace(chord[1]); - chord[1] = chord[1].substring(ws); - chord[2] = null; - chord[3] = { x: x.value, y: y.value }; + // @-15,5.7 + chord[1] = chord[1].substring(1); + var x = tokenizer.getFloat(chord[1]); + if (x.digits === 0){ + warn("Missing first position in absolutely positioned annotation.", line, i); + chord[1] = chord[1].replace("@",""); + chord[2] = 'above'; + return chord; + } + chord[1] = chord[1].substring(x.digits); + if (chord[1][0] !== ','){ + warn("Missing comma absolutely positioned annotation.", line, i); + chord[1] = chord[1].replace("@",""); + chord[2] = 'above'; + return chord; + } + chord[1] = chord[1].substring(1); + var y = tokenizer.getFloat(chord[1]); + if (y.digits === 0){ + warn("Missing second position in absolutely positioned annotation.", line, i); + chord[1] = chord[1].replace("@",""); + chord[2] = 'above'; + return chord; + } + chord[1] = chord[1].substring(y.digits); + var ws = tokenizer.skipWhiteSpace(chord[1]); + chord[1] = chord[1].substring(ws); + chord[2] = null; + chord[3] = { + x: x.value, + y: y.value + }; } else { if (multilineVars.freegchord !== true) { chord[1] = chord[1].replace(/([ABCDEFG0-9])b/g, "$1♭"); From 4932fbfc6ea7f6066ea641a9e897da182bdc91ba Mon Sep 17 00:00:00 2001 From: paulrosen Date: Wed, 11 Sep 2024 13:31:10 -0400 Subject: [PATCH 06/10] upgrade node --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41f7a5b2..a7754c5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM node:16.16.0 +FROM node:20.14.0 RUN npm install -g npm@8.19.2 RUN mkdir /srv/app && chown node:node /srv/app -USER node +# USER node WORKDIR /srv/app From 10d349ba7b8795071bd9d97f6084abe00103525f Mon Sep 17 00:00:00 2001 From: paulrosen Date: Wed, 11 Sep 2024 13:32:32 -0400 Subject: [PATCH 07/10] upgrade copyright --- LICENSE.md | 2 +- index.js | 2 +- license.js | 2 +- plugin.js | 2 +- test.js | 2 +- webpack.config.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 16d4a7b4..ad3b9393 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/index.js b/index.js index 7552c52b..ffdd120a 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/license.js b/license.js index f6738fd8..71d445c3 100644 --- a/license.js +++ b/license.js @@ -1,5 +1,5 @@ /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/plugin.js b/plugin.js index 7f3d49c5..7f8ed337 100644 --- a/plugin.js +++ b/plugin.js @@ -1,5 +1,5 @@ /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/test.js b/test.js index 27ac819e..c6ae1375 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/webpack.config.js b/webpack.config.js index 63015e9c..5ecb2253 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -65,6 +65,6 @@ module.exports = (env = {} , argv) => { }; function makeBanner(type) { - let banner = `abcjs_${type} v${pkg.version} Copyright © 2009-2023 Paul Rosen and Gregory Dyke (https://abcjs.net) */\n` + let banner = `abcjs_${type} v${pkg.version} Copyright © 2009-2024 Paul Rosen and Gregory Dyke (https://abcjs.net) */\n` return banner + `/*! For license information please see abcjs_${type}.LICENSE`; } From 2503ea459569cc6a1f74ef04916b0abd036fe1af Mon Sep 17 00:00:00 2001 From: paulrosen Date: Wed, 11 Sep 2024 21:42:37 -0400 Subject: [PATCH 08/10] If there is a slur or tie on the top or bottom of a line, make sure there is room for it. --- src/write/creation/elements/tie-element.js | 26 +++++ .../layout/set-upper-and-lower-elements.js | 8 ++ tests/parse/tie-slur.test.js | 95 +++++++++++++------ 3 files changed, 101 insertions(+), 28 deletions(-) diff --git a/src/write/creation/elements/tie-element.js b/src/write/creation/elements/tie-element.js index 8d86b95f..7ef8615e 100644 --- a/src/write/creation/elements/tie-element.js +++ b/src/write/creation/elements/tie-element.js @@ -225,4 +225,30 @@ TieElem.prototype.avoidCollisionAbove = function () { } }; +TieElem.prototype.getYBounds = function () { + var lineStartX = 10 // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much + var lineEndX = 1000 // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much + if (this.isTie) { + this.calcTieDirection(); + this.calcX(lineStartX, lineEndX); + this.calcTieY(); + + } else { + this.calcSlurDirection(); + this.calcX(lineStartX, lineEndX); + this.calcSlurY(); + } + var top; + var bottom; + // TODO-PER: It's hard to tell how far the arc is, so I'm just using 3 as the max + if (this.above) { + bottom = Math.min(this.startY, this.endY) + top = bottom + 3 + } else { + top = Math.min(this.startY, this.endY) + bottom = top - 3 + } + return [ top, bottom ] +}; + module.exports = TieElem; diff --git a/src/write/layout/set-upper-and-lower-elements.js b/src/write/layout/set-upper-and-lower-elements.js index 54b87b1e..822f7eba 100644 --- a/src/write/layout/set-upper-and-lower-elements.js +++ b/src/write/layout/set-upper-and-lower-elements.js @@ -128,6 +128,14 @@ function setUpperAndLowerVoiceElements(positionY, voice, spacing) { case 'EndingElem': setUpperAndLowerEndingElements(positionY, abselem); break; + case 'TieElem': + // If a tie element is the highest or lowest thing then space might need to make room for it. + var yBounds = abselem.getYBounds() + voice.staff.top = Math.max(voice.staff.top, yBounds[0]) + voice.staff.top = Math.max(voice.staff.top, yBounds[1]) + voice.staff.bottom = Math.min(voice.staff.bottom, yBounds[0]) + voice.staff.bottom = Math.min(voice.staff.bottom, yBounds[1]) + break; } } } diff --git a/tests/parse/tie-slur.test.js b/tests/parse/tie-slur.test.js index 70dca298..dc8ec61a 100644 --- a/tests/parse/tie-slur.test.js +++ b/tests/parse/tie-slur.test.js @@ -32,20 +32,20 @@ describe("Tie Slur", function () { "[V:B1] [ce]8-|\n" + "[ce]8||\n" - var expectedMultipartChordTie = [ - {line: 0, staff: 0, startTie: {}, endTie: undefined}, - {line: 0, staff: 0, startTie: {}, endTie: undefined}, - {line: 0, staff: 1, startTie: {}, endTie: undefined}, - {line: 0, staff: 1, startTie: {}, endTie: undefined}, - {line: 1, staff: 0, startTie: {}, endTie: true}, - {line: 1, staff: 0, startTie: {}, endTie: true}, - {line: 1, staff: 1, startTie: {}, endTie: true}, - {line: 1, staff: 1, startTie: {}, endTie: true}, - {line: 2, staff: 0, startTie: undefined, endTie: true}, - {line: 2, staff: 0, startTie: undefined, endTie: true}, - {line: 2, staff: 1, startTie: undefined, endTie: true}, - {line: 2, staff: 1, startTie: undefined, endTie: true}, - ] + var expectedMultipartChordTie = [ + {line: 0, staff: 0, startTie: {}, endTie: undefined}, + {line: 0, staff: 0, startTie: {}, endTie: undefined}, + {line: 0, staff: 1, startTie: {}, endTie: undefined}, + {line: 0, staff: 1, startTie: {}, endTie: undefined}, + {line: 1, staff: 0, startTie: {}, endTie: true}, + {line: 1, staff: 0, startTie: {}, endTie: true}, + {line: 1, staff: 1, startTie: {}, endTie: true}, + {line: 1, staff: 1, startTie: {}, endTie: true}, + {line: 2, staff: 0, startTie: undefined, endTie: true}, + {line: 2, staff: 0, startTie: undefined, endTie: true}, + {line: 2, staff: 1, startTie: undefined, endTie: true}, + {line: 2, staff: 1, startTie: undefined, endTie: true}, + ] var abcMultipartOneStaffChordTie = "X:1\n" + @@ -60,20 +60,42 @@ describe("Tie Slur", function () { "[V:B1] [ce]8-|\n" + "[ce]8||\n" - var expectedMultipartOneStaffChordTie = [ - {line: 0, staff: 0, startTie: {}, endTie: undefined}, - {line: 0, staff: 0, startTie: {}, endTie: undefined}, - {line: 0, staff: 0, startTie: {}, endTie: undefined}, - {line: 0, staff: 0, startTie: {}, endTie: undefined}, - {line: 1, staff: 0, startTie: {}, endTie: true}, - {line: 1, staff: 0, startTie: {}, endTie: true}, - {line: 1, staff: 0, startTie: {}, endTie: true}, - {line: 1, staff: 0, startTie: {}, endTie: true}, - {line: 2, staff: 0, startTie: undefined, endTie: true}, - {line: 2, staff: 0, startTie: undefined, endTie: true}, - {line: 2, staff: 0, startTie: undefined, endTie: true}, - {line: 2, staff: 0, startTie: undefined, endTie: true}, - ] + var expectedMultipartOneStaffChordTie = [ + {line: 0, staff: 0, startTie: {}, endTie: undefined}, + {line: 0, staff: 0, startTie: {}, endTie: undefined}, + {line: 0, staff: 0, startTie: {}, endTie: undefined}, + {line: 0, staff: 0, startTie: {}, endTie: undefined}, + {line: 1, staff: 0, startTie: {}, endTie: true}, + {line: 1, staff: 0, startTie: {}, endTie: true}, + {line: 1, staff: 0, startTie: {}, endTie: true}, + {line: 1, staff: 0, startTie: {}, endTie: true}, + {line: 2, staff: 0, startTie: undefined, endTie: true}, + {line: 2, staff: 0, startTie: undefined, endTie: true}, + {line: 2, staff: 0, startTie: undefined, endTie: true}, + {line: 2, staff: 0, startTie: undefined, endTie: true}, + ] + + var abcMultipartTieHeight = + "X:1\n" + + "%%stretchlast 1\n" + + "L:1/8\n" + + "M:4/4\n" + + "K:D\n" + + "%%score (S A) (T B)\n" + + "V:S clef=treble middle=B stem=up\n" + + "V:A clef=treble middle=B stem=down\n" + + "V:T clef=bass,, stem=up\n" + + "V:B clef=bass,, stem=down\n" + + "[V:S]\n" + + "F2|F2 EF G2 E2|C6||\n" + + "[V:A]\n" + + "D2|D2 C=C B,2 B,2|A,6||\n" + + "[V:T]\n" + + "A,2|A,2(G,A,)G,2G,2|G,6||\n" + + "[V:B]\n" + + "D,2|D,2A,,A,,G,,2G,,2|A,,6||\n" + + var expectedMultipartTieHeight = [ 14, 20 ] it('multipart-tie', function() { doParseTest(abcMultipartTie, expectedMultipartTie) @@ -87,6 +109,23 @@ describe("Tie Slur", function () { doParseTest(abcMultipartOneStaffChordTie, expectedMultipartOneStaffChordTie) }) + it('multipart-tie-height', function() { + doHeightTest(abcMultipartTieHeight, expectedMultipartTieHeight) + }) + + function doHeightTest(abc, expected) { + var visualObj = abcjs.renderAbc("paper", abc, {}); + var actual = [] + for (var i = 0; i < visualObj[0].lines.length; i++) { + var line = visualObj[0].lines[i] + for (var j = 0; j < line.staffGroup.staffs.length; j++) { + var staff = line.staffGroup.staffs[j] + actual.push(Math.round(staff.top)) + } + } + chai.assert.deepStrictEqual(actual, expected); + } + function doParseTest(abc, expected) { var visualObj = abcjs.renderAbc("paper", abc, {}); var actual = [] From bafca35d789a4d8475699762696e6eb5ece7490f Mon Sep 17 00:00:00 2001 From: paulrosen Date: Sat, 14 Sep 2024 10:26:54 -0400 Subject: [PATCH 09/10] Prepare 6.4.3 --- RELEASE.md | 12 +++ dist/abcjs-basic-min.js | 4 +- dist/abcjs-basic-min.js.LICENSE | 2 +- dist/abcjs-basic.js | 142 ++++++++++++++----------------- dist/abcjs-basic.js.map | 2 +- dist/abcjs-plugin-min.js | 4 +- dist/abcjs-plugin-min.js.LICENSE | 2 +- 7 files changed, 81 insertions(+), 87 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index a5cd5006..9a03b234 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,15 @@ +# Version 6.4.3 + +## Bugs + +* If there is a slur or tie on the top or bottom of a line, make sure there is room for it. + +* Fix for crash on malformed @ positioned annotations + +* Fix call of getBpm() to use the specified tempo if it isn't supplied. + +* Bring bass note in range if transposed out-of-range by a visual transpose + # Version 6.4.2 ## Bugs diff --git a/dist/abcjs-basic-min.js b/dist/abcjs-basic-min.js index a6e4c842..257d0e7f 100644 --- a/dist/abcjs-basic-min.js +++ b/dist/abcjs-basic-min.js @@ -1,3 +1,3 @@ -/*! abcjs_basic v6.4.2 Copyright © 2009-2023 Paul Rosen and Gregory Dyke (https://abcjs.net) */ +/*! abcjs_basic v6.4.3 Copyright © 2009-2024 Paul Rosen and Gregory Dyke (https://abcjs.net) */ /*! For license information please see abcjs_basic.LICENSE */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={1045:function(e,t,r){var n=r(1185),a=r(6306),i=r(1592),s=r(1028),o=r(5633),c={};c.signature="abcjs-basic v"+n,Object.keys(a).forEach((function(e){c[e]=a[e]})),Object.keys(i).forEach((function(e){c[e]=i[e]})),c.renderAbc=r(6859),c.tuneMetrics=r(9989),c.TimingCallbacks=r(5681);var l=r(6020);c.setGlyph=l.setSymbol,c.strTranspose=o;var h=r(5594),u=r(8471),d=r(522),f=r(2029),p=r(6313),m=r(5281),g=r(8702),v=r(5049),b=r(4718),y=r(3450),x=r(562),k=r(9991);c.synth={CreateSynth:h,instrumentIndexToName:u,pitchToNoteName:d,SynthController:y,SynthSequence:f,CreateSynthControl:p,registerAudioContext:m,activeAudioContext:g,supportsAudio:v,playEvent:b,getMidiFile:x,sequence:s,midiRenderer:k},c.Editor=r(5294),c.EditArea=r(2945),e.exports=c},6306:function(e,t,r){var n=r(5681),a={};!function(){"use strict";var e,t;a.startAnimation=function(r,a,i){function s(e){for(var t=0;tr.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds=r.lastMoment)if(r.eventCallback){var s=r.eventCallback(null);r.shouldStop(s).then((function(e){e&&r.stop()}))}else r.stop()}},r.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},r.doBeatCallback=function(e){if(r.beatCallback){for(var t,n,a=r.currentEvent;a=0&&null===r.noteTimings[a].left;)a--;n=r.noteTimings[a]}var i={},s={};if(n){i.top=n.top,i.height=n.height;var o=Math.max(0,e-r.startTime-n.milliseconds),c=t-n.milliseconds,l=n.endX-n.left,h=c?o*l/c:0;i.left=n.left+h,0===r.currentEvent&&n.milliseconds>e-r.startTime&&(i.left=void 0),s={timestamp:e,startTime:r.startTime,ev:n,endMs:t,offMs:o,offPx:h,gapMs:c,gapPx:l}}else s={timestamp:e,startTime:r.startTime};var u=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,i,s),u!==r.startTime)return e-r.startTime;r.currentBeat++}return null},r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,60))},r.start=function(e,t){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,void 0===e&&(r.justUnpaused=!0)),e)r.setProgress(e,t);else if(0===e)r.reset();else if(null!==r.pausedPercent){var n=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=n-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,60)},r.pause=function(){r.isPaused=!0;var e=performance.now();r.pausedPercent=(e-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(e,t){var n;switch(t){case"seconds":r.currentTime=1e3*e,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=e*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;default:(n=e)<0&&(n=0),n>1&&(n=1),r.currentTime=r.lastMoment*n}r.isRunning||(r.pausedPercent=n);var a=performance.now();for(r.startTime=a-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation=0&&"event"===r.noteTimings[r.currentEvent].type&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,60)}}},1592:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=r(8905),i=r(9565),s=r(2426),o={};!function(){"use strict";o.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=o.TuneBook=function(e){var t=i(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t=0&&h0,v=0;v=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:i.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=o},6859:function(e,t,r){var n=r(1592),a=(r(6780),r(5253)),i=r(8905),s=r(1756),o={};function c(){var e=window.innerWidth;for(var t in o)if(o.hasOwnProperty(t)){var r=o[t];e-=2*r.offsetLeft,r.style.width=e+"px"}}try{window.addEventListener("resize",c),window.addEventListener("orientationChange",c)}catch(e){}function l(e,t,r,n,i){r.viewportHorizontal?(e.innerHTML='
',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",o[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='
',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var s=new a(e,r);s.engraveABC(t,n,i),t.engraver=s,(r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}e.exports=function(e,t,r,o,c){var h,u={};if(r){for(h in r)r.hasOwnProperty(h)&&(u[h]=r[h]);u.warnings_id&&u.tablature&&(u.tablature.warning_id=u.warnings_id)}if(o)for(h in o)o.hasOwnProperty(h)&&("listener"===h?o[h].highlight&&(u.clickListener=o[h].highlight):u[h]=o[h]);if(c)for(h in c)c.hasOwnProperty(h)&&(u[h]=c[h]);return n.renderEngine((function(e,t,r,n){var o=!1;return"*"===e&&(o=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),!o&&u.wrap&&u.staffwidth?(t=function(e,t,r,n,o){var c=new a(e,o).getMeasureWidths(t),h=s.calcLineWraps(t,c,o);if(h.reParse){var u=new i;u.parse(n,h.revisedParams),t=u.getTune();var d=u.getWarnings();d&&(t.warnings=d)}return o.afterParsing&&o.afterParsing(t,r,n),l(e,t,h.revisedParams,r,0),t.explanation=h.explanation,t}(e,t,r,n,u),t):(u.afterParsing&&u.afterParsing(t,r,n),l(e,t,u,r,0),o&&e.parentNode.removeChild(e),null)}),e,t,u)}},9989:function(e,t,r){var n=r(1592),a=r(5253);e.exports=function(e,t){return n.renderEngine((function(e,r,n,i){(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e);var s=new a(e,t).getMeasureWidths(r);return e.parentNode.removeChild(e),{sections:s}}),"*",e,t)}},9447:function(e,t,r){var n=r(4914).relativeMajor,a={acc:"sharp",note:"f"},i={acc:"sharp",note:"c"},s={acc:"sharp",note:"g"},o={acc:"sharp",note:"d"},c={acc:"sharp",note:"A"},l={acc:"sharp",note:"e"},h={acc:"flat",note:"B"},u={acc:"flat",note:"e"},d={acc:"flat",note:"A"},f={acc:"flat",note:"d"},p={acc:"flat",note:"G"},m={acc:"flat",note:"c"},g={"C#":[a,i,s,o,c,l,{acc:"sharp",note:"B"}],"F#":[a,i,s,o,c,l],B:[a,i,s,o,c],E:[a,i,s,o],A:[a,i,s],D:[a,i],G:[a],C:[],F:[h],Bb:[h,u],Eb:[h,u,d],Cm:[h,u,d],Ab:[h,u,d,f],Db:[h,u,d,f,p],Gb:[h,u,d,f,p,m],Cb:[h,u,d,f,p,m,{acc:"flat",note:"F"}],"A#":[h,u],"B#":[],"D#":[h,u,d],"E#":[h],"G#":[h,u,d,f],none:[]};e.exports=function(e){var t=g[n(e)];return t?JSON.parse(JSON.stringify(t)):null}},4914:function(e){var t={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=null;e.exports={relativeMajor:function(e){r||function(){r={};for(var e=Object.keys(t),n=0;n=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;ee)return c}}return null},this.addElementToEvents=function(e,t,r,a,i,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f0)for(var s=i.staffs[0],o=s.absoluteY,c=o-s.top*a.STEP,l=i.staffs[i.staffs.length-1],h=(o=l.absoluteY)-l.bottom*a.STEP-c,u=i.voices,d=0;d0&&o["event"+p]&&(w="event"+p),p=Math.round(1e3*f),"bar"===C.type){var S=C.abcelem.type,_="bar_right_repeat"===S||"bar_dbl_repeat"===S,E="1"===C.abcelem.startEnding,M="bar_left_repeat"===S||"bar_dbl_repeat"===S||"bar_right_repeat"===S;if(_){x>0&&(o[w].endX=C.x),-1===g&&(g=x);var A=0;y=-1;for(var N=m;N=0;i--){var s=e[i];"bar"===s.type?(s.top=n,s.nextTop=t,t=n,s.bottom=a,s.nextBottom=r,r=a):"event"===s.type&&(n=s.top,a=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(e,r){if(!(r.length<1)){for(var n=0;na.left&&(a.endX=Math.min(a.endX,s)):a.endX=s}}var o=r[r.length-1];o.endX=e[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:u}),this.addUsefulCallbackInfo(s,b*a),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),n=0;n0?e.duration[0]:r)/r}if(!t){t=180;var n=this.getMeterFraction();n&&3!==n.num&&n.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var r=this.metaText?this.metaText.tempo:null,n=this.getBpm(r),a=1;e?r&&(a=e/n):e=n;var i=this.getBeatLength(),s=e/60,o=this.getBarLength()/i*t/s;o&&(o-=this.getPickupLength()/i/s);var c=i*s;return this.noteTimings=this.setupEvents(o,c,e,a),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=i(this,e);return s(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return o(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(e,t)||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(e,t){return e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),e},this.setReadOnly=function(e){var t="abc_textarea_readonly",r=this.editarea.getElem();e?(r.setAttribute("readonly","yes"),this.addClassName(r,t)):(r.removeAttribute("readonly"),this.removeClassName(r,t))}};c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new a,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}},c.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=s(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi()}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("
"):"No errors"),this.updateSelection(),this.bReentry=!1}},c.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},c.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}},c.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},c.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(e){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(e){if(void 0!==this.indicate_changed){var t,r,a="abc_textarea_dirty",i=this.editarea.getElem();e?function(e,t){var r=e.className;return r.length>0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(t=i,r=a)||(t.className+=(t.className?" ":"")+r):function(e,t){e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," "))}(i,a)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(e,t,r,n,a,i){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,n,a,i)},c.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return this.synth&&this.synth.synthControl&&this.synth.synthControl.visualObj?this.synth.synthControl.visualObj.millisecondsPerMeasure():0},c.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},e.exports=c},3284:function(e,t,r){var n,a=r(9991);!function(){"use strict";function e(e,t,r){for(var n=Object.keys(t),a=0;ai){var c=(n[s]-i)*r;e.addRest(c),i=n[s]}for(var l=0;l128&&(s=s.substring(0,124)+"...");var o=t.getKeySignature(),c=t.getMeterFraction(),l=n.tempo,h=l/60;8==c.den&&(h=(l=6e4/(t.millisecondsPerMeasure()/c.num)/2)/60),i.setGlobalInfo(l,s,o,c);for(var u=0;uu&&(m=r.pan[u]),128===p.instrument?(i.setChannel(9,m),i.setInstrument(0)):(i.setChannel(p.channel,m),i.setInstrument(p.instrument));break;case"note":var g=p.gap*h,v=p.start,b=v+p.duration-g;d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:p.volume,cents:p.cents}),d[b]||(d[b]=[]),d[b].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}e(i,d,1920),i.endTrack()}return i.getData()}}(),e.exports=n},5008:function(e){var t={cloneArray:function(e){for(var t=[],r=0;r=0&&e.lastIndexOf(t)===r},last:function(e){return 0===e.length?null:e[e.length-1]}};e.exports=t},8905:function(e,t,r){var n=r(5008),a=r(8360),i=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),u="",d="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,metaTextInfo:t.metaTextInfo,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline,findSelectableElement:t.findSelectableElement,getSelectableArray:t.getSelectableArray};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e/g,">")},y=function(t,r,n){r||(r=" ");var a=r[n];" "!==a&&a||(a="SPACE");var i,s=b(r.substring(n-64,n))+''+a+""+b(r.substring(n+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(n+1)+": "+t+": "+s),i={message:t,line:r,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(i)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var x=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(o=o.replace(/\\([-_*|~])/g,"$1"),i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=!1,l=0;l0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":c||(o(l),a.push({skip:!0,to:"slur"}));break;case"*":c||(o(l),a.push({skip:!0,to:"next"}));break;case"|":c||(o(l),a.push({skip:!0,to:"bar"}));break;case"~":c||(s=!0)}c="\\"===r[l]}t.forEach((function(e){if(0!==a.length)if(a[0].skip){switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":o(c),a.push({skip:!0,to:"slur"});break;case"*":o(c),a.push({skip:!0,to:"next"});break;case"|":o(c),a.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==a.length)if(a[0].skip)switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},w=function(e){if(n.startsWith(e,"%%")){var t=a.addDirective(e.substring(2));t&&y(t,e,2)}else{var i=e.indexOf("%");if(i>=0&&(e=e.substring(0,i)),0!==(e=e.replace(/\s+$/,"")).length)if(u)x(r.getCurrentVoice(),e.substring(2));else if(d)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e[1]||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&x(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function C(e,t){e.push({el_type:"hint"});for(var r=0;r1){for(var b=1;b0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join(" ")}var C=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===n.last(C).length&&C.pop(),e=new o(C,v),m=new i(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&a.globalFormatting(h.format);for(var S=e.nextLine();S;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var _=v.is_in_header;w(S),_&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),S=e.nextLine()}u&&x(r.getCurrentVoice(),""),d&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var E=792,M=612;switch(v.papersize){case"legal":E=1008,M=612;break;case"A4":E=842.4,M=597.6}if(v.landscape){var A=E;E=M,M=A}t.formatting.pagewidth||(t.formatting.pagewidth=M),t.formatting.pageheight||(t.formatting.pageheight=E),h.hint_measures&&function(){for(var e=0;e1&&!n.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(e){n.startsWith(e,"%%")&&(t+=e+"\n")}));var c=t;return o.forEach((function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var a=e.pure.split("T:");a.length>1&&(a=a[1].split("\n"),e.title=n.strip(a[0]));var i=e.pure.substring(2,e.pure.indexOf("\n"));e.id=n.strip(i)})),{header:c,tunes:o}}},8360:function(e,t,r){var n=r(5008),a={};!function(){"use strict";var e,t,r,i,s;a.initialize=function(n,a,o,c,l){e=n,t=a,i=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,n,a,i){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[i]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",n,a),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",n,a),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",n,a)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",n,a):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",n,a):c=g.token:t("Expected font size in font definition.",n,a),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"finished":t('Extra characters found after "box" in font definition.',n,a)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",n,a),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",n,a),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],n,0,e),r.is_in_header&&(i.formatting[e]=r[e]),null)},h=function(e,t){var r="";t.forEach((function(e){r+=e.token}));var n=parseFloat(r);if(isNaN(n)||0===n)return'Directive "'+e+'" requires a number as a parameter.';i.formatting.scale=n},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,a,i){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=n[0].intt;return void 0!==a&&si?'Directive "'+t+'" requires a number less than or equal to '+i+" as a parameter.":(r[e]=s,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return r[e]="true"===n[0].token,null;var a=d(e,t,n,0,1);return null!==a?a:(r[e]=1===r[e],null)},p=function(e,t,n,a){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+a.join(", ")+" ] as a parameter.";for(var i=n[0].token,s=!1,o=0;!s&&o1&&r.setfont){var n=[];""!==t[0]&&n.push({text:t[0]});for(var a=1;a=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}a.addDirective=function(o){var M=e.tokenize(o,0,o.length);if(0===M.length||"alpha"!==M[0].type)return null;var A=o.substring(o.indexOf(M[0].token)+M[0].token.length);A=e.stripComment(A);var N,B=M.shift().token.toLowerCase(),P="";switch(B){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=A;break;case"graceslurs":if(1!==M.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===M[0].token||"false"===M[0].token)i.formatting.graceSlurs=!1;else{if("1"!==M[0].token&&"true"!==M[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+M[0].token+")";i.formatting.graceSlurs=!0}break;case"lineThickness":var L=E(M);if(void 0!==L.value&&(i.formatting.lineThickness=L.value),L.error)return L.error;break;case"stretchlast":var O=E(M);if(void 0!==O.value&&(i.formatting.stretchlast=O.value),O.error)return O.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",B,M,_);case"dynamic":return p("dynamicPosition",B,M,_);case"gchord":return p("chordPosition",B,M,_);case"ornament":return p("ornamentPosition",B,M,_);case"volume":return p("volumePosition",B,M,_);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(i.formatting[t]=n.value,null)}(B,M);case"voicescale":if(1!==M.length||"number"!==M[0].type)return"voicescale requires one float as a parameter";var H=M.shift();return r.currentVoice&&(r.currentVoice.scale=H.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(1!==M.length)return"voicecolor requires one string as a parameter";var z=M.shift();return r.currentVoice&&(r.currentVoice.color=z.token,s.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var F=Math.round(function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:n.value}(B,M));return F.error?F.error:(s.addSpacing(F),null);case"scale":h(B,M);break;case"sep":if(0===M.length)s.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var D=e.getMeasurement(M);if(0===D.used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var j=D.value;if(0===(D=e.getMeasurement(M)).used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var I=D.value;if(0===(D=e.getMeasurement(M)).used||0!==M.length)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var V=D.value;s.addSeparator(j,I,V,{startChar:r.iChar,endChar:r.iChar+A.length})}break;case"barsperstaff":if(null!==(P=d("barsperstaff",B,M)))return P;break;case"staffnonote":if(1!==M.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===M[0].token)r.staffnonote=!0;else{if("1"!==M[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+M[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(P=f("printTempo",B,M)))return P;break;case"partsbox":if(null!==(P=f("partsBox",B,M)))return P;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(P=f("freegchord",B,M)))return P;break;case"measurenb":case"barnumbers":if(null!==(P=d("barNumbers",B,M)))return P;break;case"setbarnb":if(1!==M.length||"number"!==M[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(M[0].intt);break;case"begintext":var Y="";for(N=e.nextLine();N&&0!==N.indexOf("%%endtext");)n.startsWith(N,"%%")?Y+=N.substring(2)+"\n":Y+=N+"\n",N=e.nextLine();s.addText(Y,{startChar:r.iChar,endChar:r.iChar+Y.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(N=e.nextLine();N&&0!==N.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":A.length>0&&r.ignoredDecorations.push(A.substring(0,A.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var G=e.translateString(A);s.addText(a.parseFontChangeLine(G),{startChar:r.iChar,endChar:r.iChar+A.length+7});break;case"center":var q=e.translateString(A);s.addCentered(a.parseFontChangeLine(q));break;case"font":break;case"setfont":var W=e.tokenize(A,0,A.length);if(W.length>=4&&"-"===W[0].token&&"number"===W[1].type){var R=parseInt(W[1].token);R>=1&&R<=9&&(r.setfont||(r.setfont=[]),W.shift(),W.shift(),r.setfont[R]=c(W,r.setfont[R],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(B,M,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(i.formatting[e]=c(t,i.formatting[e],r,0,e),null)}(B,M,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",M,o);case"staves":case"score":r.score_is_present=!0;for(var X,U=function(e,t,a,i,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=n.last(r.staves);void 0!==a&&void 0===o.bracket&&(o.bracket=a),void 0!==i&&void 0===o.brace&&(o.brace=i),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},K=!1,$=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,re=function(){if(te=!0,X){var e="start";X.staffNum>0&&("start"!==r.staves[X.staffNum-1].connectBarLines&&"continue"!==r.staves[X.staffNum-1].connectBarLines||(e="continue")),r.staves[X.staffNum].connectBarLines=e}};M.length;){var ne=M.shift();switch(ne.token){case"(":K?t("Can't nest parenthesis in %%score",o,ne.start):(K=!0,J=!0);break;case")":!K||J?t("Unexpected close parenthesis in %%score",o,ne.start):K=!1;break;case"[":$?t("Can't nest brackets in %%score",o,ne.start):($=!0,Z=!0);break;case"]":!$||Z?t("Unexpected close bracket in %%score",o,ne.start):($=!1,r.staves[X.staffNum].bracket="end");break;case"{":Q?t("Can't nest braces in %%score",o,ne.start):(Q=!0,ee=!0);break;case"}":!Q||ee?t("Unexpected close brace in %%score",o,ne.start):(Q=!1,r.staves[X.staffNum].brace="end");break;case"|":re();break;default:for(var ae="";("alpha"===ne.type||"number"===ne.type)&&(ae+=ne.token,ne.continueId);)ne=M.shift();U(ae,!K||J,Z?"start":$?"continue":void 0,ee?"start":Q?"continue":void 0,te),J=!1,Z=!1,ee=!1,te=!1,X=r.voices[ae],"staves"===B&&re()}}break;case"newpage":var ie=e.getInt(A);s.addNewPage(0===ie.digits?-1:ie.value);break;case"abc":var se=A.split(" ");switch(se[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var oe=se.shift();s.addMetaText(B+oe,se.join(" "),{startChar:r.iChar,endChar:r.iChar+A.length+5});break;default:return"Unknown directive: "+B+se[0]}break;case"header":case"footer":var ce=e.getMeat(A,0,A.length);'"'===(ce=A.substring(ce.start,ce.end))[0]&&'"'===ce[ce.length-1]&&(ce=ce.substring(1,ce.length-1));var le=ce.split("\t"),he={};he=1===le.length?{left:"",center:le[0],right:""}:2===le.length?{left:le[0],center:le[1],right:""}:{left:le[0],center:le[1],right:le[2]},le.length>3&&t("Too many tabs in "+B+": "+le.length+" found.",A,0),s.addMetaTextObj(B,he,{startChar:r.iChar,endChar:r.iChar+o.length});break;case"midi":var ue=e.tokenize(A,0,A.length,!0);ue.length>0&&"="===ue[0].token&&ue.shift(),0===ue.length?t("Expected midi command",A,0):function(e,r,n){var a=e.shift().token,i=[];if(m.indexOf(a)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+a,n,0);else if(g.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):i.push(e[0].token);else if(v.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+a,n,0):i.push(e[0].intt);else if(b.indexOf(a)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+a,n,0):(i.push(e[0].intt),2===e.length&&i.push(e[1].intt));else if(y.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt));else if(w.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+a,n,0):(i.push(e[0].token),i.push(e[1].intt));else if("drummap"===a)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,i=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,i=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+a,n,0);else if(C.indexOf(a)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[2].intt));else if(x.indexOf(a)>=0)4!==e.length?t("Expected four parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt));else if(k.indexOf(a)>=0)5!==e.length?t("Expected five parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt),i.push(e[4].intt));else if(b.indexOf(a)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+a,n,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+a,n,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+a,n,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+a,n,0)):(i.push(e[0].intt),4===e.length&&i.push(e[3].intt));else if(T.indexOf(a)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else{var o=e.shift();for(i.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+a,n,0),i.push(o.intt)}else if(S.indexOf(a)>=0)if(1!==e.length&&2!==e.length)t("Expected one or two parameters in MIDI "+a,n,0);else if("number"!==e[0].type)t("Expected integer parameter in MIDI "+a,n,0);else if(2===e.length&&"alpha"!==e[1].type)t("Expected alpha parameter in MIDI "+a,n,0);else if(i.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?t("Expected octave value in MIDI"+a):(c<-1&&(t("Expected octave= in MIDI "+a+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(t("Expected octave= in MIDI "+a+" to be <= 3 (recv:"+c+")"),c=3),i.push(c))):t("Expected octave= in MIDI"+a)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:a,params:i}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[a]=i)}(ue,i,A);break;case"percmap":var de=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],n=parseInt(t[1],10);if((isNaN(n)||n<35||n>81)&&t[1]&&(n=u.indexOf(t[1].toLowerCase())+35),isNaN(n)||n<35||n>81)return{error:'Expected drum name, received "'+t[1]+'"'};var a={sound:n};return 3===t.length&&(a.noteHead=t[2]),{key:r,value:a}}(A);de.error?t(de.error,o,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[de.key]=de.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[B]=A;break;default:return"Unknown directive: "+B}return null},a.globalFormatting=function(n){for(var a in n)if(n.hasOwnProperty(a)){var s,o=""+n[a],c=e.tokenize(o,0,o.length);switch(a){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(a,c,o);break;case"scale":h(a,c);break;case"partsbox":null!==(s=f("partsBox",a,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",a,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var u=E(c);if(void 0!==u.value&&(i.formatting.stretchlast=u.value),u.error)return u.error;break;default:t("Formatting directive unrecognized: ",a,0)}}}}(),e.exports=a},9928:function(e,t,r){var n=r(5008),a=r(8360),i=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,n){i.initialize(e,t,r,n,o),a.initialize(e,t,r,n,o)},this.reset(e,t,r,s),this.setTitle=function(e,t){r.hasMainTitle?o.addSubtitle(e,{startChar:r.iChar,endChar:r.iChar+t+2}):(o.addMetaText("title",e,{startChar:r.iChar,endChar:r.iChar+t+2}),r.hasMainTitle=!0)},this.setMeter=function(n){if("C"===(n=e.stripComment(n)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===n.length||"none"===n.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var a=e.tokenize(n,0,n.length);try{var i=function(){var e=function(){var e={value:0,num:""},t=a.shift();for("("===t.token&&(t=a.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===a.length||"/"===a[0].token)return e;if(")"===(t=a.shift()).token){if(0===a.length||"/"===a[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===a.length)throw"Expected top number of meter";t=a.shift()}return e}();if(0===a.length)return e;var t=a.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=a.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===a.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=i();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===a.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,n,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var n=0;n0&&(r.default_length=i/s,r.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(n,a,i,s){try{var o=e.tokenize(n,a,i);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:s+a-2,endChar:s+i},h=!0,u=o.shift();if("quote"===u.type&&(l.preString=u.token,u=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===u.type&&"C"===u.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(u=o.shift()).type&&"="===u.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(u.token)}else{if("number"!==u.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(u.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(u=o.shift()).type||"="!==u.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(u.token)}}else{if("number"!==u.type)throw"Unknown value in Q: field";var d=parseInt(u.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=d;else{if(h=!1,"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(u.token);for(l.duration=[d/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";if(d=parseInt(u.token),"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(u.token),l.duration.push(d/f)}if("punct"!==(u=o.shift()).type&&"="!==u.token)throw"Expected = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(u.token)}}if(0!==o.length&&("quote"===(u=o.shift()).type&&(l.postString=u.token,u=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(l.suppress=!0),{type:h?"delaySet":"immediate",tempo:l}}catch(e){return t(e,n,a),{type:"none"}}},this.letter_to_inline_header=function(n,c,l){var h=!1,u=e.eatWhiteSpace(n,c);if(c+=u,n.length>=c+5&&"["===n[c]&&":"===n[c+2]){var d=n.indexOf("]",c),f=r.iChar+c,p=r.iChar+d+1;switch(n.substring(c,c+3)){case"[I:":var m=a.addDirective(n.substring(c+3,d));return m&&t(m,n,c),[d-c+1+u];case"[M:":var g=this.setMeter(n.substring(c+3,d));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):r.meter=g,[d-c+1+u];case"[K:":var v=i.parseKey(n.substring(c+3,d),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,r.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,i.fixKey(r.clef,r.key)),[d-c+1+u];case"[P:":var b=a.parseFontChangeLine(n.substring(c+3,d));return l||s.lines.length<=s.lineNum?r.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[d-c+1+u];case"[L:":return this.setDefaultLength(n,c+3,d),[d-c+1+u];case"[Q:":if(d>0){var y=this.setTempo(n,c+3,d,r.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):r.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):r.tempoForNextLine=["tempo",f,p,y.tempo]),[d-c+1+u,n[c+1],n.substring(c+3,d)]}break;case"[V:":if(d>0)return h=i.parseVoice(n,c+3,d),[d-c+1+u,n[c+1],n.substring(c+3,d),h];break;case"[r:":return[d-c+1+u]}}return[0]},this.letter_to_body_header=function(e,s){var c=!1;if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var l=a.addDirective(e.substring(s+2));return l&&t(l,e,s),[e.length];case"M:":var h=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&h&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,h),[e.length];case"K:":var u=i.parseKey(e.substring(s+2),o.hasBeginMusic());return u.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),u.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,i.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var d=e.indexOf("",s+2);-1===d&&(d=e.length);var f=this.setTempo(e,s+2,d,r.iChar);return"delaySet"===f.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,f.tempo),[d,e[s],n.strip(e.substring(s+2))];case"V:":return c=i.parseVoice(e,s+2,e.length),[e.length,e[s],n.strip(e.substring(s+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(n){var c=l[n[0]],h=n.length-2,u=e.translateString(e.stripComment(n.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else if(void 0!==c)o.addMetaText(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else{var d=r.iChar,f=d+n.length;switch(n[0]){case"H":for(o.addMetaTextArray("history",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();n&&":"!==n[1];)e.nextLine(),o.addMetaTextArray("history",a.parseFontChangeLine(e.translateString(e.stripComment(n))),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();break;case"K":this.resolveTempo();var p=i.parseKey(n.substring(2),!1);!r.is_in_header&&o.hasBeginMusic()&&(p.foundClef&&o.appendStartingElement("clef",d,f,r.clef),p.foundKey&&o.appendStartingElement("key",d,f,i.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(n,2,n.length);break;case"M":r.origMeter=r.meter=this.setMeter(n.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}):r.partForNextLine={title:u,startChar:d,endChar:f};break;case"Q":var m=this.setTempo(n,2,n.length,r.iChar);"delaySet"===m.type?r.tempo=m.tempo:"immediate"===m.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",d,f,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":r.titlecaps&&(u=u.toUpperCase()),this.setTitle(a.parseFontChangeLine(e.theReverser(u)),h);break;case"U":this.addUserDefinition(n,2,n.length);break;case"V":if(i.parseVoice(n,2,n.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",n,0);break;default:return{regular:!0}}}return{}}}},9708:function(e,t,r){var n=r(8360),a=r(2821),i={};!function(){var e,t,r,s;i.initialize=function(n,a,i,o,c){e=n,t=a,r=i,s=c},i.standardKey=function(e,t,n,i){return a.keySignature(r,e,t,n,i)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var r=o[e];return(r?r.mid:0)+t};i.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},i.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};i.addPosToKey=function(e,t){var r=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),r<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},i.fixKey=function(e,t){var r=Object.assign({},t);return i.addPosToKey(e,r),r};var h=function(e){var t=0,r=e[t++];"^"!==r&&"_"!==r||(r=e[t++]);var n=l[r];for(void 0===n&&(n=6);t0){l.foundKey=!0;var u="",d="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=h.token;if(o.length>0){var p=e.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,u=p.token),o.length>0){var m=e.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,d=m.token)}if(void 0===i.standardKey(f,h.token,u,0))return t("Unsupported key signature: "+f,a,0),l}var g,v=i.deepCopyKey(r.key),b=!s&&r.globalTranspose?-r.globalTranspose:0;if(s&&(g=r.globalTransposeOrigKeySig),r.key=i.deepCopyKey(i.standardKey(f,h.token,u,b)),s&&(r.globalTransposeOrigKeySig=g),r.key.mode=d,v){for(var y,x=0;x0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return t("Expected = after middle",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after middle",a,k.start);break}if(0===o.length)return t("Expected parameter after middle=",a,0),l;var E=e.getPitchFromTokens(o);E.warn&&t(E.warn,a,0),E.position&&(r.clef.verticalPos=E.position-6);break;case"transpose":if(o.shift(),0===o.length)return t("Expected = after transpose",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after transpose",a,k.start);break}if(0===o.length)return t("Expected parameter after transpose=",a,0),l;if("number"!==o[0].type){t("Expected number after transpose",a,o[0].start);break}r.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return t("Expected = after stafflines",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after stafflines",a,k.start);break}if(0===o.length)return t("Expected parameter after stafflines=",a,0),l;if("number"!==o[0].type){t("Expected number after stafflines",a,o[0].start);break}r.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return t("Expected = after staffscale",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after staffscale",a,k.start);break}if(0===o.length)return t("Expected parameter after staffscale=",a,0),l;if("number"!==o[0].type){t("Expected number after staffscale",a,o[0].start);break}r.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return t("Expected = after octave",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after octave",a,k.start);break}if(0===o.length)return t("Expected parameter after octave=",a,0),l;if("number"!==o[0].type){t("Expected number after octave",a,o[0].start);break}r.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return t("Expected = after style",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after style",a,k.start);break}if(0===o.length)return t("Expected parameter after style=",a,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=o[0].token,o.shift();break;default:t("error parsing style element: "+o[0].token,a,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return t("Expected = after clef",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after clef",a,k.start);break}if(0===o.length)return t("Expected parameter after clef=",a,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=o.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":M.token="alto";break;case"F":case"f":M.token="bass";break;case"G":case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,a,M.start)}o.length>0&&"number"===o[0].type&&(M.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(M.token+=o[0].token+o[1].token,o.shift(),o.shift()),r.clef={type:M.token,verticalPos:c(M.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),l.foundClef=!0;break;default:t("Unknown parameter: "+o[0].token,a,o[0].start),o.shift()}return l},i.parseVoice=function(n,a,i){var o=e.getMeat(n,a,i),l=o.start,u=o.end,d=e.getToken(n,l,u);if(0!==d.length){var f=!1;void 0===r.voices[d]&&(r.voices[d]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",n,l)),l+=d.length,l+=e.eatWhiteSpace(n,l);for(var p={startStaff:f},m=function(r){var a=e.getVoiceToken(n,l,u);void 0!==a.warn?t("Expected value for "+r+" in voice: "+a.warn,n,l):void 0!==a.err?t("Expected value for "+r+" in voice: "+a.err,n,l):0===a.token.length&&'"'!==n[l]?t("Expected value for "+r+" in voice",n,l):p[r]=a.token,l+=a.len},g=function(a,i,s){var o=e.getVoiceToken(n,l,u);void 0!==o.warn?t("Expected value for "+i+" in voice: "+o.warn,n,l):void 0!==o.err?t("Expected value for "+i+" in voice: "+o.err,n,l):0===o.token.length&&'"'!==n[l]?t("Expected value for "+i+" in voice",n,l):("number"===s&&(o.token=parseFloat(o.token)),r.voices[a][i]=o.token),l+=o.len},v=function(r,a){var i=e.getVoiceToken(n,l,u);if(void 0!==i.warn)t("Expected value for "+r+" in voice: "+i.warn,n,l);else if(void 0!==i.err)t("Expected value for "+r+" in voice: "+i.err,n,l);else{if(0!==i.token.length||'"'===n[l])return"number"===a&&(i.token=parseFloat(i.token)),i.token;t("Expected value for "+r+" in voice",n,l)}l+=i.len},b=function(a,i){var s=e.getVoiceToken(n,l,u);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+i+" in voice: "+s.warn,n,l);else if(0===s.token.length&&'"'!==n[l])t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[a][i]=o:t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l)}l+=s.len};l0&&(t+=u[0],"V"===u[1]&&this.startNewLine());for(var d=0;t0)t+=p[0],"V"===p[1]&&(l=!0);else{var m;for((!o.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((m=n.eatWhiteSpace(e,t))>0&&(t+=m),t>0&&""===e[t-1]&&(m=c.letter_to_body_header(e,t))[0]>0&&("V"===m[1]&&this.startNewLine(),t=m[0],i.start_new_line=!1),(m=P(e,t))[0]>0&&(t+=m[0]),(m=E(e,t))[0]>0){S.chord||(S.chord=[]);var g=n.translateString(m[1]);g=g.replace(/;/g,"\n");for(var y=!1,x=0;x0&&(S.force_end_beam_last=!0),t+=k}else if((m=-1===v.indexOf(e[t])?B(e,t):[0])[0]>0)null===m[1]?t+10&&(0===m[1].indexOf("style=")?S.style=m[1].substr(6):(void 0===S.decoration&&(S.decoration=[]),"beambr1"===m[1]?S.beambr=1:"beambr2"===m[1]?S.beambr=2:S.decoration.push(m[1]))),t+=m[0];else{if(!((m=M(e,t))[0]>0))break;S.gracenotes=m[1],t+=m[0]}if((m=L(e,t))[0]>0){d=0,void 0!==S.gracenotes&&(S.rest={type:"spacer"},S.duration=.125,i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+t,r+t+m[0],S),i.measureNotEmpty=!0,S={});var w={type:m[1]};0===w.type.length?a("Unknown bar type",e,t):(i.inEnding&&"bar_thin"!==w.type&&(w.endEnding=!0,i.inEnding=!1),m[2]&&(w.startEnding=m[2],i.inEnding&&(w.endEnding=!0),i.inEnding=!0,"bar_right_repeat"===m[1]?i.restoreStartEndingHoldOvers():i.duplicateStartEndingHoldOvers()),void 0!==S.decoration&&(w.decoration=S.decoration),void 0!==S.chord&&(w.chord=S.chord),w.startEnding&&void 0===i.barFirstEndingNum?i.barFirstEndingNum=i.currBarNumber:w.startEnding&&w.endEnding&&i.barFirstEndingNum?i.currBarNumber=i.barFirstEndingNum:w.endEnding&&(i.barFirstEndingNum=void 0),"bar_invisible"!==w.type&&i.measureNotEmpty&&(void 0===i.currentVoice||0===i.currentVoice.staffNum&&0===i.currentVoice.index)&&(i.currBarNumber++,i.barNumbers&&i.currBarNumber%i.barNumbers==0&&(w.barNumber=i.currBarNumber)),i.addFormattingOptions(S,s.formatting,"bar"),o.appendElement("bar",r+f,r+t+m[0],w),i.measureNotEmpty=!1,S={}),t+=m[0]}else if("&"===e[t])(m=A(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,d++);else{if((m=O(e,t)).consumed>0&&(void 0!==m.startSlur&&(S.startSlur=m.startSlur),m.dottedSlur&&(S.dottedSlur=!0),void 0!==m.triplet&&(h>0?a("Can't nest triplets",e,t):(S.startTriplet=m.triplet,S.tripletMultiplier=m.tripletQ/m.triplet,S.tripletR=m.num_notes,h=void 0===m.num_notes?m.triplet:m.num_notes)),t+=m.consumed),"["===e[t]){t++;for(var C=null,D=!1,j=!1;!j;){var I=B(e,t);I[0]>0&&(t+=I[0]);var V=z(e,t,{},!1);if(null!==V&&void 0!==V.pitch)I[0]>0&&0!==I[1].indexOf("style=")&&(void 0===S.decoration&&(S.decoration=[]),S.decoration.push(I[1])),V.end_beam&&(S.end_beam=!0,delete V.end_beam),void 0===S.pitches?(S.duration=V.duration,S.pitches=[V]):S.pitches.push(V),delete V.duration,I[0]>0&&0===I[1].indexOf("style=")&&(S.pitches[S.pitches.length-1].style=I[1].substr(6)),i.inTieChord[S.pitches.length]&&(V.endTie=!0,i.inTieChord[S.pitches.length]=void 0),V.startTie&&(i.inTieChord[S.pitches.length]=!0),t=V.endChar,delete V.endChar;else if(" "===e[t])a("Spaces are not allowed in chords",e,t),t++;else{if(t0&&(!S.rest||"spacer"!==S.rest.type)&&0==--h&&(S.endTriplet=!0);for(var Y=!1;t":case"<":var G=F(e,t);t+=G[0]-1,i.next_note_duration=G[2],C?C*=G[1]:C=G[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var q=n.getFraction(e,t);C=q.value;var W=e[t=q.index];" "===W&&(D=!0),"-"===W||")"===W||" "===W||"<"===W||">"===W?t--:Y=!0;break;case"0":C=0;break;default:Y=!0}Y||t++}}else a("Expected ']' to end the chords",e,t);void 0!==S.pitches&&(null!==C&&(S.duration=S.duration*C,D&&H(S)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S),i.measureNotEmpty=!0,S={}),j=!0}}}else{var R={},X=z(e,t,R,!0);void 0!==R.endTie&&_(i,d,!0),null!==X&&(void 0!==X.pitch?(S.pitches=[{}],void 0!==X.accidental&&(S.pitches[0].accidental=X.accidental),S.pitches[0].pitch=X.pitch,S.pitches[0].name=X.name,(X.midipitch||0===X.midipitch)&&(S.pitches[0].midipitch=X.midipitch),void 0!==X.endSlur&&(S.pitches[0].endSlur=X.endSlur),void 0!==X.endTie&&(S.pitches[0].endTie=X.endTie),void 0!==X.startSlur&&(S.pitches[0].startSlur=X.startSlur),void 0!==S.startSlur&&(S.pitches[0].startSlur=S.startSlur),void 0!==S.dottedSlur&&(S.pitches[0].dottedSlur=!0),void 0!==X.startTie&&(S.pitches[0].startTie=X.startTie),void 0!==S.startTie&&(S.pitches[0].startTie=S.startTie)):(S.rest=X.rest,void 0!==X.endSlur&&(S.endSlur=X.endSlur),void 0!==X.endTie&&(S.rest.endTie=X.endTie),void 0!==X.startSlur&&(S.startSlur=X.startSlur),void 0!==X.startTie&&(S.rest.startTie=X.startTie),void 0!==S.startTie&&(S.rest.startTie=S.startTie)),void 0!==X.chord&&(S.chord=X.chord),void 0!==X.duration&&(S.duration=X.duration),void 0!==X.decoration&&(S.decoration=X.decoration),void 0!==X.graceNotes&&(S.graceNotes=X.graceNotes),delete S.startSlur,delete S.dottedSlur,T(i,d,S)&&(void 0!==S.pitches?S.pitches[0].endTie=!0:"spacer"!==S.rest.type&&(S.rest.endTie=!0),_(i,d,!1)),(X.startTie||S.startTie)&&_(i,d,!0),t=X.endChar,h>0&&(!X.rest||"spacer"!==X.rest.type)&&0==--h&&(S.endTriplet=!0),X.end_beam&&H(S),S.rest&&"rest"===S.rest.type&&1===S.duration&&N(i)<=1&&(S.rest.type="whole",S.duration=N(i)),S.duration<1&&-1===b.indexOf(S.duration)&&0!==S.duration&&(S.rest&&"spacer"===S.rest.type||a("Duration not representable: "+e.substring(f,t),e,t)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S)||(this.startNewLine(),o.appendElement("note",r+f,r+t,S)),i.measureNotEmpty=!0,S={})}t===f&&(" "!==e[t]&&"`"!==e[t]&&a("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||u[0]>0,this.lineContinuation||(S={})}};var _=function(e,t,r){var n=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][n]=r},E=function(e,t){if('"'===e[t]){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||a("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1][0])r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1][0])r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1][0])r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1][0])r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1][0]){r[1]=r[1].substring(1);var s=n.getFloat(r[1]);0===s.digits&&a("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(s.digits),","!==r[1][0]&&a("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var o=n.getFloat(r[1]);0===o.digits&&a("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(o.digits);var c=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==i.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=h.chordName(i,r[1]);return r}return[0,""]},M=function(e,t){if("{"===e[t]){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||a("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o0&&(s[s.length-1].endBeam=!0):a("Unknown character '"+r[1][o]+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function A(e,t){if("&"===e[t]){for(var r=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-r,e.substring(r+1,t)]}return[0]}function N(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var B=function(e,t){var r=i.macros[e[t]];if(void 0!==r)return"!"!==r[0]&&"+"!==r[0]||(r=r.substring(1)),"!"!==r[r.length-1]&&"+"!==r[r.length-1]||(r=r.substring(0,r.length-1)),d.includes(r)?[1,r]:f.includes(r)?("hidden"===i.volumePosition&&(r=""),[1,r]):p.includes(r)?("hidden"===i.dynamicPosition&&(r=""),[1,r]):(i.ignoredDecorations.includes(r)||a("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=n.getBrackettedSubstring(e,t,5);if(s[1].length>1&&("^"===s[1][0]||"_"===s[1][0])&&(s[1]=s[1].substring(1)),d.includes(s[1]))return s;if(f.includes(s[1]))return"hidden"===i.volumePosition&&(s[1]=""),s;if(p.includes(s[1]))return"hidden"===i.dynamicPosition&&(s[1]=""),s;var o=m.findIndex((function(e){return s[1]===e[0]}));return o>=0?(s[1]=m[o][1],s):(o=g.findIndex((function(e){return s[1]===e[0]})))>=0?(s[1]=g[o][1],"hidden"===i.dynamicPosition&&(s[1]=""),s):"!"!==e[t]||1!==s[0]&&"!"===e[t+s[0]-1]?(a("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},P=function(e,t){for(var r=t;n.isWhiteSpace(e[t]);)t++;return[t-r]},L=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return a(r.warn,e,t),[r.len,""];for(var i=0;i="2"&&e[t+1]<="9"?(void 0!==r.triplet?a("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=w[r.triplet],r.num_notes=r.triplet,t+2="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):a("expected number after the two colons after the triplet to mark the duration",e,t):t+3="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):a("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r};C.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};i.partForNextLine.title&&(e.part=i.partForNextLine),e.clef=i.currentVoice&&void 0!==i.staves[i.currentVoice.staffNum].clef?Object.assign({},i.staves[i.currentVoice.staffNum].clef):Object.assign({},i.clef);var t=i.currentVoice?i.currentVoice.scoreTranspose:0;if(e.key=l.standardKey(i.key.root+i.key.acc+i.key.mode,i.key.root,i.key.acc,t),e.key.mode=i.key.mode,i.key.impliedNaturals&&(e.key.impliedNaturals=i.key.impliedNaturals),i.key.explicitAccidentals)for(var r=0;r=0?(r.duration=s.getBarLength(),r.rest.text=1,u="Zduration"):(a&&0!==i.next_note_duration?(r.duration=i.default_length*i.next_note_duration,i.next_note_duration=0,d=!0):r.duration=i.default_length,u="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===u||"duration"===u){var p=n.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index"!==e[t])return r;t--,u="broken_rhythm";break;case">":case"<":if(!l(u))return null;if(!a)return r.endChar=t,r;var g=F(e,t);t+=g[0]-1,i.next_note_duration=g[2],r.duration=g[1]*r.duration,u="end_slur";break;default:return l(u)?(r.endChar=t,r):null}if(++t===e.length)return l(u)?(r.endChar=t,r):null}return null},F=function(e,t){switch(e[t]){case">":return t"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],e.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],e.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",e.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],e.exports.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},e.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},e.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},e.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}},1881:function(e,t,r){var n=r(5008),a=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=e.substring(n,n+3).toLowerCase();switch((a.length>1&&" "===a[1]||"^"===a[1]||"_"===a[1]||"="===a[1])&&(a=a[0]),a){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""}}return{len:0}},this.getClef=function(e,t){var a=e,i=this.skipWhiteSpace(e);if(r(e,i))return{len:0};var s=!1,o=e.substring(i);if(n.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),i+=5),0===o.length&&s)return{len:i+5,warn:"No clef specified: "+a};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(i+=c,o=o.substring(c));var l=null;if(n.startsWith(o,"treble"))l="treble";else if(n.startsWith(o,"bass3"))l="bass3";else if(n.startsWith(o,"bass"))l="bass";else if(n.startsWith(o,"tenor"))l="tenor";else if(n.startsWith(o,"alto2"))l="alto2";else if(n.startsWith(o,"alto1"))l="alto1";else if(n.startsWith(o,"alto"))l="alto";else if(!t&&s&&n.startsWith(o,"none"))l="none";else if(n.startsWith(o,"perc"))l="perc";else if(!t&&s&&n.startsWith(o,"C"))l="tenor";else if(!t&&s&&n.startsWith(o,"F"))l="bass";else{if(t||!s||!n.startsWith(o,"G"))return{len:i+5,warn:"Unknown clef specified: "+a};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:i+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e[t+r];)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=null;switch(e[n]){case"^":case"_":case"=":a=e[n];break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};case"^":case"_":case"/":if(a+=e[n],n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var n=e.indexOf("%",t);for(n>=0&&n="A"&&e<="Z"||e>="a"&&e<="z"},i=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,n){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t=r?{len:1,err:"Missing close quote"}:{len:a-t+1,token:this.translateString(e.substring(n+1,a))}}for(var i=n;i=0?n.strip(e.substring(0,t)):n.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var n=e.shift();if("."===n.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(n=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};n=e.shift()}switch(n.token){case"pt":case"px":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(n),{used:t,value:parseFloat(r)}}};var u=function(e){return e=(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,r,n){for(var a=n||e[t],i=t+1,s=!1;ie.length-1&&(i=e.length-1),[i-t+1,u(e.substring(t+1,i)),!1])}};a.prototype.peekLine=function(){return this.lines[this.lineIndex]},a.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex11&&(f%=12);var p="m"===t[0]?l[f]:c[f],m=p+t,g=i(m);g.length>0&&"flat"===g[0].acc&&(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==h[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==h[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),d?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:n}},s.chordName=function(e,t){return a(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var h=["c","d","e","f","g","a","b"],u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};s.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var a=t.accidental?t.name.substring(1):t.name,i=t.accidental?t.name[0]:"",s=n.pitchIndex(a);t.name=i+n.noteName(s+e.localTransposeVerticalMovement)}if(t.accidental){var o=function(e,t,r,n,a){for(var i=h[(e+49)%7],s=0,o=0;o2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=o[0],t.accidental=d[o[1]],t.name&&(t.name=f[o[1]]+t.name.replace(/[_^=]/g,""))}}},e.exports=s},867:function(e){var t={},r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];t.pitchIndex=function(e){return r.indexOf(e)},t.noteName=function(e){return r[e]},e.exports=t},4208:function(e){var t=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],a=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];e.exports=function(e,i,s,o){if(!i||i%12==0)return e;for(;i<0;)i+=12;i>11&&(i%=12);var c=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return e;var l,h=c[1],u=c[2],d=c[3],f=c[4];return(l=t.indexOf(h))<0&&(l=r.indexOf(h)),l<0&&(l=n.indexOf(h)),l<0&&(l=a.indexOf(h)),l<0||(l+=i,l%=12,e=s?o?a[l]:r[l]:o?n[l]:t[l],u&&(e+=u),d&&((l=t.indexOf(d))<0&&(l=r.indexOf(d)),l<0&&(l=n.indexOf(d)),l<0&&(l=a.indexOf(d)),e+="/",l>=0?(l+=i,l%=12,e+=s?o?a[l]:r[l]:o?n[l]:t[l]):e+=d),f&&(e+=f)),e}},575:function(e,t,r){var n=r(9708);function a(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t0&&o[l].voice.push({el_type:"note",duration:u,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),o[l].voice.push(g)),u=0):"note"===g.el_type?d?o[l].voice.push(g):(u+=g.duration,r[n]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type&&"color"!==g.el_type||o[l].voice.push(g);else{t=!0,d=!0,p=m,o[l].hasOverlay=!0,0===f&&(f=r[n]);for(var v=0;v=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:r[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}o[l].hasOverlay&&0===o[l].snip.length&&o[l].snip.push({start:p,len:h.length-p})}for(l=0;l=0;y--){var x=b.snip[y];s.voices[l].splice(x.start,x.len),s.voices[l].splice(x.start+1,0,{el_type:"stem",direction:"auto"});var k=c(s.voices[l],x.start);s.voices[l].splice(k,0,{el_type:"stem",direction:"up"})}for(y=0;y0&&"bar"!==e[r].el_type;r--);return r}function l(e,t,r,n){var a;n[t]||(n[t]=[]),n[t][r]||(n[t][r]=[]);for(var i=function(e,i,s){if(void 0===n[t][r][s]){for(a=0;a=t&&ot;){if(e[t].staff)return e[t];t++}return null}function d(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function f(e){for(var t=0;t0){if(void 0!==n.voices[0]){for(var a=!1,i=0;i0&&x[x.length-1].barNumber){var w=u(e.lines,b);w&&(w.staff[0].barNumber=x[x.length-1].barNumber),delete x[x.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,i},this.addTieToLastNote=function(t){var r=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var n=t[r];if("note"===n.el_type)return n}return null}(e);return!!(r&&r.pitches&&r.pitches.length>0)&&(r.pitches[0].startTie={},t&&(r.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(n,a,s,o){var c;return o.el_type=n,null!==a&&(o.startChar=a),null!==s&&(o.endChar=s),"note"===n?((c=o).duration?c.duration:0)>=.25||o.force_end_beam_last&&void 0!==e.potentialStartBeam?g(e):o.end_beam&&void 0!==e.potentialStartBeam?void 0===o.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(o,e):g(e):void 0===o.rest&&(void 0===e.potentialStartBeam?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o):g(e),delete o.end_beam,delete o.force_end_beam_last,o.rest&&"invisible"===o.rest.type&&delete o.decoration,!(e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum||(function(e,t,r,n,a){var i=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==r.pitches){var s=i.workingClef.verticalPos;r.pitches.forEach((function(e){e.verticalPos=e.pitch-s}))}if(void 0!==r.gracenotes){var o=i.workingClef.verticalPos;r.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}i.voices.length<=t.voiceNum&&(n[a]||(n[a]={}),y(e,t,n[a])),i.voices[t.voiceNum].push(r)}(t,e,o,r,i),0))},this.appendStartingElement=function(t,r,n,a){var i;d(e),"key"===t&&(i=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var s=Object.assign({},a);if(e.lines[e.lineNum]){var o=e.lines[e.lineNum].staff;if(o){o.length<=e.staffNum&&(o[e.staffNum]={},o[e.staffNum].clef=Object.assign({},o[0].clef),o[e.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[e.staffNum].meter=Object.assign({},o[0].meter)),o[e.staffNum].workingClef=Object.assign({},o[0].workingClef),o[e.staffNum].voices=[[]]),"clef"===t&&(o[e.staffNum].workingClef=s);for(var c=o[e.staffNum].voices[e.voiceNum],l=0;l0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r,n){e.staffNum=t,e.voiceNum=r,i=n;for(var a=0;a0?(r.push(i-1),n.push(Math.round(a-s)),a=s):is&&ds?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(n-t[c]),i.push(a-f),a=f):s=p}i.push(a)}function a(e,t,r,a){for(var i=Math.ceil(e.total/t),s=Math.floor(e.total/i),o=[],c=0;ct&&(s=!0),o%r==r-1&&(o!==e.length-1&&n.push(o),a.push(Math.round(i)),i=0);return{failed:s,totals:a,lineBreaks:n}}e.exports={wrapLines:function(e,t,r){if(t&&0!==e.lines.length){var n=e.deline({lineBreaks:!1}),a=function(e,t){for(var r=[],n=0,a=0,i=0,s=0;s0&&(n[c.line].staff[c.staff].barNumber=s);for(var h=Object.keys(l),u=0;u=0;p--)if("key"===f[p].el_type){a[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){i[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==r&&0===c.staff&&0===c.voice)for(p=0;p0&&p.measureWidths.length<25&&(k=a(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}u.push(y),d.push(b)}var w=function(e,t,r){var n={lineBreaks:e,staffwidth:t};for(var a in r)r.hasOwnProperty(a)&&"wrap"!==a&&"staffwidth"!==a&&(n[a]=r[a]);return{revisedParams:n}}(u,n.staffwidth,n);return w.explanation=d,w.reParse=!0,w}}},5633:function(e,t,r){var n,a=r(9447),i=r(4914),s=i.relativeMajor,o=i.transposeKey,c=i.relativeMode,l=r(4208);!function(){"use strict";function e(e,r,n){var a=[],i=r.getKeySignature();if("Hp"===i.root||"HP"===i.root)return a;a=a.concat(function(e,t){for(var r=[],n=e.split("K:"),a=n[0].length,i=1;i2?n+=7:-12===r&&(n-=7):r>0&&n<0?n+=7:r<0&&n>0&&(n-=7),r>12?n+=7:r<-12&&(n-=7),n}function h(e,t,n,a,s,o){for(var c=[],h=i(s,n,o),u={},d={},m=0;m1?i[1]:"",accidentals:l}}function p(e,t,r,n){for(var a=e.pitch,i=u.indexOf(e.name),s=(u.indexOf(t.root)+a)%7,o=i+r,c=e.oct;o>6;)c++,o-=7;for(;o<0;)c--,o+=7;for(var l=u[s],h="",d=e.adj,f="=",m=0;m4&&(l=l.toLowerCase()),{acc:h,name:l,upper:l.toUpperCase()}}var m=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,v=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,b=/(\s*)$/;function y(e,t,r,n){var a="none"===t?0:u.indexOf(t),i=e.match(m),s=i[2].toUpperCase(),o=u.indexOf(s)-a;o<0&&(o+=7);var c=d.indexOf(i[3]);s===i[2]&&c--;var l=n[s]||r[s]||"=";return{acc:i[1],name:s,pitch:o,oct:c,adj:C(i[1],r[s],n[s]),courtesy:i[1]===l}}function x(e,t,r,n,a){var i=e.substring(t,r),s=i.match(new RegExp(g.source+b.source),"");if(s){var o=s[1].length,c=s[2].length+s[3].length+s[4].length;t+=r-t-o-c,r-=c}else if(s=i.match(new RegExp(/([^\[]*)/.source+/\[/.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+/\-?](\d*\/*\d*)?([\>\<\-\)]*)/.source+b.source))){for(var l=1+s[1].length,h=0;h=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function L(e){return e/1e6}function O(e){return Math.round(e*k*1e6)/1e6}function H(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function z(e,t){var r=t.start,n=t.duration,a=O(1/32);switch(e){case"trill":for(var i=1;n>0;)u.push({cmd:"note",pitch:t.pitch+i,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),i=1===i?0:1,n-=a,r+=a;break;case"mordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"turn":a=t.duration/5,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+2*a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+3*a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+4*a,duration:a,gap:0,instrument:h});break;case"roll":for(;n>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=2*a,r+=2*a}}function F(e,t){var r,n=function(e,t){if(t)return 0;var r;if(null!=g)r=g,g=void 0;else if(T)if(B>e)r=E;else{var n=(e-m)/H(w);r=0===n?S:parseInt(n,10)===n?_:E}else r=_;return v&&(r+=v,v=void 0),r<0&&(r=0),r>127&&(r=127),t?0:r}(L(e.time),t);if(p.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,n=0,a=[],s=0;s0?D.endType="tenuto":d&&(D.endType=d),D.endType){case"tenuto":D.gap=-.001;break;case"staccato":var I=.4*D.duration;D.gap=o/60*I;break;default:D.gap=0}u.push(D)}}}u.length}var Y=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);f=Math.max(f,L(e.time)+O(Y))}n=function(n,i,C,O){i||(i={}),O||(O={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=i.qpm,c=void 0,k=1,l=void 0,h=void 0,u=void 0,d=void 0,f=0,x=C,w={num:4,den:4},T=!0,S=105,_=95,E=85,M=.25,g=void 0,v=void 0,A=0,b=[],N={},y=1,n.length>0&&n[0].length>0&&(B=n[0][0].pickupLength),void 0===i.bassprog||O.bassprog||(O.bassprog=[i.bassprog]),void 0===i.bassvol||O.bassvol||(O.bassvol=[i.bassvol]),void 0===i.chordprog||O.chordprog||(O.chordprog=[i.chordprog]),void 0===i.chordvol||O.chordvol||(O.chordvol=[i.chordvol]),void 0===i.gchord||O.gchord||(O.gchord=[i.gchord]),p=new a(n.length,i.chordsOff,O,w),function(e,t){for(var r=0;r=0)&&(j=!0);for(var V=0;V0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=Y.program;else{var R;for(R=u.length-1;R>=0&&"program"!==u[R].cmd;R--);(R<0||u[R].instrument!==Y.program)&&u.push({cmd:"program",channel:0,instrument:Y.program})}break;case"channel":P(Y.channel);break;case"drum":N=G(Y.params),q();break;case"gchordOn":p.gChordOn(Y);break;case"beat":S=Y.beats[0],_=Y.beats[1],E=Y.beats[2];break;case"vol":g=Y.volume;break;case"volinc":v=Y.volume;break;case"beataccents":T=Y.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(Y);break;default:console.log("MIDI creation. Unknown el_type: "+Y.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=l||0),d&&u.unshift(d),s.push(u),p.finish(),b.length}return i.detuneOctave&&function(e,t){for(var r={},n=0;n1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(a=0;!h&&a0&&s.push(b),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var D=[0,2,4,5,7,9,11];function j(n){if(void 0!==n.midipitch)return n.midipitch;var a=n.pitch;if(n.accidental)switch(n.accidental){case"sharp":e[a]=1;break;case"flat":e[a]=-1;break;case"natural":e[a]=0;break;case"dblsharp":e[a]=2;break;case"dblflat":e[a]=-2;break;case"quartersharp":e[a]=.25;break;case"quarterflat":e[a]=-.25}var i=12*function(e){return Math.floor(e/7)}(a)+D[Y(a)]+60;return void 0!==e[a]?i+=e[a]:i+=t[Y(a)],i+=r}function I(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function Y(e){return(e%=7)<0&&(e+=7),e}function G(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],n="",a=0,i=0;it&&(r=r.substring(0,t)),function(e){for(var t="",r=0;r>=7;for(var n=r.length-1;n>=0;n--){t<<=8;var a=r[n];0!==n&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",r=0,n=256,a=0;a=0)return n;return n}function i(e,t,r){for(var n=Math.min(e.length,t+3),a=t;a=0)return e[a].decoration[i];return null}function s(e){for(var t=0;t=0&&"bar"!==r[n].el_type;)r[n].noChordVoice=!0,n--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var n=60;return e.bpm&&(n=e.bpm),r*n/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}n=function(n,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;n.visualTranspose&&(g-=n.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",x=h.drumBars||1,k=h.drumIntro||0,w=""!==y,C=!!h.drumOff,T=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),x=parseInt(x,10),k=parseInt(k,10);var S=n.formatting.bagpipes;S&&(m=71);var _=[];if(n.formatting.midi){var E=n.formatting.midi;E.program&&E.program.length>0&&(m=E.program[0],E.program.length>1&&(m=E.program[1],v=E.program[0]),b=!0),E.transpose&&(g=E.transpose[0]),E.channel&&(v=E.channel[0],b=!0),E.drum&&(y=E.drum),E.drumbars&&(x=E.drumbars[0]),E.drumon&&(w=!0),10===v&&(m=t),E.beat&&_.push({el_type:"beat",beats:E.beat}),E.nobeataccents&&_.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):n.metaText.tempo?c(n.metaText.tempo,n.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var M=[];S&&M.push({el_type:"bagpipes"}),M.push({el_type:"instrument",program:m}),v&&M.push({el_type:"channel",channel:v}),g&&M.push({el_type:"transpose",transpose:g}),M.push({el_type:"tempo",qpm:p});for(var A=0;A<_.length;A++)M.push(_[A]);var N,B=[],P=[],L=[],O=[0],H={};H[0]={el_type:"tempo",qpm:p,timing:0};for(var z=[],F=[],D=!1,j=n.lines,I=0;I=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(N=n[t].slice(0),B[q].push({el_type:"beat",beats:N.slice(0)}),P[X]=!1,L[X]=!1),e.decoration.indexOf("crescendo(")>=0){var a=r(U,te,"crescendo)"),s=Math.min(127,N[0]+50),o=i(U,te+a+1,Object.keys(n));o&&(s=n[o][0]),P[X]=a>0&&Math.floor((s-N[0])/a),L[X]=!1}else if(e.decoration.indexOf("crescendo)")>=0)P[X]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=r(U,te,"diminuendo)"),l=Math.max(15,N[0]-50),h=i(U,te+c+1,Object.keys(n));h&&(l=n[h][0]),P[X]=!1,L[X]=c>0&&Math.floor((l-N[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(L[X]=!1)},G=V.staff,q=0,W=0;W=0?B[q].push({el_type:"transpose",transpose:-12}):R.clef.type.indexOf("+8")>=0&&B[q].push({el_type:"transpose",transpose:12})),n.formatting.midi&&n.formatting.midi.drumoff&&(B[q].push({el_type:"bar"}),B[q].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,J=0,Z=0,ee=0;N=[105,95,85,1];for(var te=0;te=0?B[q].push({el_type:"transpose",transpose:-12}):re.type.indexOf("+8")>=0&&B[q].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(re,n.getBeatLength()),B[q].push({el_type:"tempo",qpm:p,timing:O[q]}),H[""+O[q]]={el_type:"tempo",qpm:p,timing:O[q]};break;case"bar":Q>0&&B[q].push({el_type:"bar"}),Y(re),Q=0;var se="bar_right_repeat"===re.type||"bar_dbl_repeat"===re.type,oe="1"===re.startEnding,ce="bar_left_repeat"===re.type||"bar_dbl_repeat"===re.type||"bar_right_repeat"===re.type;if(se){var le=z[q];le||(le=0);var he=F[q];he||(he=B[q].length);for(var ue=le;ue=0&&i!==t[""+o.timing].qpm&&(i=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[n].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(B,H),k)for(var pe=n.getPickupLength(),me=0;mege;)ge++;if(B[me].length>ge){for(ie=0;ie0&&B[0].length>0&&(B[0][0].pickupLength=n.getPickupLength()),B}}(),e.exports=n},8702:function(e,t,r){var n=r(5281);e.exports=function(){return window.abcjsAudioContext||n(),window.abcjsAudioContext}},2710:function(e){e.exports=function(e){return Math.pow(2,e/1200)}},7207:function(e){var t=function(e,t,r,n){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=n,this.tempoChangeFactor=1,this.bassInstrument=r.bassprog&&r.bassprog.length>=1?r.bassprog[0]:0,this.chordInstrument=r.chordprog&&r.chordprog.length>=1?r.chordprog[0]:0,this.bassOctaveShift=r.bassprog&&2===r.bassprog.length?r.bassprog[1]:0,this.chordOctaveShift=r.chordprog&&2===r.chordprog.length?r.chordprog[1]:0,this.boomVolume=r.bassvol&&1===r.bassvol.length?r.bassvol[0]:64,this.chickVolume=r.chordvol&&1===r.chordvol.length?r.chordvol[0]:48,r.gchord&&r.gchord.length>0?this.overridePattern=a(r.gchord[0]):this.overridePattern=void 0};function r(e,t,r,a){var i=[];if(!e)return i;t.indexOf("boom")>=0?i.push(r?e.boom:e.boom2):a&&i.push(e.boom);var s=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,i(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},t.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},t.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=a(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},t.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},t.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},t.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t=0)return"break"}return null},t.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var n=this.transpose;n<-8;)n+=12;for(;n>8;)n-=12;var a,i=r+=n,s=(r+=12*this.bassOctaveShift)-5;1===e.length&&(a=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(i--,r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(i++,r++,s++,o=o.substring(1));var l=o.split("/");if((a=this.chordNotes(i,l[0])).length>=3&&(s=s+(a[2]-a[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=this.basses[l[1].substring(0,1)]+h+n,s=r+=12*this.bassOctaveShift}return{boom:r,boom2:s,chick:a}}}},t.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var n=[],a=0;a0&&c[u-1]&&c[u]&&c[u-1].boom!==c[u].boom&&(d=!0);var p=l[u],m=p.indexOf("boom")>=0,g=!m&&0!==u&&l[0].indexOf("boom")>=0&&(!c[u-1]||c[u-1].boom!==c[u].boom),v=r(c[u],p,d,g);m&&(d=!1);for(var b=0;b0){var s=e.gap?e.gap:0,o=e.duration;s=Math.min(s,2*o/3);var c={pitch:e.pitch,instrument:i,start:Math.round(1e6*e.start)/1e6,end:Math.round(1e6*(e.start+o-s))/1e6,volume:e.volume};e.startChar&&(c.startChar=e.startChar),e.endChar&&(c.endChar=e.endChar),e.style&&(c.style=e.style),e.cents&&(c.cents=e.cents),t[r].push(c)}break;case"program":a=n[e.instrument];break;case"text":break;default:console.log("Unhandled midi event",e)}}))})),t}},6313:function(e,t,r){var n=r(5049),a=r(5281),i=r(8702),s=r(1225),o=r(9733),c=r(5075),l=r(5343),h=r(6987);function u(e,t,r,s,o){var c=!0;if(i()?c="suspended"===i().state:a(),!n())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&r&&r.classList.add("abcjs-loading"),c?i().resume().then((function(){s?s().then((function(n){d(e,t,r,o)})):d(e,t,r,o)})):d(e,t,r,o)}function d(e,t,r,n){n?e(t).then((function(){r&&r.classList.remove("abcjs-loading")})):(e(t),r&&r.classList.remove("abcjs-loading"))}e.exports=function(e,t){var r=this;if("string"==typeof e){var n=e;if(!(e=document.querySelector(n)))throw new Error('Cannot find element "'+n+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=Object.assign({},t)),r.options.ac&&a(r.options.ac),function(e,t){var r=!!t.loopHandler,n=!!t.restartHandler,a=!!t.playHandler||!!t.playPromiseHandler,i=!!t.progressHandler,u=!!t.warpHandler,d=!1!==t.hasClock,f='
\n';if(r){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='\n"}if(n){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='\n"}if(a){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='\n"}if(i){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='\n'}if(d&&(f+='\n'),u){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+=' ( '+(t.bpm?t.bpm:"BPM")+")\n"}f+='
CSS required: load abcjs-audio.css
',f+="
\n",e.innerHTML=f}(r.parent,r.options),function(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,n=!!e.options.playHandler||!!e.options.playPromiseHandler,a=!!e.options.progressHandler,i=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){u(e.options.loopHandler,t,s,e.options.afterResume)})),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){u(e.options.restartHandler,t,s,e.options.afterResume)})),n&&s.addEventListener("click",(function(t){u(e.options.playPromiseHandler||e.options.playHandler,t,s,e.options.afterResume,!!e.options.playPromiseHandler)})),a&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){u(e.options.progressHandler,t,s,e.options.afterResume)})),i&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){u(e.options.warpHandler,t,s,e.options.afterResume)}))}(r),r.disable=function(e){var t=r.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},r.setWarp=function(e,t){r.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),r.setTempo(e)},r.setTempo=function(e){var t=r.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},r.resetAll=function(){for(var e=r.parent.querySelectorAll(".abcjs-pushed"),t=0;t0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(l)),i?i*=2:i=50,i<9e4)return new Promise((function(t,n){setTimeout((function(){var s=[];for(u=0;u75&&(t=75),t=t/50-1;var a=0,i=.25;8===r.den&&(i/=2);for(var s=i/2,o=s*t,c=0;c=l[h].start+s)){var d=u.start;u.start+=o,u.volume*=1+a,h>0&&l[h-1].end==d&&(l[h-1].end=u.start,l[h-1].volume*=1-a)}}}}(c,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(c,e.callbackContext);var l=function(e,t){if(null==t)return null;var r=[];if(t.length){for(var n=0;n1&&(a=1),r.push(a)}else r.push(0);return r}var i=parseFloat(t);if(i*(e-1)>2)return null;for(var s=e%2==0,o=s?0-i/2:0,c=o+i,l=0;lr?l[r]:0;t.forEach((function(t){var r=t.instrument+":"+t.pitch+":"+t.volume+":"+Math.round(1e3*(t.end-t.start))/1e3+":"+n+":"+i+":"+(t.cents?t.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+r),h[r]||(h[r]=[]),h[r].push(t.start)}))}));for(var d=[],f=s().createBuffer(2,o,s().sampleRate),p=0;p0?e.audioBuffers[0].duration:0;return{status:s().state,duration:t}}e.audioBuffers=[f],e.debugCallback&&(e.debugCallback("sampleRate = "+s().sampleRate),e.debugCallback("totalSamples = "+o),e.debugCallback("creationTime = "+Math.floor(1e3*(s().currentTime-n))+"ms")),Promise.all(d).then((function(){"suspended"===s().state?s().resume().then((function(){r(b(e))})):"interrupted"===s().state?s().suspend().then((function(){s().resume().then((function(){r(b(e))}))})):r(b(e))}))}))):Promise.reject(new Error(f))},e.start=function(){if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("start called");var t=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(t),e.startTimeSec=s().currentTime-t,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(f);return e.debugCallback&&e.debugCallback("pause called"),e.pausedTimeSec=e.stop(),e.pausedTimeSec},e.resume=function(){e.start()},e.seek=function(t,r){var n;switch(r){case"seconds":n=t;break;case"beats":n=t*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:n=(e.duration-e.fadeLength/1e3)*t}if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("seek called sec="+n),e.isRunning?(e.stop(),e._kickOffSound(n)):e.pausedTimeSec=n,e.pausedTimeSec=n},e.stop=function(){return e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach((function(e){try{e.stop()}catch(e){console.log("direct source didn't stop:",e)}})),e.directSource=[],s().currentTime-e.startTimeSec},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return h(e)},e.getAudioBuffer=function(){return e.audioBuffers[0]},e.getIsRunning=function(){return e.isRunning},e._deviceCapable=function(){return!!o()||(console.warn(f),e.debugCallback&&e.debugCallback(f),!1)},e._kickOffSound=function(t){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach((function(t,r){e.directSource[r]=s().createBufferSource(),e.directSource[r].buffer=t,e.directSource[r].connect(s().destination)})),e.directSource.forEach((function(e){e.start(0,t)})),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})}}},873:function(e){e.exports=function(e){return window.URL.createObjectURL(function(e){var t,r,n=e[0],a=n.numberOfChannels,i=n.length*a*2+44,s=new ArrayBuffer(i),o=new DataView(s),c=[],l=0,h=0;for(d(1179011410),d(i-8),d(1163280727),d(544501094),d(16),u(1),u(a),d(n.sampleRate),d(2*n.sampleRate*a),u(2*a),u(16),d(1635017060),d(i-h-4),t=0;t';t.preTextDownload&&(i+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&(o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o)?t.downloadLabel(e,n):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),i+=''+s+"",t.postTextDownload&&(i+=t.postTextDownload),i+""};e.exports=function(e,t){var r={};if(t)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);function o(e,t,n){var s=a(t,r);switch(r.midiOutputType){case"encoded":return s;case"binary":var o=s.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),h=0;h4)for(a=a.toLowerCase(),t-=5;t>0;)a+="'",t--;else for(;t<4;)a+=",",t++;return a}}},522:function(e){e.exports={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},4586:function(e,t,r){var n=r(4771),a=r(522),i=r(2710),s=function(e,t,r){for(var n=0;n<2;n++)for(var a=t.getChannelData(n),i=e.getChannelData(n),s=0;s=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(r=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new i(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:r}),e.cursorControl&&e.cursorControl.onReady&&"function"==typeof e.cursorControl.onReady&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:t})}))},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)},e.runWhenReady=function(t,r){return e.visualObj?e.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return e.isLoading?e.runWhenReady(t,r):t(r)})):e.isLoaded?t(r):e.go().then((function(){return t(r)})):Promise.resolve({status:"loading"});var n},e._play=function(){return s().resume().then((function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&"function"==typeof e.cursorControl.onStart&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})}))},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(t){return e.runWhenReady(e._randomAccess,t)},e._randomAccess=function(t){var r=t.target.classList.contains("abcjs-midi-progress-indicator")?t.target.parentNode:t.target,n=(t.x-r.getBoundingClientRect().left)/r.offsetWidth;return n<0&&(n=0),n>1&&(n=1),e.seek(n),Promise.resolve({status:"ok"})},e.seek=function(t,r){e.timer&&e.midiBuffer&&(e.timer.setProgress(t,r),e.midiBuffer.seek(t,r))},e.setWarp=function(t){if(parseInt(t,10)>0){e.warp=parseInt(t,10);var r=e.isStarted,n=e.percent;return e.destroy(),e.isStarted=!1,e.go().then((function(){return e.setProgress(n,1e3*e.midiBuffer.duration),e.control&&e.control.setWarp(e.currentTempo,e.warp),r?e.play().then((function(){return e.seek(n),Promise.resolve()})):(e.seek(n),Promise.resolve())}))}return Promise.resolve()},e.onWarp=function(t){var r=t.target.value;return e.setWarp(r)},e.setProgress=function(t,r){e.percent=t,e.control&&e.control.setProgress(t,r)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&"function"==typeof e.cursorControl.onFinished&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(t,r,n,a){var i=t/r;e.setProgress(i,n),e.cursorControl&&e.cursorControl.onBeat&&"function"==typeof e.cursorControl.onBeat&&e.cursorControl.onBeat(t,r,n,a)},e.eventCallback=function(t){if(!t)return e.finished();e.cursorControl&&e.cursorControl.onEvent&&"function"==typeof e.cursorControl.onEvent&&e.cursorControl.onEvent(t)},e.lineEndCallback=function(t,r){e.cursorControl&&e.cursorControl.onLineEnd&&"function"==typeof e.cursorControl.onLineEnd&&e.cursorControl.onLineEnd(t,r)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(t){var r=e.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=r,n.download=t||"output.wav",n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)}}},2029:function(e){e.exports=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,n,a,i){var s={cmd:"note",duration:n,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:a};i&&(s.cents=i),e.tracks[t].push(s),e.starts[t]+=n,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}},2426:function(e,t,r){var n=r(6074),a={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},i={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new n),this.inited=!0);var i=null;if(r.tablature){var s=r.tablature;i=[];for(var o=0;o0)for(var a=r.length,i=0;i1&&r&&r.length>0)for(a=r.length,i=0;i=0;n--)if(t.pitch+t.pitchAltered>=e.stringPitches[n]){var a=t.pitch+t.pitchAltered-e.stringPitches[n];return"^"===t.quarter?a-=.5:"v"===t.quarter&&(a+=.5),{num:Math.round(a),str:e.stringPitches.length-1-n,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function l(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}function h(e){var t=e.tuning,r=e.capo,s=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var o=0;o0&&(this.capoTuning=function(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var n=0;n0&&(r=e.capoTuning);for(var n=r.length-1,a=0;a1?(o=s(this,e)).error&&(i=o.error):e[0].endTie||((r=new a(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(n=c(this,r))?o.push(n):(l(o,r),i=o.error))),i)return o;var h=null;if(t){h=[];for(var u=0;u0&&(r+=" capo:"+e.capo),t=t.replace("%T",r)),t}return""},h.prototype.suppress=function(e){return!!e.params.suppress},e.exports=h},8918:function(e){function t(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}t.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},t.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var n=this.bar.pitch2/2;if("dots.dot"==e.name)return r?(t.pitch=n,!1):(t.pitch=n+this.lineSpace,!0)}return r},e.exports=t},6776:function(e,t,r){var n=r(2842),a=n.noteToMidi,i=n.midiToNote;function s(e,t){var r=a(e);t&&(r+=t);var n,s=i(r),o=!1,c=!1,l=null,h=null,u=!1,d=0;e.startsWith("_")?(o=!0,d=-1,"/"==e[1]?(o=!1,h="v",d=0):"_"==e[1]&&(u=!0,d-=1)):e.startsWith("^")?(c=!0,d=1,"/"==e[1]?(c=!1,h="^",d=0):"^"==e[1]&&(u=!0,d+=1)):e.startsWith("=")&&(l=!0,d=0),((n=o||c||null!=h)||l)&&(s=null!=h||u?e.slice(2):e.slice(1));var f=(s.match(/,/g)||[]).length,p=(s.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=s,this.acc=d,this.isSharp=c,this.isKeySharp=!1,this.isDouble=u,this.isAltered=n,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=h,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}s.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},s.prototype.isLowerThan=function(e){return e.pitch>this.pitch},s.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var r=this.name,n=0;n=0){if(r===t)return e.extra[n].x+e.extra[n].w/2;r++}return-1}function f(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function p(e,t,r){var n=e.semantics.notesToNumber(t,r);if(n.error)return e.setError(n.error),n;if(n.graces&&n.notes){var a=n.notes.length-1;n.notes[a].graces=n.graces}return n}function m(e,t,r,n,a){for(var i=0;i=0&&(e.semantics.clefTranspose=-12),k.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),k.type){case"staff-extra key-signature":this.accidentals=k.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var T=!1;x===g.children.length-1&&(T=!0);var S=o(k,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var _=0;_0&&(y.abselem=M,r.push(y),v.children.push(M))}}},e.exports=h},4785:function(e,t,r){var n=r(3197),a=r(4240),i=r(4331);function s(e,t,r){var n=e.semantics,a=t.controller.getTextSize,i=n.tabInfos(e),s=!0;if(n.suppress(e)&&(s=!1),s){var o=a.calc(i,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:o.height,width:o.width},name:i},o.height}return 0}function o(e,t){return!(!t[e].isTabStaff||e!==t.length-1&&t[e+1].isTabStaff)}function c(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function l(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}e.exports=function(e,t,r,h){var u=new a,d={clef:{type:"TAB"}},f=e.linePitch*e.nbLines,p=r.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void e.setError("No tablatures when stafflines=0");p.splice(p.length,0,d)}var g=r.staffGroup,v=g.voices,b=function(e){for(var t=0,r=0;rt&&(t=n.specialY.lyricHeightBelow)}return t}(v[0]),y=h,x=g.staffs[y],k=f+3-x.bottom-b;x.isTabStaff&&(k=x.top);var w={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:k},C=function(e,t){for(var r=0,n=0,a=0;;){if(!t[r])return-1;if(t[r].isTabStaff||(a=t[r].voices.length),t[r].isTabStaff){if(n++,o(r,t)&&n=e){if(r+1==t.length)return r+1;if(!t[r+1].isTabStaff)return r+1}if(++r>t.length)return-1}}(h,g.staffs);if(-1!==C){w.parentIndex=C-1,g.staffs.splice(C,0,w),g.height+=f+3;var T=function(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}(g.staffs,C),S=1;(function(e,t){return 1===function(e){for(var t=0,r=0;r1})(g.staffs,T)&&(S=T.voices.length),d.voices=[];for(var _=0;_0&&(E.duplicate=!0);var M=s(e,t,E)/i.STEP;M=Math.max(M,1),g.staffs[h].top+=1,g.height+=M,E.staff=w;var A=v.length;v.splice(v.length,0,E);var N=l(v,_+h);d.voices[_]=[],u.build(e,v,d.voices[_],_,h,N,A)}!function(e){for(var t=0;t0&&(i[0].invisible=!0);break;case"meter":i[0]=l(a,this.tuneNumber),this.startlimitelem=i[0],r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"clef":if(i[0]=s(a,this.tuneNumber),!i[0])return null;r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"key":var h=o(a,this.tuneNumber);h&&(i[0]=h,this.startlimitelem=i[0]),r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"stem":this.stemdir="auto"===a.direction?void 0:a.direction;break;case"part":var u=new n(a,0,0,"part",this.tuneNumber),d=this.getTextSize.calc(a.title,"partsfont","part");u.addFixedX(new f(a.title,0,0,void 0,{type:"part",height:d.height/p.STEP})),i[0]=u;break;case"tempo":var m=new n(a,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(a,this.tuneNumber,c)),i[0]=m;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":T=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;case"color":this.voiceColor=a.color,r.color=this.voiceColor;break;default:var v=new n(a,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+a.el_type,0,0,void 0,{type:"debug"})),i[0]=v}return i},_.prototype.createBeam=function(e,t,r){var n=[],i=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);T&&i.setHint();for(var s=0;se.pitches[r+1].pitch){t=!1;var n=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=n}}while(!t)},N=function(e,t,r,n,a,i,s,o,c){for(var l=r;l>11;l--)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=0;l1&&(p=new a(i,"grace",s),T&&p.setHint(),p.mainNote=r);var m=[];for(u=e.gracenotes.length-1;u>=0;u--)o+=10,m[u]=o,e.gracenotes[u].accidental&&(o+=7);for(u=0;u=6?"down":"up";for(n&&(_=n),(a=t.style?t.style:a)&&"normal"!==a||(a="note"),(m=i?S[a].nostem:S[a][-s])||console.log("noteSymbol:",a,s,i),g="down"===_?t.pitches.length-2:1;"down"===_?g>=0:g11||M.verticalPos<1)&&x.push(M.verticalPos-M.verticalPos%2),"down"===_?b=d.getSymbolWidth(m)+2:v=d.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=z.accidentalshiftx,y=Math.max(y,z.dotshiftx)}if(H){var F=Math.round(70*this.voiceScale)/10,D="down"===_?t.minpitch-F:t.minpitch+1/3;D>6&&!n&&(D=6);var j="down"===_?t.maxpitch-1/3:t.maxpitch+F;j<6&&!n&&(j=6);var I="down"===_||0===e.heads.length?0:e.heads[0].w,V="down"===_?1:-1;h&&"noteheads.slash.quarter"===h.c&&("down"===_?j-=1:D+=1),h&&"noteheads.triangle.quarter"===h.c&&("down"===_?j-=.7:D-=1.2),e.addRight(new f(null,I,0,D,{type:"stem",pitch2:j,linewidth:V,bottom:D-1})),u=Math.min(D,j)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:u,additionalLedgers:x,dir:_,symbolWidth:T}},_.prototype.addLyric=function(e,t){var r="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var n=this.getTextSize.calc(r,"vocalfont","lyric"),a=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,n.width,void 0,{type:"lyric",position:a,height:n.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},_.prototype.createNote=function(e,t,r,a){var i,s=null,o=0,l=0,h=0,u=[],p=C(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y1,this.stemdir,r,g,this.voiceScale);s=M.noteHead,o=M.roomTaken,l=M.roomTakenRight}else{var A=this.addNoteToAbcElement(E,e,v,this.stemdir,this.style,m,g,t,a);void 0!==A.min&&(this.minY=Math.min(A.min,this.minY)),s=A.noteHead,o=A.roomTaken,l=A.roomTakenRight,u=A.additionalLedgers,i=A.dir,h=A.symbolWidth}if(void 0!==e.lyric&&this.addLyric(E,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,a,E,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration){var B=t&&"up"!==i?Math.min(-3,E.bottom-6):E.bottom;this.decoration.createDecoration(a,e.decoration,E.top,s?s.w:0,E,o,i,B,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&E.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),N(E,e.minpitch,e.maxpitch,e.rest,h,u,i,-2,1),void 0!==e.chord){var P=x(this.getTextSize,E,e,o,l,h,this.jazzchords,this.germanAlphabet);o=P.roomTaken,l=P.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),E},_.prototype.addSlursAndTies=function(e,t,r,n,a,i){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o10&&"treble"===t.abcelem.type?13:11;t.addFixed(new f(e,n,r.width,a+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},_.prototype.createBarLine=function(e,t,r){var a=new n(t,0,10,"bar",this.tuneNumber),i=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,a);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,d="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||d){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(a);this.startlimitelem=a}if(o&&(a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(i=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),"bar_invisible"===t.type&&(i=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),a.addRight(i)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,a,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),l&&(i=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),a.addRight(i),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=i,this.partstartelem=null),h&&(i=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),d&&(s+=3,a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;a.minspacing+=m+10,this.partstartelem=new u(t.startEnding,i,null),e.addOther(this.partstartelem)}return a.extraw-=5,void 0!==t.chord&&x(this.getTextSize,a,t,0,0,0,!1,this.germanAlphabet),a},e.exports=_},2652:function(e,t,r){var n=r(6658),a=r(4331),i=r(5810);function s(e,t,r,s,o,c,l,h,u,d,f,p,m,g,v){for(var b=e.split("\n"),y=b.length-1;y>=0;y--){var x,k=b[y],w=0;s||(k=i(k,g,v));var C=h.calc(k,o,c),T=C.width,S=C.height/a.STEP;switch(t){case"left":w=-(f+=T+7),x=d.averagepitch,u.addExtra(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"left"}));break;case"right":w=p+=4,x=d.averagepitch,u.addRight(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"right"}));break;case"below":u.addRight(new n(k,0,0,void 0,{type:"text",position:"below",height:S,dim:l,realWidth:T}));break;case"above":u.addRight(new n(k,0,0,void 0,{type:"text",position:"above",height:S,dim:l,realWidth:T}));break;default:if(r){var _=r.y+3*a.STEP;u.addRight(new n(k,w+r.x,0,d.minpitch+_/a.STEP,{position:"relative",type:"text",height:S,dim:l}))}else{var E="above";d.positioning&&d.positioning.chordPosition&&(E=d.positioning.chordPosition),"hidden"!==E&&u.addCentered(new n(k,m/2,T,void 0,{type:"chord",position:E,height:S,dim:l,realWidth:T}))}}}return{roomTaken:f,roomTakenRight:p}}e.exports=function(e,t,r,n,a,i,o,c){for(var l=0;l0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(d=3,u=0),o.addRight(new i("8",5+u,a.getSymbolWidth("8")*h,d,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},3923:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){if(e.el_type="keySignature",!e.accidentals||0===e.accidentals.length)return null;var r=new n(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var s=0;return e.accidentals.forEach((function(e){var t,n=0;switch(e.acc){case"sharp":t="accidentals.sharp",n=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",n=-1.2;break;case"quartersharp":t="accidentals.halfsharp",n=-2.5;break;case"quarterflat":t="accidentals.halfflat",n=-1.2;break;default:t="accidentals.flat"}r.addRight(new i(t,s,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t),top:e.verticalPos+a.symbolHeightInPitches(t)+n,bottom:e.verticalPos+n})),s+=a.getSymbolWidth(t)+2}),this),r}},2143:function(e,t,r){var n=r(6020),a=r(6658);e.exports=function(e,t,r,i){i||(i={});var s,o=void 0!==i.dir?i.dir:null,c=void 0!==i.headx?i.headx:0,l=void 0!==i.extrax?i.extrax:0,h=void 0!==i.flag?i.flag:null,u=void 0!==i.dot?i.dot:0,d=void 0!==i.dotshiftx?i.dotshiftx:0,f=void 0!==i.scale?i.scale:1,p=void 0!==i.accidentalSlot?i.accidentalSlot:[],m=void 0!==i.shouldExtendStem&&i.shouldExtendStem,g=void 0===i.printAccidentals||i.printAccidentals,v=r.verticalPos,b=0,y=0,x=0;if(void 0===t)e.addFixed(new a("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new a(null,0,0,v);else{var k=c;if(r.printer_shift){var w="same"===r.printer_shift?1:0;k="down"===o?-n.getSymbolWidth(t)*f+w:n.getSymbolWidth(t)*f-w}var C={scalex:f,scaley:f,thickness:n.symbolHeightInPitches(t)*f,name:r.name};if((s=new a(t,k,n.getSymbolWidth(t)*f,v,C)).stemDir=o,h){var T=v+("down"===o?-7:7)*f;m&&("down"===o&&T>6&&(T=6),"up"===o&&T<6&&(T=6));var S="down"===o?c:c+s.w-.6;e.addRight(new a(h,S,n.getSymbolWidth(h)*f,T,{scalex:f,scaley:f}))}for(y=s.w+d-2+5*u;u>0;u--){var _=1-Math.abs(v)%2;e.addRight(new a("dots.dot",s.w+d-2+5*u,n.getSymbolWidth("dots.dot"),v+_))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var E;switch(r.accidental){case"quartersharp":E="accidentals.halfsharp";break;case"dblsharp":E="accidentals.dblsharp";break;case"sharp":E="accidentals.sharp";break;case"quarterflat":E="accidentals.halfflat";break;case"flat":E="accidentals.flat";break;case"dblflat":E="accidentals.dblflat";break;case"natural":E="accidentals.nat"}for(var M=!1,A=l,N=0;N=6){p[N][0]=v,A=p[N][1],M=!0;break}!1===M&&(A-=n.getSymbolWidth(E)*f+2,p.push([v,A]),b=n.getSymbolWidth(E)*f+2);var B=n.symbolHeightInPitches(E);e.addExtra(new a(E,A,n.getSymbolWidth(E),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),x=n.getSymbolWidth(E)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:x}}},2525:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){e.el_type="timeSignature";var r=new n(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o",n)),o&&e.addOther(new a(o.start,o.stop,"<",n)),c&&e.addOther(new i(c.start,c.stop))},l.prototype.createDecoration=function(e,t,r,a,i,l,u,d,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,a){for(var i=0;i9&&d++;var m=n/2;"center"!==s.getSymbolAlign(p)&&(m-=s.getSymbolWidth(p)/2),a.addFixedX(new o(p,m,s.getSymbolWidth(p),d))}if("slide"===t[f]&&a.heads[0]){var g=a.heads[0].pitch,v=new o("",-i-15,0,(g-=2)-1),b=new o("",-i-5,0,g+1);a.addFixedX(v),a.addFixedX(b),e.addOther(new c({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===d&&(d=r),{above:d,below:a.bottom}}(e,t,r,a,i,l,u,d,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,d),function(e,t,r,n,a,i,c,l){function h(e,t){"above"===e?n.above+=t:n.below-=t}function u(e){var t;return"above"===e?(t=n.above)c&&(t=c),t}function d(e,n,a){var i=u(n);r.addFixedX(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3,anchor:a})),h(n,5)}function f(e,n){var a=t/2;"center"!==s.getSymbolAlign(e)&&(a-=s.getSymbolWidth(e)/2);var i=s.symbolHeightInPitches(e)+1,c=u(n);c="above"===n?c+i/2:c-i/2,r.addFixedX(new o(e,a,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e),position:n})),h(n,i)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=0;mthis.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(e){this._addChild(e)},i.prototype.addCentered=function(e){var t=e.w/2;-tthis.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},i.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},i.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;tthis.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setStemDirection=function(){this.average=r(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},t.prototype.calcDir=function(){this.average=r(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",t=0;t0&&this.unalignedWords(e.unalignedWords,n,a,i,s),this.extraText(e,n,a,i,s),e.footer&&r&&this.footer(e.footer,t,n,s)}function s(e,t,r,n,i,s,o){r&&(t&&(r="string"==typeof r?t+r:[{text:t}].concat(r)),a(e,r,"historyfont",i=s?"abcjs-extra-text "+i:"","description",n,{absElemType:"extraText",anchor:"start"},o))}function o(e,t,r,i,s,o,c,l,h,u,d,f){if(r){l=d?"abcjs-extra-text "+l:"";var p=f.calc("A",s,l);if("string"==typeof r)t&&(r=t+"\n"+r),n(e,{marginLeft:i,text:r,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle",klass:l},f);else{e.push({startGroup:c,klass:l,name:h}),e.push({move:u.info}),t&&(n(e,{marginLeft:i,text:t,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle"},f),e.push({move:3*p.height/4}));for(var m=0;m0&&this.startVoice.staff.voices[0]===e)},e.exports=t},6891:function(e){e.exports=function(e,t,r,n){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===n?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},3185:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},8256:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},3736:function(e){e.exports=function(e,t,r,n,a,i){var s,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o)this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:n,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),s=i.calc(o,"textfont","defined-text"),this.rows.push({move:s.height});else if(o){for(var l=0,h=n,u="textfont",d=0;dthis.top&&(this.top=this.pitch2),this.bottom=n,void 0!==this.pitch2&&this.pitch20?this.top+=a.stemHeight:this.bottom+=a.stemHeight),a.dim&&(this.dim=a.dim),a.position&&(this.position=a.position),this.height=a.height?a.height:4,a.top&&(this.top=a.top),a.bottom&&(this.bottom=a.bottom),a.name?this.name=a.name:this.c?this.name=this.c:this.name=this.type,a.realWidth?this.realWidth=a.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":a.position&&"below"===a.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},6994:function(e,t,r){var n=r(1716);e.exports=function(e,t,r,a,i,s,o,c){var l=c.calc("i",r,a);if(""===t)e.push({move:l.height});else{if("string"==typeof t)return void n(e,{marginLeft:s,text:t,font:r,klass:a,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:i},c);o.marginTop&&e.push({move:o.marginTop});var h=0,u={left:s,anchor:o.anchor,phrases:[]};a&&(u.klass=a),e.push(u);for(var d=0;d0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;te&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.exports=t},1134:function(e,t,r){var n=r(1716),a=r(6994);e.exports=function(e,t,r,i,s,o,c,l,h,u){if(this.rows=[],e.header&&o){var d=u.calc("X","headerfont","abcjs-header abcjs-meta-top").height;n(this.rows,{marginLeft:c,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:t.header,name:"header"},u)}o&&this.rows.push({move:l.top});var f=r.titleleft?"start":"middle",p=r.titleleft?c:c+s/2;if(e.title){var m=h?"abcjs-title":"";a(this.rows,e.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:t.title},u)}if(i.length)for(var g=0;g0){var v=!(!e.composer&&!e.origin);m=h?"abcjs-rhythm":"",n(this.rows,{marginLeft:c,text:e.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:t.rhythm,name:"rhythm"},u)}e.composer&&e.composer,e.origin&&e.origin;var b=e.composer?e.composer:"";e.origin&&("string"==typeof b&&"string"==typeof e.origin?b+=" ("+e.origin+")":"string"==typeof b&&"string"!=typeof e.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(e.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(e.origin)).push({text:")"}))),b&&(m=h?"abcjs-composer":"",a(this.rows,b,"composerfont",m,"composer",c+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},u))}e.author&&e.author.length>0&&(m=h?"abcjs-author":"",a(this.rows,e.author,"composerfont",m,"author",c+s,{anchor:"end",absElemType:"author",info:t.author},u)),e.partOrder&&e.partOrder.length>0&&(m=h?"abcjs-part-order":"",a(this.rows,e.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},u))}},2096:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},e.exports=t},3197:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u=0&&f.setAttribute("class","abcjs-notehead")}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m0?g.classList[0]+" ":"";g.setAttribute("class",v+t.overrideClasses)}if(h)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,c.add(t,g,!1,l);else{t.elemset.push(g);var b=!1;"note"!==t.type&&"tabNumber"!==t.type||(b=!0),c.add(t,g,b,l)}}else t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l);if(t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var y=0;y=1&&l(e,e.spacing.staffSeparation,v[v.length-1],y.staffGroup);var x=c(e,y.staffGroup,m,b);x.line=p+b,v.push(x),e.paper.closeGroup()}else y.nonMusic&&(t.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),i(e,y.nonMusic,m),e.paper.closeGroup())}return t.reset(),r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),i(e,r.bottomText,m),e.paper.closeGroup()),a(e,s,u,h),{staffgroups:v,selectables:m.getElements()}}},9879:function(e,t,r){var n=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var a=n(e,t.anchor.x,t.pitch,t.dec,{scalex:1,scaley:1,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},a),[a]}},5947:function(e,t,r){var n=r(6764),a=r(5759),i=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=n("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=n("M %f %f L %f %f ",o,l,o,s(l+20))),h+=n("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending"),"data-name":"ending"}),i(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&a(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},9045:function(e,t,r){var n=r(6764),a=r(6454),i=r(7199);function s(e,t,r){return i(e+r*t)}var o=[[3.5,-4.8]],c=[[1.5,-1],[.3,-.3],[-3.5,3.8]],l=[[-1.5,2]],h=[[3,4],[3,-4]],u=[[-3,4],[-3,-4]];function d(e,t){for(var r="",n=0;n1&&s.indexOf(".")<0){var p=i.isInGroup()?"":o.klass;e.paper.openGroup({"data-name":o.name,klass:p});for(var m=0,g=0;g0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=a(e,t.x,u,o,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=i(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness)}return 1!==t.scalex&&t.graphelem&&function(e,t,r,n,a,i){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+n+");transform-origin:"+a+"px "+i+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var n=r(5741),a=r(5829);function i(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}i.prototype.getElements=function(){return this.elements},i.prototype.add=function(e,t,r,n){if(this.canSelect(e)){var a;a=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,a);var i={absEl:e,svgEl:t,isDraggable:r};void 0!==n&&(i.staffPos=n),this.elements.push(i)}},i.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},i.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:n,unhighlight:a};this.add(r,t,!1)},e.exports=i},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),n=(e.controller.width-t)/2,a=n+t,i="M "+n+" "+r+" L "+a+" "+r+" L "+a+" "+(r+1)+" L "+n+" "+(r+1)+" L "+n+" "+r+" z";e.paper.pathToBack({path:i,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,n){var a=(t+e.padding.left+e.padding.right)*r,i=(e.y+e.padding.bottom)*r;if(e.isPrint&&(i=Math.max(i,1056)),""!==e.ariaLabel){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===n?e.paper.setResponsiveWidth(a,i):(c.width="",c.height=i+"px",r<1?(c.width=a+"px",e.paper.setSize(a/r,i/r)):e.paper.setSize(a,i)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(){for(var e,r,n,a,i,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,a=r[3]?"0"==r[3]?"0":r[3][1]:" ",i=r[5]-String(e).length,n=r[5]?str_repeat(a,i):"",c.push(r[4]?e+n:n+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var n=r(4331),a=r(129),i=r(3145),s=r(7641),o=r(1547),c=r(3624),l=r(5668);function h(e,t,r,i,s){if(r)for(var o=0;o=0&&v.voices&&u(e,t.voices,v.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:m,y2:m,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(v.originalTop),width:e.controller.width,height:e.calcY(v.originalBottom)-e.calcY(v.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),d=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),e.moveY(n.STEP,-v.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var b=2,y=0,x=0;x6&&(d=0)}}_>1&&(f=t.staffs[0].topLine,p=t.staffs[_-1].bottomLine,c(e,t.startx,.6,f,p,null)),e.y=m}},7865:function(e,t,r){var n=r(6637);e.exports=function(e,t,r,a,i,s,o){var c=e.calcY(a);return n(e,t,r,c,i,s,o)}},7641:function(e,t,r){var n=r(7865);e.exports=function(e,t,r,a,i,s){var o="abcjs-top-line",c=2;i&&(c=i),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var l=0,h=0;if(1===a)n(e,t,r,6,o,null,s+e.lineThickness),l=e.calcY(10),h=e.calcY(2);else for(var u=a-1;u>=0;u--){var d=(u+1)*c;h=e.calcY(d),0===l&&(l=h),n(e,t,r,d,o,null,s+e.lineThickness),o=void 0}return e.paper.closeGroup(),[l,h]}},3987:function(e,t,r){var n=r(2435),a=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var i,s=e.calcY(t.pitch)+2;if(t.tempo.preString){i=a(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",i).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new i(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",void 0!==t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};function x(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=0;r0)for(var o=s.staffGroup.voices[0],c=!1,l=0,h=0;hthis.width+1&&(e.topText=new l(e.metaText,e.metaTextInfo,e.formatting,e.lines,i,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o0)for(var h=c.nonMusic.rows.length,f=0;f0&&c.text[0].center)&&(p.left=i/2+this.renderer.padding.left)}}e.tablatures&&v.layoutTablatures(this.renderer,e);var m=g(this.renderer,this.classes,e,this.width,i,this.responsive,a,this.selectTypes,t,r);if(this.staffgroups=m.staffgroups,this.selectables=m.selectables,this.oneSvgPerLine){var b=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,r,n,a){r||(r="Untitled");var i=t.querySelector("svg");"resize"===n&&(t.style.paddingBottom="");for(var s=i.querySelector("style"),o="resize"===n?i.viewBox.baseVal.width:i.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,h=[],u=0;u0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},1328:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var n=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*n,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},9799:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t,r,n){var a;a="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var i=this.svg.getTextSize(e,a.attr,n);return a.font.box?{height:i.height+4*a.font.padding,width:i.width+4*a.font.padding}:i},t.prototype.baselineToCenter=function(e,t,r,n,a){return.5*this.calc(e,t,r).height+(a-n-2)*this.attr(t,r).font.size},e.exports=t},2187:function(e){e.exports=function(e,t,r,n){if(e)for(var a=0;a0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),i.setAttribute("class",o)}}},4331:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},8123:function(e){function t(e,t,r,n){if(0===e.indexOf(t)){var a=e.replace(t,""),i=parseInt(a,10);""+i===a&&(r[n]=i)}}e.exports=function(e,r){var n=[];if(e.absEl.elemset){for(var a={},i=0;i=0&&r=0?(a=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[i].svgEl.getBBox(),t,e.scale),r=a[0],n=a[1]):(a=function(e){var t,r,n=1,a=1,i=e.target.closest("svg"),s=0;return i&&i.viewBox&&i.viewBox.baseVal&&(0!==i.viewBox.baseVal.width&&(n=i.viewBox.baseVal.width/i.clientWidth),0!==i.viewBox.baseVal.height&&(a=i.viewBox.baseVal.height/i.clientHeight),s=i.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,r=e.offsetY):(t=e.layerX,r=e.layerY),[t*=n,(r*=a)+s]}(t),i=function(e,t,r){for(var n=9999999,a=-1,i=0;i0;i++){var s=e.selectables[i];if(e.getDim(s),s.dim.leftt&&s.dim.topr)a=i,n=0;else if(s.dim.topr){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));ot){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));cMath.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),u=Math.sqrt(l*l+h*h);u=0&&n<=12?a:-1}(e,r=a[0],n=a[1])),{x:r,y:n,clickedOn:i}}function l(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,n=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=n,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function h(e){var t=e;"touchstart"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0]));var r=c(this,t);r.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=v(e.svg);r[t]=!0,b(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function u(e){var t=e;if("touchmove"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=c(this,t),a=Math.round((r.y-this.dragMouseStart.y)/n.STEP);a!==this.dragYStep&&(this.dragYStep=a,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+a*n.STEP+")"))}}function d(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),p.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=v(e.svg);delete r[t],b(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function f(e){e>=0&&eo&&ei&&(a=i),a<-i&&(a=-i),a}(x,k,v,w),N=M+Math.floor(A/2),B=M+Math.floor(-A/2),S||(y&&M<6||!y&&M>6)&&(N=6,B=6),[N,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,r,n,a){for(var o=[],l=[],h=0;h0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var x=l.length-1;x>=0;x--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-x-4){var k=f,w=p+m*(x+1);l[x].single&&(k=0===h?f+5:f-5,w=i(r.startX,r.startY,r.endX,r.endY,k)+m*(x+1));var C={startX:l[x].x,endX:k,startY:l[x].y,endY:w,dy:a};if(void 0!==l[x].split){var T=l[x].split;C.endX<=T[T.length-1]&&(T[T.length-1]-=u.w),T.push(C.endX),C.split=l[x].split}o.push(C),l=l.slice(0,x)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m0?((a=(r-(n-i*a))/i)*s>50&&(a=50/s),a):null}e.exports=function(e,t,r,i,s,l){var h,u,d=r;for(h=0;hMath.round(d)&&(d=f,s&&(h=-1)))}for(h=0;h=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),i(c,l,"lyricHeightAbove"),i(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+a,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+a,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(i(c,l,"dynamicHeightAbove"),i(c,l,"volumeHeightAbove")),i(c,l,"partHeightAbove"),i(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/n.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+a),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+a}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+a):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+a):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+a),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u0&&(c.top+=f)}c.top+=e.spacing.staffTopMargin/n.STEP,r=2-c.bottom}}},735:function(e,t,r){var n=r(937);function a(e){for(var t=0;t0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d,f,p=0;for(r&&console.log("init layout",e),c=0;c1e-7?v.push(s.voices[c]):g.push(s.voices[c]);m=0;var b=0;for(c=0;cu&&(u=n.getNextX(g[c]),m=n.getSpacingUnits(g[c]),b=g[c].spacingduration);l+=m,h=Math.min(h,m),r&&console.log("currentduration: ",p,l,h);var y=void 0;for(c=0;c0){u=w;for(var T=0;Tu&&(u=n.getNextX(s.voices[c]),m=n.getSpacingUnits(s.voices[c]));return function(e){for(var t=0,r=0;r0){var a=n.children.length-1,i=n.children[a];if("bar"===i.abcelem.el_type){var s=i.children[0].x;s>t?t=s:i.children[0].x=t}}}}(s.voices),l+=m,s.setWidth(u),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var n=r(3721);function a(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=a(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var a=e+(t-e)/2;return n(r.startX,r.startY,r.endX,r.endY,a)}(r,e.anchor2.x,t),e.yTextPos+=a(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,a(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var i=0,s=0;se.startNote||i>e.endNote)&&(e.startNote=i,e.endNote=i),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},937:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,n,a){var i=r.children[r.i];if(!i)return 0;var s=e-r.minx,o=r.durationindex+i.duration>0?n:0;if("note"===i.abcelem.el_type&&!i.abcelem.rest&&0!==r.voicenumber&&a){var c=a.children[a.i],l=c&&(i.abcelem.maxpitch<=c.abcelem.maxpitch+1&&i.abcelem.maxpitch>=c.abcelem.minpitch-1||i.abcelem.minpitch<=c.abcelem.maxpitch+1&&i.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&i.abcelem.minpitch===c.abcelem.minpitch&&i.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&i.heads&&i.heads.length>0&&c.heads[0].c===i.heads[0].c&&(l=!1),l){var h=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;i.adjustedWidth||(i.adjustedWidth=h+i.w),i.w=i.adjustedWidth;for(var u=0;u0&&t.putChordInLane(n),void(e[n]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r=0;r--)(n=e[t].children[r]).chordHeightBelow&&o(i,n)}return(a.length>1||i.length>1)&&function(e,t,r){for(var n=0;n=0};i.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},i.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},i.prototype.setLineThickness=function(e){this.lineThickness=e},i.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},i.prototype.setPadding=function(e){function t(t,r,n,a,i){void 0!==e.formatting[n]?t.padding[r]=e.formatting[n]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=a:t.padding[r]=i}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},i.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},i.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},i.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},i.prototype.calcY=function(e){return this.y-e*n.STEP},i.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},i.prototype.absolutemoveY=function(e){this.y=e},e.exports=i},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function n(e,t,r){var n=r-e;return"M "+e+" "+t+" l "+n+" 0 l 0 1 l "+-n+" 0 z "}function a(e,t,r){var n=r-t;return"M "+e+" "+t+" l 0 "+n+" l 1 0 l 0 "+-n+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var n=t/e*100;this.svg.parentNode.style["padding-bottom"]=n+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,i=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(n(r,i,s)),t.push(n(r,o,s)),t.push(a(s,i,o)),t.push(a(r,o,i)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,n){var a=document.createElementNS(t,"text");for(var i in a.setAttribute("stroke","none"),r)r.hasOwnProperty(i)&&a.setAttribute(i,r[i]);for(var s=(""+e).split("\n"),o=0;o0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),n&&(i[n]=a),a},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e["data-name"]&&r.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(r):this.append(r),this.currentGroup.unshift(r),r},r.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):void 0!==e[n]&&r.setAttributeNS(null,n,e[n]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):r.setAttributeNS(null,n,e[n]));return this.prepend(r),r},r.prototype.lineToBack=function(e){for(var r=document.createElementNS(t,"line"),n=Object.keys(e),a=0;a0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},1185:function(e){e.exports="6.4.2"}},t={},r=function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(1045),r;var e,t,r})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={1045:function(e,t,r){var n=r(1185),a=r(6306),i=r(1592),s=r(1028),o=r(5633),c={};c.signature="abcjs-basic v"+n,Object.keys(a).forEach((function(e){c[e]=a[e]})),Object.keys(i).forEach((function(e){c[e]=i[e]})),c.renderAbc=r(6859),c.tuneMetrics=r(9989),c.TimingCallbacks=r(5681);var l=r(6020);c.setGlyph=l.setSymbol,c.strTranspose=o;var h=r(5594),u=r(8471),d=r(522),f=r(2029),p=r(6313),m=r(5281),g=r(8702),v=r(5049),b=r(4718),y=r(3450),x=r(562),k=r(9991);c.synth={CreateSynth:h,instrumentIndexToName:u,pitchToNoteName:d,SynthController:y,SynthSequence:f,CreateSynthControl:p,registerAudioContext:m,activeAudioContext:g,supportsAudio:v,playEvent:b,getMidiFile:x,sequence:s,midiRenderer:k},c.Editor=r(5294),c.EditArea=r(2945),e.exports=c},6306:function(e,t,r){var n=r(5681),a={};!function(){"use strict";var e,t;a.startAnimation=function(r,a,i){function s(e){for(var t=0;tr.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds=r.lastMoment)if(r.eventCallback){var s=r.eventCallback(null);r.shouldStop(s).then((function(e){e&&r.stop()}))}else r.stop()}},r.shouldStop=function(e){return new Promise((function(t){return e?"continue"===e?t(!1):void(e.then&&e.then((function(e){t("continue"!==e)}))):t(!0)}))},r.doBeatCallback=function(e){if(r.beatCallback){for(var t,n,a=r.currentEvent;a=0&&null===r.noteTimings[a].left;)a--;n=r.noteTimings[a]}var i={},s={};if(n){i.top=n.top,i.height=n.height;var o=Math.max(0,e-r.startTime-n.milliseconds),c=t-n.milliseconds,l=n.endX-n.left,h=c?o*l/c:0;i.left=n.left+h,0===r.currentEvent&&n.milliseconds>e-r.startTime&&(i.left=void 0),s={timestamp:e,startTime:r.startTime,ev:n,endMs:t,offMs:o,offPx:h,gapMs:c,gapPx:l}}else s={timestamp:e,startTime:r.startTime};var u=r.startTime;if(r.beatCallback(r.currentBeat/r.beatSubdivisions,r.totalBeats/r.beatSubdivisions,r.lastMoment,i,s),u!==r.startTime)return e-r.startTime;r.currentBeat++}return null},r.animationJogger=function(){r.isRunning&&(r.doTiming(performance.now()),r.joggerTimer=setTimeout(r.animationJogger,60))},r.start=function(e,t){if(r.isRunning=!0,r.isPaused&&(r.isPaused=!1,void 0===e&&(r.justUnpaused=!0)),e)r.setProgress(e,t);else if(0===e)r.reset();else if(null!==r.pausedPercent){var n=performance.now();r.currentTime=r.lastMoment*r.pausedPercent,r.startTime=n-r.currentTime,r.pausedPercent=null,r.reportNext=!0}requestAnimationFrame(r.doTiming),r.joggerTimer=setTimeout(r.animationJogger,60)},r.pause=function(){r.isPaused=!0;var e=performance.now();r.pausedPercent=(e-r.startTime)/r.lastMoment,r.isRunning=!1,r.joggerTimer&&(clearTimeout(r.joggerTimer),r.joggerTimer=null)},r.currentMillisecond=function(){return r.currentTime},r.reset=function(){r.currentBeat=0,r.currentEvent=0,r.currentLine=0,r.startTime=null,r.pausedPercent=null},r.stop=function(){r.pause(),r.reset()},r.setProgress=function(e,t){var n;switch(t){case"seconds":r.currentTime=1e3*e,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;case"beats":r.currentTime=e*r.millisecondsPerBeat*r.beatSubdivisions,r.currentTime<0&&(r.currentTime=0),r.currentTime>r.lastMoment&&(r.currentTime=r.lastMoment),n=r.currentTime/r.lastMoment;break;default:(n=e)<0&&(n=0),n>1&&(n=1),r.currentTime=r.lastMoment*n}r.isRunning||(r.pausedPercent=n);var a=performance.now();for(r.startTime=a-r.currentTime,r.currentEvent,r.currentEvent=0;r.noteTimings.length>r.currentEvent&&r.noteTimings[r.currentEvent].millisecondsr.currentLine&&r.lineEndTimings[r.currentLine].milliseconds+r.lineEndAnticipation=0&&"event"===r.noteTimings[r.currentEvent].type&&r.eventCallback(r.noteTimings[r.currentEvent]),r.lineEndCallback&&r.lineEndCallback(r.lineEndTimings[r.currentLine],r.noteTimings[r.currentEvent],{line:r.currentLine,endTimings:r.lineEndTimings}),r.joggerTimer=setTimeout(r.animationJogger,60)}}},1592:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=r(8905),i=r(9565),s=r(2426),o={};!function(){"use strict";o.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=o.TuneBook=function(e){var t=i(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t=0&&h0,v=0;v=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:i.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=o},6859:function(e,t,r){var n=r(1592),a=(r(6780),r(5253)),i=r(8905),s=r(1756),o={};function c(){var e=window.innerWidth;for(var t in o)if(o.hasOwnProperty(t)){var r=o[t];e-=2*r.offsetLeft,r.style.width=e+"px"}}try{window.addEventListener("resize",c),window.addEventListener("orientationChange",c)}catch(e){}function l(e,t,r,n,i){r.viewportHorizontal?(e.innerHTML='
',r.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",o[e.id]=e,e=e.children[0]):r.viewportVertical?(e.innerHTML='
',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var s=new a(e,r);s.engraveABC(t,n,i),t.engraver=s,(r.viewportVertical||r.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}e.exports=function(e,t,r,o,c){var h,u={};if(r){for(h in r)r.hasOwnProperty(h)&&(u[h]=r[h]);u.warnings_id&&u.tablature&&(u.tablature.warning_id=u.warnings_id)}if(o)for(h in o)o.hasOwnProperty(h)&&("listener"===h?o[h].highlight&&(u.clickListener=o[h].highlight):u[h]=o[h]);if(c)for(h in c)c.hasOwnProperty(h)&&(u[h]=c[h]);return n.renderEngine((function(e,t,r,n){var o=!1;return"*"===e&&(o=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),!o&&u.wrap&&u.staffwidth?(t=function(e,t,r,n,o){var c=new a(e,o).getMeasureWidths(t),h=s.calcLineWraps(t,c,o);if(h.reParse){var u=new i;u.parse(n,h.revisedParams),t=u.getTune();var d=u.getWarnings();d&&(t.warnings=d)}return o.afterParsing&&o.afterParsing(t,r,n),l(e,t,h.revisedParams,r,0),t.explanation=h.explanation,t}(e,t,r,n,u),t):(u.afterParsing&&u.afterParsing(t,r,n),l(e,t,u,r,0),o&&e.parentNode.removeChild(e),null)}),e,t,u)}},9989:function(e,t,r){var n=r(1592),a=r(5253);e.exports=function(e,t){return n.renderEngine((function(e,r,n,i){(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e);var s=new a(e,t).getMeasureWidths(r);return e.parentNode.removeChild(e),{sections:s}}),"*",e,t)}},9447:function(e,t,r){var n=r(4914).relativeMajor,a={acc:"sharp",note:"f"},i={acc:"sharp",note:"c"},s={acc:"sharp",note:"g"},o={acc:"sharp",note:"d"},c={acc:"sharp",note:"A"},l={acc:"sharp",note:"e"},h={acc:"flat",note:"B"},u={acc:"flat",note:"e"},d={acc:"flat",note:"A"},f={acc:"flat",note:"d"},p={acc:"flat",note:"G"},m={acc:"flat",note:"c"},g={"C#":[a,i,s,o,c,l,{acc:"sharp",note:"B"}],"F#":[a,i,s,o,c,l],B:[a,i,s,o,c],E:[a,i,s,o],A:[a,i,s],D:[a,i],G:[a],C:[],F:[h],Bb:[h,u],Eb:[h,u,d],Cm:[h,u,d],Ab:[h,u,d,f],Db:[h,u,d,f,p],Gb:[h,u,d,f,p,m],Cb:[h,u,d,f,p,m,{acc:"flat",note:"F"}],"A#":[h,u],"B#":[],"D#":[h,u,d],"E#":[h],"G#":[h,u,d,f],none:[]};e.exports=function(e){var t=g[n(e)];return t?JSON.parse(JSON.stringify(t)):null}},4914:function(e){var t={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=null;e.exports={relativeMajor:function(e){r||function(){r={};for(var e=Object.keys(t),n=0;n=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;ee)return c}}return null},this.addElementToEvents=function(e,t,r,a,i,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f0)for(var s=i.staffs[0],o=s.absoluteY,c=o-s.top*a.STEP,l=i.staffs[i.staffs.length-1],h=(o=l.absoluteY)-l.bottom*a.STEP-c,u=i.voices,d=0;d0&&o["event"+p]&&(w="event"+p),p=Math.round(1e3*f),"bar"===C.type){var S=C.abcelem.type,_="bar_right_repeat"===S||"bar_dbl_repeat"===S,E="1"===C.abcelem.startEnding,M="bar_left_repeat"===S||"bar_dbl_repeat"===S||"bar_right_repeat"===S;if(_){x>0&&(o[w].endX=C.x),-1===g&&(g=x);var A=0;y=-1;for(var N=m;N=0;i--){var s=e[i];"bar"===s.type?(s.top=n,s.nextTop=t,t=n,s.bottom=a,s.nextBottom=r,r=a):"event"===s.type&&(n=s.top,a=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(e,r){if(!(r.length<1)){for(var n=0;na.left&&(a.endX=Math.min(a.endX,s)):a.endX=s}}var o=r[r.length-1];o.endX=e[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:u}),this.addUsefulCallbackInfo(s,b*a),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),n=0;n0?e.duration[0]:r)/r}if(!t){t=180;var n=this.getMeterFraction();n&&3!==n.num&&n.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var r=this.metaText?this.metaText.tempo:null,n=this.getBpm(r),a=1;e?r&&(a=e/n):e=n;var i=this.getBeatLength(),s=e/60,o=this.getBarLength()/i*t/s;o&&(o-=this.getPickupLength()/i/s);var c=i*s;return this.noteTimings=this.setupEvents(o,c,e,a),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=i(this,e);return s(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return o(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(e,t)||(e.className+=(e.className?" ":"")+t),e},this.removeClassName=function(e,t){return e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ")),e},this.setReadOnly=function(e){var t="abc_textarea_readonly",r=this.editarea.getElem();e?(r.setAttribute("readonly","yes"),this.addClassName(r,t)):(r.removeAttribute("readonly"),this.removeClassName(r,t))}};c.prototype.redrawMidi=function(){if(this.generate_midi&&!this.midiPause){var e=new window.CustomEvent("generateMidi",{detail:{tunes:this.tunes,abcjsParams:this.abcjsParams,downloadMidiEl:this.downloadMidi,inlineMidiEl:this.inlineMidi,engravingEl:this.div}});window.dispatchEvent(e)}if(this.synth){var t=this.synth.synthControl;this.synth.synthControl||(this.synth.synthControl=new a,this.synth.synthControl.load(this.synth.el,this.synth.cursorControl,this.synth.options)),this.synth.synthControl.setTune(this.tunes[0],t,this.synth.options)}},c.prototype.modelChanged=function(){if(!this.bReentry){this.bReentry=!0;try{this.timerId=null,this.synth&&this.synth.synthControl&&this.synth.synthControl.disable(!0),this.tunes=s(this.div,this.currentAbc,this.abcjsParams),this.tunes.length>0&&(this.warnings=this.tunes[0].warnings),this.redrawMidi()}catch(e){console.error("ABCJS error: ",e),this.warnings||(this.warnings=[]),this.warnings.push(e.message)}this.warningsdiv&&(this.warningsdiv.innerHTML=this.warnings?this.warnings.join("
"):"No errors"),this.updateSelection(),this.bReentry=!1}},c.prototype.paramChanged=function(e){if(e)for(var t in e)e.hasOwnProperty(t)&&(this.abcjsParams[t]=e[t]);this.currentAbc="",this.fireChanged()},c.prototype.synthParamChanged=function(e){if(this.synth){if(this.synth.options={},e)for(var t in e)e.hasOwnProperty(t)&&(this.synth.options[t]=e[t]);this.currentAbc="",this.fireChanged()}},c.prototype.parseABC=function(){var e=this.editarea.getString();return e===this.currentAbc?(this.updateSelection(),!1):(this.currentAbc=e,!0)},c.prototype.updateSelection=function(){var e=this.editarea.getSelection();try{this.tunes.length>0&&this.tunes[0].engraver&&this.tunes[0].engraver.rangeHighlight(e.start,e.end)}catch(e){}this.selectionChangeCallback&&this.selectionChangeCallback(e.start,e.end)},c.prototype.fireSelectionChanged=function(){this.updateSelection()},c.prototype.setDirtyStyle=function(e){if(void 0!==this.indicate_changed){var t,r,a="abc_textarea_dirty",i=this.editarea.getElem();e?function(e,t){var r=e.className;return r.length>0&&(r===t||new RegExp("(^|\\s)"+t+"(\\s|$)").test(r))}(t=i,r=a)||(t.className+=(t.className?" ":"")+r):function(e,t){e.className=n.strip(e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," "))}(i,a)}},c.prototype.fireChanged=function(){if(!this.bIsPaused&&this.parseABC()){var e=this;this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout((function(){e.modelChanged()}),300);var t=this.isDirty();this.wasDirty!==t&&(this.wasDirty=t,this.setDirtyStyle(t)),this.onchangeCallback&&this.onchangeCallback(this)}},c.prototype.setNotDirty=function(){this.editarea.initialText=this.editarea.getString(),this.wasDirty=!1,this.setDirtyStyle(!1)},c.prototype.isDirty=function(){return void 0!==this.indicate_changed&&this.editarea.initialText!==this.editarea.getString()},c.prototype.highlight=function(e,t,r,n,a,i){this.editarea.setSelection(e.startChar,e.endChar),this.selectionChangeCallback&&this.selectionChangeCallback(e.startChar,e.endChar),this.clientClickListener&&this.clientClickListener(e,t,r,n,a,i)},c.prototype.pause=function(e){this.bIsPaused=e,e||this.fireChanged()},c.prototype.millisecondsPerMeasure=function(){return this.synth&&this.synth.synthControl&&this.synth.synthControl.visualObj?this.synth.synthControl.visualObj.millisecondsPerMeasure():0},c.prototype.pauseMidi=function(e){this.midiPause=e,e||this.redrawMidi()},e.exports=c},3284:function(e,t,r){var n,a=r(9991);!function(){"use strict";function e(e,t,r){for(var n=Object.keys(t),a=0;ai){var c=(n[s]-i)*r;e.addRest(c),i=n[s]}for(var l=0;l128&&(s=s.substring(0,124)+"...");var o=t.getKeySignature(),c=t.getMeterFraction(),l=n.tempo,h=l/60;8==c.den&&(h=(l=6e4/(t.millisecondsPerMeasure()/c.num)/2)/60),i.setGlobalInfo(l,s,o,c);for(var u=0;uu&&(m=r.pan[u]),128===p.instrument?(i.setChannel(9,m),i.setInstrument(0)):(i.setChannel(p.channel,m),i.setInstrument(p.instrument));break;case"note":var g=p.gap*h,v=p.start,b=v+p.duration-g;d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:p.volume,cents:p.cents}),d[b]||(d[b]=[]),d[b].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}e(i,d,1920),i.endTrack()}return i.getData()}}(),e.exports=n},5008:function(e){var t={cloneArray:function(e){for(var t=[],r=0;r=0&&e.lastIndexOf(t)===r},last:function(e){return 0===e.length?null:e[e.length-1]}};e.exports=t},8905:function(e,t,r){var n=r(5008),a=r(8360),i=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),u="",d="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,metaTextInfo:t.metaTextInfo,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline,findSelectableElement:t.findSelectableElement,getSelectableArray:t.getSelectableArray};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e/g,">")},y=function(t,r,n){r||(r=" ");var a=r[n];" "!==a&&a||(a="SPACE");var i,s=b(r.substring(n-64,n))+''+a+""+b(r.substring(n+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(n+1)+": "+t+": "+s),i={message:t,line:r,startChar:v.iChar+n,column:n},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(i)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var x=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(o=o.replace(/\\([-_*|~])/g,"$1"),i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=!1,l=0;l0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":c||(o(l),a.push({skip:!0,to:"slur"}));break;case"*":c||(o(l),a.push({skip:!0,to:"next"}));break;case"|":c||(o(l),a.push({skip:!0,to:"bar"}));break;case"~":c||(s=!0)}c="\\"===r[l]}t.forEach((function(e){if(0!==a.length)if(a[0].skip){switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=n.strip(r))[r.length-1]&&(r+=" ");for(var a=[],i=0,s=!1,o=function(t){var o=n.strip(r.substring(i,t));if(i=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),a.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c0&&(n.last(a).divider="-",a.push({skip:!0,to:"next"}));break;case"_":o(c),a.push({skip:!0,to:"slur"});break;case"*":o(c),a.push({skip:!0,to:"next"});break;case"|":o(c),a.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==a.length)if(a[0].skip)switch(a[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&a.shift();break;case"bar":"bar"===e.el_type&&a.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=a.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},w=function(e){if(n.startsWith(e,"%%")){var t=a.addDirective(e.substring(2));t&&y(t,e,2)}else{var i=e.indexOf("%");if(i>=0&&(e=e.substring(0,i)),0!==(e=e.replace(/\s+$/,"")).length)if(u)x(r.getCurrentVoice(),e.substring(2));else if(d)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e[1]||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&x(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function C(e,t){e.push({el_type:"hint"});for(var r=0;r1){for(var b=1;b0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join(" ")}var C=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===n.last(C).length&&C.pop(),e=new o(C,v),m=new i(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&a.globalFormatting(h.format);for(var S=e.nextLine();S;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var _=v.is_in_header;w(S),_&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),S=e.nextLine()}u&&x(r.getCurrentVoice(),""),d&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var E=792,M=612;switch(v.papersize){case"legal":E=1008,M=612;break;case"A4":E=842.4,M=597.6}if(v.landscape){var A=E;E=M,M=A}t.formatting.pagewidth||(t.formatting.pagewidth=M),t.formatting.pageheight||(t.formatting.pageheight=E),h.hint_measures&&function(){for(var e=0;e1&&!n.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(e){n.startsWith(e,"%%")&&(t+=e+"\n")}));var c=t;return o.forEach((function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var a=e.pure.split("T:");a.length>1&&(a=a[1].split("\n"),e.title=n.strip(a[0]));var i=e.pure.substring(2,e.pure.indexOf("\n"));e.id=n.strip(i)})),{header:c,tunes:o}}},8360:function(e,t,r){var n=r(5008),a={};!function(){"use strict";var e,t,r,i,s;a.initialize=function(n,a,o,c,l){e=n,t=a,i=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},i.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},i.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},i.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},i.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},i.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},i.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},i.formatting.annotationfont=r.annotationfont,i.formatting.gchordfont=r.gchordfont,i.formatting.historyfont=r.historyfont,i.formatting.infofont=r.infofont,i.formatting.measurefont=r.measurefont,i.formatting.partsfont=r.partsfont,i.formatting.repeatfont=r.repeatfont,i.formatting.textfont=r.textfont,i.formatting.tripletfont=r.tripletfont,i.formatting.vocalfont=r.vocalfont,i.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,n,a,i){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[i]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",n,a),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",n,a),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",n,a)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",n,a):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",n,a):c=g.token:t("Expected font size in font definition.",n,a),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[i]?f=!0:t('This font style doesn\'t support "box"',n,a),p="finished"):t("Unknown parameter "+g.token+" in font definition.",n,a);break;case"finished":t('Extra characters found after "box" in font definition.',n,a)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",n,a),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",n,a),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],n,0,e),r.is_in_header&&(i.formatting[e]=r[e]),null)},h=function(e,t){var r="";t.forEach((function(e){r+=e.token}));var n=parseFloat(r);if(isNaN(n)||0===n)return'Directive "'+e+'" requires a number as a parameter.';i.formatting.scale=n},u=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],d=function(e,t,n,a,i){if(1!==n.length||"number"!==n[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=n[0].intt;return void 0!==a&&si?'Directive "'+t+'" requires a number less than or equal to '+i+" as a parameter.":(r[e]=s,null)},f=function(e,t,n){if(1===n.length&&("true"===n[0].token||"false"===n[0].token))return r[e]="true"===n[0].token,null;var a=d(e,t,n,0,1);return null!==a?a:(r[e]=1===r[e],null)},p=function(e,t,n,a){if(1!==n.length)return'Directive "'+t+'" requires one of [ '+a.join(", ")+" ] as a parameter.";for(var i=n[0].token,s=!1,o=0;!s&&o1&&r.setfont){var n=[];""!==t[0]&&n.push({text:t[0]});for(var a=1;a=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}a.addDirective=function(o){var M=e.tokenize(o,0,o.length);if(0===M.length||"alpha"!==M[0].type)return null;var A=o.substring(o.indexOf(M[0].token)+M[0].token.length);A=e.stripComment(A);var N,B=M.shift().token.toLowerCase(),P="";switch(B){case"bagpipes":i.formatting.bagpipes=!0;break;case"flatbeams":i.formatting.flatbeams=!0;break;case"jazzchords":i.formatting.jazzchords=!0;break;case"accentAbove":i.formatting.accentAbove=!0;break;case"germanAlphabet":i.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=A;break;case"graceslurs":if(1!==M.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===M[0].token||"false"===M[0].token)i.formatting.graceSlurs=!1;else{if("1"!==M[0].token&&"true"!==M[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+M[0].token+")";i.formatting.graceSlurs=!0}break;case"lineThickness":var L=E(M);if(void 0!==L.value&&(i.formatting.lineThickness=L.value),L.error)return L.error;break;case"stretchlast":var O=E(M);if(void 0!==O.value&&(i.formatting.stretchlast=O.value),O.error)return O.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":i.formatting.titleleft=!0;break;case"measurebox":i.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",B,M,_);case"dynamic":return p("dynamicPosition",B,M,_);case"gchord":return p("chordPosition",B,M,_);case"ornament":return p("ornamentPosition",B,M,_);case"volume":return p("volumePosition",B,M,_);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(i.formatting[t]=n.value,null)}(B,M);case"voicescale":if(1!==M.length||"number"!==M[0].type)return"voicescale requires one float as a parameter";var H=M.shift();return r.currentVoice&&(r.currentVoice.scale=H.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(1!==M.length)return"voicecolor requires one string as a parameter";var z=M.shift();return r.currentVoice&&(r.currentVoice.color=z.token,s.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var D=Math.round(function(t,r){var n=e.getMeasurement(r);return 0===n.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:n.value}(B,M));return D.error?D.error:(s.addSpacing(D),null);case"scale":h(B,M);break;case"sep":if(0===M.length)s.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var F=e.getMeasurement(M);if(0===F.used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var j=F.value;if(0===(F=e.getMeasurement(M)).used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var I=F.value;if(0===(F=e.getMeasurement(M)).used||0!==M.length)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var V=F.value;s.addSeparator(j,I,V,{startChar:r.iChar,endChar:r.iChar+A.length})}break;case"barsperstaff":if(null!==(P=d("barsperstaff",B,M)))return P;break;case"staffnonote":if(1!==M.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===M[0].token)r.staffnonote=!0;else{if("1"!==M[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+M[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(P=f("printTempo",B,M)))return P;break;case"partsbox":if(null!==(P=f("partsBox",B,M)))return P;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(P=f("freegchord",B,M)))return P;break;case"measurenb":case"barnumbers":if(null!==(P=d("barNumbers",B,M)))return P;break;case"setbarnb":if(1!==M.length||"number"!==M[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(M[0].intt);break;case"begintext":var Y="";for(N=e.nextLine();N&&0!==N.indexOf("%%endtext");)n.startsWith(N,"%%")?Y+=N.substring(2)+"\n":Y+=N+"\n",N=e.nextLine();s.addText(Y,{startChar:r.iChar,endChar:r.iChar+Y.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(N=e.nextLine();N&&0!==N.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":A.length>0&&r.ignoredDecorations.push(A.substring(0,A.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var G=e.translateString(A);s.addText(a.parseFontChangeLine(G),{startChar:r.iChar,endChar:r.iChar+A.length+7});break;case"center":var q=e.translateString(A);s.addCentered(a.parseFontChangeLine(q));break;case"font":break;case"setfont":var W=e.tokenize(A,0,A.length);if(W.length>=4&&"-"===W[0].token&&"number"===W[1].type){var R=parseInt(W[1].token);R>=1&&R<=9&&(r.setfont||(r.setfont=[]),W.shift(),W.shift(),r.setfont[R]=c(W,r.setfont[R],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(B,M,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(i.formatting[e]=c(t,i.formatting[e],r,0,e),null)}(B,M,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",M,o);case"staves":case"score":r.score_is_present=!0;for(var X,U=function(e,t,a,i,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=n.last(r.staves);void 0!==a&&void 0===o.bracket&&(o.bracket=a),void 0!==i&&void 0===o.brace&&(o.brace=i),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},K=!1,$=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,re=function(){if(te=!0,X){var e="start";X.staffNum>0&&("start"!==r.staves[X.staffNum-1].connectBarLines&&"continue"!==r.staves[X.staffNum-1].connectBarLines||(e="continue")),r.staves[X.staffNum].connectBarLines=e}};M.length;){var ne=M.shift();switch(ne.token){case"(":K?t("Can't nest parenthesis in %%score",o,ne.start):(K=!0,J=!0);break;case")":!K||J?t("Unexpected close parenthesis in %%score",o,ne.start):K=!1;break;case"[":$?t("Can't nest brackets in %%score",o,ne.start):($=!0,Z=!0);break;case"]":!$||Z?t("Unexpected close bracket in %%score",o,ne.start):($=!1,r.staves[X.staffNum].bracket="end");break;case"{":Q?t("Can't nest braces in %%score",o,ne.start):(Q=!0,ee=!0);break;case"}":!Q||ee?t("Unexpected close brace in %%score",o,ne.start):(Q=!1,r.staves[X.staffNum].brace="end");break;case"|":re();break;default:for(var ae="";("alpha"===ne.type||"number"===ne.type)&&(ae+=ne.token,ne.continueId);)ne=M.shift();U(ae,!K||J,Z?"start":$?"continue":void 0,ee?"start":Q?"continue":void 0,te),J=!1,Z=!1,ee=!1,te=!1,X=r.voices[ae],"staves"===B&&re()}}break;case"newpage":var ie=e.getInt(A);s.addNewPage(0===ie.digits?-1:ie.value);break;case"abc":var se=A.split(" ");switch(se[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var oe=se.shift();s.addMetaText(B+oe,se.join(" "),{startChar:r.iChar,endChar:r.iChar+A.length+5});break;default:return"Unknown directive: "+B+se[0]}break;case"header":case"footer":var ce=e.getMeat(A,0,A.length);'"'===(ce=A.substring(ce.start,ce.end))[0]&&'"'===ce[ce.length-1]&&(ce=ce.substring(1,ce.length-1));var le=ce.split("\t"),he={};he=1===le.length?{left:"",center:le[0],right:""}:2===le.length?{left:le[0],center:le[1],right:""}:{left:le[0],center:le[1],right:le[2]},le.length>3&&t("Too many tabs in "+B+": "+le.length+" found.",A,0),s.addMetaTextObj(B,he,{startChar:r.iChar,endChar:r.iChar+o.length});break;case"midi":var ue=e.tokenize(A,0,A.length,!0);ue.length>0&&"="===ue[0].token&&ue.shift(),0===ue.length?t("Expected midi command",A,0):function(e,r,n){var a=e.shift().token,i=[];if(m.indexOf(a)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+a,n,0);else if(g.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):i.push(e[0].token);else if(v.indexOf(a)>=0)1!==e.length?t("Expected one parameter in MIDI "+a,n,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+a,n,0):i.push(e[0].intt);else if(b.indexOf(a)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+a,n,0):(i.push(e[0].intt),2===e.length&&i.push(e[1].intt));else if(y.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt));else if(w.indexOf(a)>=0)2!==e.length?t("Expected two parameters in MIDI "+a,n,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+a,n,0):(i.push(e[0].token),i.push(e[1].intt));else if("drummap"===a)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,i=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,i=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+a,n,0);else if(C.indexOf(a)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[2].intt));else if(x.indexOf(a)>=0)4!==e.length?t("Expected four parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt));else if(k.indexOf(a)>=0)5!==e.length?t("Expected five parameters in MIDI "+a,n,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+a,n,0):(i.push(e[0].intt),i.push(e[1].intt),i.push(e[2].intt),i.push(e[3].intt),i.push(e[4].intt));else if(b.indexOf(a)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+a,n,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+a,n,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+a,n,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+a,n,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+a,n,0)):(i.push(e[0].intt),4===e.length&&i.push(e[3].intt));else if(T.indexOf(a)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+a,n,0);else{var o=e.shift();for(i.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+a,n,0),i.push(o.intt)}else if(S.indexOf(a)>=0)if(1!==e.length&&2!==e.length)t("Expected one or two parameters in MIDI "+a,n,0);else if("number"!==e[0].type)t("Expected integer parameter in MIDI "+a,n,0);else if(2===e.length&&"alpha"!==e[1].type)t("Expected alpha parameter in MIDI "+a,n,0);else if(i.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?t("Expected octave value in MIDI"+a):(c<-1&&(t("Expected octave= in MIDI "+a+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(t("Expected octave= in MIDI "+a+" to be <= 3 (recv:"+c+")"),c=3),i.push(c))):t("Expected octave= in MIDI"+a)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:a,params:i}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[a]=i)}(ue,i,A);break;case"percmap":var de=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],n=parseInt(t[1],10);if((isNaN(n)||n<35||n>81)&&t[1]&&(n=u.indexOf(t[1].toLowerCase())+35),isNaN(n)||n<35||n>81)return{error:'Expected drum name, received "'+t[1]+'"'};var a={sound:n};return 3===t.length&&(a.noteHead=t[2]),{key:r,value:a}}(A);de.error?t(de.error,o,8):(i.formatting.percmap||(i.formatting.percmap={}),i.formatting.percmap[de.key]=de.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":i.formatting[B]=A;break;default:return"Unknown directive: "+B}return null},a.globalFormatting=function(n){for(var a in n)if(n.hasOwnProperty(a)){var s,o=""+n[a],c=e.tokenize(o,0,o.length);switch(a){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(a,c,o);break;case"scale":h(a,c);break;case"partsbox":null!==(s=f("partsBox",a,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",a,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||t('Directive "'+a+'" requires a number as a parameter.'),i.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var u=E(c);if(void 0!==u.value&&(i.formatting.stretchlast=u.value),u.error)return u.error;break;default:t("Formatting directive unrecognized: ",a,0)}}}}(),e.exports=a},9928:function(e,t,r){var n=r(5008),a=r(8360),i=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,n){i.initialize(e,t,r,n,o),a.initialize(e,t,r,n,o)},this.reset(e,t,r,s),this.setTitle=function(e,t){r.hasMainTitle?o.addSubtitle(e,{startChar:r.iChar,endChar:r.iChar+t+2}):(o.addMetaText("title",e,{startChar:r.iChar,endChar:r.iChar+t+2}),r.hasMainTitle=!0)},this.setMeter=function(n){if("C"===(n=e.stripComment(n)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===n)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===n.length||"none"===n.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var a=e.tokenize(n,0,n.length);try{var i=function(){var e=function(){var e={value:0,num:""},t=a.shift();for("("===t.token&&(t=a.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===a.length||"/"===a[0].token)return e;if(")"===(t=a.shift()).token){if(0===a.length||"/"===a[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===a.length)throw"Expected top number of meter";t=a.shift()}return e}();if(0===a.length)return e;var t=a.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=a.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===a.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=i();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===a.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,n,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var n=0;n0&&(r.default_length=i/s,r.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(n,a,i,s){try{var o=e.tokenize(n,a,i);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:s+a-2,endChar:s+i},h=!0,u=o.shift();if("quote"===u.type&&(l.preString=u.token,u=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===u.type&&"C"===u.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(u=o.shift()).type&&"="===u.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(u.token)}else{if("number"!==u.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(u.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(u=o.shift()).type||"="!==u.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(u.token)}}else{if("number"!==u.type)throw"Unknown value in Q: field";var d=parseInt(u.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=d;else{if(h=!1,"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(u.token);for(l.duration=[d/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";if(d=parseInt(u.token),"punct"!==(u=o.shift()).type&&"/"!==u.token)throw"Expected fraction in Q: field";if("number"!==(u=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(u.token),l.duration.push(d/f)}if("punct"!==(u=o.shift()).type&&"="!==u.token)throw"Expected = in Q: field";if("number"!==(u=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(u.token)}}if(0!==o.length&&("quote"===(u=o.shift()).type&&(l.postString=u.token,u=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(l.suppress=!0),{type:h?"delaySet":"immediate",tempo:l}}catch(e){return t(e,n,a),{type:"none"}}},this.letter_to_inline_header=function(n,c,l){var h=!1,u=e.eatWhiteSpace(n,c);if(c+=u,n.length>=c+5&&"["===n[c]&&":"===n[c+2]){var d=n.indexOf("]",c),f=r.iChar+c,p=r.iChar+d+1;switch(n.substring(c,c+3)){case"[I:":var m=a.addDirective(n.substring(c+3,d));return m&&t(m,n,c),[d-c+1+u];case"[M:":var g=this.setMeter(n.substring(c+3,d));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):r.meter=g,[d-c+1+u];case"[K:":var v=i.parseKey(n.substring(c+3,d),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,r.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,i.fixKey(r.clef,r.key)),[d-c+1+u];case"[P:":var b=a.parseFontChangeLine(n.substring(c+3,d));return l||s.lines.length<=s.lineNum?r.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[d-c+1+u];case"[L:":return this.setDefaultLength(n,c+3,d),[d-c+1+u];case"[Q:":if(d>0){var y=this.setTempo(n,c+3,d,r.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):r.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):r.tempoForNextLine=["tempo",f,p,y.tempo]),[d-c+1+u,n[c+1],n.substring(c+3,d)]}break;case"[V:":if(d>0)return h=i.parseVoice(n,c+3,d),[d-c+1+u,n[c+1],n.substring(c+3,d),h];break;case"[r:":return[d-c+1+u]}}return[0]},this.letter_to_body_header=function(e,s){var c=!1;if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var l=a.addDirective(e.substring(s+2));return l&&t(l,e,s),[e.length];case"M:":var h=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&h&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,h),[e.length];case"K:":var u=i.parseKey(e.substring(s+2),o.hasBeginMusic());return u.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),u.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,i.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var d=e.indexOf("",s+2);-1===d&&(d=e.length);var f=this.setTempo(e,s+2,d,r.iChar);return"delaySet"===f.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,f.tempo),[d,e[s],n.strip(e.substring(s+2))];case"V:":return c=i.parseVoice(e,s+2,e.length),[e.length,e[s],n.strip(e.substring(s+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(n){var c=l[n[0]],h=n.length-2,u=e.translateString(e.stripComment(n.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else if(void 0!==c)o.addMetaText(c,a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length});else{var d=r.iChar,f=d+n.length;switch(n[0]){case"H":for(o.addMetaTextArray("history",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();n&&":"!==n[1];)e.nextLine(),o.addMetaTextArray("history",a.parseFontChangeLine(e.translateString(e.stripComment(n))),{startChar:r.iChar,endChar:r.iChar+n.length}),n=e.peekLine();break;case"K":this.resolveTempo();var p=i.parseKey(n.substring(2),!1);!r.is_in_header&&o.hasBeginMusic()&&(p.foundClef&&o.appendStartingElement("clef",d,f,r.clef),p.foundKey&&o.appendStartingElement("key",d,f,i.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(n,2,n.length);break;case"M":r.origMeter=r.meter=this.setMeter(n.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",a.parseFontChangeLine(u),{startChar:r.iChar,endChar:r.iChar+n.length}):r.partForNextLine={title:u,startChar:d,endChar:f};break;case"Q":var m=this.setTempo(n,2,n.length,r.iChar);"delaySet"===m.type?r.tempo=m.tempo:"immediate"===m.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",d,f,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":r.titlecaps&&(u=u.toUpperCase()),this.setTitle(a.parseFontChangeLine(e.theReverser(u)),h);break;case"U":this.addUserDefinition(n,2,n.length);break;case"V":if(i.parseVoice(n,2,n.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",n,0);break;default:return{regular:!0}}}return{}}}},9708:function(e,t,r){var n=r(8360),a=r(2821),i={};!function(){var e,t,r,s;i.initialize=function(n,a,i,o,c){e=n,t=a,r=i,s=c},i.standardKey=function(e,t,n,i){return a.keySignature(r,e,t,n,i)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var r=o[e];return(r?r.mid:0)+t};i.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},i.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};i.addPosToKey=function(e,t){var r=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),r<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},i.fixKey=function(e,t){var r=Object.assign({},t);return i.addPosToKey(e,r),r};var h=function(e){var t=0,r=e[t++];"^"!==r&&"_"!==r||(r=e[t++]);var n=l[r];for(void 0===n&&(n=6);t0){l.foundKey=!0;var u="",d="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=h.token;if(o.length>0){var p=e.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,u=p.token),o.length>0){var m=e.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,d=m.token)}if(void 0===i.standardKey(f,h.token,u,0))return t("Unsupported key signature: "+f,a,0),l}var g,v=i.deepCopyKey(r.key),b=!s&&r.globalTranspose?-r.globalTranspose:0;if(s&&(g=r.globalTransposeOrigKeySig),r.key=i.deepCopyKey(i.standardKey(f,h.token,u,b)),s&&(r.globalTransposeOrigKeySig=g),r.key.mode=d,v){for(var y,x=0;x0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return t("Expected = after middle",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after middle",a,k.start);break}if(0===o.length)return t("Expected parameter after middle=",a,0),l;var E=e.getPitchFromTokens(o);E.warn&&t(E.warn,a,0),E.position&&(r.clef.verticalPos=E.position-6);break;case"transpose":if(o.shift(),0===o.length)return t("Expected = after transpose",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after transpose",a,k.start);break}if(0===o.length)return t("Expected parameter after transpose=",a,0),l;if("number"!==o[0].type){t("Expected number after transpose",a,o[0].start);break}r.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return t("Expected = after stafflines",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after stafflines",a,k.start);break}if(0===o.length)return t("Expected parameter after stafflines=",a,0),l;if("number"!==o[0].type){t("Expected number after stafflines",a,o[0].start);break}r.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return t("Expected = after staffscale",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after staffscale",a,k.start);break}if(0===o.length)return t("Expected parameter after staffscale=",a,0),l;if("number"!==o[0].type){t("Expected number after staffscale",a,o[0].start);break}r.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return t("Expected = after octave",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after octave",a,k.start);break}if(0===o.length)return t("Expected parameter after octave=",a,0),l;if("number"!==o[0].type){t("Expected number after octave",a,o[0].start);break}r.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return t("Expected = after style",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after style",a,k.start);break}if(0===o.length)return t("Expected parameter after style=",a,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=o[0].token,o.shift();break;default:t("error parsing style element: "+o[0].token,a,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return t("Expected = after clef",a,0),l;if("="!==(k=o.shift()).token){t("Expected = after clef",a,k.start);break}if(0===o.length)return t("Expected parameter after clef=",a,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=o.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":M.token="alto";break;case"F":case"f":M.token="bass";break;case"G":case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,a,M.start)}o.length>0&&"number"===o[0].type&&(M.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(M.token+=o[0].token+o[1].token,o.shift(),o.shift()),r.clef={type:M.token,verticalPos:c(M.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),l.foundClef=!0;break;default:t("Unknown parameter: "+o[0].token,a,o[0].start),o.shift()}return l},i.parseVoice=function(n,a,i){var o=e.getMeat(n,a,i),l=o.start,u=o.end,d=e.getToken(n,l,u);if(0!==d.length){var f=!1;void 0===r.voices[d]&&(r.voices[d]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",n,l)),l+=d.length,l+=e.eatWhiteSpace(n,l);for(var p={startStaff:f},m=function(r){var a=e.getVoiceToken(n,l,u);void 0!==a.warn?t("Expected value for "+r+" in voice: "+a.warn,n,l):void 0!==a.err?t("Expected value for "+r+" in voice: "+a.err,n,l):0===a.token.length&&'"'!==n[l]?t("Expected value for "+r+" in voice",n,l):p[r]=a.token,l+=a.len},g=function(a,i,s){var o=e.getVoiceToken(n,l,u);void 0!==o.warn?t("Expected value for "+i+" in voice: "+o.warn,n,l):void 0!==o.err?t("Expected value for "+i+" in voice: "+o.err,n,l):0===o.token.length&&'"'!==n[l]?t("Expected value for "+i+" in voice",n,l):("number"===s&&(o.token=parseFloat(o.token)),r.voices[a][i]=o.token),l+=o.len},v=function(r,a){var i=e.getVoiceToken(n,l,u);if(void 0!==i.warn)t("Expected value for "+r+" in voice: "+i.warn,n,l);else if(void 0!==i.err)t("Expected value for "+r+" in voice: "+i.err,n,l);else{if(0!==i.token.length||'"'===n[l])return"number"===a&&(i.token=parseFloat(i.token)),i.token;t("Expected value for "+r+" in voice",n,l)}l+=i.len},b=function(a,i){var s=e.getVoiceToken(n,l,u);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+i+" in voice: "+s.warn,n,l);else if(0===s.token.length&&'"'!==n[l])t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[a][i]=o:t("Expected one of (_B, _E, _b, _e) for "+i+" in voice",n,l)}l+=s.len};l0&&(t+=u[0],"V"===u[1]&&this.startNewLine());for(var d=0;t0)t+=p[0],"V"===p[1]&&(l=!0);else{var m;for((!o.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((m=n.eatWhiteSpace(e,t))>0&&(t+=m),t>0&&""===e[t-1]&&(m=c.letter_to_body_header(e,t))[0]>0&&("V"===m[1]&&this.startNewLine(),t=m[0],i.start_new_line=!1),(m=P(e,t))[0]>0&&(t+=m[0]),(m=E(e,t))[0]>0){S.chord||(S.chord=[]);var g=n.translateString(m[1]);g=g.replace(/;/g,"\n");for(var y=!1,x=0;x0&&(S.force_end_beam_last=!0),t+=k}else if((m=-1===v.indexOf(e[t])?B(e,t):[0])[0]>0)null===m[1]?t+10&&(0===m[1].indexOf("style=")?S.style=m[1].substr(6):(void 0===S.decoration&&(S.decoration=[]),"beambr1"===m[1]?S.beambr=1:"beambr2"===m[1]?S.beambr=2:S.decoration.push(m[1]))),t+=m[0];else{if(!((m=M(e,t))[0]>0))break;S.gracenotes=m[1],t+=m[0]}if((m=L(e,t))[0]>0){d=0,void 0!==S.gracenotes&&(S.rest={type:"spacer"},S.duration=.125,i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+t,r+t+m[0],S),i.measureNotEmpty=!0,S={});var w={type:m[1]};0===w.type.length?a("Unknown bar type",e,t):(i.inEnding&&"bar_thin"!==w.type&&(w.endEnding=!0,i.inEnding=!1),m[2]&&(w.startEnding=m[2],i.inEnding&&(w.endEnding=!0),i.inEnding=!0,"bar_right_repeat"===m[1]?i.restoreStartEndingHoldOvers():i.duplicateStartEndingHoldOvers()),void 0!==S.decoration&&(w.decoration=S.decoration),void 0!==S.chord&&(w.chord=S.chord),w.startEnding&&void 0===i.barFirstEndingNum?i.barFirstEndingNum=i.currBarNumber:w.startEnding&&w.endEnding&&i.barFirstEndingNum?i.currBarNumber=i.barFirstEndingNum:w.endEnding&&(i.barFirstEndingNum=void 0),"bar_invisible"!==w.type&&i.measureNotEmpty&&(void 0===i.currentVoice||0===i.currentVoice.staffNum&&0===i.currentVoice.index)&&(i.currBarNumber++,i.barNumbers&&i.currBarNumber%i.barNumbers==0&&(w.barNumber=i.currBarNumber)),i.addFormattingOptions(S,s.formatting,"bar"),o.appendElement("bar",r+f,r+t+m[0],w),i.measureNotEmpty=!1,S={}),t+=m[0]}else if("&"===e[t])(m=A(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,d++);else{if((m=O(e,t)).consumed>0&&(void 0!==m.startSlur&&(S.startSlur=m.startSlur),m.dottedSlur&&(S.dottedSlur=!0),void 0!==m.triplet&&(h>0?a("Can't nest triplets",e,t):(S.startTriplet=m.triplet,S.tripletMultiplier=m.tripletQ/m.triplet,S.tripletR=m.num_notes,h=void 0===m.num_notes?m.triplet:m.num_notes)),t+=m.consumed),"["===e[t]){t++;for(var C=null,F=!1,j=!1;!j;){var I=B(e,t);I[0]>0&&(t+=I[0]);var V=z(e,t,{},!1);if(null!==V&&void 0!==V.pitch)I[0]>0&&0!==I[1].indexOf("style=")&&(void 0===S.decoration&&(S.decoration=[]),S.decoration.push(I[1])),V.end_beam&&(S.end_beam=!0,delete V.end_beam),void 0===S.pitches?(S.duration=V.duration,S.pitches=[V]):S.pitches.push(V),delete V.duration,I[0]>0&&0===I[1].indexOf("style=")&&(S.pitches[S.pitches.length-1].style=I[1].substr(6)),i.inTieChord[S.pitches.length]&&(V.endTie=!0,i.inTieChord[S.pitches.length]=void 0),V.startTie&&(i.inTieChord[S.pitches.length]=!0),t=V.endChar,delete V.endChar;else if(" "===e[t])a("Spaces are not allowed in chords",e,t),t++;else{if(t0&&(!S.rest||"spacer"!==S.rest.type)&&0==--h&&(S.endTriplet=!0);for(var Y=!1;t":case"<":var G=D(e,t);t+=G[0]-1,i.next_note_duration=G[2],C?C*=G[1]:C=G[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var q=n.getFraction(e,t);C=q.value;var W=e[t=q.index];" "===W&&(F=!0),"-"===W||")"===W||" "===W||"<"===W||">"===W?t--:Y=!0;break;case"0":C=0;break;default:Y=!0}Y||t++}}else a("Expected ']' to end the chords",e,t);void 0!==S.pitches&&(null!==C&&(S.duration=S.duration*C,F&&H(S)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S),i.measureNotEmpty=!0,S={}),j=!0}}}else{var R={},X=z(e,t,R,!0);void 0!==R.endTie&&_(i,d,!0),null!==X&&(void 0!==X.pitch?(S.pitches=[{}],void 0!==X.accidental&&(S.pitches[0].accidental=X.accidental),S.pitches[0].pitch=X.pitch,S.pitches[0].name=X.name,(X.midipitch||0===X.midipitch)&&(S.pitches[0].midipitch=X.midipitch),void 0!==X.endSlur&&(S.pitches[0].endSlur=X.endSlur),void 0!==X.endTie&&(S.pitches[0].endTie=X.endTie),void 0!==X.startSlur&&(S.pitches[0].startSlur=X.startSlur),void 0!==S.startSlur&&(S.pitches[0].startSlur=S.startSlur),void 0!==S.dottedSlur&&(S.pitches[0].dottedSlur=!0),void 0!==X.startTie&&(S.pitches[0].startTie=X.startTie),void 0!==S.startTie&&(S.pitches[0].startTie=S.startTie)):(S.rest=X.rest,void 0!==X.endSlur&&(S.endSlur=X.endSlur),void 0!==X.endTie&&(S.rest.endTie=X.endTie),void 0!==X.startSlur&&(S.startSlur=X.startSlur),void 0!==X.startTie&&(S.rest.startTie=X.startTie),void 0!==S.startTie&&(S.rest.startTie=S.startTie)),void 0!==X.chord&&(S.chord=X.chord),void 0!==X.duration&&(S.duration=X.duration),void 0!==X.decoration&&(S.decoration=X.decoration),void 0!==X.graceNotes&&(S.graceNotes=X.graceNotes),delete S.startSlur,delete S.dottedSlur,T(i,d,S)&&(void 0!==S.pitches?S.pitches[0].endTie=!0:"spacer"!==S.rest.type&&(S.rest.endTie=!0),_(i,d,!1)),(X.startTie||S.startTie)&&_(i,d,!0),t=X.endChar,h>0&&(!X.rest||"spacer"!==X.rest.type)&&0==--h&&(S.endTriplet=!0),X.end_beam&&H(S),S.rest&&"rest"===S.rest.type&&1===S.duration&&N(i)<=1&&(S.rest.type="whole",S.duration=N(i)),S.duration<1&&-1===b.indexOf(S.duration)&&0!==S.duration&&(S.rest&&"spacer"===S.rest.type||a("Duration not representable: "+e.substring(f,t),e,t)),i.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S)||(this.startNewLine(),o.appendElement("note",r+f,r+t,S)),i.measureNotEmpty=!0,S={})}t===f&&(" "!==e[t]&&"`"!==e[t]&&a("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||u[0]>0,this.lineContinuation||(S={})}};var _=function(e,t,r){var n=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][n]=r},E=function(e,t){if('"'===e[t]){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||a("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1][0])r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1][0])r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1][0])r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1][0])r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1][0]){r[1]=r[1].substring(1);var s=n.getFloat(r[1]);if(0===s.digits)return a("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;if(r[1]=r[1].substring(s.digits),","!==r[1][0])return a("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(1);var o=n.getFloat(r[1]);if(0===o.digits)return a("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(o.digits);var c=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==i.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=h.chordName(i,r[1]);return r}return[0,""]},M=function(e,t){if("{"===e[t]){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||a("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o0&&(s[s.length-1].endBeam=!0):a("Unknown character '"+r[1][o]+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function A(e,t){if("&"===e[t]){for(var r=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-r,e.substring(r+1,t)]}return[0]}function N(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var B=function(e,t){var r=i.macros[e[t]];if(void 0!==r)return"!"!==r[0]&&"+"!==r[0]||(r=r.substring(1)),"!"!==r[r.length-1]&&"+"!==r[r.length-1]||(r=r.substring(0,r.length-1)),d.includes(r)?[1,r]:f.includes(r)?("hidden"===i.volumePosition&&(r=""),[1,r]):p.includes(r)?("hidden"===i.dynamicPosition&&(r=""),[1,r]):(i.ignoredDecorations.includes(r)||a("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=n.getBrackettedSubstring(e,t,5);if(s[1].length>1&&("^"===s[1][0]||"_"===s[1][0])&&(s[1]=s[1].substring(1)),d.includes(s[1]))return s;if(f.includes(s[1]))return"hidden"===i.volumePosition&&(s[1]=""),s;if(p.includes(s[1]))return"hidden"===i.dynamicPosition&&(s[1]=""),s;var o=m.findIndex((function(e){return s[1]===e[0]}));return o>=0?(s[1]=m[o][1],s):(o=g.findIndex((function(e){return s[1]===e[0]})))>=0?(s[1]=g[o][1],"hidden"===i.dynamicPosition&&(s[1]=""),s):"!"!==e[t]||1!==s[0]&&"!"===e[t+s[0]-1]?(a("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},P=function(e,t){for(var r=t;n.isWhiteSpace(e[t]);)t++;return[t-r]},L=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return a(r.warn,e,t),[r.len,""];for(var i=0;i="2"&&e[t+1]<="9"?(void 0!==r.triplet?a("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=w[r.triplet],r.num_notes=r.triplet,t+2="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):a("expected number after the two colons after the triplet to mark the duration",e,t):t+3="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):a("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r};C.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};i.partForNextLine.title&&(e.part=i.partForNextLine),e.clef=i.currentVoice&&void 0!==i.staves[i.currentVoice.staffNum].clef?Object.assign({},i.staves[i.currentVoice.staffNum].clef):Object.assign({},i.clef);var t=i.currentVoice?i.currentVoice.scoreTranspose:0;if(e.key=l.standardKey(i.key.root+i.key.acc+i.key.mode,i.key.root,i.key.acc,t),e.key.mode=i.key.mode,i.key.impliedNaturals&&(e.key.impliedNaturals=i.key.impliedNaturals),i.key.explicitAccidentals)for(var r=0;r=0?(r.duration=s.getBarLength(),r.rest.text=1,u="Zduration"):(a&&0!==i.next_note_duration?(r.duration=i.default_length*i.next_note_duration,i.next_note_duration=0,d=!0):r.duration=i.default_length,u="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===u||"duration"===u){var p=n.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index"!==e[t])return r;t--,u="broken_rhythm";break;case">":case"<":if(!l(u))return null;if(!a)return r.endChar=t,r;var g=D(e,t);t+=g[0]-1,i.next_note_duration=g[2],r.duration=g[1]*r.duration,u="end_slur";break;default:return l(u)?(r.endChar=t,r):null}if(++t===e.length)return l(u)?(r.endChar=t,r):null}return null},D=function(e,t){switch(e[t]){case">":return t"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],e.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],e.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",e.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],e.exports.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},e.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},e.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},e.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}},1881:function(e,t,r){var n=r(5008),a=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=e.substring(n,n+3).toLowerCase();switch((a.length>1&&" "===a[1]||"^"===a[1]||"_"===a[1]||"="===a[1])&&(a=a[0]),a){case"mix":return{len:t(e,n),token:"Mix"};case"dor":return{len:t(e,n),token:"Dor"};case"phr":return{len:t(e,n),token:"Phr"};case"lyd":return{len:t(e,n),token:"Lyd"};case"loc":return{len:t(e,n),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,n),token:"m"};case"maj":case"ion":return{len:t(e,n),token:""}}return{len:0}},this.getClef=function(e,t){var a=e,i=this.skipWhiteSpace(e);if(r(e,i))return{len:0};var s=!1,o=e.substring(i);if(n.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),i+=5),0===o.length&&s)return{len:i+5,warn:"No clef specified: "+a};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(i+=c,o=o.substring(c));var l=null;if(n.startsWith(o,"treble"))l="treble";else if(n.startsWith(o,"bass3"))l="bass3";else if(n.startsWith(o,"bass"))l="bass";else if(n.startsWith(o,"tenor"))l="tenor";else if(n.startsWith(o,"alto2"))l="alto2";else if(n.startsWith(o,"alto1"))l="alto1";else if(n.startsWith(o,"alto"))l="alto";else if(!t&&s&&n.startsWith(o,"none"))l="none";else if(n.startsWith(o,"perc"))l="perc";else if(!t&&s&&n.startsWith(o,"C"))l="tenor";else if(!t&&s&&n.startsWith(o,"F"))l="bass";else{if(t||!s||!n.startsWith(o,"G"))return{len:i+5,warn:"Unknown clef specified: "+a};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:i+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e[t+r];)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var a=null;switch(e[n]){case"^":case"_":case"=":a=e[n];break;default:return{len:0}}if(n++,r(e,n))return{len:1,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};case"^":case"_":case"/":if(a+=e[n],n++,r(e,n))return{len:2,warn:"Expected note name after accidental"};switch(e[n]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:n+1,token:{acc:t[a],note:e[n]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var n=e.indexOf("%",t);for(n>=0&&n="A"&&e<="Z"||e>="a"&&e<="z"},i=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,n){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t=r?{len:1,err:"Missing close quote"}:{len:a-t+1,token:this.translateString(e.substring(n+1,a))}}for(var i=n;i=0?n.strip(e.substring(0,t)):n.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var n=e.shift();if("."===n.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(n=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};n=e.shift()}switch(n.token){case"pt":case"px":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(n),{used:t,value:parseFloat(r)}}};var u=function(e){return e=(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,r,n){for(var a=n||e[t],i=t+1,s=!1;ie.length-1&&(i=e.length-1),[i-t+1,u(e.substring(t+1,i)),!1])}};a.prototype.peekLine=function(){return this.lines[this.lineIndex]},a.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex11&&(f%=12);var p="m"===t[0]?l[f]:c[f],m=p+t,g=i(m);g.length>0&&"flat"===g[0].acc&&(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==h[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==h[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),d?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:n}},s.chordName=function(e,t){return a(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var h=["c","d","e","f","g","a","b"],u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};s.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var a=t.accidental?t.name.substring(1):t.name,i=t.accidental?t.name[0]:"",s=n.pitchIndex(a);t.name=i+n.noteName(s+e.localTransposeVerticalMovement)}if(t.accidental){var o=function(e,t,r,n,a){for(var i=h[(e+49)%7],s=0,o=0;o2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=o[0],t.accidental=d[o[1]],t.name&&(t.name=f[o[1]]+t.name.replace(/[_^=]/g,""))}}},e.exports=s},867:function(e){var t={},r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];t.pitchIndex=function(e){return r.indexOf(e)},t.noteName=function(e){return r[e]},e.exports=t},4208:function(e){var t=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],n=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],a=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];e.exports=function(e,i,s,o){if(!i||i%12==0)return e;for(;i<0;)i+=12;i>11&&(i%=12);var c=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return e;var l,h=c[1],u=c[2],d=c[3],f=c[4];return(l=t.indexOf(h))<0&&(l=r.indexOf(h)),l<0&&(l=n.indexOf(h)),l<0&&(l=a.indexOf(h)),l<0||(l+=i,l%=12,e=s?o?a[l]:r[l]:o?n[l]:t[l],u&&(e+=u),d&&((l=t.indexOf(d))<0&&(l=r.indexOf(d)),l<0&&(l=n.indexOf(d)),l<0&&(l=a.indexOf(d)),e+="/",l>=0?(l+=i,l%=12,e+=s?o?a[l]:r[l]:o?n[l]:t[l]):e+=d),f&&(e+=f)),e}},575:function(e,t,r){var n=r(9708);function a(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t0&&o[l].voice.push({el_type:"note",duration:u,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),o[l].voice.push(g)),u=0):"note"===g.el_type?d?o[l].voice.push(g):(u+=g.duration,r[n]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type&&"color"!==g.el_type||o[l].voice.push(g);else{t=!0,d=!0,p=m,o[l].hasOverlay=!0,0===f&&(f=r[n]);for(var v=0;v=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:r[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}o[l].hasOverlay&&0===o[l].snip.length&&o[l].snip.push({start:p,len:h.length-p})}for(l=0;l=0;y--){var x=b.snip[y];s.voices[l].splice(x.start,x.len),s.voices[l].splice(x.start+1,0,{el_type:"stem",direction:"auto"});var k=c(s.voices[l],x.start);s.voices[l].splice(k,0,{el_type:"stem",direction:"up"})}for(y=0;y0&&"bar"!==e[r].el_type;r--);return r}function l(e,t,r,n){var a;n[t]||(n[t]=[]),n[t][r]||(n[t][r]=[]);for(var i=function(e,i,s){if(void 0===n[t][r][s]){for(a=0;a=t&&ot;){if(e[t].staff)return e[t];t++}return null}function d(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function f(e){for(var t=0;t0){if(void 0!==n.voices[0]){for(var a=!1,i=0;i0&&x[x.length-1].barNumber){var w=u(e.lines,b);w&&(w.staff[0].barNumber=x[x.length-1].barNumber),delete x[x.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,i},this.addTieToLastNote=function(t){var r=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var n=t[r];if("note"===n.el_type)return n}return null}(e);return!!(r&&r.pitches&&r.pitches.length>0)&&(r.pitches[0].startTie={},t&&(r.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(n,a,s,o){var c;return o.el_type=n,null!==a&&(o.startChar=a),null!==s&&(o.endChar=s),"note"===n?((c=o).duration?c.duration:0)>=.25||o.force_end_beam_last&&void 0!==e.potentialStartBeam?g(e):o.end_beam&&void 0!==e.potentialStartBeam?void 0===o.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(o,e):g(e):void 0===o.rest&&(void 0===e.potentialStartBeam?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o):g(e),delete o.end_beam,delete o.force_end_beam_last,o.rest&&"invisible"===o.rest.type&&delete o.decoration,!(e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum||(function(e,t,r,n,a){var i=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==r.pitches){var s=i.workingClef.verticalPos;r.pitches.forEach((function(e){e.verticalPos=e.pitch-s}))}if(void 0!==r.gracenotes){var o=i.workingClef.verticalPos;r.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}i.voices.length<=t.voiceNum&&(n[a]||(n[a]={}),y(e,t,n[a])),i.voices[t.voiceNum].push(r)}(t,e,o,r,i),0))},this.appendStartingElement=function(t,r,n,a){var i;d(e),"key"===t&&(i=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var s=Object.assign({},a);if(e.lines[e.lineNum]){var o=e.lines[e.lineNum].staff;if(o){o.length<=e.staffNum&&(o[e.staffNum]={},o[e.staffNum].clef=Object.assign({},o[0].clef),o[e.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[e.staffNum].meter=Object.assign({},o[0].meter)),o[e.staffNum].workingClef=Object.assign({},o[0].workingClef),o[e.staffNum].voices=[[]]),"clef"===t&&(o[e.staffNum].workingClef=s);for(var c=o[e.staffNum].voices[e.voiceNum],l=0;l0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r,n){e.staffNum=t,e.voiceNum=r,i=n;for(var a=0;a0?(r.push(i-1),n.push(Math.round(a-s)),a=s):is&&ds?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(n-t[c]),i.push(a-f),a=f):s=p}i.push(a)}function a(e,t,r,a){for(var i=Math.ceil(e.total/t),s=Math.floor(e.total/i),o=[],c=0;ct&&(s=!0),o%r==r-1&&(o!==e.length-1&&n.push(o),a.push(Math.round(i)),i=0);return{failed:s,totals:a,lineBreaks:n}}e.exports={wrapLines:function(e,t,r){if(t&&0!==e.lines.length){var n=e.deline({lineBreaks:!1}),a=function(e,t){for(var r=[],n=0,a=0,i=0,s=0;s0&&(n[c.line].staff[c.staff].barNumber=s);for(var h=Object.keys(l),u=0;u=0;p--)if("key"===f[p].el_type){a[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){i[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==r&&0===c.staff&&0===c.voice)for(p=0;p0&&p.measureWidths.length<25&&(k=a(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}u.push(y),d.push(b)}var w=function(e,t,r){var n={lineBreaks:e,staffwidth:t};for(var a in r)r.hasOwnProperty(a)&&"wrap"!==a&&"staffwidth"!==a&&(n[a]=r[a]);return{revisedParams:n}}(u,n.staffwidth,n);return w.explanation=d,w.reParse=!0,w}}},5633:function(e,t,r){var n,a=r(9447),i=r(4914),s=i.relativeMajor,o=i.transposeKey,c=i.relativeMode,l=r(4208);!function(){"use strict";function e(e,r,n){var a=[],i=r.getKeySignature();if("Hp"===i.root||"HP"===i.root)return a;a=a.concat(function(e,t){for(var r=[],n=e.split("K:"),a=n[0].length,i=1;i2?n+=7:-12===r&&(n-=7):r>0&&n<0?n+=7:r<0&&n>0&&(n-=7),r>12?n+=7:r<-12&&(n-=7),n}function h(e,t,n,a,s,o){for(var c=[],h=i(s,n,o),u={},d={},m=0;m1?i[1]:"",accidentals:l}}function p(e,t,r,n){for(var a=e.pitch,i=u.indexOf(e.name),s=(u.indexOf(t.root)+a)%7,o=i+r,c=e.oct;o>6;)c++,o-=7;for(;o<0;)c--,o+=7;for(var l=u[s],h="",d=e.adj,f="=",m=0;m4&&(l=l.toLowerCase()),{acc:h,name:l,upper:l.toUpperCase()}}var m=/([_^=]*)([A-Ga-g])([,']*)/,g=/([_^=]*[A-Ga-g][,']*)(\d*\/*\d*)([\>\<\-\)\.\s\\]*)/,v=/([_^=]*[A-Ga-g][,']*)?(\d*\/*\d*)?([\>\<\-\)]*)?/,b=/(\s*)$/;function y(e,t,r,n){var a="none"===t?0:u.indexOf(t),i=e.match(m),s=i[2].toUpperCase(),o=u.indexOf(s)-a;o<0&&(o+=7);var c=d.indexOf(i[3]);s===i[2]&&c--;var l=n[s]||r[s]||"=";return{acc:i[1],name:s,pitch:o,oct:c,adj:C(i[1],r[s],n[s]),courtesy:i[1]===l}}function x(e,t,r,n,a){var i=e.substring(t,r),s=i.match(new RegExp(g.source+b.source),"");if(s){var o=s[1].length,c=s[2].length+s[3].length+s[4].length;t+=r-t-o-c,r-=c}else if(s=i.match(new RegExp(/([^\[]*)/.source+/\[/.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+v.source+/\-?](\d*\/*\d*)?([\>\<\-\)]*)/.source+b.source))){for(var l=1+s[1].length,h=0;h=0;t--)if("program"===u[t].cmd)return void(u[t].channel=e)}function L(e){return e/1e6}function O(e){return Math.round(e*k*1e6)/1e6}function H(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function z(e,t){var r=t.start,n=t.duration,a=O(1/32);switch(e){case"trill":for(var i=1;n>0;)u.push({cmd:"note",pitch:t.pitch+i,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),i=1===i?0:1,n-=a,r+=a;break;case"mordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"lowermordent":u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=a,r+=a,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:n,gap:0,instrument:h});break;case"turn":a=t.duration/5,u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+2*a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+3*a,duration:a,gap:0,instrument:h,style:"decoration"}),u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+4*a,duration:a,gap:0,instrument:h});break;case"roll":for(;n>0;)u.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h,style:"decoration"}),n-=2*a,r+=2*a}}function D(e,t){var r,n=function(e,t){if(t)return 0;var r;if(null!=g)r=g,g=void 0;else if(T)if(B>e)r=E;else{var n=(e-m)/H(w);r=0===n?S:parseInt(n,10)===n?_:E}else r=_;return v&&(r+=v,v=void 0),r<0&&(r=0),r>127&&(r=127),t?0:r}(L(e.time),t);if(p.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,n=0,a=[],s=0;s0?F.endType="tenuto":d&&(F.endType=d),F.endType){case"tenuto":F.gap=-.001;break;case"staccato":var I=.4*F.duration;F.gap=o/60*I;break;default:F.gap=0}u.push(F)}}}u.length}var Y=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);f=Math.max(f,L(e.time)+O(Y))}n=function(n,i,C,O){i||(i={}),O||(O={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=i.qpm,c=void 0,k=1,l=void 0,h=void 0,u=void 0,d=void 0,f=0,x=C,w={num:4,den:4},T=!0,S=105,_=95,E=85,M=.25,g=void 0,v=void 0,A=0,b=[],N={},y=1,n.length>0&&n[0].length>0&&(B=n[0][0].pickupLength),void 0===i.bassprog||O.bassprog||(O.bassprog=[i.bassprog]),void 0===i.bassvol||O.bassvol||(O.bassvol=[i.bassvol]),void 0===i.chordprog||O.chordprog||(O.chordprog=[i.chordprog]),void 0===i.chordvol||O.chordvol||(O.chordvol=[i.chordvol]),void 0===i.gchord||O.gchord||(O.gchord=[i.gchord]),p=new a(n.length,i.chordsOff,O,w),function(e,t){for(var r=0;r=0)&&(j=!0);for(var V=0;V0&&"program"===u[u.length-1].cmd)u[u.length-1].instrument=Y.program;else{var R;for(R=u.length-1;R>=0&&"program"!==u[R].cmd;R--);(R<0||u[R].instrument!==Y.program)&&u.push({cmd:"program",channel:0,instrument:Y.program})}break;case"channel":P(Y.channel);break;case"drum":N=G(Y.params),q();break;case"gchordOn":p.gChordOn(Y);break;case"beat":S=Y.beats[0],_=Y.beats[1],E=Y.beats[2];break;case"vol":g=Y.volume;break;case"volinc":v=Y.volume;break;case"beataccents":T=Y.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(Y);break;default:console.log("MIDI creation. Unknown el_type: "+Y.el_type+"\n")}}void 0===u[0].instrument&&(u[0].instrument=l||0),d&&u.unshift(d),s.push(u),p.finish(),b.length}return i.detuneOctave&&function(e,t){for(var r={},n=0;n1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(a=0;!h&&a0&&s.push(b),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var F=[0,2,4,5,7,9,11];function j(n){if(void 0!==n.midipitch)return n.midipitch;var a=n.pitch;if(n.accidental)switch(n.accidental){case"sharp":e[a]=1;break;case"flat":e[a]=-1;break;case"natural":e[a]=0;break;case"dblsharp":e[a]=2;break;case"dblflat":e[a]=-2;break;case"quartersharp":e[a]=.25;break;case"quarterflat":e[a]=-.25}var i=12*function(e){return Math.floor(e/7)}(a)+F[Y(a)]+60;return void 0!==e[a]?i+=e[a]:i+=t[Y(a)],i+=r}function I(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function Y(e){return(e%=7)<0&&(e+=7),e}function G(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],n="",a=0,i=0;it&&(r=r.substring(0,t)),function(e){for(var t="",r=0;r>=7;for(var n=r.length-1;n>=0;n--){t<<=8;var a=r[n];0!==n&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t="%00%FF%59%02",r=0,n=256,a=0;a=0)return n;return n}function i(e,t,r){for(var n=Math.min(e.length,t+3),a=t;a=0)return e[a].decoration[i];return null}function s(e){for(var t=0;t=0&&"bar"!==r[n].el_type;)r[n].noChordVoice=!0,n--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var n=60;return e.bpm&&(n=e.bpm),r*n/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}n=function(n,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;n.visualTranspose&&(g-=n.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",x=h.drumBars||1,k=h.drumIntro||0,w=""!==y,C=!!h.drumOff,T=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),x=parseInt(x,10),k=parseInt(k,10);var S=n.formatting.bagpipes;S&&(m=71);var _=[];if(n.formatting.midi){var E=n.formatting.midi;E.program&&E.program.length>0&&(m=E.program[0],E.program.length>1&&(m=E.program[1],v=E.program[0]),b=!0),E.transpose&&(g=E.transpose[0]),E.channel&&(v=E.channel[0],b=!0),E.drum&&(y=E.drum),E.drumbars&&(x=E.drumbars[0]),E.drumon&&(w=!0),10===v&&(m=t),E.beat&&_.push({el_type:"beat",beats:E.beat}),E.nobeataccents&&_.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):n.metaText.tempo?c(n.metaText.tempo,n.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var M=[];S&&M.push({el_type:"bagpipes"}),M.push({el_type:"instrument",program:m}),v&&M.push({el_type:"channel",channel:v}),g&&M.push({el_type:"transpose",transpose:g}),M.push({el_type:"tempo",qpm:p});for(var A=0;A<_.length;A++)M.push(_[A]);var N,B=[],P=[],L=[],O=[0],H={};H[0]={el_type:"tempo",qpm:p,timing:0};for(var z=[],D=[],F=!1,j=n.lines,I=0;I=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(N=n[t].slice(0),B[q].push({el_type:"beat",beats:N.slice(0)}),P[X]=!1,L[X]=!1),e.decoration.indexOf("crescendo(")>=0){var a=r(U,te,"crescendo)"),s=Math.min(127,N[0]+50),o=i(U,te+a+1,Object.keys(n));o&&(s=n[o][0]),P[X]=a>0&&Math.floor((s-N[0])/a),L[X]=!1}else if(e.decoration.indexOf("crescendo)")>=0)P[X]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=r(U,te,"diminuendo)"),l=Math.max(15,N[0]-50),h=i(U,te+c+1,Object.keys(n));h&&(l=n[h][0]),P[X]=!1,L[X]=c>0&&Math.floor((l-N[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(L[X]=!1)},G=V.staff,q=0,W=0;W=0?B[q].push({el_type:"transpose",transpose:-12}):R.clef.type.indexOf("+8")>=0&&B[q].push({el_type:"transpose",transpose:12})),n.formatting.midi&&n.formatting.midi.drumoff&&(B[q].push({el_type:"bar"}),B[q].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,J=0,Z=0,ee=0;N=[105,95,85,1];for(var te=0;te=0?B[q].push({el_type:"transpose",transpose:-12}):re.type.indexOf("+8")>=0&&B[q].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(re,n.getBeatLength()),B[q].push({el_type:"tempo",qpm:p,timing:O[q]}),H[""+O[q]]={el_type:"tempo",qpm:p,timing:O[q]};break;case"bar":Q>0&&B[q].push({el_type:"bar"}),Y(re),Q=0;var se="bar_right_repeat"===re.type||"bar_dbl_repeat"===re.type,oe="1"===re.startEnding,ce="bar_left_repeat"===re.type||"bar_dbl_repeat"===re.type||"bar_right_repeat"===re.type;if(se){var le=z[q];le||(le=0);var he=D[q];he||(he=B[q].length);for(var ue=le;ue=0&&i!==t[""+o.timing].qpm&&(i=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[n].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(B,H),k)for(var pe=n.getPickupLength(),me=0;mege;)ge++;if(B[me].length>ge){for(ie=0;ie0&&B[0].length>0&&(B[0][0].pickupLength=n.getPickupLength()),B}}(),e.exports=n},8702:function(e,t,r){var n=r(5281);e.exports=function(){return window.abcjsAudioContext||n(),window.abcjsAudioContext}},2710:function(e){e.exports=function(e){return Math.pow(2,e/1200)}},7207:function(e){var t=function(e,t,r,n){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=n,this.tempoChangeFactor=1,this.bassInstrument=r.bassprog&&r.bassprog.length>=1?r.bassprog[0]:0,this.chordInstrument=r.chordprog&&r.chordprog.length>=1?r.chordprog[0]:0,this.bassOctaveShift=r.bassprog&&2===r.bassprog.length?r.bassprog[1]:0,this.chordOctaveShift=r.chordprog&&2===r.chordprog.length?r.chordprog[1]:0,this.boomVolume=r.bassvol&&1===r.bassvol.length?r.bassvol[0]:64,this.chickVolume=r.chordvol&&1===r.chordvol.length?r.chordvol[0]:48,r.gchord&&r.gchord.length>0?this.overridePattern=a(r.gchord[0]):this.overridePattern=void 0};function r(e,t,r,a){var i=[];if(!e)return i;t.indexOf("boom")>=0?i.push(r?e.boom:e.boom2):a&&i.push(e.boom);var s=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,i(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},t.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},t.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=a(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},t.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},t.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},t.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t=0)return"break"}return null},t.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var n=this.transpose;n<-8;)n+=12;for(;n>8;)n-=12;(r+=n)<33?r+=12:r>44&&(r-=12);var a,i=r,s=(r+=12*this.bassOctaveShift)-5;1===e.length&&(a=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(i--,r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(i++,r++,s++,o=o.substring(1));var l=o.split("/");if((a=this.chordNotes(i,l[0])).length>=3&&(s=s+(a[2]-a[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=this.basses[l[1].substring(0,1)]+h+n,s=r+=12*this.bassOctaveShift}return{boom:r,boom2:s,chick:a}}}},t.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var n=[],a=0;a0&&c[u-1]&&c[u]&&c[u-1].boom!==c[u].boom&&(d=!0);var p=l[u],m=p.indexOf("boom")>=0,g=!m&&0!==u&&l[0].indexOf("boom")>=0&&(!c[u-1]||c[u-1].boom!==c[u].boom),v=r(c[u],p,d,g);m&&(d=!1);for(var b=0;b0){var s=e.gap?e.gap:0,o=e.duration;s=Math.min(s,2*o/3);var c={pitch:e.pitch,instrument:i,start:Math.round(1e6*e.start)/1e6,end:Math.round(1e6*(e.start+o-s))/1e6,volume:e.volume};e.startChar&&(c.startChar=e.startChar),e.endChar&&(c.endChar=e.endChar),e.style&&(c.style=e.style),e.cents&&(c.cents=e.cents),t[r].push(c)}break;case"program":a=n[e.instrument];break;case"text":break;default:console.log("Unhandled midi event",e)}}))})),t}},6313:function(e,t,r){var n=r(5049),a=r(5281),i=r(8702),s=r(1225),o=r(9733),c=r(5075),l=r(5343),h=r(6987);function u(e,t,r,s,o){var c=!0;if(i()?c="suspended"===i().state:a(),!n())throw{status:"NotSupported",message:"This browser does not support audio."};(c||o)&&r&&r.classList.add("abcjs-loading"),c?i().resume().then((function(){s?s().then((function(n){d(e,t,r,o)})):d(e,t,r,o)})):d(e,t,r,o)}function d(e,t,r,n){n?e(t).then((function(){r&&r.classList.remove("abcjs-loading")})):(e(t),r&&r.classList.remove("abcjs-loading"))}e.exports=function(e,t){var r=this;if("string"==typeof e){var n=e;if(!(e=document.querySelector(n)))throw new Error('Cannot find element "'+n+'" in the DOM.')}else if(!(e instanceof HTMLElement))throw new Error("The first parameter must be a valid element or selector in the DOM.");if(r.parent=e,r.options={},t&&(r.options=Object.assign({},t)),r.options.ac&&a(r.options.ac),function(e,t){var r=!!t.loopHandler,n=!!t.restartHandler,a=!!t.playHandler||!!t.playPromiseHandler,i=!!t.progressHandler,u=!!t.warpHandler,d=!1!==t.hasClock,f='
\n';if(r){var p=t.repeatTitle?t.repeatTitle:"Click to toggle play once/repeat.";f+='\n"}if(n){var m=t.restartTitle?t.restartTitle:"Click to go to beginning.";f+='\n"}if(a){var g=t.playTitle?t.playTitle:"Click to play/pause.";f+='\n"}if(i){var v=t.randomTitle?t.randomTitle:"Click to change the playback position.";f+='\n'}if(d&&(f+='\n'),u){var b=t.warpTitle?t.warpTitle:"Change the playback speed.";f+=' ( '+(t.bpm?t.bpm:"BPM")+")\n"}f+='
CSS required: load abcjs-audio.css
',f+="
\n",e.innerHTML=f}(r.parent,r.options),function(e){var t=!!e.options.loopHandler,r=!!e.options.restartHandler,n=!!e.options.playHandler||!!e.options.playPromiseHandler,a=!!e.options.progressHandler,i=!!e.options.warpHandler,s=e.parent.querySelector(".abcjs-midi-start");t&&e.parent.querySelector(".abcjs-midi-loop").addEventListener("click",(function(t){u(e.options.loopHandler,t,s,e.options.afterResume)})),r&&e.parent.querySelector(".abcjs-midi-reset").addEventListener("click",(function(t){u(e.options.restartHandler,t,s,e.options.afterResume)})),n&&s.addEventListener("click",(function(t){u(e.options.playPromiseHandler||e.options.playHandler,t,s,e.options.afterResume,!!e.options.playPromiseHandler)})),a&&e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click",(function(t){u(e.options.progressHandler,t,s,e.options.afterResume)})),i&&e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change",(function(t){u(e.options.warpHandler,t,s,e.options.afterResume)}))}(r),r.disable=function(e){var t=r.parent.querySelector(".abcjs-inline-audio");e?t.classList.add("abcjs-disabled"):t.classList.remove("abcjs-disabled")},r.setWarp=function(e,t){r.parent.querySelector(".abcjs-midi-tempo").value=Math.round(t),r.setTempo(e)},r.setTempo=function(e){var t=r.parent.querySelector(".abcjs-midi-current-tempo");t&&(t.innerHTML=Math.round(e))},r.resetAll=function(){for(var e=r.parent.querySelectorAll(".abcjs-pushed"),t=0;t0){if(e.debugCallback&&e.debugCallback("pending "+JSON.stringify(l)),i?i*=2:i=50,i<9e4)return new Promise((function(t,n){setTimeout((function(){var s=[];for(u=0;u75&&(t=75),t=t/50-1;var a=0,i=.25;8===r.den&&(i/=2);for(var s=i/2,o=s*t,c=0;c=l[h].start+s)){var d=u.start;u.start+=o,u.volume*=1+a,h>0&&l[h-1].end==d&&(l[h-1].end=u.start,l[h-1].volume*=1-a)}}}}(c,e.options.swing,e.meterFraction,e.pickupLength),e.sequenceCallback&&e.sequenceCallback(c,e.callbackContext);var l=function(e,t){if(null==t)return null;var r=[];if(t.length){for(var n=0;n1&&(a=1),r.push(a)}else r.push(0);return r}var i=parseFloat(t);if(i*(e-1)>2)return null;for(var s=e%2==0,o=s?0-i/2:0,c=o+i,l=0;lr?l[r]:0;t.forEach((function(t){var r=t.instrument+":"+t.pitch+":"+t.volume+":"+Math.round(1e3*(t.end-t.start))/1e3+":"+n+":"+i+":"+(t.cents?t.cents:0);e.debugCallback&&e.debugCallback("noteMapTrack "+r),h[r]||(h[r]=[]),h[r].push(t.start)}))}));for(var d=[],f=s().createBuffer(2,o,s().sampleRate),p=0;p0?e.audioBuffers[0].duration:0;return{status:s().state,duration:t}}e.audioBuffers=[f],e.debugCallback&&(e.debugCallback("sampleRate = "+s().sampleRate),e.debugCallback("totalSamples = "+o),e.debugCallback("creationTime = "+Math.floor(1e3*(s().currentTime-n))+"ms")),Promise.all(d).then((function(){"suspended"===s().state?s().resume().then((function(){r(b(e))})):"interrupted"===s().state?s().suspend().then((function(){s().resume().then((function(){r(b(e))}))})):r(b(e))}))}))):Promise.reject(new Error(f))},e.start=function(){if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("start called");var t=e.pausedTimeSec?e.pausedTimeSec:0;e._kickOffSound(t),e.startTimeSec=s().currentTime-t,e.pausedTimeSec=void 0,e.debugCallback&&e.debugCallback("MIDI STARTED",e.startTimeSec)},e.pause=function(){if(!e.audioBufferPossible)throw new Error(f);return e.debugCallback&&e.debugCallback("pause called"),e.pausedTimeSec=e.stop(),e.pausedTimeSec},e.resume=function(){e.start()},e.seek=function(t,r){var n;switch(r){case"seconds":n=t;break;case"beats":n=t*e.millisecondsPerMeasure/e.beatsPerMeasure/1e3;break;default:n=(e.duration-e.fadeLength/1e3)*t}if(!e.audioBufferPossible)throw new Error(f);e.debugCallback&&e.debugCallback("seek called sec="+n),e.isRunning?(e.stop(),e._kickOffSound(n)):e.pausedTimeSec=n,e.pausedTimeSec=n},e.stop=function(){return e.isRunning=!1,e.pausedTimeSec=void 0,e.directSource.forEach((function(e){try{e.stop()}catch(e){console.log("direct source didn't stop:",e)}})),e.directSource=[],s().currentTime-e.startTimeSec},e.finished=function(){e.startTimeSec=void 0,e.pausedTimeSec=void 0,e.isRunning=!1},e.download=function(){return h(e)},e.getAudioBuffer=function(){return e.audioBuffers[0]},e.getIsRunning=function(){return e.isRunning},e._deviceCapable=function(){return!!o()||(console.warn(f),e.debugCallback&&e.debugCallback(f),!1)},e._kickOffSound=function(t){e.isRunning=!0,e.directSource=[],e.audioBuffers.forEach((function(t,r){e.directSource[r]=s().createBufferSource(),e.directSource[r].buffer=t,e.directSource[r].connect(s().destination)})),e.directSource.forEach((function(e){e.start(0,t)})),e.onEnded&&(e.directSource[0].onended=function(){e.onEnded(e.callbackContext)})}}},873:function(e){e.exports=function(e){return window.URL.createObjectURL(function(e){var t,r,n=e[0],a=n.numberOfChannels,i=n.length*a*2+44,s=new ArrayBuffer(i),o=new DataView(s),c=[],l=0,h=0;for(d(1179011410),d(i-8),d(1163280727),d(544501094),d(16),u(1),u(a),d(n.sampleRate),d(2*n.sampleRate*a),u(2*a),u(16),d(1635017060),d(i-h-4),t=0;t';t.preTextDownload&&(i+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&(o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o)?t.downloadLabel(e,n):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"),i+=''+s+"",t.postTextDownload&&(i+=t.postTextDownload),i+""};e.exports=function(e,t){var r={};if(t)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);function o(e,t,n){var s=a(t,r);switch(r.midiOutputType){case"encoded":return s;case"binary":var o=s.replace("data:audio/midi,","");o=(o=o.replace(/MThd/g,"%4d%54%68%64")).replace(/MTrk/g,"%4d%54%72%6b");for(var c=new ArrayBuffer(o.length/3),l=new Uint8Array(c),h=0;h4)for(a=a.toLowerCase(),t-=5;t>0;)a+="'",t--;else for(;t<4;)a+=",",t++;return a}}},522:function(e){e.exports={21:"A0",22:"Bb0",23:"B0",24:"C1",25:"Db1",26:"D1",27:"Eb1",28:"E1",29:"F1",30:"Gb1",31:"G1",32:"Ab1",33:"A1",34:"Bb1",35:"B1",36:"C2",37:"Db2",38:"D2",39:"Eb2",40:"E2",41:"F2",42:"Gb2",43:"G2",44:"Ab2",45:"A2",46:"Bb2",47:"B2",48:"C3",49:"Db3",50:"D3",51:"Eb3",52:"E3",53:"F3",54:"Gb3",55:"G3",56:"Ab3",57:"A3",58:"Bb3",59:"B3",60:"C4",61:"Db4",62:"D4",63:"Eb4",64:"E4",65:"F4",66:"Gb4",67:"G4",68:"Ab4",69:"A4",70:"Bb4",71:"B4",72:"C5",73:"Db5",74:"D5",75:"Eb5",76:"E5",77:"F5",78:"Gb5",79:"G5",80:"Ab5",81:"A5",82:"Bb5",83:"B5",84:"C6",85:"Db6",86:"D6",87:"Eb6",88:"E6",89:"F6",90:"Gb6",91:"G6",92:"Ab6",93:"A6",94:"Bb6",95:"B6",96:"C7",97:"Db7",98:"D7",99:"Eb7",100:"E7",101:"F7",102:"Gb7",103:"G7",104:"Ab7",105:"A7",106:"Bb7",107:"B7",108:"C8",109:"Db8",110:"D8",111:"Eb8",112:"E8",113:"F8",114:"Gb8",115:"G8",116:"Ab8",117:"A8",118:"Bb8",119:"B8",120:"C9",121:"Db9"}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},4586:function(e,t,r){var n=r(4771),a=r(522),i=r(2710),s=function(e,t,r){for(var n=0;n<2;n++)for(var a=t.getChannelData(n),i=e.getChannelData(n),s=0;s=1&&parseInt(e.cursorControl.beatSubdivisions,10)<=64&&(r=parseInt(e.cursorControl.beatSubdivisions,10)),e.timer=new i(e.visualObj,{beatCallback:e.beatCallback,eventCallback:e.eventCallback,lineEndCallback:e.lineEndCallback,qpm:e.currentTempo,extraMeasuresAtBeginning:e.cursorControl?e.cursorControl.extraMeasuresAtBeginning:void 0,lineEndAnticipation:e.cursorControl?e.cursorControl.lineEndAnticipation:0,beatSubdivisions:r}),e.cursorControl&&e.cursorControl.onReady&&"function"==typeof e.cursorControl.onReady&&e.cursorControl.onReady(e),e.isLoaded=!0,e.isLoading=!1,Promise.resolve({status:"created",notesStatus:t})}))},e.destroy=function(){e.timer&&(e.timer.reset(),e.timer.stop(),e.timer=null),e.midiBuffer&&(e.midiBuffer.stop(),e.midiBuffer=null),e.setProgress(0,1),e.control&&e.control.resetAll()},e.play=function(){return e.runWhenReady(e._play,void 0)},e.runWhenReady=function(t,r){return e.visualObj?e.isLoading?(n=500,new Promise((function(e){setTimeout(e,n)}))).then((function(){return e.isLoading?e.runWhenReady(t,r):t(r)})):e.isLoaded?t(r):e.go().then((function(){return t(r)})):Promise.resolve({status:"loading"});var n},e._play=function(){return s().resume().then((function(){return e.isStarted=!e.isStarted,e.isStarted?(e.cursorControl&&e.cursorControl.onStart&&"function"==typeof e.cursorControl.onStart&&e.cursorControl.onStart(),e.midiBuffer.start(),e.timer.start(e.percent),e.control&&e.control.pushPlay(!0)):e.pause(),Promise.resolve({status:"ok"})}))},e.pause=function(){e.timer&&(e.timer.pause(),e.midiBuffer.pause(),e.control&&e.control.pushPlay(!1))},e.toggleLoop=function(){e.isLooping=!e.isLooping,e.control&&e.control.pushLoop(e.isLooping)},e.restart=function(){e.timer&&(e.timer.setProgress(0),e.midiBuffer.seek(0))},e.randomAccess=function(t){return e.runWhenReady(e._randomAccess,t)},e._randomAccess=function(t){var r=t.target.classList.contains("abcjs-midi-progress-indicator")?t.target.parentNode:t.target,n=(t.x-r.getBoundingClientRect().left)/r.offsetWidth;return n<0&&(n=0),n>1&&(n=1),e.seek(n),Promise.resolve({status:"ok"})},e.seek=function(t,r){e.timer&&e.midiBuffer&&(e.timer.setProgress(t,r),e.midiBuffer.seek(t,r))},e.setWarp=function(t){if(parseInt(t,10)>0){e.warp=parseInt(t,10);var r=e.isStarted,n=e.percent;return e.destroy(),e.isStarted=!1,e.go().then((function(){return e.setProgress(n,1e3*e.midiBuffer.duration),e.control&&e.control.setWarp(e.currentTempo,e.warp),r?e.play().then((function(){return e.seek(n),Promise.resolve()})):(e.seek(n),Promise.resolve())}))}return Promise.resolve()},e.onWarp=function(t){var r=t.target.value;return e.setWarp(r)},e.setProgress=function(t,r){e.percent=t,e.control&&e.control.setProgress(t,r)},e.finished=function(){if(e.timer.reset(),e.isLooping)return e.timer.start(0),e.midiBuffer.finished(),e.midiBuffer.start(),"continue";e.timer.stop(),e.isStarted&&(e.control&&e.control.pushPlay(!1),e.isStarted=!1,e.midiBuffer.finished(),e.cursorControl&&e.cursorControl.onFinished&&"function"==typeof e.cursorControl.onFinished&&e.cursorControl.onFinished(),e.setProgress(0,1))},e.beatCallback=function(t,r,n,a){var i=t/r;e.setProgress(i,n),e.cursorControl&&e.cursorControl.onBeat&&"function"==typeof e.cursorControl.onBeat&&e.cursorControl.onBeat(t,r,n,a)},e.eventCallback=function(t){if(!t)return e.finished();e.cursorControl&&e.cursorControl.onEvent&&"function"==typeof e.cursorControl.onEvent&&e.cursorControl.onEvent(t)},e.lineEndCallback=function(t,r){e.cursorControl&&e.cursorControl.onLineEnd&&"function"==typeof e.cursorControl.onLineEnd&&e.cursorControl.onLineEnd(t,r)},e.getUrl=function(){return e.midiBuffer.download()},e.download=function(t){var r=e.getUrl(),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("style","display: none;"),n.href=r,n.download=t||"output.wav",n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n)}}},2029:function(e){e.exports=function(){var e=this;e.tracks=[],e.totalDuration=0,e.currentInstrument=[],e.starts=[],e.addTrack=function(){return e.tracks.push([]),e.currentInstrument.push(0),e.starts.push(0),e.tracks.length-1},e.setInstrument=function(t,r){e.tracks[t].push({channel:0,cmd:"program",instrument:r}),e.currentInstrument[t]=r},e.appendNote=function(t,r,n,a,i){var s={cmd:"note",duration:n,gap:0,instrument:e.currentInstrument[t],pitch:r,start:e.starts[t],volume:a};i&&(s.cents=i),e.tracks[t].push(s),e.starts[t]+=n,e.totalDuration=Math.max(e.totalDuration,e.starts[t])}}},2426:function(e,t,r){var n=r(6074),a={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},i={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new n),this.inited=!0);var i=null;if(r.tablature){var s=r.tablature;i=[];for(var o=0;o0)for(var a=r.length,i=0;i1&&r&&r.length>0)for(a=r.length,i=0;i=0;n--)if(t.pitch+t.pitchAltered>=e.stringPitches[n]){var a=t.pitch+t.pitchAltered-e.stringPitches[n];return"^"===t.quarter?a-=.5:"v"===t.quarter&&(a+=.5),{num:Math.round(a),str:e.stringPitches.length-1-n,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function l(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}function h(e){var t=e.tuning,r=e.capo,s=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var o=0;o0&&(this.capoTuning=function(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var n=0;n0&&(r=e.capoTuning);for(var n=r.length-1,a=0;a1?(o=s(this,e)).error&&(i=o.error):e[0].endTie||((r=new a(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(n=c(this,r))?o.push(n):(l(o,r),i=o.error))),i)return o;var h=null;if(t){h=[];for(var u=0;u0&&(r+=" capo:"+e.capo),t=t.replace("%T",r)),t}return""},h.prototype.suppress=function(e){return!!e.params.suppress},e.exports=h},8918:function(e){function t(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}t.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},t.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var n=this.bar.pitch2/2;if("dots.dot"==e.name)return r?(t.pitch=n,!1):(t.pitch=n+this.lineSpace,!0)}return r},e.exports=t},6776:function(e,t,r){var n=r(2842),a=n.noteToMidi,i=n.midiToNote;function s(e,t){var r=a(e);t&&(r+=t);var n,s=i(r),o=!1,c=!1,l=null,h=null,u=!1,d=0;e.startsWith("_")?(o=!0,d=-1,"/"==e[1]?(o=!1,h="v",d=0):"_"==e[1]&&(u=!0,d-=1)):e.startsWith("^")?(c=!0,d=1,"/"==e[1]?(c=!1,h="^",d=0):"^"==e[1]&&(u=!0,d+=1)):e.startsWith("=")&&(l=!0,d=0),((n=o||c||null!=h)||l)&&(s=null!=h||u?e.slice(2):e.slice(1));var f=(s.match(/,/g)||[]).length,p=(s.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=s,this.acc=d,this.isSharp=c,this.isKeySharp=!1,this.isDouble=u,this.isAltered=n,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=h,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}s.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},s.prototype.isLowerThan=function(e){return e.pitch>this.pitch},s.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var r=this.name,n=0;n=0){if(r===t)return e.extra[n].x+e.extra[n].w/2;r++}return-1}function f(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function p(e,t,r){var n=e.semantics.notesToNumber(t,r);if(n.error)return e.setError(n.error),n;if(n.graces&&n.notes){var a=n.notes.length-1;n.notes[a].graces=n.graces}return n}function m(e,t,r,n,a){for(var i=0;i=0&&(e.semantics.clefTranspose=-12),k.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),k.type){case"staff-extra key-signature":this.accidentals=k.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var T=!1;x===g.children.length-1&&(T=!0);var S=o(k,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var _=0;_0&&(y.abselem=M,r.push(y),v.children.push(M))}}},e.exports=h},4785:function(e,t,r){var n=r(3197),a=r(4240),i=r(4331);function s(e,t,r){var n=e.semantics,a=t.controller.getTextSize,i=n.tabInfos(e),s=!0;if(n.suppress(e)&&(s=!1),s){var o=a.calc(i,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:o.height,width:o.width},name:i},o.height}return 0}function o(e,t){return!(!t[e].isTabStaff||e!==t.length-1&&t[e+1].isTabStaff)}function c(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function l(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}e.exports=function(e,t,r,h){var u=new a,d={clef:{type:"TAB"}},f=e.linePitch*e.nbLines,p=r.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void e.setError("No tablatures when stafflines=0");p.splice(p.length,0,d)}var g=r.staffGroup,v=g.voices,b=function(e){for(var t=0,r=0;rt&&(t=n.specialY.lyricHeightBelow)}return t}(v[0]),y=h,x=g.staffs[y],k=f+3-x.bottom-b;x.isTabStaff&&(k=x.top);var w={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:k},C=function(e,t){for(var r=0,n=0,a=0;;){if(!t[r])return-1;if(t[r].isTabStaff||(a=t[r].voices.length),t[r].isTabStaff){if(n++,o(r,t)&&n=e){if(r+1==t.length)return r+1;if(!t[r+1].isTabStaff)return r+1}if(++r>t.length)return-1}}(h,g.staffs);if(-1!==C){w.parentIndex=C-1,g.staffs.splice(C,0,w),g.height+=f+3;var T=function(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}(g.staffs,C),S=1;(function(e,t){return 1===function(e){for(var t=0,r=0;r1})(g.staffs,T)&&(S=T.voices.length),d.voices=[];for(var _=0;_0&&(E.duplicate=!0);var M=s(e,t,E)/i.STEP;M=Math.max(M,1),g.staffs[h].top+=1,g.height+=M,E.staff=w;var A=v.length;v.splice(v.length,0,E);var N=l(v,_+h);d.voices[_]=[],u.build(e,v,d.voices[_],_,h,N,A)}!function(e){for(var t=0;t0&&(i[0].invisible=!0);break;case"meter":i[0]=l(a,this.tuneNumber),this.startlimitelem=i[0],r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"clef":if(i[0]=s(a,this.tuneNumber),!i[0])return null;r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"key":var h=o(a,this.tuneNumber);h&&(i[0]=h,this.startlimitelem=i[0]),r.duplicate&&i.length>0&&(i[0].invisible=!0);break;case"stem":this.stemdir="auto"===a.direction?void 0:a.direction;break;case"part":var u=new n(a,0,0,"part",this.tuneNumber),d=this.getTextSize.calc(a.title,"partsfont","part");u.addFixedX(new f(a.title,0,0,void 0,{type:"part",height:d.height/p.STEP})),i[0]=u;break;case"tempo":var m=new n(a,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(a,this.tuneNumber,c)),i[0]=m;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":T=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;case"color":this.voiceColor=a.color,r.color=this.voiceColor;break;default:var v=new n(a,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+a.el_type,0,0,void 0,{type:"debug"})),i[0]=v}return i},_.prototype.createBeam=function(e,t,r){var n=[],i=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);T&&i.setHint();for(var s=0;se.pitches[r+1].pitch){t=!1;var n=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=n}}while(!t)},N=function(e,t,r,n,a,i,s,o,c){for(var l=r;l>11;l--)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||n||e.addFixed(new f(null,o,(a+4)*c,l,{type:"ledger"}));for(l=0;l1&&(p=new a(i,"grace",s),T&&p.setHint(),p.mainNote=r);var m=[];for(u=e.gracenotes.length-1;u>=0;u--)o+=10,m[u]=o,e.gracenotes[u].accidental&&(o+=7);for(u=0;u=6?"down":"up";for(n&&(_=n),(a=t.style?t.style:a)&&"normal"!==a||(a="note"),(m=i?S[a].nostem:S[a][-s])||console.log("noteSymbol:",a,s,i),g="down"===_?t.pitches.length-2:1;"down"===_?g>=0:g11||M.verticalPos<1)&&x.push(M.verticalPos-M.verticalPos%2),"down"===_?b=d.getSymbolWidth(m)+2:v=d.getSymbolWidth(m)+2)}var N=t.pitches.length;for(g=0;g0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=z.accidentalshiftx,y=Math.max(y,z.dotshiftx)}if(H){var D=Math.round(70*this.voiceScale)/10,F="down"===_?t.minpitch-D:t.minpitch+1/3;F>6&&!n&&(F=6);var j="down"===_?t.maxpitch-1/3:t.maxpitch+D;j<6&&!n&&(j=6);var I="down"===_||0===e.heads.length?0:e.heads[0].w,V="down"===_?1:-1;h&&"noteheads.slash.quarter"===h.c&&("down"===_?j-=1:F+=1),h&&"noteheads.triangle.quarter"===h.c&&("down"===_?j-=.7:F-=1.2),e.addRight(new f(null,I,0,F,{type:"stem",pitch2:j,linewidth:V,bottom:F-1})),u=Math.min(F,j)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:u,additionalLedgers:x,dir:_,symbolWidth:T}},_.prototype.addLyric=function(e,t){var r="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var n=this.getTextSize.calc(r,"vocalfont","lyric"),a=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,n.width,void 0,{type:"lyric",position:a,height:n.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},_.prototype.createNote=function(e,t,r,a){var i,s=null,o=0,l=0,h=0,u=[],p=C(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y1,this.stemdir,r,g,this.voiceScale);s=M.noteHead,o=M.roomTaken,l=M.roomTakenRight}else{var A=this.addNoteToAbcElement(E,e,v,this.stemdir,this.style,m,g,t,a);void 0!==A.min&&(this.minY=Math.min(A.min,this.minY)),s=A.noteHead,o=A.roomTaken,l=A.roomTakenRight,u=A.additionalLedgers,i=A.dir,h=A.symbolWidth}if(void 0!==e.lyric&&this.addLyric(E,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,a,E,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration){var B=t&&"up"!==i?Math.min(-3,E.bottom-6):E.bottom;this.decoration.createDecoration(a,e.decoration,E.top,s?s.w:0,E,o,i,B,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&E.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),N(E,e.minpitch,e.maxpitch,e.rest,h,u,i,-2,1),void 0!==e.chord){var P=x(this.getTextSize,E,e,o,l,h,this.jazzchords,this.germanAlphabet);o=P.roomTaken,l=P.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),E},_.prototype.addSlursAndTies=function(e,t,r,n,a,i){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o10&&"treble"===t.abcelem.type?13:11;t.addFixed(new f(e,n,r.width,a+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},_.prototype.createBarLine=function(e,t,r){var a=new n(t,0,10,"bar",this.tuneNumber),i=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,a);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,d="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||d){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(a);this.startlimitelem=a}if(o&&(a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(i=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),"bar_invisible"===t.type&&(i=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),a.addRight(i)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,a,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),l&&(i=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),a.addRight(i),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=i,this.partstartelem=null),h&&(i=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),a.addRight(i)),d&&(s+=3,a.addRight(new f("dots.dot",s,1,7)),a.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;a.minspacing+=m+10,this.partstartelem=new u(t.startEnding,i,null),e.addOther(this.partstartelem)}return a.extraw-=5,void 0!==t.chord&&x(this.getTextSize,a,t,0,0,0,!1,this.germanAlphabet),a},e.exports=_},2652:function(e,t,r){var n=r(6658),a=r(4331),i=r(5810);function s(e,t,r,s,o,c,l,h,u,d,f,p,m,g,v){for(var b=e.split("\n"),y=b.length-1;y>=0;y--){var x,k=b[y],w=0;s||(k=i(k,g,v));var C=h.calc(k,o,c),T=C.width,S=C.height/a.STEP;switch(t){case"left":w=-(f+=T+7),x=d.averagepitch,u.addExtra(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"left"}));break;case"right":w=p+=4,x=d.averagepitch,u.addRight(new n(k,w,T+4,x,{type:"text",height:S,dim:l,position:"right"}));break;case"below":u.addRight(new n(k,0,0,void 0,{type:"text",position:"below",height:S,dim:l,realWidth:T}));break;case"above":u.addRight(new n(k,0,0,void 0,{type:"text",position:"above",height:S,dim:l,realWidth:T}));break;default:if(r){var _=r.y+3*a.STEP;u.addRight(new n(k,w+r.x,0,d.minpitch+_/a.STEP,{position:"relative",type:"text",height:S,dim:l}))}else{var E="above";d.positioning&&d.positioning.chordPosition&&(E=d.positioning.chordPosition),"hidden"!==E&&u.addCentered(new n(k,m/2,T,void 0,{type:"chord",position:E,height:S,dim:l,realWidth:T}))}}}return{roomTaken:f,roomTakenRight:p}}e.exports=function(e,t,r,n,a,i,o,c){for(var l=0;l0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(d=3,u=0),o.addRight(new i("8",5+u,a.getSymbolWidth("8")*h,d,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},3923:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){if(e.el_type="keySignature",!e.accidentals||0===e.accidentals.length)return null;var r=new n(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var s=0;return e.accidentals.forEach((function(e){var t,n=0;switch(e.acc){case"sharp":t="accidentals.sharp",n=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",n=-1.2;break;case"quartersharp":t="accidentals.halfsharp",n=-2.5;break;case"quarterflat":t="accidentals.halfflat",n=-1.2;break;default:t="accidentals.flat"}r.addRight(new i(t,s,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t),top:e.verticalPos+a.symbolHeightInPitches(t)+n,bottom:e.verticalPos+n})),s+=a.getSymbolWidth(t)+2}),this),r}},2143:function(e,t,r){var n=r(6020),a=r(6658);e.exports=function(e,t,r,i){i||(i={});var s,o=void 0!==i.dir?i.dir:null,c=void 0!==i.headx?i.headx:0,l=void 0!==i.extrax?i.extrax:0,h=void 0!==i.flag?i.flag:null,u=void 0!==i.dot?i.dot:0,d=void 0!==i.dotshiftx?i.dotshiftx:0,f=void 0!==i.scale?i.scale:1,p=void 0!==i.accidentalSlot?i.accidentalSlot:[],m=void 0!==i.shouldExtendStem&&i.shouldExtendStem,g=void 0===i.printAccidentals||i.printAccidentals,v=r.verticalPos,b=0,y=0,x=0;if(void 0===t)e.addFixed(new a("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new a(null,0,0,v);else{var k=c;if(r.printer_shift){var w="same"===r.printer_shift?1:0;k="down"===o?-n.getSymbolWidth(t)*f+w:n.getSymbolWidth(t)*f-w}var C={scalex:f,scaley:f,thickness:n.symbolHeightInPitches(t)*f,name:r.name};if((s=new a(t,k,n.getSymbolWidth(t)*f,v,C)).stemDir=o,h){var T=v+("down"===o?-7:7)*f;m&&("down"===o&&T>6&&(T=6),"up"===o&&T<6&&(T=6));var S="down"===o?c:c+s.w-.6;e.addRight(new a(h,S,n.getSymbolWidth(h)*f,T,{scalex:f,scaley:f}))}for(y=s.w+d-2+5*u;u>0;u--){var _=1-Math.abs(v)%2;e.addRight(new a("dots.dot",s.w+d-2+5*u,n.getSymbolWidth("dots.dot"),v+_))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var E;switch(r.accidental){case"quartersharp":E="accidentals.halfsharp";break;case"dblsharp":E="accidentals.dblsharp";break;case"sharp":E="accidentals.sharp";break;case"quarterflat":E="accidentals.halfflat";break;case"flat":E="accidentals.flat";break;case"dblflat":E="accidentals.dblflat";break;case"natural":E="accidentals.nat"}for(var M=!1,A=l,N=0;N=6){p[N][0]=v,A=p[N][1],M=!0;break}!1===M&&(A-=n.getSymbolWidth(E)*f+2,p.push([v,A]),b=n.getSymbolWidth(E)*f+2);var B=n.symbolHeightInPitches(E);e.addExtra(new a(E,A,n.getSymbolWidth(E),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),x=n.getSymbolWidth(E)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:x}}},2525:function(e,t,r){var n=r(1409),a=r(6020),i=r(6658);e.exports=function(e,t){e.el_type="timeSignature";var r=new n(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o",n)),o&&e.addOther(new a(o.start,o.stop,"<",n)),c&&e.addOther(new i(c.start,c.stop))},l.prototype.createDecoration=function(e,t,r,a,i,l,u,d,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,a){for(var i=0;i9&&d++;var m=n/2;"center"!==s.getSymbolAlign(p)&&(m-=s.getSymbolWidth(p)/2),a.addFixedX(new o(p,m,s.getSymbolWidth(p),d))}if("slide"===t[f]&&a.heads[0]){var g=a.heads[0].pitch,v=new o("",-i-15,0,(g-=2)-1),b=new o("",-i-5,0,g+1);a.addFixedX(v),a.addFixedX(b),e.addOther(new c({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===d&&(d=r),{above:d,below:a.bottom}}(e,t,r,a,i,l,u,d,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,d),function(e,t,r,n,a,i,c,l){function h(e,t){"above"===e?n.above+=t:n.below-=t}function u(e){var t;return"above"===e?(t=n.above)c&&(t=c),t}function d(e,n,a){var i=u(n);r.addFixedX(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3,anchor:a})),h(n,5)}function f(e,n){var a=t/2;"center"!==s.getSymbolAlign(e)&&(a-=s.getSymbolWidth(e)/2);var i=s.symbolHeightInPitches(e)+1,c=u(n);c="above"===n?c+i/2:c-i/2,r.addFixedX(new o(e,a,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e),position:n})),h(n,i)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=0;mthis.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(e){this._addChild(e)},i.prototype.addCentered=function(e){var t=e.w/2;-tthis.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},i.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},i.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;tthis.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setStemDirection=function(){this.average=r(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},t.prototype.calcDir=function(){this.average=r(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",t=0;t0&&this.unalignedWords(e.unalignedWords,n,a,i,s),this.extraText(e,n,a,i,s),e.footer&&r&&this.footer(e.footer,t,n,s)}function s(e,t,r,n,i,s,o){r&&(t&&(r="string"==typeof r?t+r:[{text:t}].concat(r)),a(e,r,"historyfont",i=s?"abcjs-extra-text "+i:"","description",n,{absElemType:"extraText",anchor:"start"},o))}function o(e,t,r,i,s,o,c,l,h,u,d,f){if(r){l=d?"abcjs-extra-text "+l:"";var p=f.calc("A",s,l);if("string"==typeof r)t&&(r=t+"\n"+r),n(e,{marginLeft:i,text:r,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle",klass:l},f);else{e.push({startGroup:c,klass:l,name:h}),e.push({move:u.info}),t&&(n(e,{marginLeft:i,text:t,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle"},f),e.push({move:3*p.height/4}));for(var m=0;m0&&this.startVoice.staff.voices[0]===e)},e.exports=t},6891:function(e){e.exports=function(e,t,r,n){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===n?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},3185:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},8256:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},3736:function(e){e.exports=function(e,t,r,n,a,i){var s,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o)this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:n,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),s=i.calc(o,"textfont","defined-text"),this.rows.push({move:s.height});else if(o){for(var l=0,h=n,u="textfont",d=0;dthis.top&&(this.top=this.pitch2),this.bottom=n,void 0!==this.pitch2&&this.pitch20?this.top+=a.stemHeight:this.bottom+=a.stemHeight),a.dim&&(this.dim=a.dim),a.position&&(this.position=a.position),this.height=a.height?a.height:4,a.top&&(this.top=a.top),a.bottom&&(this.bottom=a.bottom),a.name?this.name=a.name:this.c?this.name=this.c:this.name=this.type,a.realWidth?this.realWidth=a.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":a.position&&"below"===a.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?a.position&&"below"===a.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},6994:function(e,t,r){var n=r(1716);e.exports=function(e,t,r,a,i,s,o,c){var l=c.calc("i",r,a);if(""===t)e.push({move:l.height});else{if("string"==typeof t)return void n(e,{marginLeft:s,text:t,font:r,klass:a,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:i},c);o.marginTop&&e.push({move:o.marginTop});var h=0,u={left:s,anchor:o.anchor,phrases:[]};a&&(u.klass=a),e.push(u);for(var d=0;d0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;te&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},t.prototype.getYBounds=function(){var e,t;return this.isTie?(this.calcTieDirection(),this.calcX(10,1e3),this.calcTieY()):(this.calcSlurDirection(),this.calcX(10,1e3),this.calcSlurY()),this.above?e=(t=Math.min(this.startY,this.endY))+3:t=(e=Math.min(this.startY,this.endY))-3,[e,t]},e.exports=t},1134:function(e,t,r){var n=r(1716),a=r(6994);e.exports=function(e,t,r,i,s,o,c,l,h,u){if(this.rows=[],e.header&&o){var d=u.calc("X","headerfont","abcjs-header abcjs-meta-top").height;n(this.rows,{marginLeft:c,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-d,info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"middle",info:t.header,name:"header"},u),n(this.rows,{marginLeft:c+s,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-d,anchor:"end",info:t.header,name:"header"},u)}o&&this.rows.push({move:l.top});var f=r.titleleft?"start":"middle",p=r.titleleft?c:c+s/2;if(e.title){var m=h?"abcjs-title":"";a(this.rows,e.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:t.title},u)}if(i.length)for(var g=0;g0){var v=!(!e.composer&&!e.origin);m=h?"abcjs-rhythm":"",n(this.rows,{marginLeft:c,text:e.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:t.rhythm,name:"rhythm"},u)}e.composer&&e.composer,e.origin&&e.origin;var b=e.composer?e.composer:"";e.origin&&("string"==typeof b&&"string"==typeof e.origin?b+=" ("+e.origin+")":"string"==typeof b&&"string"!=typeof e.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(e.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(e.origin)).push({text:")"}))),b&&(m=h?"abcjs-composer":"",a(this.rows,b,"composerfont",m,"composer",c+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},u))}e.author&&e.author.length>0&&(m=h?"abcjs-author":"",a(this.rows,e.author,"composerfont",m,"author",c+s,{anchor:"end",absElemType:"author",info:t.author},u)),e.partOrder&&e.partOrder.length>0&&(m=h?"abcjs-part-order":"",a(this.rows,e.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},u))}},2096:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},e.exports=t},3197:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u=0&&f.setAttribute("class","abcjs-notehead")}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m0?g.classList[0]+" ":"";g.setAttribute("class",v+t.overrideClasses)}if(h)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,c.add(t,g,!1,l);else{t.elemset.push(g);var b=!1;"note"!==t.type&&"tabNumber"!==t.type||(b=!0),c.add(t,g,b,l)}}else t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l);if(t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var y=0;y=1&&l(e,e.spacing.staffSeparation,v[v.length-1],y.staffGroup);var x=c(e,y.staffGroup,m,b);x.line=p+b,v.push(x),e.paper.closeGroup()}else y.nonMusic&&(t.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),i(e,y.nonMusic,m),e.paper.closeGroup())}return t.reset(),r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),i(e,r.bottomText,m),e.paper.closeGroup()),a(e,s,u,h),{staffgroups:v,selectables:m.getElements()}}},9879:function(e,t,r){var n=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var a=n(e,t.anchor.x,t.pitch,t.dec,{scalex:1,scaley:1,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},a),[a]}},5947:function(e,t,r){var n=r(6764),a=r(5759),i=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=n("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=n("M %f %f L %f %f ",o,l,o,s(l+20))),h+=n("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending"),"data-name":"ending"}),i(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&a(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},9045:function(e,t,r){var n=r(6764),a=r(6454),i=r(7199);function s(e,t,r){return i(e+r*t)}var o=[[3.5,-4.8]],c=[[1.5,-1],[.3,-.3],[-3.5,3.8]],l=[[-1.5,2]],h=[[3,4],[3,-4]],u=[[-3,4],[-3,-4]];function d(e,t){for(var r="",n=0;n1&&s.indexOf(".")<0){var p=i.isInGroup()?"":o.klass;e.paper.openGroup({"data-name":o.name,klass:p});for(var m=0,g=0;g0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=a(e,t.x,u,o,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=i(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness)}return 1!==t.scalex&&t.graphelem&&function(e,t,r,n,a,i){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+n+");transform-origin:"+a+"px "+i+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var n=r(5741),a=r(5829);function i(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}i.prototype.getElements=function(){return this.elements},i.prototype.add=function(e,t,r,n){if(this.canSelect(e)){var a;a=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,a);var i={absEl:e,svgEl:t,isDraggable:r};void 0!==n&&(i.staffPos=n),this.elements.push(i)}},i.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},i.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:n,unhighlight:a};this.add(r,t,!1)},e.exports=i},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),n=(e.controller.width-t)/2,a=n+t,i="M "+n+" "+r+" L "+a+" "+r+" L "+a+" "+(r+1)+" L "+n+" "+(r+1)+" L "+n+" "+r+" z";e.paper.pathToBack({path:i,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,n){var a=(t+e.padding.left+e.padding.right)*r,i=(e.y+e.padding.bottom)*r;if(e.isPrint&&(i=Math.max(i,1056)),""!==e.ariaLabel){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===n?e.paper.setResponsiveWidth(a,i):(c.width="",c.height=i+"px",r<1?(c.width=a+"px",e.paper.setSize(a/r,i/r)):e.paper.setSize(a,i)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(){for(var e,r,n,a,i,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,a=r[3]?"0"==r[3]?"0":r[3][1]:" ",i=r[5]-String(e).length,n=r[5]?str_repeat(a,i):"",c.push(r[4]?e+n:n+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var n=r(4331),a=r(129),i=r(3145),s=r(7641),o=r(1547),c=r(3624),l=r(5668);function h(e,t,r,i,s){if(r)for(var o=0;o=0&&v.voices&&u(e,t.voices,v.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:m,y2:m,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(v.originalTop),width:e.controller.width,height:e.calcY(v.originalBottom)-e.calcY(v.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),d=0,E(v,"chordHeightAbove"),E(v,"chordHeightBelow"),E(v,"dynamicHeightAbove"),E(v,"dynamicHeightBelow"),E(v,"endingHeightAbove"),E(v,"lyricHeightAbove"),E(v,"lyricHeightBelow"),E(v,"partHeightAbove"),E(v,"tempoHeightAbove"),E(v,"volumeHeightAbove"),E(v,"volumeHeightBelow"))),e.moveY(n.STEP,-v.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var b=2,y=0,x=0;x6&&(d=0)}}_>1&&(f=t.staffs[0].topLine,p=t.staffs[_-1].bottomLine,c(e,t.startx,.6,f,p,null)),e.y=m}},7865:function(e,t,r){var n=r(6637);e.exports=function(e,t,r,a,i,s,o){var c=e.calcY(a);return n(e,t,r,c,i,s,o)}},7641:function(e,t,r){var n=r(7865);e.exports=function(e,t,r,a,i,s){var o="abcjs-top-line",c=2;i&&(c=i),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var l=0,h=0;if(1===a)n(e,t,r,6,o,null,s+e.lineThickness),l=e.calcY(10),h=e.calcY(2);else for(var u=a-1;u>=0;u--){var d=(u+1)*c;h=e.calcY(d),0===l&&(l=h),n(e,t,r,d,o,null,s+e.lineThickness),o=void 0}return e.paper.closeGroup(),[l,h]}},3987:function(e,t,r){var n=r(2435),a=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var i,s=e.calcY(t.pitch)+2;if(t.tempo.preString){i=a(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",i).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new i(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",void 0!==t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};function x(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=0;r0)for(var o=s.staffGroup.voices[0],c=!1,l=0,h=0;hthis.width+1&&(e.topText=new l(e.metaText,e.metaTextInfo,e.formatting,e.lines,i,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o0)for(var h=c.nonMusic.rows.length,f=0;f0&&c.text[0].center)&&(p.left=i/2+this.renderer.padding.left)}}e.tablatures&&v.layoutTablatures(this.renderer,e);var m=g(this.renderer,this.classes,e,this.width,i,this.responsive,a,this.selectTypes,t,r);if(this.staffgroups=m.staffgroups,this.selectables=m.selectables,this.oneSvgPerLine){var b=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,r,n,a){r||(r="Untitled");var i=t.querySelector("svg");"resize"===n&&(t.style.paddingBottom="");for(var s=i.querySelector("style"),o="resize"===n?i.viewBox.baseVal.width:i.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,h=[],u=0;u0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},1328:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var n=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*n,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},9799:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t,r,n){var a;a="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var i=this.svg.getTextSize(e,a.attr,n);return a.font.box?{height:i.height+4*a.font.padding,width:i.width+4*a.font.padding}:i},t.prototype.baselineToCenter=function(e,t,r,n,a){return.5*this.calc(e,t,r).height+(a-n-2)*this.attr(t,r).font.size},e.exports=t},2187:function(e){e.exports=function(e,t,r,n){if(e)for(var a=0;a0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),i.setAttribute("class",o)}}},4331:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},8123:function(e){function t(e,t,r,n){if(0===e.indexOf(t)){var a=e.replace(t,""),i=parseInt(a,10);""+i===a&&(r[n]=i)}}e.exports=function(e,r){var n=[];if(e.absEl.elemset){for(var a={},i=0;i=0&&r=0?(a=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[i].svgEl.getBBox(),t,e.scale),r=a[0],n=a[1]):(a=function(e){var t,r,n=1,a=1,i=e.target.closest("svg"),s=0;return i&&i.viewBox&&i.viewBox.baseVal&&(0!==i.viewBox.baseVal.width&&(n=i.viewBox.baseVal.width/i.clientWidth),0!==i.viewBox.baseVal.height&&(a=i.viewBox.baseVal.height/i.clientHeight),s=i.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,r=e.offsetY):(t=e.layerX,r=e.layerY),[t*=n,(r*=a)+s]}(t),i=function(e,t,r){for(var n=9999999,a=-1,i=0;i0;i++){var s=e.selectables[i];if(e.getDim(s),s.dim.leftt&&s.dim.topr)a=i,n=0;else if(s.dim.topr){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));ot){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));cMath.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),u=Math.sqrt(l*l+h*h);u=0&&n<=12?a:-1}(e,r=a[0],n=a[1])),{x:r,y:n,clickedOn:i}}function l(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,n=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=n,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function h(e){var t=e;"touchstart"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0]));var r=c(this,t);r.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=v(e.svg);r[t]=!0,b(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function u(e){var t=e;if("touchmove"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=c(this,t),a=Math.round((r.y-this.dragMouseStart.y)/n.STEP);a!==this.dragYStep&&(this.dragYStep=a,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+a*n.STEP+")"))}}function d(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),p.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=v(e.svg);delete r[t],b(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function f(e){e>=0&&eo&&ei&&(a=i),a<-i&&(a=-i),a}(x,k,v,w),N=M+Math.floor(A/2),B=M+Math.floor(-A/2),S||(y&&M<6||!y&&M>6)&&(N=6,B=6),[N,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,r,n,a){for(var o=[],l=[],h=0;h0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var x=l.length-1;x>=0;x--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-x-4){var k=f,w=p+m*(x+1);l[x].single&&(k=0===h?f+5:f-5,w=i(r.startX,r.startY,r.endX,r.endY,k)+m*(x+1));var C={startX:l[x].x,endX:k,startY:l[x].y,endY:w,dy:a};if(void 0!==l[x].split){var T=l[x].split;C.endX<=T[T.length-1]&&(T[T.length-1]-=u.w),T.push(C.endX),C.split=l[x].split}o.push(C),l=l.slice(0,x)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m0?((a=(r-(n-i*a))/i)*s>50&&(a=50/s),a):null}e.exports=function(e,t,r,i,s,l){var h,u,d=r;for(h=0;hMath.round(d)&&(d=f,s&&(h=-1)))}for(h=0;h=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),i(c,l,"lyricHeightAbove"),i(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+a,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+a,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(i(c,l,"dynamicHeightAbove"),i(c,l,"volumeHeightAbove")),i(c,l,"partHeightAbove"),i(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/n.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+a),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+a}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+a):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+a):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+a),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u0&&(c.top+=f)}c.top+=e.spacing.staffTopMargin/n.STEP,r=2-c.bottom}}},735:function(e,t,r){var n=r(937);function a(e){for(var t=0;t0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d,f,p=0;for(r&&console.log("init layout",e),c=0;c1e-7?v.push(s.voices[c]):g.push(s.voices[c]);m=0;var b=0;for(c=0;cu&&(u=n.getNextX(g[c]),m=n.getSpacingUnits(g[c]),b=g[c].spacingduration);l+=m,h=Math.min(h,m),r&&console.log("currentduration: ",p,l,h);var y=void 0;for(c=0;c0){u=w;for(var T=0;Tu&&(u=n.getNextX(s.voices[c]),m=n.getSpacingUnits(s.voices[c]));return function(e){for(var t=0,r=0;r0){var a=n.children.length-1,i=n.children[a];if("bar"===i.abcelem.el_type){var s=i.children[0].x;s>t?t=s:i.children[0].x=t}}}}(s.voices),l+=m,s.setWidth(u),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var n=r(3721);function a(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=a(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var a=e+(t-e)/2;return n(r.startX,r.startY,r.endX,r.endY,a)}(r,e.anchor2.x,t),e.yTextPos+=a(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,a(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var i=0,s=0;se.startNote||i>e.endNote)&&(e.startNote=i,e.endNote=i),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},937:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,n,a){var i=r.children[r.i];if(!i)return 0;var s=e-r.minx,o=r.durationindex+i.duration>0?n:0;if("note"===i.abcelem.el_type&&!i.abcelem.rest&&0!==r.voicenumber&&a){var c=a.children[a.i],l=c&&(i.abcelem.maxpitch<=c.abcelem.maxpitch+1&&i.abcelem.maxpitch>=c.abcelem.minpitch-1||i.abcelem.minpitch<=c.abcelem.maxpitch+1&&i.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&i.abcelem.minpitch===c.abcelem.minpitch&&i.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&i.heads&&i.heads.length>0&&c.heads[0].c===i.heads[0].c&&(l=!1),l){var h=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;i.adjustedWidth||(i.adjustedWidth=h+i.w),i.w=i.adjustedWidth;for(var u=0;u0&&t.putChordInLane(n),void(e[n]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r=0;r--)(n=e[t].children[r]).chordHeightBelow&&o(i,n)}return(a.length>1||i.length>1)&&function(e,t,r){for(var n=0;n=0};i.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},i.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},i.prototype.setLineThickness=function(e){this.lineThickness=e},i.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},i.prototype.setPadding=function(e){function t(t,r,n,a,i){void 0!==e.formatting[n]?t.padding[r]=e.formatting[n]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=a:t.padding[r]=i}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},i.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},i.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},i.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},i.prototype.calcY=function(e){return this.y-e*n.STEP},i.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},i.prototype.absolutemoveY=function(e){this.y=e},e.exports=i},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function n(e,t,r){var n=r-e;return"M "+e+" "+t+" l "+n+" 0 l 0 1 l "+-n+" 0 z "}function a(e,t,r){var n=r-t;return"M "+e+" "+t+" l 0 "+n+" l 1 0 l 0 "+-n+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var n=t/e*100;this.svg.parentNode.style["padding-bottom"]=n+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,i=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(n(r,i,s)),t.push(n(r,o,s)),t.push(a(s,i,o)),t.push(a(r,o,i)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,n){var a=document.createElementNS(t,"text");for(var i in a.setAttribute("stroke","none"),r)r.hasOwnProperty(i)&&a.setAttribute(i,r[i]);for(var s=(""+e).split("\n"),o=0;o0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),n&&(i[n]=a),a},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e["data-name"]&&r.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(r):this.append(r),this.currentGroup.unshift(r),r},r.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):void 0!==e[n]&&r.setAttributeNS(null,n,e[n]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var n in e)e.hasOwnProperty(n)&&("path"===n?r.setAttributeNS(null,"d",e.path):"klass"===n?r.setAttributeNS(null,"class",e[n]):r.setAttributeNS(null,n,e[n]));return this.prepend(r),r},r.prototype.lineToBack=function(e){for(var r=document.createElementNS(t,"line"),n=Object.keys(e),a=0;a0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},1185:function(e){e.exports="6.4.3"}},t={},r=function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(1045),r;var e,t,r})); \ No newline at end of file diff --git a/dist/abcjs-basic-min.js.LICENSE b/dist/abcjs-basic-min.js.LICENSE index ce22b18f..6da816a5 100644 --- a/dist/abcjs-basic-min.js.LICENSE +++ b/dist/abcjs-basic-min.js.LICENSE @@ -1,5 +1,5 @@ /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/abcjs-basic.js b/dist/abcjs-basic.js index 3b2112b9..9edc95d7 100644 --- a/dist/abcjs-basic.js +++ b/dist/abcjs-basic.js @@ -18,7 +18,7 @@ return /******/ (function() { // webpackBootstrap /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -617,7 +617,6 @@ var tunebook = {}; } } } - return staves; } function measuresParser(staff, tune) { @@ -1341,7 +1340,6 @@ var Tune = function Tune() { }; return this.meter; // TODO-PER: is this saved value used anywhere? A get function shouldn't change state. }; - this.getKeySignature = function () { for (var i = 0; i < this.lines.length; i++) { var line = this.lines[i]; @@ -1496,7 +1494,6 @@ var Tune = function Tune() { // isTiedState = voiceTimeMilliseconds; } } - return { isTiedState: isTiedState, duration: realDuration / timeDivider, @@ -1667,6 +1664,7 @@ var Tune = function Tune() { } this.getBpm = function (tempo) { var bpm; + if (!tempo) tempo = this.metaText ? this.metaText.tempo : null; if (tempo) { bpm = tempo.bpm; var beatLength = this.getBeatLength(); @@ -3121,7 +3119,6 @@ var Parse = function Parse() { multilineVars.lineBreaks = switches.lineBreaks; //multilineVars.continueall = true; } - header.reset(tokenizer, warn, multilineVars, tune); try { if (switches.format) { @@ -3211,7 +3208,6 @@ var bookParser = function bookParser(book) { }); pos += tune.length + 1; // We also lost a newline when splitting, so count that. }); - if (tunes.length > 1 && !parseCommon.startsWith(tunes[0].abc, 'X:')) { // If there is only one tune, the X: might be missing, otherwise assume the top of the file is "intertune" // There could be file-wide directives in this, if so, we need to insert it into each tune. We can probably get away with @@ -4784,7 +4780,6 @@ var ParseHeader = function ParseHeader(tokenizer, warn, multilineVars, tune, tun } return ret; // just to suppress warning }; - var parseFraction = function parseFraction() { // handles this much: parseNum slash decimal var ret = parseNum(); @@ -4815,7 +4810,6 @@ var ParseHeader = function ParseHeader(tokenizer, warn, multilineVars, tune, tun //var tok = tokens.shift(); //if (tok.token !== '+') throw "Extra characters in M: line"; } - if (multilineVars.havent_set_length === true) { multilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125; multilineVars.havent_set_length = false; @@ -5091,7 +5085,6 @@ var ParseHeader = function ParseHeader(tokenizer, warn, multilineVars, tune, tun // TODO: complain about unhandled header } } - return [0]; }; this.letter_to_body_header = function (line, i) { @@ -5133,7 +5126,6 @@ var ParseHeader = function ParseHeader(tokenizer, warn, multilineVars, tune, tun // TODO: complain about unhandled header } } - return [0]; }; var metaTextHeaders = { @@ -5600,7 +5592,6 @@ var parseKeyVoice = {}; str: str.substring(i) }; // We get the note in the middle of the staff. We want the note that appears as the first ledger line below the staff. }; - var normalizeAccidentals = function normalizeAccidentals(accs) { for (var i = 0; i < accs.length; i++) { if (accs[i].note === 'b') accs[i].note = 'B';else if (accs[i].note === 'a') accs[i].note = 'A';else if (accs[i].note === 'F') accs[i].note = 'f';else if (accs[i].note === 'E') accs[i].note = 'e';else if (accs[i].note === 'D') accs[i].note = 'd';else if (accs[i].note === 'C') accs[i].note = 'c';else if (accs[i].note === 'G' && accs[i].acc === 'sharp') accs[i].note = 'g';else if (accs[i].note === 'g' && accs[i].acc === 'flat') accs[i].note = 'G'; @@ -6017,7 +6008,6 @@ var parseKeyVoice = {}; if (multilineVars.currentVoice) { if (multilineVars.currentVoice.index === currentVoice.index && multilineVars.currentVoice.staffNum === currentVoice.staffNum) return; // there was no change so don't reset it. } - multilineVars.currentVoice = currentVoice; return tuneBuilder.setCurrentVoice(currentVoice.staffNum, currentVoice.index, id); }; @@ -6233,7 +6223,6 @@ var parseKeyVoice = {}; // console.log("parse voice", token, tune.metaText.title); } } - start += tokenizer.eatWhiteSpace(line, start); } @@ -6408,7 +6397,6 @@ MusicParser.prototype.parseMusic = function (line) { // delayStartNewLine = true; // TODO-PER: Handle inline headers } - var overlayLevel = 0; while (i < line.length) { var startI = i; @@ -6836,15 +6824,30 @@ var letter_to_chord = function letter_to_chord(line, i) { chord[1] = chord[1].substring(1); chord[2] = 'right'; } else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '@') { - // @-15,5.7 + // @-15,5.7 chord[1] = chord[1].substring(1); var x = tokenizer.getFloat(chord[1]); - if (x.digits === 0) warn("Missing first position in absolutely positioned annotation.", line, i); + if (x.digits === 0) { + warn("Missing first position in absolutely positioned annotation.", line, i); + chord[1] = chord[1].replace("@", ""); + chord[2] = 'above'; + return chord; + } chord[1] = chord[1].substring(x.digits); - if (chord[1][0] !== ',') warn("Missing comma absolutely positioned annotation.", line, i); + if (chord[1][0] !== ',') { + warn("Missing comma absolutely positioned annotation.", line, i); + chord[1] = chord[1].replace("@", ""); + chord[2] = 'above'; + return chord; + } chord[1] = chord[1].substring(1); var y = tokenizer.getFloat(chord[1]); - if (y.digits === 0) warn("Missing second position in absolutely positioned annotation.", line, i); + if (y.digits === 0) { + warn("Missing second position in absolutely positioned annotation.", line, i); + chord[1] = chord[1].replace("@", ""); + chord[2] = 'above'; + return chord; + } chord[1] = chord[1].substring(y.digits); var ws = tokenizer.skipWhiteSpace(chord[1]); chord[1] = chord[1].substring(ws); @@ -7574,7 +7577,6 @@ var Tokenizer = function Tokenizer(lines, multilineVars) { } return str.length; // It must have been all white space }; - var finished = function finished(str, i) { return i >= str.length; }; @@ -7635,7 +7637,6 @@ var Tokenizer = function Tokenizer(lines, multilineVars) { // case 'f':return {len: i+1, token: 'F'}; // case 'g':return {len: i+1, token: 'G'}; } - return { len: 0 }; @@ -8467,7 +8468,6 @@ var Tokenizer = function Tokenizer(lines, multilineVars) { // More chars: IJ ij Ď ď Đ đ Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň ʼn Ŋ ŋ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š Ţ ţ Ť ť Ŧ ŧ Ŵ ŵ Ź ź Ż ż Ž }; - var charMap1 = { "#": "♯", "b": "♭", @@ -9159,7 +9159,6 @@ function transposeChordName(chord, steps, preferFlats, freeGCchord) { } } else chord += bass; // Don't know what to do so do nothing } - if (extra2) chord += extra2; return chord; } @@ -9370,7 +9369,6 @@ var TuneBuilder = function TuneBuilder(tune) { if (hashParams.rest && hashParams.rest.type === 'invisible') { delete hashParams.decoration; // the decorations on invisible rests should be invisible, too. } - if (tune.lines.length <= tune.lineNum || tune.lines[tune.lineNum].staff.length <= tune.staffNum) { //console.log("pushNote IGNORED", tune.lines[tune.lineNum]) // TODO-PER: This prevents a crash, but it drops the element. Need to figure out how to start a new line, or delay adding this. @@ -9838,7 +9836,6 @@ function cleanUpSlursInLine(line, staffNum, voiceNum, currSlur) { obj.endSlur.push(slurNum); // lyr.syllable += '<' + slurNum; // TODO-PER: debugging } - if (currSlur[staffNum][voiceNum][chordPos].length === 0) delete currSlur[staffNum][voiceNum][chordPos]; return slurNum; }; @@ -11088,7 +11085,6 @@ var strTranspose; return 0; // this should never happen } - case '_': switch (thisAccidental) { case '__': @@ -11105,7 +11101,6 @@ var strTranspose; return 0; // this should never happen } - case '^': switch (thisAccidental) { case '__': @@ -11123,11 +11118,9 @@ var strTranspose; // this should never happen } } - return 0; // this should never happen } })(); - module.exports = strTranspose; /***/ }), @@ -11452,7 +11445,6 @@ var pitchesToPerc = __webpack_require__(/*! ./pitches-to-perc */ "./src/synth/pi // console.log(JSON.stringify(voices)) } } - function getBeatFraction(meter) { switch (parseInt(meter.den, 10)) { case 2: @@ -12228,7 +12220,6 @@ var rendererFactory; this.track += this.noteOnAndChannel; this.track += "%" + pitch.toString(16) + toHex(loudness, 2); //note }; - Midi.prototype.endNote = function (pitch) { this.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any) this.silencelength = 0; @@ -12242,7 +12233,6 @@ var rendererFactory; this.track += this.noteOffAndChannel; this.track += "%" + pitch.toString(16) + "%00"; //end note }; - Midi.prototype.addRest = function (length) { this.silencelength += length; if (this.silencelength < 0) this.silencelength = 0; @@ -12279,7 +12269,6 @@ var rendererFactory; } return "%00%FF" + cmdType + toHex(nameArray.length / 3, 2) + nameArray; // Each byte is represented by three chars "%XX", so divide by 3 to get the length. } - function keySignature(key) { //00 FF 5902 03 00 - key signature if (!key || !key.accidentals) return ""; @@ -13069,7 +13058,6 @@ var parseCommon = __webpack_require__(/*! ../parse/abc_common */ "./src/parse/ab } } } - function chordVoiceOffThisBar(voices) { for (var i = 0; i < voices.length; i++) { var voice = voices[i]; @@ -13395,6 +13383,14 @@ ChordTrack.prototype.interpretChord = function (name) { } bass += chordTranspose; + // MAE 31 Aug 2024 - For visual transpose backup range issue + // If transposed below A or above G, bring it back in the normal backup range + if (bass < 33) { + bass += 12; + } else if (bass > 44) { + bass -= 12; + } + // MAE 17 Jun 2024 - Supporting octave shifted bass and chords var unshiftedBass = bass; bass += this.bassOctaveShift * 12; @@ -13533,7 +13529,6 @@ ChordTrack.prototype.resolveChords = function (startTime, endTime) { if (newBass) newBass = false;else isBoom = false; // only the first note in a chord is a bass note. This handles the case where bass and chord are played at the same time. } } - return; }; ChordTrack.prototype.processChord = function (elem) { @@ -14589,7 +14584,6 @@ function CreateSynth() { self.directSource[trackNum].buffer = audioBuffer; // tell the source which sound to play self.directSource[trackNum].connect(activeAudioContext().destination); // connect the source to the context's destination (the speakers) }); - self.directSource.forEach(function (source) { source.start(0, seconds); }); @@ -16775,7 +16769,6 @@ function convertToNumber(plugin, pitches, graceNotes) { plugin.setError(tabPos.error); return tabPos; // give up on error here } - if (tabPos.graces && tabPos.notes) { // add graces to last note in notes var posNote = tabPos.notes.length - 1; @@ -16973,7 +16966,6 @@ function getLyricHeight(voice) { } return maxLyricHeight; // add spacing } - function buildTabName(plugin, renderer, dest) { var stringSemantics = plugin.semantics; var textSize = renderer.controller.getTextSize; @@ -17052,7 +17044,6 @@ function getNextTabPos(tabIndex, staffGroup) { if (!staffGroup[startIndex].isTabStaff) { nbVoices = staffGroup[startIndex].voices.length; // get number of staff voices } - if (staffGroup[startIndex].isTabStaff) { handledVoices++; if (islastTabInStaff(startIndex, staffGroup)) { @@ -17165,7 +17156,6 @@ function tabRenderer(plugin, renderer, line, staffIndex) { } linkStaffAndTabs(staffGroup.staffs); // crossreference tabs and staff } - module.exports = tabRenderer; /***/ }), @@ -17385,7 +17375,6 @@ AbstractEngraver.prototype.createABCStaff = function (staffgroup, abcstaff, temp } else { voice.duplicate = true; // bar lines and other duplicate info need not be created } - if (abcstaff.title && abcstaff.title[v]) { voice.header = abcstaff.title[v].replace(/\\n/g, "\n"); voice.headerPosition = 6 + staffgroup.getTextSize.baselineToCenter(voice.header, "voicefont", 'staff-extra voice-name', v, abcstaff.voices.length) / spacing.STEP; @@ -17399,13 +17388,11 @@ AbstractEngraver.prototype.createABCStaff = function (staffgroup, abcstaff, temp voice.addChild(clef); this.startlimitelem = clef; // limit ties here } - var keySig = createKeySignature(abcstaff.key, this.tuneNumber); if (keySig) { voice.addChild(keySig); this.startlimitelem = keySig; // limit ties here } - if (abcstaff.meter) { if (abcstaff.meter.type === 'specified') { this.measureLength = abcstaff.meter.value[0].num / abcstaff.meter.value[0].den; @@ -17414,7 +17401,6 @@ AbstractEngraver.prototype.createABCStaff = function (staffgroup, abcstaff, temp voice.addChild(ts); this.startlimitelem = ts; // limit ties here } - if (voice.duplicate) voice.children = []; // we shouldn't reprint the above if we're reusing the same staff. We just created them to get the right spacing. var staffLines = abcstaff.clef.stafflines || abcstaff.clef.stafflines === 0 ? abcstaff.clef.stafflines : 5; staffgroup.addVoice(voice, s, staffLines); @@ -17578,7 +17564,6 @@ AbstractEngraver.prototype.createABCElement = function (isFirstStaff, isSingleLi elemset[0] = absKey; this.startlimitelem = elemset[0]; // limit ties here } - if (voice.duplicate && elemset.length > 0) elemset[0].invisible = true; break; case "stem": @@ -17712,7 +17697,6 @@ AbstractEngraver.prototype.addGraceNotes = function (elem, voice, abselem, noteh if (hint) gracebeam.setHint(); gracebeam.mainNote = abselem; // this gives us a reference back to the note this is attached to so that the stems can be attached somewhere. } - var i; var graceoffsets = []; for (i = elem.gracenotes.length - 1; i >= 0; i--) { @@ -17812,7 +17796,6 @@ function addRestToAbsElement(abselem, elem, duration, dot, isMultiVoice, stemdir if (duration < 0.5) restpitch = 7;else if (duration < 1) restpitch = 7; // half rest else restpitch = 5; // whole rest } - switch (elem.rest.type) { case "whole": c = chartable.rest[0]; @@ -17951,7 +17934,6 @@ AbstractEngraver.prototype.addNoteToAbcElement = function (abselem, elem, dot, s elem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos; if (getDuration(elem) < 1 && (stemdir === "up" || dir === "up")) elem.pitches[p].highestVert += 6; // If the stem is up, then compensate for the length of the stem } - if (elem.startSlur) { if (!elem.pitches[p].startSlur) elem.pitches[p].startSlur = []; //TODO possibly redundant, provided array is not optional for (i = 0; i < elem.startSlur.length; i++) { @@ -18121,7 +18103,6 @@ AbstractEngraver.prototype.createNote = function (elem, nostem, isSingleLineStaf flatBeams: this.flatBeams }); // above is opposite from case of slurs } - if (elem.endTriplet && this.triplet) { this.triplet.setCloseAnchor(notehead); } @@ -18255,7 +18236,6 @@ AbstractEngraver.prototype.createBarLine = function (voice, elem, isFirstStaff) abselem.addRight(new RelativeElement("dots.dot", dx, 1, 5)); dx += 6; //2 hardcoded, twice; } - if (firstthin) { anchor = new RelativeElement(null, dx, 1, 2, { "type": "bar", @@ -18304,7 +18284,6 @@ AbstractEngraver.prototype.createBarLine = function (voice, elem, isFirstStaff) }); abselem.addRight(anchor); // 3 is hardcoded } - if (seconddots) { dx += 3; //3 hardcoded; abselem.addRight(new RelativeElement("dots.dot", dx, 1, 7)); @@ -18638,7 +18617,6 @@ var createClef = function createClef(elem, tuneNumber) { //abselem.top += 2; } } - return abselem; }; function clefOffsets(clef) { @@ -18830,7 +18808,6 @@ var createNoteHead = function createNoteHead(abselem, c, pitchelem, options) { })); extraLeft = glyphs.getSymbolWidth(symb) / 2; // TODO-PER: We need a little extra width if there is an accidental, but I'm not sure why it isn't the full width of the accidental. } - return { notehead: notehead, accidentalshiftx: accidentalshiftx, @@ -19621,7 +19598,6 @@ BeamElem.prototype.setStemDirection = function () { var middleLine = 6; // hardcoded 6 is B this.stemsUp = this.average < middleLine; // true is up, false is down; } - delete this.count; this.total = 0; }; @@ -19635,7 +19611,6 @@ BeamElem.prototype.calcDir = function () { var middleLine = 6; // hardcoded 6 is B this.stemsUp = this.average < middleLine; // true is up, false is down; } - var dir = this.stemsUp ? 'up' : 'down'; for (var i = 0; i < this.elems.length; i++) { for (var j = 0; j < this.elems[i].heads.length; j++) { @@ -19825,7 +19800,6 @@ BraceElem.prototype.continuing = function (voice) { BraceElem.prototype.getWidth = function () { return 10; // TODO-PER: right now the drawing function doesn't vary the width at all. If it does in the future then this will change. }; - BraceElem.prototype.isStartVoice = function (voice) { if (this.startVoice && this.startVoice.staff && this.startVoice.staff.voices.length > 0 && this.startVoice.staff.voices[0] === voice) return true; return false; @@ -19850,7 +19824,6 @@ var CrescendoElem = function CrescendoElem(anchor1, anchor2, dir, positioning) { if (positioning === 'above') this.dynamicHeightAbove = 6;else this.dynamicHeightBelow = 6; this.pitch = undefined; // This will be set later }; - module.exports = CrescendoElem; /***/ }), @@ -19870,7 +19843,6 @@ var DynamicDecoration = function DynamicDecoration(anchor, dec, position) { if (position === 'below') this.volumeHeightBelow = 6;else this.volumeHeightAbove = 6; this.pitch = undefined; // This will be set later }; - module.exports = DynamicDecoration; /***/ }), @@ -19891,7 +19863,6 @@ var EndingElem = function EndingElem(text, anchor1, anchor2) { this.endingHeightAbove = 5; this.pitch = undefined; // This will be set later }; - module.exports = EndingElem; /***/ }), @@ -19997,7 +19968,6 @@ var GlissandoElem = function GlissandoElem(anchor1, anchor2) { this.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the "beginning" of the line - after keysig) this.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line) }; - module.exports = GlissandoElem; /***/ }), @@ -20532,14 +20502,12 @@ TieElem.prototype.calcX = function (lineStartX, lineEndX) { if (this.anchor2) this.startX = this.anchor2.x - 20; // There is no element and no repeat mark: make a small arc else this.startX = lineStartX; // Don't have any guidance, so extend to beginning of line } - if (!this.anchor1 && this.dotted) this.startX -= 3; // The arc needs to be long enough to tell that it is dotted. if (this.anchor2) this.endX = this.anchor2.x; // The normal case where there is a starting element to attach to. else if (this.endLimitX) this.endX = this.endLimitX.x; // if there is no start element, but there is a repeat mark before the start of the line. else this.endX = lineEndX; // There is no element and no repeat mark: extend to the beginning of the line. }; - TieElem.prototype.calcTieY = function () { // If the tie comes from another line, then one or both anchors will be missing. if (this.anchor1) this.startY = this.anchor1.pitch;else if (this.anchor2) this.startY = this.anchor2.pitch;else this.startY = this.above ? 14 : 0; @@ -20602,6 +20570,30 @@ TieElem.prototype.avoidCollisionAbove = function () { if (maxInnerHeight > this.startY && maxInnerHeight > this.endY) this.startY = this.endY = maxInnerHeight - 1; } }; +TieElem.prototype.getYBounds = function () { + var lineStartX = 10; // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much + var lineEndX = 1000; // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much + if (this.isTie) { + this.calcTieDirection(); + this.calcX(lineStartX, lineEndX); + this.calcTieY(); + } else { + this.calcSlurDirection(); + this.calcX(lineStartX, lineEndX); + this.calcSlurY(); + } + var top; + var bottom; + // TODO-PER: It's hard to tell how far the arc is, so I'm just using 3 as the max + if (this.above) { + bottom = Math.min(this.startY, this.endY); + top = bottom + 3; + } else { + top = Math.min(this.startY, this.endY); + bottom = top - 3; + } + return [top, bottom]; +}; module.exports = TieElem; /***/ }), @@ -20652,7 +20644,6 @@ function TopText(metaText, metaTextInfo, formatting, lines, width, isPrint, padd // TopText.prototype.addTextIf = function (marginLeft, text, font, klass, marginTop, marginBottom, anchor, getTextSize, absElemType, noMove) { } - if (isPrint) this.rows.push({ move: spacing.top }); @@ -21724,7 +21715,6 @@ function straightPath(renderer, xLeft, yTop, yBottom, type) { // right point -wCurve * 0.1, -hCurve * 0.3, -wCurve, -hCurve - spacing.STEP // left bottom ); - return renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, @@ -23003,7 +22993,6 @@ function drawStaffGroup(renderer, params, selectables, lineNumber) { // renderer.moveY(spacing.STEP, -staff.bottom); } } - renderer.controller.classes.newMeasure(); // connect all the staves together with a vertical line @@ -23225,7 +23214,6 @@ function drawTempo(renderer, params) { // }); //return [tempoGroup]; } - module.exports = drawTempo; /***/ }), @@ -23562,7 +23550,6 @@ function drawVoice(renderer, params, bartop, selectables, staffPos) { renderer.controller.classes.incrMeasure(); } else drawBeam(renderer, beam, selectables); // beams must be drawn first for proper printing of triplets, slurs and ties. } - renderer.controller.classes.startMeasure(); for (i = 0; i < params.otherchildren.length; i++) { child = params.otherchildren[i]; @@ -23671,7 +23658,6 @@ var EngraverController = function EngraverController(paper, params) { this.staffwidthScreen = 740; // TODO-PER: Not sure where this number comes from, but this is how it's always been. this.staffwidthPrint = 680; // The number of pixels in 8.5", after 1cm of margin has been removed. } - this.listeners = []; if (params.clickListener) this.addSelectListener(params.clickListener); this.renderer = new Renderer(paper); @@ -24581,7 +24567,6 @@ function getMousePosition(self, ev) { clickedOn = findElementByCoord(self, x, y); //console.log("clicked near", clickedOn, x, y, printEl(ev.target)); } - return { x: x, y: y, @@ -24819,7 +24804,6 @@ function minStem(element, stemsUp, referencePitch, minStemHeight) { var elem = element.children[i]; if (stemsUp && elem.top !== undefined && elem.c === "flags.ugrace") minStemHeight = Math.max(minStemHeight, elem.top - referencePitch);else if (!stemsUp && elem.bottom !== undefined && elem.c === "flags.ugrace") minStemHeight = Math.max(minStemHeight, referencePitch - elem.bottom + 7); // The extra 7 is because we are measuring the slash from the top. } - return minStemHeight; } function calcSlant(leftAveragePitch, rightAveragePitch, numStems, isFlat) { @@ -25224,7 +25208,6 @@ function calcHorizontalSpacing(isLastLine, stretchLast, targetWidth, lineWidth, if (!stretch) return null; // don't stretch last line too much } } - if (Math.abs(targetWidth - lineWidth) < 2) return null; // if we are already near the target width, we're done. var relSpace = spacingUnits * spacing; var constSpace = lineWidth - relSpace; @@ -25289,7 +25272,6 @@ var setUpperAndLowerElements = function setUpperAndLowerElements(renderer, staff staff.originalTop = staff.top; // This is just being stored for debugging purposes. staff.originalBottom = staff.bottom; // This is just being stored for debugging purposes. } - incTop(staff, positionY, 'lyricHeightAbove'); incTop(staff, positionY, 'chordHeightAbove', staff.specialY.chordLines.above); if (staff.specialY.endingHeightAbove) { @@ -25352,7 +25334,6 @@ var setUpperAndLowerElements = function setUpperAndLowerElements(renderer, staff } //console.log("Staff Height: ",heightInPitches,this.height); }; - var margin = 1; function incTop(staff, positionY, item, count) { if (staff.specialY[item]) { @@ -25381,6 +25362,14 @@ function setUpperAndLowerVoiceElements(positionY, voice, spacing) { case 'EndingElem': setUpperAndLowerEndingElements(positionY, abselem); break; + case 'TieElem': + // If a tie element is the highest or lowest thing then space might need to make room for it. + var yBounds = abselem.getYBounds(); + voice.staff.top = Math.max(voice.staff.top, yBounds[0]); + voice.staff.top = Math.max(voice.staff.top, yBounds[1]); + voice.staff.bottom = Math.min(voice.staff.bottom, yBounds[0]); + voice.staff.bottom = Math.min(voice.staff.bottom, yBounds[1]); + break; } } } @@ -25609,7 +25598,6 @@ function finished(voices) { function getDurationIndex(element) { return element.durationindex - (element.children[element.i] && element.children[element.i].duration > 0 ? 0 : 0.0000005); // if the ith element doesn't have a duration (is not a note), its duration index is fractionally before. This enables CLEF KEYSIG TIMESIG PART, etc. to be laid out before we get to the first note of other voices } - function isSameStaff(voice1, voice2) { if (!voice1 || !voice1.staff || !voice1.staff.voices || voice1.staff.voices.length === 0) return false; if (!voice2 || !voice2.staff || !voice2.staff.voices || voice2.staff.voices.length === 0) return false; @@ -25707,7 +25695,6 @@ VoiceElement.beginLayout = function (startx, voice) { voice.nextx = startx; // x position where the next element of this voice should be placed assuming no other voices and no fixed width constraints voice.spacingduration = 0; // duration left to be laid out in current iteration (omitting additional spacing due to other aspects, such as bars, dots, sharps and flats) }; - VoiceElement.layoutEnded = function (voice) { return voice.i >= voice.children.length; }; @@ -25773,7 +25760,6 @@ VoiceElement.layoutOneItem = function (x, spacing, voice, minPadding, firstVoice return x; // where we end up having placed the child }; - VoiceElement.shiftRight = function (dx, voice) { var child = voice.children[voice.i]; if (!child) return; @@ -25936,7 +25922,6 @@ function setLane(absElems, numLanesAbove, numLanesBelow) { } } } - function yAtNote(element, beam) { beam = beam.beams[0]; return getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, element.x); @@ -26095,7 +26080,6 @@ Renderer.prototype.initVerticalSpace = function () { range is 0.0 to 1.0. */ }; - Renderer.prototype.setVerticalSpace = function (formatting) { // conversion from pts to px 4/3 if (formatting.staffsep !== undefined) this.spacing.staffSeparation = formatting.staffsep * 4 / 3; @@ -26217,7 +26201,6 @@ Svg.prototype.insertStyles = function (styles) { this.svg.insertBefore(el, this.svg.firstChild); // prepend is not available on older browsers. // this.svg.prepend(el); }; - Svg.prototype.setParentStyles = function (attr) { // This is needed to get the size right when there is scaling involved. for (var key in attr) { @@ -26360,7 +26343,6 @@ Svg.prototype.guessWidth = function (text, attr) { height: attr['font-size'] + 2 }; // Just a wild guess. } - svg.removeChild(el); return size; }; @@ -26489,7 +26471,7 @@ module.exports = Svg; \********************/ /***/ (function(module) { -var version = '6.4.2'; +var version = '6.4.3'; module.exports = version; /***/ }) diff --git a/dist/abcjs-basic.js.map b/dist/abcjs-basic.js.map index 64566342..7f18457c 100644 --- a/dist/abcjs-basic.js.map +++ b/dist/abcjs-basic.js.map @@ -1 +1 @@ -{"version":3,"file":"abcjs-basic.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,OAAO,GAAGC,mBAAO,CAAC,+BAAW,CAAC;AAClC,IAAIC,SAAS,GAAGD,mBAAO,CAAC,2DAAyB,CAAC;AAClD,IAAIE,QAAQ,GAAGF,mBAAO,CAAC,yDAAwB,CAAC;AAChD,IAAIG,QAAQ,GAAGH,mBAAO,CAAC,yEAAgC,CAAC;AACxD,IAAII,YAAY,GAAGJ,mBAAO,CAAC,6CAAkB,CAAC;AAE9C,IAAIK,KAAK,GAAG,CAAC,CAAC;AAEdA,KAAK,CAACC,SAAS,GAAG,eAAe,GAAGP,OAAO;AAE3CQ,MAAM,CAACC,IAAI,CAACP,SAAS,CAAC,CAACQ,OAAO,CAAC,UAAUC,GAAG,EAAE;EAC7CL,KAAK,CAACK,GAAG,CAAC,GAAGT,SAAS,CAACS,GAAG,CAAC;AAC5B,CAAC,CAAC;AAEFH,MAAM,CAACC,IAAI,CAACN,QAAQ,CAAC,CAACO,OAAO,CAAC,UAAUC,GAAG,EAAE;EAC5CL,KAAK,CAACK,GAAG,CAAC,GAAGR,QAAQ,CAACQ,GAAG,CAAC;AAC3B,CAAC,CAAC;AAEFL,KAAK,CAACM,SAAS,GAAGX,mBAAO,CAAC,iEAA4B,CAAC;AACvDK,KAAK,CAACO,WAAW,GAAGZ,mBAAO,CAAC,yDAAwB,CAAC;AACrDK,KAAK,CAACQ,eAAe,GAAGb,mBAAO,CAAC,yEAAgC,CAAC;AAEjE,IAAIc,MAAM,GAAGd,mBAAO,CAAC,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ACzD,KAAK,IAAInkC,GAAG,IAAImkC,IAAI,EAAE;IACrB,IAAIA,IAAI,CAACt1B,cAAc,CAAC7O,GAAG,CAAC,EAAE;MAC7B8V,EAAE,CAACi9F,cAAc,CAAC,IAAI,EAAE/yG,GAAG,EAAEmkC,IAAI,CAACnkC,GAAG,CAAC,CAAC;IACxC;EACD;AACD,CAAC;AAEDyvG,GAAG,CAAChlG,SAAS,CAACuoG,kBAAkB,GAAG,UAAUhjG,MAAM,EAAEy8D,KAAK,EAAE;EAC3Dz8D,MAAM,CAAC3N,WAAW,CAACoqE,KAAK,CAAC;AAC1B,CAAC;AAED,SAASklC,SAAS,GAAG;EACpB,IAAIz1C,GAAG,GAAGl6D,QAAQ,CAACg/F,eAAe,CAACD,KAAK,EAAE,KAAK,CAAC;EAChD7kC,GAAG,CAAC62C,cAAc,CAAC,+BAA+B,EAAE,aAAa,EAAE,8BAA8B,CAAC;EAClG72C,GAAG,CAACvrD,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAI;EACpCurD,GAAG,CAACvrD,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAI;EAC7CurD,GAAG,CAACvrD,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAI;EAC/C,OAAOurD,GAAG;AACX;AAGA96D,MAAM,CAACC,OAAO,GAAGouG,GAAG;;;;;;;;;;ACxapB,IAAIpwG,OAAO,GAAG,OAAO;AAErB+B,MAAM,CAACC,OAAO,GAAGhC,OAAO;;;;;;UCFxB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://ABCJS/webpack/universalModuleDefinition","webpack://ABCJS/./index.js","webpack://ABCJS/./src/api/abc_animation.js","webpack://ABCJS/./src/api/abc_timing_callbacks.js","webpack://ABCJS/./src/api/abc_tunebook.js","webpack://ABCJS/./src/api/abc_tunebook_svg.js","webpack://ABCJS/./src/api/tune-metrics.js","webpack://ABCJS/./src/const/key-accidentals.js","webpack://ABCJS/./src/const/relative-major.js","webpack://ABCJS/./src/data/abc_tune.js","webpack://ABCJS/./src/data/deline-tune.js","webpack://ABCJS/./src/edit/abc_editarea.js","webpack://ABCJS/./src/edit/abc_editor.js","webpack://ABCJS/./src/midi/abc_midi_create.js","webpack://ABCJS/./src/parse/abc_common.js","webpack://ABCJS/./src/parse/abc_parse.js","webpack://ABCJS/./src/parse/abc_parse_book.js","webpack://ABCJS/./src/parse/abc_parse_directive.js","webpack://ABCJS/./src/parse/abc_parse_header.js","webpack://ABCJS/./src/parse/abc_parse_key_voice.js","webpack://ABCJS/./src/parse/abc_parse_music.js","webpack://ABCJS/./src/parse/abc_parse_settings.js","webpack://ABCJS/./src/parse/abc_tokenizer.js","webpack://ABCJS/./src/parse/abc_transpose.js","webpack://ABCJS/./src/parse/all-notes.js","webpack://ABCJS/./src/parse/transpose-chord.js","webpack://ABCJS/./src/parse/tune-builder.js","webpack://ABCJS/./src/parse/wrap_lines.js","webpack://ABCJS/./src/str/output.js","webpack://ABCJS/./src/synth/abc_midi_flattener.js","webpack://ABCJS/./src/synth/abc_midi_renderer.js","webpack://ABCJS/./src/synth/abc_midi_sequencer.js","webpack://ABCJS/./src/synth/active-audio-context.js","webpack://ABCJS/./src/synth/cents-to-factor.js","webpack://ABCJS/./src/synth/chord-track.js","webpack://ABCJS/./src/synth/create-note-map.js","webpack://ABCJS/./src/synth/create-synth-control.js","webpack://ABCJS/./src/synth/create-synth.js","webpack://ABCJS/./src/synth/download-buffer.js","webpack://ABCJS/./src/synth/get-midi-file.js","webpack://ABCJS/./src/synth/images/loading.svg.js","webpack://ABCJS/./src/synth/images/loop.svg.js","webpack://ABCJS/./src/synth/images/pause.svg.js","webpack://ABCJS/./src/synth/images/play.svg.js","webpack://ABCJS/./src/synth/images/reset.svg.js","webpack://ABCJS/./src/synth/instrument-index-to-name.js","webpack://ABCJS/./src/synth/load-note.js","webpack://ABCJS/./src/synth/note-to-midi.js","webpack://ABCJS/./src/synth/pitch-to-note-name.js","webpack://ABCJS/./src/synth/pitches-to-perc.js","webpack://ABCJS/./src/synth/place-note.js","webpack://ABCJS/./src/synth/play-event.js","webpack://ABCJS/./src/synth/register-audio-context.js","webpack://ABCJS/./src/synth/sounds-cache.js","webpack://ABCJS/./src/synth/supports-audio.js","webpack://ABCJS/./src/synth/synth-controller.js","webpack://ABCJS/./src/synth/synth-sequence.js","webpack://ABCJS/./src/tablatures/abc_tablatures.js","webpack://ABCJS/./src/tablatures/instruments/string-patterns.js","webpack://ABCJS/./src/tablatures/instruments/string-tablature.js","webpack://ABCJS/./src/tablatures/instruments/tab-note.js","webpack://ABCJS/./src/tablatures/instruments/tab-notes.js","webpack://ABCJS/./src/tablatures/instruments/tab-string.js","webpack://ABCJS/./src/tablatures/render/tab-absolute-elements.js","webpack://ABCJS/./src/tablatures/render/tab-renderer.js","webpack://ABCJS/./src/write/creation/abstract-engraver.js","webpack://ABCJS/./src/write/creation/add-chord.js","webpack://ABCJS/./src/write/creation/add-text-if.js","webpack://ABCJS/./src/write/creation/calc-height.js","webpack://ABCJS/./src/write/creation/create-clef.js","webpack://ABCJS/./src/write/creation/create-key-signature.js","webpack://ABCJS/./src/write/creation/create-note-head.js","webpack://ABCJS/./src/write/creation/create-time-signature.js","webpack://ABCJS/./src/write/creation/decoration.js","webpack://ABCJS/./src/write/creation/elements/absolute-element.js","webpack://ABCJS/./src/write/creation/elements/beam-element.js","webpack://ABCJS/./src/write/creation/elements/bottom-text.js","webpack://ABCJS/./src/write/creation/elements/brace-element.js","webpack://ABCJS/./src/write/creation/elements/crescendo-element.js","webpack://ABCJS/./src/write/creation/elements/dynamic-decoration.js","webpack://ABCJS/./src/write/creation/elements/ending-element.js","webpack://ABCJS/./src/write/creation/elements/free-text.js","webpack://ABCJS/./src/write/creation/elements/glissando-element.js","webpack://ABCJS/./src/write/creation/elements/relative-element.js","webpack://ABCJS/./src/write/creation/elements/rich-text.js","webpack://ABCJS/./src/write/creation/elements/separator.js","webpack://ABCJS/./src/write/creation/elements/staff-group-element.js","webpack://ABCJS/./src/write/creation/elements/subtitle.js","webpack://ABCJS/./src/write/creation/elements/tempo-element.js","webpack://ABCJS/./src/write/creation/elements/tie-element.js","webpack://ABCJS/./src/write/creation/elements/top-text.js","webpack://ABCJS/./src/write/creation/elements/triplet-element.js","webpack://ABCJS/./src/write/creation/elements/voice-element.js","webpack://ABCJS/./src/write/creation/glyphs.js","webpack://ABCJS/./src/write/creation/translate-chord.js","webpack://ABCJS/./src/write/draw/absolute.js","webpack://ABCJS/./src/write/draw/beam.js","webpack://ABCJS/./src/write/draw/brace.js","webpack://ABCJS/./src/write/draw/crescendo.js","webpack://ABCJS/./src/write/draw/debug-box.js","webpack://ABCJS/./src/write/draw/draw.js","webpack://ABCJS/./src/write/draw/dynamics.js","webpack://ABCJS/./src/write/draw/ending.js","webpack://ABCJS/./src/write/draw/glissando.js","webpack://ABCJS/./src/write/draw/group-elements.js","webpack://ABCJS/./src/write/draw/non-music.js","webpack://ABCJS/./src/write/draw/print-line.js","webpack://ABCJS/./src/write/draw/print-path.js","webpack://ABCJS/./src/write/draw/print-stem.js","webpack://ABCJS/./src/write/draw/print-symbol.js","webpack://ABCJS/./src/write/draw/relative.js","webpack://ABCJS/./src/write/draw/round-number.js","webpack://ABCJS/./src/write/draw/selectables.js","webpack://ABCJS/./src/write/draw/separator.js","webpack://ABCJS/./src/write/draw/set-paper-size.js","webpack://ABCJS/./src/write/draw/sprintf.js","webpack://ABCJS/./src/write/draw/staff-group.js","webpack://ABCJS/./src/write/draw/staff-line.js","webpack://ABCJS/./src/write/draw/staff.js","webpack://ABCJS/./src/write/draw/tempo.js","webpack://ABCJS/./src/write/draw/text.js","webpack://ABCJS/./src/write/draw/tie.js","webpack://ABCJS/./src/write/draw/triplet.js","webpack://ABCJS/./src/write/draw/voice.js","webpack://ABCJS/./src/write/engraver-controller.js","webpack://ABCJS/./src/write/helpers/classes.js","webpack://ABCJS/./src/write/helpers/get-font-and-attr.js","webpack://ABCJS/./src/write/helpers/get-text-size.js","webpack://ABCJS/./src/write/helpers/set-class.js","webpack://ABCJS/./src/write/helpers/spacing.js","webpack://ABCJS/./src/write/interactive/create-analysis.js","webpack://ABCJS/./src/write/interactive/find-selectable-element.js","webpack://ABCJS/./src/write/interactive/highlight.js","webpack://ABCJS/./src/write/interactive/selection.js","webpack://ABCJS/./src/write/interactive/unhighlight.js","webpack://ABCJS/./src/write/layout/beam.js","webpack://ABCJS/./src/write/layout/get-bar-y-at.js","webpack://ABCJS/./src/write/layout/get-left-edge-of-staff.js","webpack://ABCJS/./src/write/layout/layout-in-grid.js","webpack://ABCJS/./src/write/layout/layout.js","webpack://ABCJS/./src/write/layout/set-upper-and-lower-elements.js","webpack://ABCJS/./src/write/layout/staff-group.js","webpack://ABCJS/./src/write/layout/triplet.js","webpack://ABCJS/./src/write/layout/voice-elements.js","webpack://ABCJS/./src/write/layout/voice.js","webpack://ABCJS/./src/write/renderer.js","webpack://ABCJS/./src/write/svg.js","webpack://ABCJS/./version.js","webpack://ABCJS/webpack/bootstrap","webpack://ABCJS/webpack/before-startup","webpack://ABCJS/webpack/startup","webpack://ABCJS/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"abcjs\"] = factory();\n\telse\n\t\troot[\"ABCJS\"] = factory();\n})(this, function() {\nreturn ","/**!\nCopyright (c) 2009-2023 Paul Rosen and Gregory Dyke\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n **This text is from: http://opensource.org/licenses/MIT**\n!**/\nvar version = require('./version');\nvar animation = require('./src/api/abc_animation');\nvar tuneBook = require('./src/api/abc_tunebook');\nvar sequence = require('./src/synth/abc_midi_sequencer');\nvar strTranspose = require('./src/str/output');\n\nvar abcjs = {};\n\nabcjs.signature = \"abcjs-basic v\" + version;\n\nObject.keys(animation).forEach(function (key) {\n\tabcjs[key] = animation[key];\n});\n\nObject.keys(tuneBook).forEach(function (key) {\n\tabcjs[key] = tuneBook[key];\n});\n\nabcjs.renderAbc = require('./src/api/abc_tunebook_svg');\nabcjs.tuneMetrics = require('./src/api/tune-metrics');\nabcjs.TimingCallbacks = require('./src/api/abc_timing_callbacks');\n\nvar glyphs = require('./src/write/creation/glyphs');\nabcjs.setGlyph = glyphs.setSymbol;\nabcjs.strTranspose = strTranspose;\n\nvar CreateSynth = require('./src/synth/create-synth');\nvar instrumentIndexToName = require('./src/synth/instrument-index-to-name');\nvar pitchToNoteName = require('./src/synth/pitch-to-note-name');\nvar SynthSequence = require('./src/synth/synth-sequence');\nvar CreateSynthControl = require('./src/synth/create-synth-control');\nvar registerAudioContext = require('./src/synth/register-audio-context');\nvar activeAudioContext = require('./src/synth/active-audio-context');\nvar supportsAudio = require('./src/synth/supports-audio');\nvar playEvent = require('./src/synth/play-event');\nvar SynthController = require('./src/synth/synth-controller');\nvar getMidiFile = require('./src/synth/get-midi-file');\nvar midiRenderer = require('./src/synth/abc_midi_renderer');\n\nabcjs.synth = {\n\tCreateSynth: CreateSynth,\n\tinstrumentIndexToName: instrumentIndexToName,\n\tpitchToNoteName: pitchToNoteName,\n\tSynthController: SynthController,\n\tSynthSequence: SynthSequence,\n\tCreateSynthControl: CreateSynthControl,\n\tregisterAudioContext: registerAudioContext,\n\tactiveAudioContext: activeAudioContext,\n\tsupportsAudio: supportsAudio,\n\tplayEvent: playEvent,\n\tgetMidiFile: getMidiFile,\n\tsequence: sequence,\n\tmidiRenderer: midiRenderer,\n};\n\nabcjs['Editor'] = require('./src/edit/abc_editor');\nabcjs['EditArea'] = require('./src/edit/abc_editarea');\n\nmodule.exports = abcjs;\n","// abc_animation.js: handles animating the music in real time.\n\nvar TimingCallbacks = require('./abc_timing_callbacks');\n\nvar animation = {};\n\n(function() {\n\t\"use strict\";\n\n\tvar timer;\n\tvar cursor;\n\tanimation.startAnimation = function(paper, tune, options) {\n\t\t//options.bpm\n\t\t//options.showCursor\n\t\t//options.hideCurrentMeasure\n\t\t//options.hideFinishedMeasures\n\t\tif (timer) {\n\t\t\ttimer.stop();\n\t\t\ttimer = undefined;\n\t\t}\n\n\t\tif (options.showCursor) {\n\t\t\tcursor = paper.querySelector('.abcjs-cursor');\n\t\t\tif (!cursor) {\n\t\t\t\tcursor = document.createElement('DIV');\n\t\t\t\tcursor.className = 'abcjs-cursor cursor';\n\t\t\t\tcursor.style.position = 'absolute';\n\n\t\t\t\tpaper.appendChild(cursor);\n\t\t\t\tpaper.style.position = 'relative';\n\t\t\t}\n\t\t}\n\n\t\tfunction hideMeasures(elements) {\n\t\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\t\tvar element = elements[i];\n\t\t\t\tif (!element.classList.contains('abcjs-bar'))\n\t\t\t\t\telement.style.display = \"none\";\n\t\t\t}\n\t\t}\n\n\t\tvar lastMeasure;\n\t\tfunction disappearMeasuresAfter(selector) {\n\t\t\tif (lastMeasure) {\n\t\t\t\tvar elements = paper.querySelectorAll(lastMeasure);\n\t\t\t\thideMeasures(elements);\n\t\t\t}\n\t\t\tlastMeasure = selector;\n\t\t}\n\n\t\tfunction disappearMeasuresBefore(selector) {\n\t\t\tvar elements = paper.querySelectorAll(selector);\n\t\t\thideMeasures(elements);\n\t\t}\n\n\t\tfunction measureCallback(selector) {\n\t\t\tif (options.hideCurrentMeasure) {\n\t\t\t\tdisappearMeasuresBefore(selector);\n\t\t\t} else if (options.hideFinishedMeasures) {\n\t\t\t\tdisappearMeasuresAfter(selector);\n\t\t\t}\n\t\t}\n\n\t\tfunction getLineAndMeasure(element) {\n\t\t\treturn '.abcjs-l' + element.line + '.abcjs-m' + element.measureNumber;\n\t\t}\n\n\t\tfunction setCursor(range) {\n\t\t\tif (range) {\n\t\t\t\tif (range.measureStart) {\n\t\t\t\t\tvar selector = getLineAndMeasure(range);\n\t\t\t\t\tif (selector)\n\t\t\t\t\t\tmeasureCallback(selector);\n\t\t\t\t}\n\t\t\t\tif (cursor) {\n\t\t\t\t\tcursor.style.left = range.left + \"px\";\n\t\t\t\t\tcursor.style.top = range.top + \"px\";\n\t\t\t\t\tcursor.style.width = range.width + \"px\";\n\t\t\t\t\tcursor.style.height = range.height + \"px\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttimer.stop();\n\t\t\t\ttimer = undefined;\n\t\t\t}\n\t\t}\n\n\t\ttimer = new TimingCallbacks(tune, {\n\t\t\tqpm: options.bpm,\n\t\t\teventCallback: setCursor\n\t\t});\n\t\ttimer.start();\n\t};\n\n\tanimation.pauseAnimation = function(pause) {\n\t\tif (timer) {\n\t\t\tif (pause)\n\t\t\t\ttimer.pause();\n\t\t\telse\n\t\t\t\ttimer.start();\n\t\t}\n\t};\n\n\tanimation.stopAnimation = function() {\n\t\tif (timer) {\n\t\t\ttimer.stop();\n\t\t\ttimer = undefined;\n\t\t}\n\t};\n\n})();\n\nmodule.exports = animation;\n","var TimingCallbacks = function(target, params) {\n\tvar self = this;\n\tif (!params) params = {};\n\tself.qpm = params.qpm ? parseInt(params.qpm, 10) : null;\n\tif (!self.qpm) {\n\t\tvar tempo = target.metaText ? target.metaText.tempo : null;\n\t\tself.qpm = target.getBpm(tempo);\n\t}\n\tself.extraMeasuresAtBeginning = params.extraMeasuresAtBeginning ? parseInt(params.extraMeasuresAtBeginning, 10) : 0;\n\tself.beatCallback = params.beatCallback; // This is called for each beat.\n\tself.eventCallback = params.eventCallback; // This is called for each note or rest encountered.\n\tself.lineEndCallback = params.lineEndCallback; // This is called when the end of a line is approaching.\n\tself.lineEndAnticipation = params.lineEndAnticipation ? parseInt(params.lineEndAnticipation, 10) : 0; // How many milliseconds before the end should the call happen.\n\tself.beatSubdivisions = params.beatSubdivisions ? parseInt(params.beatSubdivisions, 10) : 1; // how many callbacks per beat is desired.\n\tself.joggerTimer = null;\n\n\tself.replaceTarget = function(newTarget) {\n\t\tself.noteTimings = newTarget.setTiming(self.qpm, self.extraMeasuresAtBeginning);\n\t\tif (newTarget.noteTimings.length === 0)\n\t\t\tself.noteTimings = newTarget.setTiming(0,0);\n\t\tif (self.lineEndCallback) {\n\t\t\tself.lineEndTimings = getLineEndTimings(newTarget.noteTimings, self.lineEndAnticipation);\n\t\t}\n\t\tself.startTime = null;\n\t\tself.currentBeat = 0;\n\t\tself.currentEvent = 0;\n\t\tself.currentLine = 0;\n\t\tself.currentTime = 0;\n\t\tself.isPaused = false;\n\t\tself.isRunning = false;\n\t\tself.pausedPercent = null;\n\t\tself.justUnpaused = false;\n\t\tself.newSeekPercent = 0;\n\t\tself.lastTimestamp = 0;\n\n\t\tif (self.noteTimings.length === 0)\n\t\t\treturn;\n\t\t// noteTimings contains an array of events sorted by time. Events that happen at the same time are in the same element of the array.\n\t\tself.millisecondsPerBeat = 1000 / (self.qpm / 60) / self.beatSubdivisions;\n\t\tself.lastMoment = self.noteTimings[self.noteTimings.length-1].milliseconds;\n\t\tself.totalBeats = Math.round(self.lastMoment / self.millisecondsPerBeat);\n\t};\n\n\tself.replaceTarget(target);\n\n\tself.doTiming = function (timestamp) {\n\t\t// This is called 60 times a second, that is, every 16 msecs.\n\t\t//console.log(\"doTiming\", timestamp, timestamp-self.lastTimestamp);\n\t\tif (self.lastTimestamp === timestamp)\n\t\t\treturn; // If there are multiple seeks or other calls, then we can easily get multiple callbacks for the same instant.\n\t\tself.lastTimestamp = timestamp;\n\t\tif (!self.startTime) {\n\t\t\tself.startTime = timestamp;\n\t\t}\n\n\t\tif (!self.isPaused && self.isRunning) {\n\t\t\tself.currentTime = timestamp - self.startTime;\n\t\t\tself.currentTime += 16; // Add a little slop because this function isn't called exactly.\n\t\t\twhile (self.noteTimings.length > self.currentEvent && self.noteTimings[self.currentEvent].milliseconds < self.currentTime) {\n\t\t\t\tif (self.eventCallback && self.noteTimings[self.currentEvent].type === 'event') {\n\t\t\t\t\tvar thisStartTime = self.startTime; // the event callback can call seek and change the position from beneath us.\n\t\t\t\t\tself.eventCallback(self.noteTimings[self.currentEvent]);\n\t\t\t\t\tif (thisStartTime !== self.startTime) {\n\t\t\t\t\t\tself.currentTime = timestamp - self.startTime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself.currentEvent++;\n\t\t\t}\n\t\t\tif (self.lineEndCallback && self.lineEndTimings.length > self.currentLine && self.lineEndTimings[self.currentLine].milliseconds < self.currentTime && self.currentEvent < self.noteTimings.length) {\n\t\t\t\tvar leftEvent = self.noteTimings[self.currentEvent].milliseconds === self.currentTime ? self.noteTimings[self.currentEvent] : self.noteTimings[self.currentEvent-1]\n\t\t\t\tself.lineEndCallback(self.lineEndTimings[self.currentLine], leftEvent, { line: self.currentLine, endTimings: self.lineEndTimings, currentTime: self.currentTime });\n\t\t\t\tself.currentLine++;\n\t\t\t}\n\t\t\tif (self.currentTime < self.lastMoment) {\n\t\t\t\trequestAnimationFrame(self.doTiming);\n\t\t\t\tif (self.currentBeat * self.millisecondsPerBeat < self.currentTime) {\n\t\t\t\t\tvar ret = self.doBeatCallback(timestamp);\n\t\t\t\t\tif (ret !== null)\n\t\t\t\t\t\tself.currentTime = ret;\n\t\t\t\t}\n\t\t\t} else if (self.currentBeat <= self.totalBeats) {\n\t\t\t\t// Because of timing issues (for instance, if the browser tab isn't active), the beat callbacks might not have happened when they are supposed to. To keep the client programs from having to deal with that, this will keep calling the loop until all of them have been sent.\n\t\t\t\tif (self.beatCallback) {\n\t\t\t\t\tvar ret2 = self.doBeatCallback(timestamp);\n\t\t\t\t\tif (ret2 !== null)\n\t\t\t\t\t\tself.currentTime = ret2;\n\t\t\t\t\trequestAnimationFrame(self.doTiming);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (self.currentTime >= self.lastMoment) {\n\t\t\t\tif (self.eventCallback) {\n\t\t\t\t\t// At the end, the event callback can return \"continue\" to keep from stopping.\n\t\t\t\t\t// The event callback can either be a promise or not.\n\t\t\t\t\tvar promise = self.eventCallback(null);\n\t\t\t\t\tself.shouldStop(promise).then(function(shouldStop) {\n\t\t\t\t\t\tif (shouldStop)\n\t\t\t\t\t\t\tself.stop();\n\t\t\t\t\t})\n\t\t\t\t} else\n\t\t\t\t\tself.stop();\n\t\t\t}\n\t\t}\n\t};\n\n\tself.shouldStop = function(promise) {\n\t\t// The return of the last event callback can be \"continue\" or a promise that returns \"continue\".\n\t\t// If it is then don't call stop. Any other value calls stop.\n\t\treturn new Promise(function (resolve) {\n\t\t\tif (!promise)\n\t\t\t\treturn resolve(true);\n\t\t\tif (promise === \"continue\")\n\t\t\t\treturn resolve(false);\n\t\t\tif (promise.then) {\n\t\t\t\tpromise.then(function (result) {\n\t\t\t\t\tresolve(result !== \"continue\");\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tself.doBeatCallback = function(timestamp) {\n\t\tif (self.beatCallback) {\n\t\t\tvar next = self.currentEvent;\n\t\t\twhile (next < self.noteTimings.length && self.noteTimings[next].left === null)\n\t\t\t\tnext++;\n\t\t\tvar endMs;\n\t\t\tvar ev;\n\t\t\tif (next < self.noteTimings.length) {\n\t\t\t\tendMs = self.noteTimings[next].milliseconds;\n\t\t\t\tnext = Math.max(0, self.currentEvent - 1);\n\t\t\t\twhile (next >= 0 && self.noteTimings[next].left === null)\n\t\t\t\t\tnext--;\n\n\t\t\t\tev = self.noteTimings[next];\n\t\t\t}\n\n\t\t\tvar position = {};\n\t\t\tvar debugInfo = {};\n\t\t\tif (ev) {\n\t\t\t\tposition.top = ev.top;\n\t\t\t\tposition.height = ev.height;\n\n\t\t\t\t// timestamp = the time passed in from the animation timer\n\t\t\t\t// self.startTime = the time that the tune was started (if there was seeking or pausing, it is adjusted to keep the math the same)\n\t\t\t\t// ev = the event that is either happening now or has most recently passed.\n\t\t\t\t// ev.milliseconds = the time that the current event starts (relative to self.startTime)\n\t\t\t\t// endMs = the time that the next event starts\n\t\t\t\t// ev.endX = the x coordinate that the next event happens (or the end of the line or repeat measure)\n\t\t\t\t// ev.left = the x coordinate of the current event\n\t\t\t\t//\n\t\t\t\t// The output is the X coordinate of the current cursor location. It is calculated with the ratio of the length of the event and the width of it.\n\t\t\t\tvar offMs = Math.max(0, timestamp-self.startTime-ev.milliseconds); // Offset in time from the last beat\n\t\t\t\tvar gapMs = endMs - ev.milliseconds; // Length of this event in time\n\t\t\t\tvar gapPx = ev.endX - ev.left; // The length in pixels\n\t\t\t\tvar offPx = gapMs ? offMs * gapPx / gapMs : 0;\n\t\t\t\tposition.left = ev.left + offPx;\n\t\t\t\t// See if this is before the first event - that is the case where there are \"prep beats\"\n\t\t\t\tif (self.currentEvent === 0 && ev.milliseconds > timestamp-self.startTime)\n\t\t\t\t\tposition.left = undefined\n\t\t\t\t\n\t\t\t\tdebugInfo = {\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tstartTime: self.startTime,\n\t\t\t\t\tev: ev,\n\t\t\t\t\tendMs: endMs,\n\t\t\t\t\toffMs: offMs,\n\t\t\t\t\toffPx: offPx,\n\t\t\t\t\tgapMs: gapMs,\n\t\t\t\t\tgapPx: gapPx\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tdebugInfo = {\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tstartTime: self.startTime,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar thisStartTime = self.startTime; // the beat callback can call seek and change the position from beneath us.\n\t\t\tself.beatCallback(\n\t\t\t\tself.currentBeat / self.beatSubdivisions,\n\t\t\t\tself.totalBeats / self.beatSubdivisions,\n\t\t\t\tself.lastMoment,\n\t\t\t\tposition,\n\t\t\t\tdebugInfo);\n\t\t\tif (thisStartTime !== self.startTime) {\n\t\t\t\treturn timestamp - self.startTime;\n\t\t\t} else\n\t\t\t\tself.currentBeat++;\n\t\t}\n\t\treturn null;\n\t};\n\n\t// In general music doesn't need a timer at 60 fps because notes don't happen that fast.\n\t// For instance, at 120 beats per minute, a sixteenth note takes 125ms. So just as a\n\t// compromise value between performance and jank this is set about half that.\n\tvar JOGGING_INTERVAL = 60;\n\n\tself.animationJogger = function() {\n\t\t// There are some cases where the animation timer doesn't work: for instance when\n\t\t// this isn't running in a visible tab and sometimes on mobile devices. We compensate\n\t\t// by having a backup timer using setTimeout. This won't be accurate so the performance\n\t\t// will be jerky, but without it the requestAnimationFrame might be skipped and so\n\t\t// not called again.\n\t\tif (self.isRunning) {\n\t\t\tself.doTiming(performance.now());\n\t\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t\t}\n\t};\n\n\tself.start = function(offsetPercent, units) {\n\t\tself.isRunning = true;\n\t\tif (self.isPaused) {\n\t\t\tself.isPaused = false;\n\t\t\tif (offsetPercent === undefined)\n\t\t\t\tself.justUnpaused = true;\n\t\t}\n\t\tif (offsetPercent) {\n\t\t\tself.setProgress(offsetPercent, units);\n\t\t} else if (offsetPercent === 0) {\n\t\t\tself.reset();\n\t\t} else if (self.pausedPercent !== null) {\n\t\t\tvar now = performance.now();\n\t\t\tself.currentTime = self.lastMoment * self.pausedPercent;\n\t\t\tself.startTime = now - self.currentTime;\n\t\t\tself.pausedPercent = null;\n\t\t\tself.reportNext = true;\n\t\t}\n\t\trequestAnimationFrame(self.doTiming);\n\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t};\n\tself.pause = function() {\n\t\tself.isPaused = true;\n\t\tvar now = performance.now();\n\t\tself.pausedPercent = (now - self.startTime) / self.lastMoment;\n\t\tself.isRunning = false;\n\t\tif (self.joggerTimer) {\n\t\t\tclearTimeout(self.joggerTimer);\n\t\t\tself.joggerTimer = null;\n\t\t}\n\t};\n\tself.currentMillisecond = function() {\n\t\treturn self.currentTime;\n\t};\n\tself.reset = function() {\n\t\tself.currentBeat = 0;\n\t\tself.currentEvent = 0;\n\t\tself.currentLine = 0;\n\t\tself.startTime = null;\n\t\tself.pausedPercent = null;\n\t};\n\tself.stop = function() {\n\t\tself.pause();\n\t\tself.reset();\n\t};\n\tself.setProgress = function(position, units) {\n\t\t// the effect of this function is to move startTime so that the callbacks happen correctly for the new seek.\n\t\tvar percent;\n\t\tswitch (units) {\n\t\t\tcase \"seconds\":\n\t\t\t\tself.currentTime = position * 1000;\n\t\t\t\tif (self.currentTime < 0) self.currentTime = 0;\n\t\t\t\tif (self.currentTime > self.lastMoment) self.currentTime = self.lastMoment;\n\t\t\t\tpercent = self.currentTime / self.lastMoment;\n\t\t\t\tbreak;\n\t\t\tcase \"beats\":\n\t\t\t\tself.currentTime = position * self.millisecondsPerBeat * self.beatSubdivisions;\n\t\t\t\tif (self.currentTime < 0) self.currentTime = 0;\n\t\t\t\tif (self.currentTime > self.lastMoment) self.currentTime = self.lastMoment;\n\t\t\t\tpercent = self.currentTime / self.lastMoment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// this is \"percent\" or any illegal value\n\t\t\t\t// this is passed a value between 0 and 1.\n\t\t\t\tpercent = position;\n\t\t\t\tif (percent < 0) percent = 0;\n\t\t\t\tif (percent > 1) percent = 1;\n\t\t\t\tself.currentTime = self.lastMoment * percent;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!self.isRunning)\n\t\t\tself.pausedPercent = percent;\n\n\t\tvar now = performance.now();\n\t\tself.startTime = now - self.currentTime;\n\n\t\tvar oldEvent = self.currentEvent;\n\t\tself.currentEvent = 0;\n\t\twhile (self.noteTimings.length > self.currentEvent && self.noteTimings[self.currentEvent].milliseconds < self.currentTime) {\n\t\t\tself.currentEvent++;\n\t\t}\n\n\t\tif (self.lineEndCallback) {\n\t\t\tself.currentLine = 0;\n\t\t\twhile (self.lineEndTimings.length > self.currentLine && self.lineEndTimings[self.currentLine].milliseconds + self.lineEndAnticipation < self.currentTime) {\n\t\t\t\tself.currentLine++;\n\t\t\t}\n\t\t}\n\n\t\tvar oldBeat = self.currentBeat;\n\t\tself.currentBeat = Math.floor(self.currentTime / self.millisecondsPerBeat);\n\t\tif (self.beatCallback && oldBeat !== self.currentBeat) // If the movement caused the beat to change, then immediately report it to the client.\n\t\t\tself.doBeatCallback(self.startTime+self.currentTime);\n\n\t\tif (self.eventCallback && self.currentEvent >= 0 && self.noteTimings[self.currentEvent].type === 'event')\n\t\t\tself.eventCallback(self.noteTimings[self.currentEvent]);\n\t\tif (self.lineEndCallback)\n\t\t\tself.lineEndCallback(self.lineEndTimings[self.currentLine], self.noteTimings[self.currentEvent], { line: self.currentLine, endTimings: self.lineEndTimings });\n\n\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t};\n};\n\nfunction getLineEndTimings(timings, anticipation) {\n\t// Returns an array of milliseconds to call the lineEndCallback.\n\t// This figures out the timing of the beginning of each line and subtracts the anticipation from it.\n\tvar callbackTimes = [];\n\tvar lastTop = null;\n\tfor (var i = 0; i < timings.length; i++) {\n\t\tvar timing = timings[i];\n\t\tif (timing.type !== 'end' && timing.top !== lastTop) {\n\t\t\tcallbackTimes.push({ measureNumber: timing.measureNumber, milliseconds: timing.milliseconds-anticipation, top: timing.top, bottom: timing.top+timing.height });\n\t\t\tlastTop = timing.top;\n\t\t}\n\t}\n\treturn callbackTimes;\n}\n\nmodule.exports = TimingCallbacks;\n\n","// abc_tunebook.js: splits a string representing ABC Music Notation into individual tunes.\n\nvar Parse = require('../parse/abc_parse');\nvar bookParser = require('../parse/abc_parse_book');\nvar tablatures = require('../tablatures/abc_tablatures');\n\n\nvar tunebook = {};\n\n(function() {\n\t\"use strict\";\n\n\ttunebook.numberOfTunes = function(abc) {\n\t\tvar tunes = abc.split(\"\\nX:\");\n\t\tvar num = tunes.length;\n\t\tif (num === 0) num = 1;\n\t\treturn num;\n\t};\n\n\tvar TuneBook = tunebook.TuneBook = function(book) {\n\t\tvar parsed = bookParser(book);\n\t\tthis.header = parsed.header;\n\t\tthis.tunes = parsed.tunes;\n\t};\n\n\tTuneBook.prototype.getTuneById = function(id) {\n\t\tfor (var i = 0; i < this.tunes.length; i++) {\n\t\t\tif (this.tunes[i].id === ''+id)\n\t\t\t\treturn this.tunes[i];\n\t\t}\n\t\treturn null;\n\t};\n\n\tTuneBook.prototype.getTuneByTitle = function(title) {\n\t\tfor (var i = 0; i < this.tunes.length; i++) {\n\t\t\tif (this.tunes[i].title === title)\n\t\t\t\treturn this.tunes[i];\n\t\t}\n\t\treturn null;\n\t};\n\n\ttunebook.parseOnly = function(abc, params) {\n\t\tvar numTunes = tunebook.numberOfTunes(abc);\n\n\t\t// this just needs to be passed in because this tells the engine how many tunes to process.\n\t\tvar output = [];\n\t\tfor (var i = 0; i < numTunes; i++) {\n\t\t\toutput.push(1);\n\t\t}\n\t\tfunction callback() {\n\t\t\t// Don't need to do anything with the parsed tunes.\n\t\t}\n\t\treturn tunebook.renderEngine(callback, output, abc, params);\n\t};\n\n\ttunebook.renderEngine = function (callback, output, abc, params) {\n\t\tvar ret = [];\n\t\tvar isArray = function(testObject) {\n\t\t\treturn testObject && !(testObject.propertyIsEnumerable('length')) && typeof testObject === 'object' && typeof testObject.length === 'number';\n\t\t};\n\n\t\t// check and normalize input parameters\n\t\tif (output === undefined || abc === undefined)\n\t\t\treturn;\n\t\tif (!isArray(output))\n\t\t\toutput = [ output ];\n\t\tif (params === undefined)\n\t\t\tparams = {};\n\t\tvar currentTune = params.startingTune ? parseInt(params.startingTune, 10) : 0;\n\n\t\t// parse the abc string\n\t\tvar book = new TuneBook(abc);\n\t\tvar abcParser = new Parse();\n\n\t\t// output each tune, if it exists. Otherwise clear the div.\n\t\tfor (var i = 0; i < output.length; i++) {\n\t\t\tvar div = output[i];\n\t\t\tif (div === \"*\") {\n\t\t\t\t// This is for \"headless\" rendering: doing the work but not showing the svg.\n\t\t\t} else if (typeof(div) === \"string\")\n\t\t\t\tdiv = document.getElementById(div);\n\t\t\tif (div) {\n\t\t\t\tif (currentTune >= 0 && currentTune < book.tunes.length) {\n\t\t\t\t\tabcParser.parse(book.tunes[currentTune].abc, params, book.tunes[currentTune].startPos - book.header.length);\n\t\t\t\t\tvar tune = abcParser.getTune();\n\t\t\t\t\t//\n\t\t\t\t\t// Init tablatures plugins\n\t\t\t\t\t//\n\t\t\t\t\tif (params.tablature) {\n\t\t\t\t\t\ttune.tablatures = tablatures.preparePlugins(tune, currentTune, params);\n\t\t\t\t\t}\n\t\t\t\t\tvar warnings = abcParser.getWarnings();\n\t\t\t\t\tif (warnings)\n\t\t\t\t\t\ttune.warnings = warnings;\n\t\t\t\t\tvar override = callback(div, tune, i, book.tunes[currentTune].abc);\n\t\t\t\t\tret.push(override ? override : tune);\n\t\t\t\t} else {\n\t\t\t\t\tif (div['innerHTML'])\n\t\t\t\t\t\tdiv.innerHTML = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentTune++;\n\t\t}\n\t return ret;\n\t};\n\n\tfunction flattenTune(tuneObj) {\n\t\t// This removes the line breaks and removes the non-music lines.\n\t\tvar staves = [];\n\t\tfor (var j = 0; j < tuneObj.lines.length; j++) {\n\t\t\tvar line = tuneObj.lines[j];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var k = 0; k < line.staff.length; k++) {\n\t\t\t\t\tvar staff = line.staff[k];\n\t\t\t\t\tif (!staves[k])\n\t\t\t\t\t\tstaves[k] = staff;\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (var i = 0; i < staff.voices.length; i++) {\n\t\t\t\t\t\t\tif (staves[k].voices[i])\n\t\t\t\t\t\t\t\tstaves[k].voices[i] = staves[k].voices[i].concat(staff.voices[i]);\n\t\t\t\t\t\t\t// TODO-PER: If staves[k].voices[i] doesn't exist, that means a voice appeared in the middle of the tune. That isn't handled yet.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn staves;\n\t}\n\n\tfunction measuresParser(staff, tune) {\n\t\tvar voices = [];\n\t\tvar lastChord = null;\n\t\tvar measureStartChord = null;\n\t\tvar fragStart = null;\n\t\tvar hasNotes = false;\n\n\t\tfor (var i = 0; i < staff.voices.length; i++) {\n\t\t\tvar voice = staff.voices[i];\n\t\t\tvoices.push([]);\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar elem = voice[j];\n\t\t\t\tif (fragStart === null && elem.startChar >= 0) {\n\t\t\t\t\tfragStart = elem.startChar;\n\t\t\t\t\tif (elem.chord === undefined)\n\t\t\t\t\t\tmeasureStartChord = lastChord;\n\t\t\t\t\telse\n\t\t\t\t\t\tmeasureStartChord = null;\n\t\t\t\t}\n\t\t\t\tif (elem.chord)\n\t\t\t\t\tlastChord = elem;\n\t\t\t\tif (elem.el_type === 'bar') {\n\t\t\t\t\tif (hasNotes) {\n\t\t\t\t\t\tvar frag = tune.abc.substring(fragStart, elem.endChar);\n\t\t\t\t\t\tvar measure = {abc: frag};\n\t\t\t\t\t\tlastChord = measureStartChord && measureStartChord.chord && measureStartChord.chord.length > 0 ? measureStartChord.chord[0].name : null;\n\t\t\t\t\t\tif (lastChord)\n\t\t\t\t\t\t\tmeasure.lastChord = lastChord;\n\t\t\t\t\t\tif (elem.startEnding)\n\t\t\t\t\t\t\tmeasure.startEnding = elem.startEnding;\n\t\t\t\t\t\tif (elem.endEnding)\n\t\t\t\t\t\t\tmeasure.endEnding = elem.endEnding;\n\t\t\t\t\t\tvoices[i].push(measure);\n\t\t\t\t\t\tfragStart = null;\n\t\t\t\t\t\thasNotes = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (elem.el_type === 'note') {\n\t\t\t\t\thasNotes = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn voices;\n\t}\n\n\ttunebook.extractMeasures = function(abc) {\n\t\tvar tunes = [];\n\t\tvar book = new TuneBook(abc);\n\t\tfor (var i = 0; i < book.tunes.length; i++) {\n\t\t\tvar tune = book.tunes[i];\n\t\t\tvar arr = tune.abc.split(\"K:\");\n\t\t\tvar arr2 = arr[1].split(\"\\n\");\n\t\t\tvar header = arr[0] + \"K:\" + arr2[0] + \"\\n\";\n\t\t\tvar lastChord = null;\n\t\t\tvar measureStartChord = null;\n\t\t\tvar fragStart = null;\n\t\t\tvar measures = [];\n\t\t\tvar hasNotes = false;\n\t\t\tvar tuneObj = tunebook.parseOnly(tune.abc)[0];\n\t\t\tvar hasPickup = tuneObj.getPickupLength() > 0;\n\t\t\t// var staves = flattenTune(tuneObj);\n\t\t\t// for (var s = 0; s < staves.length; s++) {\n\t\t\t// \tvar voices = measuresParser(staves[s], tune);\n\t\t\t// \tif (s === 0)\n\t\t\t// \t\tmeasures = voices;\n\t\t\t// \telse {\n\t\t\t// \t\tfor (var ss = 0; ss < voices.length; ss++) {\n\t\t\t// \t\t\tvar voice = voices[ss];\n\t\t\t// \t\t\tif (measures.length <= ss)\n\t\t\t// \t\t\t\tmeasures.push([]);\n\t\t\t// \t\t\tvar measureVoice = measures[ss];\n\t\t\t// \t\t\tfor (var sss = 0; sss < voice.length; sss++) {\n\t\t\t// \t\t\t\tif (measureVoice.length > sss)\n\t\t\t// \t\t\t\t\tmeasureVoice[sss].abc += \"\\n\" + voice[sss].abc;\n\t\t\t// \t\t\t\telse\n\t\t\t// \t\t\t\t\tmeasures.push(voice[sss]);\n\t\t\t// \t\t\t}\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// \tconsole.log(voices);\n\t\t\t// }\n\t\t\t// measures = measures[0];\n\n\t\t\tfor (var j = 0; j < tuneObj.lines.length; j++) {\n\t\t\t\tvar line = tuneObj.lines[j];\n\t\t\t\tif (line.staff) {\n\t\t\t\t\tfor (var k = 0; k < 1 /*line.staff.length*/; k++) {\n\t\t\t\t\t\tvar staff = line.staff[k];\n\t\t\t\t\t\tfor (var kk = 0; kk < 1 /*staff.voices.length*/; kk++) {\n\t\t\t\t\t\t\tvar voice = staff.voices[kk];\n\t\t\t\t\t\t\tfor (var kkk = 0; kkk < voice.length; kkk++) {\n\t\t\t\t\t\t\t\tvar elem = voice[kkk];\n\t\t\t\t\t\t\t\tif (fragStart === null && elem.startChar >= 0) {\n\t\t\t\t\t\t\t\t\tfragStart = elem.startChar;\n\t\t\t\t\t\t\t\t\tif (elem.chord === undefined)\n\t\t\t\t\t\t\t\t\t\tmeasureStartChord = lastChord;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tmeasureStartChord = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (elem.chord)\n\t\t\t\t\t\t\t\t\tlastChord = elem;\n\t\t\t\t\t\t\t\tif (elem.el_type === 'bar') {\n\t\t\t\t\t\t\t\t\tif (hasNotes) {\n\t\t\t\t\t\t\t\t\t\tvar frag = tune.abc.substring(fragStart, elem.endChar);\n\t\t\t\t\t\t\t\t\t\tvar measure = {abc: frag};\n\t\t\t\t\t\t\t\t\t\tlastChord = measureStartChord && measureStartChord.chord && measureStartChord.chord.length > 0 ? measureStartChord.chord[0].name : null;\n\t\t\t\t\t\t\t\t\t\tif (lastChord)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.lastChord = lastChord;\n\t\t\t\t\t\t\t\t\t\tif (elem.startEnding)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.startEnding = elem.startEnding;\n\t\t\t\t\t\t\t\t\t\tif (elem.endEnding)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.endEnding = elem.endEnding;\n\t\t\t\t\t\t\t\t\t\tmeasures.push(measure);\n\t\t\t\t\t\t\t\t\t\tfragStart = null;\n\t\t\t\t\t\t\t\t\t\thasNotes = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (elem.el_type === 'note') {\n\t\t\t\t\t\t\t\t\thasNotes = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttunes.push({\n\t\t\t\theader: header,\n\t\t\t\tmeasures: measures,\n\t\t\t\thasPickup: hasPickup\n\t\t\t});\n\t\t}\n\t\treturn tunes;\n\t};\n})();\n\nmodule.exports = tunebook;\n","var tunebook = require('./abc_tunebook');\nvar Tune = require('../data/abc_tune');\n\nvar EngraverController = require('../write/engraver-controller');\nvar Parse = require('../parse/abc_parse');\nvar wrap = require('../parse/wrap_lines');\n\n\nvar resizeDivs = {};\nfunction resizeOuter() {\n var width = window.innerWidth;\n for (var id in resizeDivs) {\n if (resizeDivs.hasOwnProperty(id)) {\n var outer = resizeDivs[id];\n var ofs = outer.offsetLeft;\n width -= ofs * 2;\n outer.style.width = width + \"px\";\n }\n }\n}\n\ntry {\n window.addEventListener(\"resize\", resizeOuter);\n window.addEventListener(\"orientationChange\", resizeOuter);\n} catch(e) {\n // if we aren't in a browser, this code will crash, but it is not needed then either.\n}\n\nfunction renderOne(div, tune, params, tuneNumber, lineOffset) {\n if (params.viewportHorizontal) {\n // Create an inner div that holds the music, so that the passed in div will be the viewport.\n div.innerHTML = '
';\n if (params.scrollHorizontal) {\n div.style.overflowX = \"auto\";\n div.style.overflowY = \"hidden\";\n } else\n div.style.overflow = \"hidden\";\n resizeDivs[div.id] = div; // We use a hash on the element's id so that multiple calls won't keep adding to the list.\n div = div.children[0]; // The music should be rendered in the inner div.\n }\n else if (params.viewportVertical) {\n // Create an inner div that holds the music, so that the passed in div will be the viewport.\n div.innerHTML = '
';\n div.style.overflowX = \"hidden\";\n div.style.overflowY = \"auto\";\n div = div.children[0]; // The music should be rendered in the inner div.\n }\n else\n\t div.innerHTML = \"\";\n var engraver_controller = new EngraverController(div, params);\n engraver_controller.engraveABC(tune, tuneNumber, lineOffset);\n tune.engraver = engraver_controller;\n if (params.viewportVertical || params.viewportHorizontal) {\n // If we added a wrapper around the div, then we need to size the wrapper, too.\n var parent = div.parentNode;\n parent.style.width = div.style.width;\n }\n}\n\n// A quick way to render a tune from javascript when interactivity is not required.\n// This is used when a javascript routine has some abc text that it wants to render\n// in a div or collection of divs. One tune or many can be rendered.\n//\n// parameters:\n// output: an array of divs that the individual tunes are rendered to.\n// If the number of tunes exceeds the number of divs in the array, then\n// only the first tunes are rendered. If the number of divs exceeds the number\n// of tunes, then the unused divs are cleared. The divs can be passed as either\n// elements or strings of ids. If ids are passed, then the div MUST exist already.\n// (if a single element is passed, then it is an implied array of length one.)\n// (if a null is passed for an element, or the element doesn't exist, then that tune is skipped.)\n// abc: text representing a tune or an entire tune book in ABC notation.\n// renderParams: hash of:\n// startingTune: an index, starting at zero, representing which tune to start rendering at.\n// (If this element is not present, then rendering starts at zero.)\n// width: 800 by default. The width in pixels of the output paper\nvar renderAbc = function(output, abc, parserParams, engraverParams, renderParams) {\n // Note: all parameters have been condensed into the first ones. It doesn't hurt anything to allow the old format, so just copy them here.\n var params = {};\n var key;\n if (parserParams) {\n for (key in parserParams) {\n if (parserParams.hasOwnProperty(key)) {\n params[key] = parserParams[key];\n }\n }\n if (params.warnings_id && params.tablature) {\n params.tablature.warning_id = params.warnings_id;\n }\n }\n if (engraverParams) {\n for (key in engraverParams) {\n if (engraverParams.hasOwnProperty(key)) {\n\t // There is a conflict with the name of the parameter \"listener\". If it is in the second parameter, then it is for click.\n\t if (key === \"listener\") {\n\t \tif (engraverParams[key].highlight)\n\t\t params.clickListener = engraverParams[key].highlight;\n\t } else\n params[key] = engraverParams[key];\n }\n }\n }\n if (renderParams) {\n for (key in renderParams) {\n if (renderParams.hasOwnProperty(key)) {\n params[key] = renderParams[key];\n }\n }\n }\n\n function callback(div, tune, tuneNumber, abcString) {\n var removeDiv = false;\n if (div === \"*\") {\n removeDiv = true;\n div = document.createElement(\"div\");\n div.setAttribute(\"style\", \"visibility: hidden;\");\n document.body.appendChild(div);\n }\n if (!removeDiv && params.wrap && params.staffwidth) {\n tune = doLineWrapping(div, tune, tuneNumber, abcString, params);\n\t return tune;\n }\n if (params.afterParsing)\n params.afterParsing(tune, tuneNumber, abcString);\n renderOne(div, tune, params, tuneNumber, 0);\n if (removeDiv)\n div.parentNode.removeChild(div);\n return null;\n }\n\n return tunebook.renderEngine(callback, output, abc, params);\n};\n\nfunction doLineWrapping(div, tune, tuneNumber, abcString, params) {\n\tvar engraver_controller = new EngraverController(div, params);\n\tvar widths = engraver_controller.getMeasureWidths(tune);\n\n\tvar ret = wrap.calcLineWraps(tune, widths, params);\n\tif (ret.reParse) {\n var abcParser = new Parse();\n abcParser.parse(abcString, ret.revisedParams);\n tune = abcParser.getTune();\n var warnings = abcParser.getWarnings();\n if (warnings)\n tune.warnings = warnings;\n }\n if (params.afterParsing)\n params.afterParsing(tune, tuneNumber, abcString);\n renderOne(div, tune, ret.revisedParams, tuneNumber, 0);\n\ttune.explanation = ret.explanation;\n\treturn tune;\n}\n\nmodule.exports = renderAbc;\n","var tunebook = require('./abc_tunebook');\nvar EngraverController = require('../write/engraver-controller');\n\nvar tuneMetrics = function(abc, params) {\n function callback(div, tune, tuneNumber, abcString) {\n\t\tdiv = document.createElement(\"div\");\n\t\tdiv.setAttribute(\"style\", \"visibility: hidden;\");\n\t\tdocument.body.appendChild(div);\n\t\tvar engraver_controller = new EngraverController(div, params);\n\t\tvar widths = engraver_controller.getMeasureWidths(tune);\n div.parentNode.removeChild(div);\n return {sections: widths};\n }\n\n return tunebook.renderEngine(callback, \"*\", abc, params);\n};\n\nmodule.exports = tuneMetrics;\n","var { relativeMajor } = require(\"./relative-major\");\n\nvar key1sharp = { acc: 'sharp', note: 'f' };\nvar key2sharp = { acc: 'sharp', note: 'c' };\nvar key3sharp = { acc: 'sharp', note: 'g' };\nvar key4sharp = { acc: 'sharp', note: 'd' };\nvar key5sharp = { acc: 'sharp', note: 'A' };\nvar key6sharp = { acc: 'sharp', note: 'e' };\nvar key7sharp = { acc: 'sharp', note: 'B' };\nvar key1flat = { acc: 'flat', note: 'B' };\nvar key2flat = { acc: 'flat', note: 'e' };\nvar key3flat = { acc: 'flat', note: 'A' };\nvar key4flat = { acc: 'flat', note: 'd' };\nvar key5flat = { acc: 'flat', note: 'G' };\nvar key6flat = { acc: 'flat', note: 'c' };\nvar key7flat = { acc: 'flat', note: 'F' };\n\nvar keys = {\n\t'C#': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp, key6sharp, key7sharp],\n\t'F#': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp, key6sharp],\n\t'B': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp],\n\t'E': [key1sharp, key2sharp, key3sharp, key4sharp],\n\t'A': [key1sharp, key2sharp, key3sharp],\n\t'D': [key1sharp, key2sharp],\n\t'G': [key1sharp],\n\t'C': [],\n\t'F': [key1flat],\n\t'Bb': [key1flat, key2flat],\n\t'Eb': [key1flat, key2flat, key3flat],\n\t'Cm': [key1flat, key2flat, key3flat],\n\t'Ab': [key1flat, key2flat, key3flat, key4flat],\n\t'Db': [key1flat, key2flat, key3flat, key4flat, key5flat],\n\t'Gb': [key1flat, key2flat, key3flat, key4flat, key5flat, key6flat],\n\t'Cb': [key1flat, key2flat, key3flat, key4flat, key5flat, key6flat, key7flat],\n\n\t// The following are not in the 2.0 spec, but seem normal enough.\n\t// TODO-PER: These SOUND the same as what's written, but they aren't right\n\t'A#': [key1flat, key2flat],\n\t'B#': [],\n\t'D#': [key1flat, key2flat, key3flat],\n\t'E#': [key1flat],\n\t'G#': [key1flat, key2flat, key3flat, key4flat],\n\t'none': [],\n};\n\nfunction keyAccidentals(key) {\n\tvar newKey = keys[relativeMajor(key)]\n\tif (!newKey) // If we don't recognize the key then there is no change\n\t\treturn null\n\treturn JSON.parse(JSON.stringify(newKey))\n};\n\nmodule.exports = keyAccidentals;\n","// All these keys have the same number of accidentals\nvar keys = {\n\t'C': { modes: ['CMaj', 'Amin', 'Am', 'GMix', 'DDor', 'EPhr', 'FLyd', 'BLoc'], stepsFromC: 0 },\n\t'Db': { modes: ['DbMaj', 'Bbmin', 'Bbm', 'AbMix', 'EbDor', 'FPhr', 'GbLyd', 'CLoc'], stepsFromC: 1 },\n\t'D': { modes: ['DMaj', 'Bmin', 'Bm', 'AMix', 'EDor', 'F#Phr', 'GLyd', 'C#Loc'], stepsFromC: 2 },\n\t'Eb': { modes: ['EbMaj', 'Cmin', 'Cm', 'BbMix', 'FDor', 'GPhr', 'AbLyd', 'DLoc'], stepsFromC: 3 },\n\t'E': { modes: ['EMaj', 'C#min', 'C#m', 'BMix', 'F#Dor', 'G#Phr', 'ALyd', 'D#Loc'], stepsFromC: 4 },\n\t'F': { modes: ['FMaj', 'Dmin', 'Dm', 'CMix', 'GDor', 'APhr', 'BbLyd', 'ELoc'], stepsFromC: 5 },\n\t'Gb': { modes: ['GbMaj', 'Ebmin', 'Ebm', 'DbMix', 'AbDor', 'BbPhr', 'CbLyd', 'FLoc'], stepsFromC: 6 },\n\t'G': { modes: ['GMaj', 'Emin', 'Em', 'DMix', 'ADor', 'BPhr', 'CLyd', 'F#Loc'], stepsFromC: 7 },\n\t'Ab': { modes: ['AbMaj', 'Fmin', 'Fm', 'EbMix', 'BbDor', 'CPhr', 'DbLyd', 'GLoc'], stepsFromC: 8 },\n\t'A': { modes: ['AMaj', 'F#min', 'F#m', 'EMix', 'BDor', 'C#Phr', 'DLyd', 'G#Loc'], stepsFromC: 9 },\n\t'Bb': { modes: ['BbMaj', 'Gmin', 'Gm', 'FMix', 'CDor', 'DPhr', 'EbLyd', 'ALoc'], stepsFromC: 10 },\n\t'B': { modes: ['BMaj', 'G#min', 'G#m', 'F#Mix', 'C#Dor', 'D#Phr', 'ELyd', 'A#Loc'], stepsFromC: 11 },\n\t// Enharmonic keys\n\t'C#': { modes: ['C#Maj', 'A#min', 'A#m', 'G#Mix', 'D#Dor', 'E#Phr', 'F#Lyd', 'B#Loc'], stepsFromC: 1 },\n\t'F#': { modes: ['F#Maj', 'D#min', 'D#m', 'C#Mix', 'G#Dor', 'A#Phr', 'BLyd', 'E#Loc'], stepsFromC: 6 },\n\t'Cb': { modes: ['CbMaj', 'Abmin', 'Abm', 'GbMix', 'DbDor', 'EbPhr', 'FbLyd', 'BbLoc'], stepsFromC: 11 },\n}\n\nvar keyReverse = null\n\nfunction createKeyReverse() {\n\tkeyReverse = {}\n\tvar allKeys = Object.keys(keys)\n\tfor (var i = 0 ; i < allKeys.length; i++) {\n\t\tvar keyObj = keys[allKeys[i]]\n\t\tkeyReverse[allKeys[i].toLowerCase()] = allKeys[i];\n\t\tfor (var j = 0; j < keyObj.modes.length; j++) {\n\t\t\tvar mode = keyObj.modes[j].toLowerCase()\n\t\t\tkeyReverse[mode] = allKeys[i];\n\t\t}\n\t}\n}\n\nfunction relativeMajor(key) {\n\t// Translate a key to its relative major. If it doesn't exist, do the best we can\n\t// by just returning the original key.\n\t// There are alternate spellings of these - so the search needs to be case insensitive.\n\t// To make this efficient, the first time this is called the \"keys\" object is reversed so this search is fast in the future\n\tif (!keyReverse) {\n\t\tcreateKeyReverse()\n\t}\n\t// get the key portion itself - there might be other stuff, like extra sharps and flats, or the mode written out.\n\tvar mode = key.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/)\n\tif (!mode || !mode[2])\n\t\treturn key;\n\tmode = mode[1] + mode[2]\n\tvar maj = keyReverse[mode]\n\tif (maj)\n\t\treturn maj;\n\treturn key;\n}\n\nfunction relativeMode(majorKey, mode) {\n\t// The reverse of the relativeMajor. Translate it back to the original mode.\n\t// If it isn't a recognized mode or it is already major, then just return the major key.\n\tvar group = keys[majorKey]\n\tif (!group)\n\t\treturn majorKey;\n\tif (mode === '')\n\t\treturn majorKey;\n\tvar match = mode.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/)\t\n\tif (!match)\n\t\treturn majorKey\n\tvar regMode = match[1]\t\n\tfor (var i = 0; i < group.modes.length; i++) {\n\t\tvar thisMode = group.modes[i]\n\t\tvar ind = thisMode.toLowerCase().indexOf(regMode)\n\t\tif (ind !== -1 && ind === thisMode.length - regMode.length)\n\t\t\treturn thisMode.substring(0, thisMode.length - regMode.length)\n\t}\n\treturn majorKey;\n}\n\nfunction transposeKey(key, steps) {\n\t// This takes a major key and adds the desired steps.\n\t// It assigns each key a number that is the number of steps from C so that there can just be arithmetic.\n\tvar match = keys[key]\n\tif (!match)\n\t\treturn key;\n\twhile (steps < 0) steps += 12;\n\tvar fromC = (match.stepsFromC + steps) % 12;\n\tfor (var i = 0; i < Object.keys(keys).length; i++) {\n\t\tvar k = Object.keys(keys)[i]\n\t\tif (keys[k].stepsFromC === fromC)\n\t\t\treturn k;\n\t}\n\treturn key;\n}\n\nmodule.exports = {relativeMajor: relativeMajor, relativeMode: relativeMode, transposeKey: transposeKey};\n","// abc_tune.js: a computer usable internal structure representing one tune.\n\nvar parseCommon = require('../parse/abc_common');\nvar spacing = require('../write/helpers/spacing');\nvar sequence = require('../synth/abc_midi_sequencer');\nvar flatten = require('../synth/abc_midi_flattener');\nvar delineTune = require(\"./deline-tune\");\n\n/**\n * This is the data for a single ABC tune. It is created and populated by the window.ABCJS.parse.Parse class.\n * Also known as the ABCJS Abstract Syntax Tree\n * @alternateClassName ABCJS.Tune\n */\nvar Tune = function() {\n\tthis.reset = function () {\n\t\tthis.version = \"1.1.0\";\n\t\tthis.media = \"screen\";\n\t\tthis.metaText = {};\n\t\tthis.metaTextInfo = {};\n\t\tthis.formatting = {};\n\t\tthis.lines = [];\n\t\tthis.staffNum = 0;\n\t\tthis.voiceNum = 0;\n\t\tthis.lineNum = 0;\n\t\tthis.runningFonts = {};\n\t\tdelete this.visualTranspose;\n\t};\n\tthis.reset();\n\n\tfunction copy(dest, src, prop, attrs) {\n\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t\tdest[prop][attrs[i]] = src[prop][attrs[i]];\n\t}\n\n\tthis.copyTopInfo = function(src) {\n\t\tvar attrs = ['tempo', 'title', 'header', 'rhythm', 'origin', 'composer', 'author', 'partOrder'];\n\t\tcopy(this, src, \"metaText\", attrs);\n\t\tcopy(this, src, \"metaTextInfo\", attrs);\n\t};\n\n\tthis.copyBottomInfo = function(src) {\n\t\tvar attrs = ['unalignedWords',\n\t\t\t'book',\n\t\t\t'source',\n\t\t\t'discography',\n\t\t\t'notes',\n\t\t\t'transcription',\n\t\t\t'history',\n\t\t\t'abc-copyright',\n\t\t\t'abc-creator',\n\t\t\t'abc-edited-by',\n\t\t\t'footer']\n\t\tcopy(this, src, \"metaText\", attrs);\n\t\tcopy(this, src, \"metaTextInfo\", attrs);\n\t};\n\n\t// The structure consists of a hash with the following two items:\n\t// metaText: a hash of {key, value}, where key is one of: title, author, rhythm, source, transcription, unalignedWords, etc...\n\t// tempo: { noteLength: number (e.g. .125), bpm: number }\n\t// lines: an array of elements, or one of the following:\n\t//\n\t// STAFF: array of elements\n\t// SUBTITLE: string\n\t//\n\t// TODO: actually, the start and end char should modify each part of the note type\n\t// The elements all have a type field and a start and end char\n\t// field. The rest of the fields depend on the type and are listed below:\n\t// REST: duration=1,2,4,8; chord: string\n\t// NOTE: accidental=none,dbl_flat,flat,natural,sharp,dbl_sharp\n\t//\t\tpitch: \"C\" is 0. The numbers refer to the pitch letter.\n\t//\t\tduration: .5 (sixteenth), .75 (dotted sixteenth), 1 (eighth), 1.5 (dotted eighth)\n\t//\t\t\t2 (quarter), 3 (dotted quarter), 4 (half), 6 (dotted half) 8 (whole)\n\t//\t\tchord: { name:chord, position: one of 'default', 'above', 'below' }\n\t//\t\tend_beam = true or undefined if this is the last note in a beam.\n\t//\t\tlyric: array of { syllable: xxx, divider: one of \" -_\" }\n\t//\t\tstartTie = true|undefined\n\t//\t\tendTie = true|undefined\n\t//\t\tstartTriplet = num <- that is the number to print\n\t//\t\tendTriplet = true|undefined (the last note of the triplet)\n\t// TODO: actually, decoration should be an array.\n\t//\t\tdecoration: upbow, downbow, accent\n\t// BAR: type=bar_thin, bar_thin_thick, bar_thin_thin, bar_thick_thin, bar_right_repeat, bar_left_repeat, bar_double_repeat\n\t//\tnumber: 1 or 2: if it is the start of a first or second ending\n\t// CLEF: type=treble,bass\n\t// KEY-SIG:\n\t//\t\taccidentals[]: { acc:sharp|dblsharp|natural|flat|dblflat, note:a|b|c|d|e|f|g }\n\t// METER: type: common_time,cut_time,specified\n\t//\t\tif specified, { num: 99, den: 99 }\n\n\tthis.getBeatLength = function() {\n\t\t// This returns a fraction: for instance 1/4 for a quarter\n\t\t// There are two types of meters: compound and regular. Compound meter has 3 beats counted as one.\n\t\tvar meter = this.getMeterFraction();\n\t\tvar multiplier = 1;\n\t\tif (meter.num === 6 || meter.num === 9 || meter.num === 12)\n\t\t\tmultiplier = 3;\n\t\telse if (meter.num === 3 && meter.den === 8)\n\t\t\tmultiplier = 3;\n\n\t\treturn multiplier / meter.den;\n\t};\n\n\tfunction computePickupLength(lines, barLength) {\n\t\tvar pickupLength = 0;\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\tif (lines[i].staff) {\n\t\t\t\tfor (var j = 0; j < lines[i].staff.length; j++) {\n\t\t\t\t\tfor (var v = 0; v < lines[i].staff[j].voices.length; v++) {\n\t\t\t\t\t\tvar voice = lines[i].staff[j].voices[v];\n\t\t\t\t\t\tvar tripletMultiplier = 1;\n\t\t\t\t\t\tfor (var el = 0; el < voice.length; el++) {\n\t\t\t\t\t\t\tvar isSpacer = voice[el].rest && voice[el].rest.type === \"spacer\";\n\t\t\t\t\t\t\tif (voice[el].startTriplet)\n\t\t\t\t\t\t\t\ttripletMultiplier = voice[el].tripletMultiplier;\n\t\t\t\t\t\t\tif (voice[el].duration && !isSpacer && voice[el].el_type !== \"tempo\")\n\t\t\t\t\t\t\t\tpickupLength += voice[el].duration * tripletMultiplier;\n\t\t\t\t\t\t\tif (voice[el].endTriplet)\n\t\t\t\t\t\t\t\ttripletMultiplier = 1;\n\t\t\t\t\t\t\tif (pickupLength >= barLength)\n\t\t\t\t\t\t\t\tpickupLength -= barLength;\n\t\t\t\t\t\t\tif (voice[el].el_type === 'bar')\n\t\t\t\t\t\t\t\treturn pickupLength;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn pickupLength;\n\t}\n\tthis.getPickupLength = function() {\n\t\tvar barLength = this.getBarLength();\n\t\tvar pickupLength = computePickupLength(this.lines, barLength);\n\n\t\t// If computed pickup length is very close to 0 or the bar length, we assume\n\t\t// that we actually have a full bar and hence no pickup.\n\t\treturn (pickupLength < 1e-8 || barLength-pickupLength < 1e-8) ? 0 : pickupLength;\n\t};\n\n\tthis.getBarLength = function() {\n\t\tvar meter = this.getMeterFraction();\n\t\treturn meter.num / meter.den;\n\t};\n\n\tthis.getTotalTime = function() {\n\t\treturn this.totalTime;\n\t};\n\n\tthis.getTotalBeats = function() {\n\t\treturn this.totalBeats;\n\t};\n\n\tthis.millisecondsPerMeasure = function(bpmOverride) {\n\t\tvar bpm;\n\t\tif (bpmOverride) {\n\t\t\tbpm = bpmOverride;\n\t\t} else {\n\t\t\tvar tempo = this.metaText ? this.metaText.tempo : null;\n\t\t\tbpm = this.getBpm(tempo);\n\t\t}\n\t\tif (bpm <= 0)\n\t\t\tbpm = 1; // I don't think this can happen, but we don't want a possibility of dividing by zero.\n\n\t\tvar beatsPerMeasure = this.getBeatsPerMeasure();\n\n\t\tvar minutesPerMeasure = beatsPerMeasure / bpm;\n\t\treturn minutesPerMeasure * 60000;\n\t};\n\n\tthis.getBeatsPerMeasure = function() {\n\t\tvar beatLen = this.getBeatLength();\n\t\tvar barLen = this.getBarLength();\n\t\treturn barLen / beatLen;\n\t};\n\n\tthis.getMeter = function() {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tvar meter = line.staff[j].meter;\n\t\t\t\t\tif (meter) {\n\t\t\t\t\t\treturn meter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { type: \"common_time\" };\n\t};\n\n\tthis.getMeterFraction = function() {\n\t\tvar meter = this.getMeter();\n\t\tvar num = 4;\n\t\tvar den = 4;\n\t\tif (meter) {\n\t\t\tif (meter.type === 'specified') {\n\t\t\t\tnum = parseInt(meter.value[0].num, 10);\n\t\t\t\tden = parseInt(meter.value[0].den,10);\n\t\t\t} else if (meter.type === 'cut_time') {\n\t\t\t\tnum = 2;\n\t\t\t\tden = 2;\n\t\t\t} else if (meter.type === 'common_time') {\n\t\t\t\tnum = 4;\n\t\t\t\tden = 4;\n\t\t\t}\n\t\t}\n\t\tthis.meter = { num: num, den: den };\n\t\treturn this.meter; // TODO-PER: is this saved value used anywhere? A get function shouldn't change state.\n\t};\n\n\tthis.getKeySignature = function() {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tif (line.staff[j].key)\n\t\t\t\t\t\treturn line.staff[j].key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { };\n\t};\n\n\tthis.getElementFromChar = function(char) {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tvar staff = line.staff[j];\n\t\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\t\tfor (var ii = 0; ii < voice.length; ii++) {\n\t\t\t\t\t\t\tvar elem = voice[ii];\n\t\t\t\t\t\t\tif (elem.startChar && elem.endChar &&\n\t\t\t\t\t\t\t\telem.startChar <= char && elem.endChar > char)\n\t\t\t\t\t\t\t\treturn elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tfunction addVerticalInfo(timingEvents) {\n\t\t// Add vertical info to the bar events: put the next event's top, and the event after the next measure's top.\n\t\tvar lastBarTop;\n\t\tvar lastBarBottom;\n\t\tvar lastEventTop;\n\t\tvar lastEventBottom;\n\t\tfor (var e = timingEvents.length - 1; e >= 0; e--) {\n\t\t\tvar ev = timingEvents[e];\n\t\t\tif (ev.type === 'bar') {\n\t\t\t\tev.top = lastEventTop;\n\t\t\t\tev.nextTop = lastBarTop;\n\t\t\t\tlastBarTop = lastEventTop;\n\n\t\t\t\tev.bottom = lastEventBottom;\n\t\t\t\tev.nextBottom = lastBarBottom;\n\t\t\t\tlastBarBottom = lastEventBottom;\n\t\t\t} else if (ev.type === 'event') {\n\t\t\t\tlastEventTop = ev.top;\n\t\t\t\tlastEventBottom = ev.top + ev.height;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction makeSortedArray(hash) {\n\t\tvar arr = [];\n\t\tfor (var k in hash) {\n\t\t\tif (hash.hasOwnProperty(k))\n\t\t\t\tarr.push(hash[k]);\n\t\t}\n\t\tarr = arr.sort(function (a, b) {\n\t\t\tvar diff = a.milliseconds - b.milliseconds;\n\t\t\t// if the events have the same time, make sure a bar comes before a note\n\t\t\tif (diff !== 0) {\n\t\t\t\treturn diff;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn a.type === \"bar\" ? -1 : 1;\n\t\t\t}\n\t\t});\n\t\treturn arr;\n\t}\n\n\tthis.addElementToEvents = function(eventHash, element, voiceTimeMilliseconds, top, height, line, measureNumber, timeDivider, isTiedState, nextIsBar) {\n\t\tif (element.hint)\n\t\t\treturn { isTiedState: undefined, duration: 0 };\n\t\tvar realDuration = element.durationClass ? element.durationClass : element.duration;\n\t\tif (element.abcelem.rest && element.abcelem.rest.type === \"spacer\")\n\t\t\trealDuration = 0;\n\t\tif (realDuration > 0) {\n\t\t\tvar es = [];\n\t\t\t// If there is an invisible rest, then there are not elements, so don't push a null one.\n\t\t\tfor (var i = 0; i < element.elemset.length; i++) {\n\t\t\t\tif (element.elemset[i] !== null)\n\t\t\t\t\tes.push(element.elemset[i]);\n\t\t\t}\n\t\t\tvar isTiedToNext = element.startTie;\n\t\t\tif (isTiedState !== undefined) {\n\t\t\t\teventHash[\"event\" + isTiedState].elements.push(es); // Add the tied note to the first note that it is tied to\n\t\t\t\tif (nextIsBar) {\n\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds]) {\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds] = {\n\t\t\t\t\t\t\ttype: \"event\",\n\t\t\t\t\t\t\tmilliseconds: voiceTimeMilliseconds,\n\t\t\t\t\t\t\tline: line,\n\t\t\t\t\t\t\tmeasureNumber: measureNumber,\n\t\t\t\t\t\t\ttop: top,\n\t\t\t\t\t\t\theight: height,\n\t\t\t\t\t\t\tleft: null,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\telements: [],\n\t\t\t\t\t\t\tstartChar: null,\n\t\t\t\t\t\t\tendChar: null,\n\t\t\t\t\t\t\tstartCharArray: [],\n\t\t\t\t\t\t\tendCharArray: []\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].measureStart = true;\n\t\t\t\t\tnextIsBar = false;\n\t\t\t\t}\n\t\t\t\tif (!isTiedToNext)\n\t\t\t\t\tisTiedState = undefined;\n\t\t\t} else {\n\t\t\t\t// the last note wasn't tied.\n\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds]) {\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds] = {\n\t\t\t\t\t\ttype: \"event\",\n\t\t\t\t\t\tmilliseconds: voiceTimeMilliseconds,\n\t\t\t\t\t\tline: line,\n\t\t\t\t\t\tmeasureNumber: measureNumber,\n\t\t\t\t\t\ttop: top,\n\t\t\t\t\t\theight: height,\n\t\t\t\t\t\tleft: element.x,\n\t\t\t\t\t\twidth: element.w,\n\t\t\t\t\t\telements: [es],\n\t\t\t\t\t\tstartChar: element.abcelem.startChar,\n\t\t\t\t\t\tendChar: element.abcelem.endChar,\n\t\t\t\t\t\tstartCharArray: [element.abcelem.startChar],\n\t\t\t\t\t\tendCharArray: [element.abcelem.endChar],\n\t\t\t\t\t\tmidiPitches: element.abcelem.midiPitches ? parseCommon.cloneArray(element.abcelem.midiPitches) : []\n\t\t\t\t\t};\n\t\t\t\t\tif (element.abcelem.midiGraceNotePitches)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches = parseCommon.cloneArray(element.abcelem.midiGraceNotePitches);\n\t\t\t\t} else {\n\t\t\t\t\t// If there is more than one voice then two notes can fall at the same time. Usually they would be lined up in the same place, but if it is a whole rest, then it is placed funny. In any case, the left most element wins.\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].left)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].left = Math.min(eventHash[\"event\" + voiceTimeMilliseconds].left, element.x);\n\t\t\t\t\telse\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].left = element.x;\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].elements.push(es);\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].startCharArray.push(element.abcelem.startChar);\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].endCharArray.push(element.abcelem.endChar);\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].startChar === null)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].startChar =element.abcelem.startChar;\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].endChar === null)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].endChar =element.abcelem.endChar;\n\t\t\t\t\tif (element.abcelem.midiPitches && element.abcelem.midiPitches.length) {\n\t\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds].midiPitches)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiPitches = [];\n\t\t\t\t\t\tfor (var i = 0; i < element.abcelem.midiPitches.length; i++)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiPitches.push(element.abcelem.midiPitches[i]);\n\t\t\t\t\t}\n\t\t\t\t\tif (element.abcelem.midiGraceNotePitches && element.abcelem.midiGraceNotePitches.length) {\n\t\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches = [];\n\t\t\t\t\t\tfor (var j = 0; j < element.abcelem.midiGraceNotePitches.length; j++)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches.push(element.abcelem.midiGraceNotePitches[j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (nextIsBar) {\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].measureStart = true;\n\t\t\t\t\tnextIsBar = false;\n\t\t\t\t}\n\t\t\t\t// TODO-PER: There doesn't seem to be a harm in letting ties be two different notes and it fixes a bug when a tie goes to a new line. If there aren't other problems with this change, then the variable can be removed completely. \n\t\t\t\t// if (isTiedToNext)\n\t\t\t\t// \tisTiedState = voiceTimeMilliseconds;\n\t\t\t}\n\t\t}\n\t\treturn { isTiedState: isTiedState, duration: realDuration / timeDivider, nextIsBar: nextIsBar || element.type === 'bar' };\n\t};\n\n\tthis.makeVoicesArray = function() {\n\t\t// First make a new array that is arranged by voice so that the repeats that span different lines are handled correctly.\n\t\tvar voicesArr = [];\n\t\tvar measureNumber = [];\n\t\tvar tempos = {};\n\t\tfor (var line = 0; line < this.engraver.staffgroups.length; line++) {\n\t\t\tvar group = this.engraver.staffgroups[line];\n\t\t\tif (group && group.staffs && group.staffs.length > 0) {\n\t\t\t\tvar firstStaff = group.staffs[0];\n\t\t\t\tvar middleC = firstStaff.absoluteY;\n\t\t\t\tvar top = middleC - firstStaff.top * spacing.STEP;\n\t\t\t\tvar lastStaff = group.staffs[group.staffs.length - 1];\n\t\t\t\tmiddleC = lastStaff.absoluteY;\n\t\t\t\tvar bottom = middleC - lastStaff.bottom * spacing.STEP;\n\t\t\t\tvar height = bottom - top;\n\n\t\t\t\tvar voices = group.voices;\n\t\t\t\tfor (var v = 0; v < voices.length; v++) {\n\t\t\t\t\tif (voices[v].staff && voices[v].staff.isTabStaff)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tvar noteFound = false;\n\t\t\t\t\tif (!voicesArr[v])\n\t\t\t\t\t\tvoicesArr[v] = [];\n\t\t\t\t\tif (measureNumber[v] === undefined)\n\t\t\t\t\t\tmeasureNumber[v] = 0;\n\t\t\t\t\tvar elements = voices[v].children;\n\t\t\t\t\tfor (var elem = 0; elem < elements.length; elem++) {\n\t\t\t\t\t\tif (elements[elem].type === \"tempo\")\n\t\t\t\t\t\t\ttempos[measureNumber[v]] = this.getBpm(elements[elem].abcelem);\n\t\t\t\t\t\tvoicesArr[v].push({top: top, height: height, line: group.line, measureNumber: measureNumber[v], elem: elements[elem]});\n\t\t\t\t\t\tif (elements[elem].type === 'bar' && noteFound) // Count the measures by counting the bar lines, but skip a bar line that appears at the left of the music, before any notes.\n\t\t\t\t\t\t\tmeasureNumber[v]++;\n\t\t\t\t\t\tif (elements[elem].type === 'note' || elements[elem].type === 'rest')\n\t\t\t\t\t\t\tnoteFound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.tempoLocations = tempos; // This should be passed back, but the function is accessible publicly so that would break the interface.\n\t\treturn voicesArr;\n\t};\n\n\tthis.setupEvents = function(startingDelay, timeDivider, startingBpm, warp) {\n\t\tif (!warp) warp = 1;\n\t\tvar timingEvents = [];\n\n\t\tvar eventHash = {};\n\t\t// The time is the number of seconds from the beginning of the piece.\n\t\t// The units we are scanning are in notation units (i.e. 0.25 is a quarter note)\n\t\tvar time = startingDelay;\n\t\tvar isTiedState;\n\t\tvar nextIsBar = true;\n\t\tvar voices = this.makeVoicesArray();\n\t\tvar maxVoiceTimeMilliseconds = 0;\n\t\tfor (var v = 0; v < voices.length; v++) {\n\t\t\tvar voiceTime = time;\n\t\t\tvar voiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\tvar startingRepeatElem = 0;\n\t\t\tvar endingRepeatElem = -1;\n\t\t\tvar elements = voices[v];\n\t\t\tvar bpm = startingBpm;\n\t\t\ttimeDivider = this.getBeatLength() * bpm / 60;\n\t\t\tvar tempoDone = -1;\n\t\t\tfor (var elem = 0; elem < elements.length; elem++) {\n\t\t\t\tvar thisMeasure = elements[elem].measureNumber;\n\t\t\t\tif (tempoDone !== thisMeasure && this.tempoLocations[thisMeasure]) {\n\t\t\t\t\tbpm = this.tempoLocations[thisMeasure];\n\t\t\t\t\ttimeDivider = warp * this.getBeatLength() * bpm / 60;\n\t\t\t\t\ttempoDone = thisMeasure;\n\t\t\t\t}\n\t\t\t\tvar element = elements[elem].elem;\n\t\t\t\tvar ret = this.addElementToEvents(eventHash, element, voiceTimeMilliseconds, elements[elem].top, elements[elem].height, elements[elem].line, elements[elem].measureNumber, timeDivider, isTiedState, nextIsBar);\n\t\t\t\tisTiedState = ret.isTiedState;\n\t\t\t\tnextIsBar = ret.nextIsBar;\n\t\t\t\tvoiceTime += ret.duration;\n\t\t\t\tvar lastHash;\n\t\t\t\tif (element.duration > 0 && eventHash[\"event\" + voiceTimeMilliseconds]) // This won't exist if this is the end of a tie.\n\t\t\t\t\tlastHash = \"event\" + voiceTimeMilliseconds;\n\t\t\t\tvoiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\t\tif (element.type === 'bar') {\n\t\t\t\t\tvar barType = element.abcelem.type;\n\t\t\t\t\tvar endRepeat = (barType === \"bar_right_repeat\" || barType === \"bar_dbl_repeat\");\n\t\t\t\t\tvar startEnding = (element.abcelem.startEnding === '1');\n\t\t\t\t\tvar startRepeat = (barType === \"bar_left_repeat\" || barType === \"bar_dbl_repeat\" || barType === \"bar_right_repeat\");\n\t\t\t\t\tif (endRepeat) {\n\t\t\t\t\t\t// Force the end of the previous note to the position of the measure - the cursor won't go past the end repeat\n\t\t\t\t\t\tif (elem > 0) {\n\t\t\t\t\t\t\teventHash[lastHash].endX = element.x;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endingRepeatElem === -1)\n\t\t\t\t\t\t\tendingRepeatElem = elem;\n\t\t\t\t\t\tvar lastVoiceTimeMilliseconds = 0;\n\t\t\t\t\t\ttempoDone = -1;\n\t\t\t\t\t\tfor (var el2 = startingRepeatElem; el2 < endingRepeatElem; el2++) {\n\t\t\t\t\t\t\tthisMeasure = elements[el2].measureNumber;\n\t\t\t\t\t\t\tif (tempoDone !== thisMeasure && this.tempoLocations[thisMeasure]) {\n\t\t\t\t\t\t\t\tbpm = this.tempoLocations[thisMeasure];\n\t\t\t\t\t\t\t\ttimeDivider = warp * this.getBeatLength() * bpm / 60;\n\t\t\t\t\t\t\t\ttempoDone = thisMeasure;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar element2 = elements[el2].elem;\n\t\t\t\t\t\t\tret = this.addElementToEvents(eventHash, element2, voiceTimeMilliseconds, elements[el2].top, elements[el2].height, elements[el2].line, elements[el2].measureNumber, timeDivider, isTiedState, nextIsBar);\n\t\t\t\t\t\t\tisTiedState = ret.isTiedState;\n\t\t\t\t\t\t\tnextIsBar = ret.nextIsBar;\n\t\t\t\t\t\t\tvoiceTime += ret.duration;\n\t\t\t\t\t\t\tlastVoiceTimeMilliseconds = voiceTimeMilliseconds;\n\t\t\t\t\t\t\tvoiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (eventHash[\"event\" + lastVoiceTimeMilliseconds]) // This won't exist if it is the beginning of the next line. That's ok because we will just count the end of the last line as the end.\n\t\t\t\t\t\t\teventHash[\"event\" + lastVoiceTimeMilliseconds].endX = elements[endingRepeatElem].elem.x;\n\t\t\t\t\t\tnextIsBar = true;\n\t\t\t\t\t\tendingRepeatElem = -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startEnding)\n\t\t\t\t\t\tendingRepeatElem = elem;\n\t\t\t\t\tif (startRepeat)\n\t\t\t\t\t\tstartingRepeatElem = elem;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmaxVoiceTimeMilliseconds = Math.max(maxVoiceTimeMilliseconds, voiceTimeMilliseconds)\n\t\t}\n\t\t// now we have all the events, but if there are multiple voices then there may be events out of order or duplicated, so normalize it.\n\t\ttimingEvents = makeSortedArray(eventHash);\n\t\taddVerticalInfo(timingEvents);\n\t\taddEndPoints(this.lines, timingEvents)\n\t\ttimingEvents.push({ type: \"end\", milliseconds: maxVoiceTimeMilliseconds });\n\t\tthis.addUsefulCallbackInfo(timingEvents, bpm*warp);\n\t\treturn timingEvents;\n\t};\n\n\tthis.addUsefulCallbackInfo = function(timingEvents, bpm) {\n\t\tvar millisecondsPerMeasure = this.millisecondsPerMeasure(bpm);\n\t\tfor (var i = 0; i < timingEvents.length; i++) {\n\t\t\tvar ev = timingEvents[i];\n\t\t\tev.millisecondsPerMeasure = millisecondsPerMeasure;\n\t\t}\n\t};\n\n\tfunction skipTies(elements, index) {\n\t\twhile (index < elements.length && elements[index].left === null)\n\t\t\tindex++;\n\t\treturn elements[index];\n\t}\n\tfunction addEndPoints(lines, elements) {\n\t\tif (elements.length < 1)\n\t\t\treturn;\n\t\tfor (var i = 0; i < elements.length-1; i++) {\n\t\t\tvar el = elements[i];\n\t\t\tvar next = skipTies(elements, i+1);\n\t\t\tif (el.left !== null) {\n\t\t\t\t// If there is no left element that is because this is a tie so it should be skipped.\n\t\t\t\tvar endX = (next && el.top === next.top) ? next.left : lines[el.line].staffGroup.w;\n\t\t\t\t// If this is already set, it is because the notes aren't sequential here, like the next thing is a repeat bar line.\n\t\t\t\t// In that case, the right-most position is passed in. There could still be an intervening note in another voice, so always look for the closest position.\n\t\t\t\t// If there is a repeat that stays on the same line, the endX set above won't be right because the next note will be before. In that case, use the endX that was calculated.\n\t\t\t\tif (el.endX !== undefined) {\n\t\t\t\t\tif (endX > el.left)\n\t\t\t\t\t\tel.endX = Math.min(el.endX, endX);\n\t\t\t\t} else\n\t\t\t\t\tel.endX = endX;\n\t\t\t}\n\t\t}\n\t\tvar lastEl = elements[elements.length-1];\n\t\tlastEl.endX = lines[lastEl.line].staffGroup.w;\n\t}\n\n\tthis.getBpm = function(tempo) {\n\t\tvar bpm;\n\t\tif (tempo) {\n\t\t\tbpm = tempo.bpm;\n\t\t\tvar beatLength = this.getBeatLength();\n\t\t\tvar statedBeatLength = tempo.duration && tempo.duration.length > 0 ? tempo.duration[0] : beatLength;\n\t\t\tbpm = bpm * statedBeatLength / beatLength;\n\t\t}\n\t\tif (!bpm) {\n\t\t\tbpm = 180;\n\t\t\t// Compensate for compound meter, where the beat isn't a beat.\n\t\t\tvar meter = this.getMeterFraction();\n\t\t\tif (meter && meter.num !== 3 && (meter.num % 3 === 0)) {\n\t\t\t\tbpm = 120;\n\t\t\t}\n\t\t}\n\t\treturn bpm;\n\t};\n\n\tthis.setTiming = function (bpm, measuresOfDelay) {\n\t\tmeasuresOfDelay = measuresOfDelay || 0;\n\t\tif (!this.engraver || !this.engraver.staffgroups) {\n\t\t\tconsole.log(\"setTiming cannot be called before the tune is drawn.\");\n\t\t\tthis.noteTimings = [];\n\t\t\treturn this.noteTimings;\n\t\t}\n\n\t\tvar tempo = this.metaText ? this.metaText.tempo : null;\n\t\tvar naturalBpm = this.getBpm(tempo);\n\t\tvar warp = 1;\n\t\tif (bpm) {\n\t\t\tif (tempo)\n\t\t\t\twarp = bpm / naturalBpm;\n\t\t} else\n\t\t\tbpm = naturalBpm;\n\n\t\t// Calculate the basic midi data. We only care about the qpm variable here.\n\t\t//this.setUpAudio({qpm: bpm});\n\n\t\tvar beatLength = this.getBeatLength();\n\t\tvar beatsPerSecond = bpm / 60;\n\n\t\tvar measureLength = this.getBarLength();\n\n\t\tvar startingDelay = measureLength / beatLength * measuresOfDelay / beatsPerSecond;\n\t\tif (startingDelay)\n\t\t\tstartingDelay -= this.getPickupLength() / beatLength / beatsPerSecond;\n\t\tvar timeDivider = beatLength * beatsPerSecond;\n\n\t\tthis.noteTimings = this.setupEvents(startingDelay, timeDivider, bpm, warp);\n\t\tif (this.noteTimings.length > 0) {\n\t\t\tthis.totalTime = this.noteTimings[this.noteTimings.length - 1].milliseconds / 1000;\n\t\t\tthis.totalBeats = this.totalTime * beatsPerSecond;\n\t\t} else {\n\t\t\tthis.totalTime = undefined;\n\t\t\tthis.totalBeats = undefined;\n\t\t}\n\t\treturn this.noteTimings;\n\t};\n\n\tthis.setUpAudio = function(options) {\n\t\tif (!options) options = {};\n\t\tvar seq = sequence(this, options);\n\t\treturn flatten(seq, options, this.formatting.percmap, this.formatting.midi);\n\t};\n\tthis.deline = function(options) {\n\t\treturn delineTune(this.lines, options);\n\t}\n\tthis.findSelectableElement = function(target) {\n\t\tif (this.engraver && this.engraver.selectables)\n\t\t\treturn this.engraver.findSelectableElement(target)\n\t\treturn null\n\t}\n\tthis.getSelectableArray = function() {\n\t\tif (this.engraver && this.engraver.selectables)\n\t\t\treturn this.engraver.selectables\n\t\treturn []\n\t}\n};\n\nmodule.exports = Tune;\n","function delineTune(inputLines, options) {\n\tif (!options) options = {};\n\tvar lineBreaks = !!options.lineBreaks;\n\tvar outputLines = [];\n\tvar inMusicLine = false;\n\tvar currentMeter = [];\n\tvar currentKey = [];\n\tvar currentClef = [];\n\tvar currentVocalFont = [];\n\tvar currentGChordFont = [];\n\tvar currentTripletFont = [];\n\tvar currentAnnotationFont = [];\n\tfor (var i = 0; i < inputLines.length; i++) {\n\t\tvar inputLine = inputLines[i];\n\t\tif (inputLine.staff) {\n\t\t\tif (inMusicLine && !inputLine.vskip) {\n\t\t\t\tvar outputLine = outputLines[outputLines.length-1];\n\t\t\t\t//findMismatchKeys(inputLine, outputLine, [\"staff\", \"staffGroup\"], \"line\", i)\n\t\t\t\tfor (var s = 0; s < outputLine.staff.length; s++) {\n\t\t\t\t\tvar inputStaff = inputLine.staff[s];\n\t\t\t\t\tvar outputStaff = outputLine.staff[s];\n\t\t\t\t\tif (inputStaff) {\n\t\t\t\t\t\tif (!objEqual(inputStaff.meter, currentMeter[s])) {\n\t\t\t\t\t\t\t// The meter changed for this line, otherwise it wouldn't have been set\n\t\t\t\t\t\t\taddMeterToVoices(inputStaff.meter, inputStaff.voices)\n\t\t\t\t\t\t\tcurrentMeter[s] = inputStaff.meter;\n\t\t\t\t\t\t\tdelete inputStaff.meter;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.key, currentKey[s])) {\n\t\t\t\t\t\t\taddKeyToVoices(inputStaff.key, inputStaff.voices);\n\t\t\t\t\t\t\tcurrentKey[s] = inputStaff.key;\n\t\t\t\t\t\t\tdelete inputStaff.key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (inputStaff.title)\n\t\t\t\t\t\t\toutputStaff.abbrevTitle = inputStaff.title;\n\t\t\t\t\t\tif (!objEqual(inputStaff.clef, currentClef[s])) {\n\t\t\t\t\t\t\taddClefToVoices(inputStaff.clef, inputStaff.voices);\n\t\t\t\t\t\t\tcurrentClef[s] = inputStaff.clef;\n\t\t\t\t\t\t\tdelete inputStaff.clef;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.vocalfont, currentVocalFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.vocalfont, inputStaff.voices, 'vocalfont')\n\t\t\t\t\t\t\tcurrentVocalFont[s] = inputStaff.vocalfont;\n\t\t\t\t\t\t\tdelete inputStaff.vocalfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.gchordfont, currentGChordFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.gchordfont, inputStaff.voices, 'gchordfont')\n\t\t\t\t\t\t\tcurrentGChordFont[s] = inputStaff.gchordfont;\n\t\t\t\t\t\t\tdelete inputStaff.gchordfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.tripletfont, currentTripletFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.tripletfont, inputStaff.voices, 'tripletfont')\n\t\t\t\t\t\t\tcurrentTripletFont[s] = inputStaff.tripletfont;\n\t\t\t\t\t\t\tdelete inputStaff.tripletfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.annotationfont, currentAnnotationFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.annotationfont, inputStaff.voices, 'annotationfont')\n\t\t\t\t\t\t\tcurrentAnnotationFont[s] = inputStaff.annotationfont;\n\t\t\t\t\t\t\tdelete inputStaff.annotationfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//findMismatchKeys(inputStaff, outputStaff, [\"voices\", \"title\", \"abbrevTitle\", \"barNumber\", \"meter\", \"key\", \"clef\", \"vocalfont\", \"gchordfont\", \"tripletfont\", \"annotationfont\"], \"staff\", i + ' ' + s)\n\t\t\t\t\tif (inputStaff) {\n\t\t\t\t\t\tfor (var v = 0; v < outputStaff.voices.length; v++) {\n\t\t\t\t\t\t\tvar outputVoice = outputStaff.voices[v];\n\t\t\t\t\t\t\tvar inputVoice = inputStaff.voices[v];\n\t\t\t\t\t\t\tif (lineBreaks)\n\t\t\t\t\t\t\t\toutputVoice.push({el_type: \"break\"});\n\t\t\t\t\t\t\tif (inputVoice)\n\t\t\t\t\t\t\t\toutputStaff.voices[v] = outputVoice.concat(inputVoice)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var ii = 0; ii < inputLine.staff.length; ii++) {\n\t\t\t\t\tcurrentKey[ii] = inputLine.staff[ii].key;\n\t\t\t\t\tcurrentMeter[ii] = inputLine.staff[ii].meter;\n\t\t\t\t\tcurrentClef[ii] = inputLine.staff[ii].clef;\n\t\t\t\t}\n\t\t\t\t// copy this because we are going to change it and we don't want to change the original.\n\t\t\t\toutputLines.push(cloneLine(inputLine));\n\t\t\t}\n\t\t\tinMusicLine = true;\n\t\t} else {\n\t\t\tinMusicLine = false;\n\t\t\toutputLines.push(inputLine);\n\t\t}\n\t}\n\treturn outputLines;\n}\n// function findMismatchKeys(input, output, ignore, context, context2) {\n// \tif (!input) {\n// \t\treturn;\n// \t}\n// \tvar outputKeys = Object.keys(output);\n// \tvar inputKeys = Object.keys(input);\n// \tfor (var ii = 0; ii < ignore.length; ii++) {\n// \t\tif (outputKeys.indexOf(ignore[ii]) >= 0) {\n// \t\t\toutputKeys.splice(outputKeys.indexOf(ignore[ii]), 1);\n// \t\t}\n// \t\tif (inputKeys.indexOf(ignore[ii]) >= 0) {\n// \t\t\tinputKeys.splice(inputKeys.indexOf(ignore[ii]), 1);\n// \t\t}\n// \t}\n// \tif (inputKeys.join(\",\") !== outputKeys.join(\",\")) {\n// \t\tconsole.log(\"keys mismatch \"+context + ' ' + context2, input, output);\n// \t}\n// \tfor (var k = 0; k < inputKeys.length; k++) {\n// \t\tvar key = inputKeys[k];\n// \t\tif (ignore.indexOf(key) < 0) {\n// \t\t\tvar inputValue = JSON.stringify(input[key], replacer);\n// \t\t\tvar outputValue = JSON.stringify(output[key], replacer);\n// \t\t\tif (inputValue !== outputValue)\n// \t\t\t\tconsole.log(\"value mismatch \"+context + ' ' + context2 + ' ' + key, inputValue, outputValue)\n// \t\t}\n// \t}\n// }\nfunction replacer(key, value) {\n\t// Filtering out properties\n\tif (key === 'abselem') {\n\t\treturn 'abselem';\n\t}\n\treturn value;\n}\n\nfunction addMeterToVoices(meter, voices) {\n\tmeter.el_type = \"meter\";\n\tmeter.startChar = -1;\n\tmeter.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(meter);\n\t}\n}\n\nfunction addKeyToVoices(key, voices) {\n\tkey.el_type = \"key\";\n\tkey.startChar = -1;\n\tkey.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(key);\n\t}\n}\n\nfunction addClefToVoices(clef, voices) {\n\tclef.el_type = \"clef\";\n\tclef.startChar = -1;\n\tclef.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(clef);\n\t}\n}\n\nfunction addFontToVoices(font, voices, type) {\n\tfont.el_type = \"font\";\n\tfont.type = type;\n\tfont.startChar = -1;\n\tfont.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(font);\n\t}\n}\n\nfunction objEqual(input, output) {\n\tif (!input)\n\t\treturn true; // the default is whatever the old output is.\n\tvar inputValue = JSON.stringify(input, replacer);\n\tvar outputValue = JSON.stringify(output, replacer);\n\treturn inputValue === outputValue;\n}\n\nfunction cloneLine(line) {\n\tvar output = {};\n\tvar keys = Object.keys(line);\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tif (keys[i] !== \"staff\")\n\t\t\toutput[keys[i]] = line[keys[i]];\n\t\telse {\n\t\t\toutput.staff = [];\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = {};\n\t\t\t\tvar keys2 = Object.keys(line.staff[j]);\n\t\t\t\tfor (var k = 0; k < keys2.length; k++) {\n\t\t\t\t\tif (keys2[k] !== \"voices\")\n\t\t\t\t\t\tstaff[keys2[k]] = line.staff[j][keys2[k]];\n\t\t\t\t\telse {\n\t\t\t\t\t\tstaff.voices = [];\n\t\t\t\t\t\tfor (var v = 0; v < line.staff[j].voices.length; v++) {\n\t\t\t\t\t\t\tstaff.voices.push([].concat(line.staff[j].voices[v]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutput.staff.push(staff)\n\t\t\t}\n\t\t}\n\t}\n\treturn output;\n}\n\nmodule.exports = delineTune;\n","// abc_editor.js\n\n// window.ABCJS.Editor is the interface class for the area that contains the ABC text. It is responsible for\n// holding the text of the tune and calling the parser and the rendering engines.\n//\n// EditArea is an example of using a textarea as the control that is shown to the user. As long as\n// the same interface is used, window.ABCJS.Editor can use a different type of object.\n//\n// EditArea:\n// - constructor(textareaid)\n//\t\tThis contains the id of a textarea control that will be used.\n// - addSelectionListener(listener)\n//\t\tA callback class that contains the entry point fireSelectionChanged()\n// - addChangeListener(listener)\n//\t\tA callback class that contains the entry point fireChanged()\n// - getSelection()\n//\t\treturns the object { start: , end: } with the current selection in characters\n// - setSelection(start, end)\n//\t\tstart and end are the character positions that should be selected.\n// - getString()\n//\t\treturns the ABC text that is currently displayed.\n// - setString(str)\n//\t\tsets the ABC text that is currently displayed, and resets the initialText variable\n// - getElem()\n//\t\treturns the textarea element\n// - string initialText\n//\t\tContains the starting text. This can be compared against the current text to see if anything changed.\n//\n\n// Polyfill for CustomEvent for old IE versions\ntry {\n\tif (typeof window.CustomEvent !== \"function\") {\n\t\tvar CustomEvent = function (event, params) {\n\t\t\tparams = params || {bubbles: false, cancelable: false, detail: undefined};\n\t\t\tvar evt = document.createEvent('CustomEvent');\n\t\t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n\t\t\treturn evt;\n\t\t};\n\t\tCustomEvent.prototype = window.Event.prototype;\n\t\twindow.CustomEvent = CustomEvent;\n\t}\n} catch (e) {\n\t// if we aren't in a browser, this code will crash, but it is not needed then either.\n}\n\nvar EditArea = function(textareaid) {\n if (typeof textareaid === \"string\")\n this.textarea = document.getElementById(textareaid);\n else\n this.textarea = textareaid;\n this.initialText = this.textarea.value;\n this.isDragging = false;\n}\n\nEditArea.prototype.addSelectionListener = function(listener) {\n this.textarea.onmousemove = function(ev) {\n\t if (this.isDragging)\n\t listener.fireSelectionChanged();\n };\n};\n\nEditArea.prototype.addChangeListener = function(listener) {\n this.changelistener = listener;\n this.textarea.onkeyup = function() {\n listener.fireChanged();\n };\n this.textarea.onmousedown = function() {\n\tthis.isDragging = true;\n listener.fireSelectionChanged();\n };\n this.textarea.onmouseup = function() {\n\tthis.isDragging = false;\n listener.fireChanged();\n };\n this.textarea.onchange = function() {\n listener.fireChanged();\n };\n};\n\n//TODO won't work under IE?\nEditArea.prototype.getSelection = function() {\n return {start: this.textarea.selectionStart, end: this.textarea.selectionEnd};\n};\n\nEditArea.prototype.setSelection = function(start, end) {\n\tif(this.textarea.setSelectionRange)\n\t this.textarea.setSelectionRange(start, end);\n\telse if(this.textarea.createTextRange) {\n\t\t// For IE8\n\t var e = this.textarea.createTextRange();\n\t e.collapse(true);\n\t e.moveEnd('character', end);\n\t e.moveStart('character', start);\n\t e.select();\n\t}\n this.textarea.focus();\n};\n\nEditArea.prototype.getString = function() {\n return this.textarea.value;\n};\n\nEditArea.prototype.setString = function(str) {\n this.textarea.value = str;\n this.initialText = this.getString();\n if (this.changelistener) {\n this.changelistener.fireChanged();\n }\n};\n\nEditArea.prototype.getElem = function() {\n return this.textarea;\n};\n\nmodule.exports = EditArea;\n","// window.ABCJS.Editor:\n//\n// constructor(editarea, params)\n//\t\tif editarea is a string, then it is an HTML id of a textarea control.\n//\t\tOtherwise, it should be an instantiation of an object that expresses the EditArea interface.\n//\n//\t\tparams is a hash of:\n//\t\tcanvas_id: or paper_id: HTML id to draw in. If not present, then the drawing happens just below the editor.\n//\t\tgenerate_midi: if present, then midi is generated.\n//\t\tmidi_id: if present, the HTML id to place the midi control. Otherwise it is placed in the same div as the paper.\n//\t\tmidi_download_id: if present, the HTML id to place the midi download link. Otherwise it is placed in the same div as the paper.\n//\t\tgenerate_warnings: if present, then parser warnings are displayed on the page.\n//\t\twarnings_id: if present, the HTML id to place the warnings. Otherwise they are placed in the same div as the paper.\n//\t\tonchange: if present, the callback function to call whenever there has been a change.\n//\t\tgui: if present, the paper can send changes back to the editor (presumably because the user changed something directly.)\n//\t\tparser_options: options to send to the parser engine.\n//\t\tmidi_options: options to send to the midi engine.\n//\t\trender_options: options to send to the render engine.\n//\t\tindicate_changed: the dirty flag is set if this is true.\n//\n// - setReadOnly(bool)\n//\t\tadds or removes the class abc_textarea_readonly, and adds or removes the attribute readonly=yes\n// - setDirtyStyle(bool)\n//\t\tadds or removes the class abc_textarea_dirty\n// - modelChanged()\n//\t\tCalled when the model has been changed to trigger re-rendering\n// - parseABC()\n//\t\tCalled internally by fireChanged()\n//\t\treturns true if there has been a change since last call.\n// - updateSelection()\n//\t\tCalled when the user has changed the selection. This calls the engraver to show the selection.\n// - fireSelectionChanged()\n//\t\tCalled by the textarea object when the user has changed the selection.\n// - paramChanged(engraverparams)\n//\t\tCalled to signal that the engraver params have changed, so re-rendering should occur.\n// - fireChanged()\n//\t\tCalled by the textarea object when the user has changed something.\n// - setNotDirty()\n//\t\tCalled by the client app to reset the dirty flag\n// - isDirty()\n//\t\tReturns true or false, whether the textarea contains the same text that it started with.\n// - highlight(abcelem)\n//\t\tCalled by the engraver to highlight an area.\n// - pause(bool)\n//\t\tStops the automatic rendering when the user is typing.\n//\nvar parseCommon = require('../parse/abc_common');\nvar SynthController = require('../synth/synth-controller');\nvar supportsAudio = require('../synth/supports-audio');\nvar renderAbc = require('../api/abc_tunebook_svg');\nvar EditArea = require('./abc_editarea');\n\nfunction gatherAbcParams(params) {\n\t// There used to be a bunch of ways parameters can be passed in. This just simplifies it.\n\tvar abcjsParams = {};\n\tvar key;\n\tif (params.abcjsParams) {\n\t\tfor (key in params.abcjsParams) {\n\t\t\tif (params.abcjsParams.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.abcjsParams[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.midi_options) {\n\t\tfor (key in params.midi_options) {\n\t\t\tif (params.midi_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.midi_options[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.parser_options) {\n\t\tfor (key in params.parser_options) {\n\t\t\tif (params.parser_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.parser_options[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.render_options) {\n\t\tfor (key in params.render_options) {\n\t\t\tif (params.render_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.render_options[key];\n\t\t\t}\n\t\t}\n\t}\n\t/*\n\tif (params.tablature_options) {\n\t\tabcjsParams['tablatures'] = params.tablature_options;\n\t}\n\t*/\n\tif (abcjsParams.tablature) {\n\t\tif (params.warnings_id) {\n\t\t\t// store for plugin error handling\n\t\t\tabcjsParams.tablature.warnings_id = params.warnings_id;\n\t\t}\n\t}\n\treturn abcjsParams;\n}\n\nvar Editor = function(editarea, params) {\n\t// Copy all the options that will be passed through\n\tthis.abcjsParams = gatherAbcParams(params);\n\n\tif (params.indicate_changed)\n\t\tthis.indicate_changed = true;\n if (typeof editarea === \"string\") {\n this.editarea = new EditArea(editarea);\n } else {\n this.editarea = editarea;\n }\n this.editarea.addSelectionListener(this);\n this.editarea.addChangeListener(this);\n\n if (params.canvas_id) {\n this.div = params.canvas_id;\n } else if (params.paper_id) {\n this.div = params.paper_id;\n } else {\n this.div = document.createElement(\"DIV\");\n this.editarea.getElem().parentNode.insertBefore(this.div, this.editarea.getElem());\n }\n if (typeof this.div === 'string')\n\t this.div = document.getElementById(this.div);\n\n if (params.selectionChangeCallback) {\n \tthis.selectionChangeCallback = params.selectionChangeCallback;\n }\n\n this.clientClickListener = this.abcjsParams.clickListener;\n this.abcjsParams.clickListener = this.highlight.bind(this);\n\n if (params.synth) {\n \tif (supportsAudio()) {\n\t this.synth = {\n\t\t el: params.synth.el,\n\t\t cursorControl: params.synth.cursorControl,\n\t\t options: params.synth.options\n\t };\n }\n }\n\t// If the user wants midi, then store the elements that it will be written to. The element could either be passed in as an id,\n\t// an element, or nothing. If nothing is passed in, then just put the midi on top of the generated music.\n\tif (params.generate_midi) {\n\t \tthis.generate_midi = params.generate_midi;\n\t\tif (this.abcjsParams.generateDownload) {\n\t\t\tif (typeof params.midi_download_id === 'string')\n\t\t\t\tthis.downloadMidi = document.getElementById(params.midi_download_id);\n\t\t\telse if (params.midi_download_id) // assume, if the var is not a string it is an element. If not, it will crash soon enough.\n\t\t\t\tthis.downloadMidi = params.midi_download_id;\n\t\t}\n\t\tif (this.abcjsParams.generateInline !== false) { // The default for this is true, so undefined is also true.\n\t\t\tif (typeof params.midi_id === 'string')\n\t\t\t\tthis.inlineMidi = document.getElementById(params.midi_id);\n\t\t\telse if (params.midi_id) // assume, if the var is not a string it is an element. If not, it will crash soon enough.\n\t\t\t\tthis.inlineMidi = params.midi_id;\n\t\t}\n\t}\n\n if (params.warnings_id) {\n \tif (typeof(params.warnings_id) === \"string\")\n this.warningsdiv = document.getElementById(params.warnings_id);\n \telse\n\t\tthis.warningsdiv = params.warnings_id;\n } else if (params.generate_warnings) {\n\t this.warningsdiv = document.createElement(\"div\");\n\t this.div.parentNode.insertBefore(this.warningsdiv, this.div);\n }\n\n this.onchangeCallback = params.onchange;\n\n this.currentAbc = \"\";\n this.tunes = [];\n this.bReentry = false;\n this.parseABC();\n this.modelChanged();\n\n this.addClassName = function(element, className) {\n var hasClassName = function(element, className) {\n var elementClassName = element.className;\n return (elementClassName.length > 0 && (elementClassName === className ||\n new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n };\n\n if (!hasClassName(element, className))\n element.className += (element.className ? ' ' : '') + className;\n return element;\n };\n\n this.removeClassName = function(element, className) {\n element.className = parseCommon.strip(element.className.replace(\n new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' '));\n return element;\n };\n\n this.setReadOnly = function(readOnly) {\n\t var readonlyClass = 'abc_textarea_readonly';\n\t var el = this.editarea.getElem();\n if (readOnly) {\n el.setAttribute('readonly', 'yes');\n\t this.addClassName(el, readonlyClass);\n\t} else {\n el.removeAttribute('readonly');\n\t this.removeClassName(el, readonlyClass);\n }\n };\n};\n\nEditor.prototype.redrawMidi = function() {\n\tif (this.generate_midi && !this.midiPause) {\n\t\tvar event = new window.CustomEvent(\"generateMidi\", {\n\t\t\tdetail: {\n\t\t\t\ttunes: this.tunes,\n\t\t\t\tabcjsParams: this.abcjsParams,\n\t\t\t\tdownloadMidiEl: this.downloadMidi,\n\t\t\t\tinlineMidiEl: this.inlineMidi,\n\t\t\t\tengravingEl: this.div\n\t\t\t}\n\t\t});\n\t\twindow.dispatchEvent(event);\n\t}\n\tif (this.synth) {\n\t\tvar userAction = this.synth.synthControl; // Can't really tell if there was a user action before drawing, but we assume that if the synthControl was created already there was a user action.\n\t\tif (!this.synth.synthControl) {\n\t\t\tthis.synth.synthControl = new SynthController();\n\t\t\tthis.synth.synthControl.load(this.synth.el, this.synth.cursorControl, this.synth.options);\n\t\t}\n\t\tthis.synth.synthControl.setTune(this.tunes[0], userAction, this.synth.options);\n\t}\n};\n\nEditor.prototype.modelChanged = function() {\n if (this.bReentry)\n return; // TODO is this likely? maybe, if we rewrite abc immediately w/ abc2abc\n\tthis.bReentry = true;\n\ttry {\n\t\tthis.timerId = null;\n\t\tif (this.synth && this.synth.synthControl)\n\t\t\tthis.synth.synthControl.disable(true);\n\n\t\tthis.tunes = renderAbc(this.div, this.currentAbc, this.abcjsParams);\n\t\tif (this.tunes.length > 0) {\n\t\t\tthis.warnings = this.tunes[0].warnings;\n\t\t}\n\t\tthis.redrawMidi();\n\t} catch(error) {\n\t\tconsole.error(\"ABCJS error: \", error);\n\t\tif (!this.warnings)\n\t\t\tthis.warnings = [];\n\t\tthis.warnings.push(error.message);\n\t}\n\n if (this.warningsdiv) {\n this.warningsdiv.innerHTML = (this.warnings) ? this.warnings.join(\"
\") : \"No errors\";\n }\n this.updateSelection();\n this.bReentry = false;\n};\n\n// Call this to reparse in response to the client changing the parameters on the fly\nEditor.prototype.paramChanged = function(engraverParams) {\n\tif (engraverParams) {\n\t\tfor (var key in engraverParams) {\n\t\t\tif (engraverParams.hasOwnProperty(key)) {\n\t\t\t\tthis.abcjsParams[key] = engraverParams[key];\n\t\t\t}\n\t\t}\n\t}\n\tthis.currentAbc = \"\";\n\tthis.fireChanged();\n};\n\nEditor.prototype.synthParamChanged = function(options) {\n\tif (!this.synth)\n\t\treturn;\n\tthis.synth.options = {};\n\tif (options) {\n\t\tfor (var key in options) {\n\t\t\tif (options.hasOwnProperty(key)) {\n\t\t\t\tthis.synth.options[key] = options[key];\n\t\t\t}\n\t\t}\n\t}\n\tthis.currentAbc = \"\";\n\tthis.fireChanged();\n};\n\n// return true if the model has changed\nEditor.prototype.parseABC = function() {\n var t = this.editarea.getString();\n if (t===this.currentAbc) {\n this.updateSelection();\n return false;\n }\n\n this.currentAbc = t;\n return true;\n};\n\nEditor.prototype.updateSelection = function() {\n var selection = this.editarea.getSelection();\n try {\n \tif (this.tunes.length > 0 && this.tunes[0].engraver)\n\t this.tunes[0].engraver.rangeHighlight(selection.start, selection.end);\n } catch (e) {} // maybe printer isn't defined yet?\n\tif (this.selectionChangeCallback)\n\t\tthis.selectionChangeCallback(selection.start, selection.end);\n};\n\n// Called when the textarea's selection is in the process of changing (after mouse down, dragging, or keyboard arrows)\nEditor.prototype.fireSelectionChanged = function() {\n this.updateSelection();\n};\n\nEditor.prototype.setDirtyStyle = function(isDirty) {\n\tif (this.indicate_changed === undefined)\n\t\treturn;\n var addClassName = function(element, className) {\n var hasClassName = function(element, className) {\n var elementClassName = element.className;\n return (elementClassName.length > 0 && (elementClassName === className ||\n new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n };\n\n if (!hasClassName(element, className))\n element.className += (element.className ? ' ' : '') + className;\n return element;\n };\n\n var removeClassName = function(element, className) {\n element.className = parseCommon.strip(element.className.replace(\n new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' '));\n return element;\n };\n\n\tvar readonlyClass = 'abc_textarea_dirty';\n\tvar el = this.editarea.getElem();\n\tif (isDirty) {\n\t\taddClassName(el, readonlyClass);\n\t} else {\n\t\tremoveClassName(el, readonlyClass);\n }\n};\n\n// call when the textarea alerts us that the abc text is changed and needs re-parsing\nEditor.prototype.fireChanged = function() {\n if (this.bIsPaused)\n return;\n if (this.parseABC()) {\n var self = this;\n if (this.timerId)\t// If the user is still typing, cancel the update\n clearTimeout(this.timerId);\n this.timerId = setTimeout(function () {\n self.modelChanged();\n }, 300);\t// Is this a good compromise between responsiveness and not redrawing too much?\n\t var isDirty = this.isDirty();\n\t if (this.wasDirty !== isDirty) {\n\t\t this.wasDirty = isDirty;\n\t\t this.setDirtyStyle(isDirty);\n\t }\n\t if (this.onchangeCallback)\n\t\t this.onchangeCallback(this);\n\t }\n};\n\nEditor.prototype.setNotDirty = function() {\n\tthis.editarea.initialText = this.editarea.getString();\n\tthis.wasDirty = false;\n\tthis.setDirtyStyle(false);\n};\n\nEditor.prototype.isDirty = function() {\n\tif (this.indicate_changed === undefined)\n\t\treturn false;\n\treturn this.editarea.initialText !== this.editarea.getString();\n};\n\nEditor.prototype.highlight = function(abcelem, tuneNumber, classes, analysis, drag, mouseEvent) {\n\t// TODO-PER: The marker appears to get off by one for each tune parsed. I'm not sure why, but adding the tuneNumber in corrects it for the time being.\n//\tvar offset = (tuneNumber !== undefined) ? this.startPos[tuneNumber] + tuneNumber : 0;\n\n this.editarea.setSelection(abcelem.startChar, abcelem.endChar);\n\tif (this.selectionChangeCallback)\n\t\tthis.selectionChangeCallback(abcelem.startChar, abcelem.endChar);\n\tif (this.clientClickListener)\n\t\tthis.clientClickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent);\n};\n\nEditor.prototype.pause = function(shouldPause) {\n\tthis.bIsPaused = shouldPause;\n\tif (!shouldPause)\n\t\tthis.fireChanged();\n};\n\nEditor.prototype.millisecondsPerMeasure = function() {\n\tif (!this.synth || !this.synth.synthControl || !this.synth.synthControl.visualObj)\n\t\treturn 0;\n\treturn this.synth.synthControl.visualObj.millisecondsPerMeasure();\n};\n\nEditor.prototype.pauseMidi = function(shouldPause) {\n\tthis.midiPause = shouldPause;\n\tif (!shouldPause)\n\t\tthis.redrawMidi();\n};\n\nmodule.exports = Editor;\n","// abc_midi_create.js: Turn a linear series of events into a midi file.\n\nvar rendererFactory = require('../synth/abc_midi_renderer');\n\nvar create;\n\n(function() {\n\t\"use strict\";\n\n\tvar baseDuration = 480*4; // nice and divisible, equals 1 whole note\n\n\tcreate = function create(abcTune, options) {\n\t\tif (options === undefined) options = {};\n\t\tvar commands = abcTune.setUpAudio(options);\n\t\tvar midi = rendererFactory();\n\t\tvar title = abcTune.metaText ? abcTune.metaText.title : undefined;\n\t\tif (title && title.length > 128) title = title.substring(0, 124) + '...';\n\t\tvar key = abcTune.getKeySignature();\n\t\tvar time = abcTune.getMeterFraction();\n\n\t\t// MAE 7 July 2024 - Fix for */8 meter tempos\n\t\tvar tempo = commands.tempo;\n\n\t\tvar beatsPerSecond = tempo / 60;\n\n\t\t// Fix tempo for */8 meters\n\t\tif (time.den == 8){\n\n\t\t\t// Compute the tempo based on the actual milliseconds per measure, scaled by the number of eight notes and halved to get tempo in bpm.\n\t\t\tvar msPerMeasure = abcTune.millisecondsPerMeasure();\n\t\t\t\n\t\t\ttempo = (60000 / (msPerMeasure/time.num)) / 2;\n\t\t\t\n\t\t\tbeatsPerSecond = tempo/60;\n\n\t\t}\n\n\t\t//var beatLength = abcTune.getBeatLength();\n\t\tmidi.setGlobalInfo(tempo, title, key, time);\n\t\t\n\t\tfor (var i = 0; i < commands.tracks.length; i++) {\n\t\t\tmidi.startTrack();\n\t\t\tvar notePlacement = {};\n\t\t\tfor (var j = 0; j < commands.tracks[i].length; j++) {\n\t\t\t\tvar event = commands.tracks[i][j];\n\t\t\t\tswitch (event.cmd) {\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\tmidi.setText(event.type, event.text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'program':\n\t\t\t\t\t\tvar pan = 0;\n\t\t\t\t\t\tif (options.pan && options.pan.length > i)\n\t\t\t\t\t\t\tpan = options.pan[i];\n\t\t\t\t\t\tif (event.instrument === 128) {\n\t\t\t\t\t\t\t// If we're using the percussion voice, change to Channel 10\n\t\t\t\t\t\t\tmidi.setChannel(9, pan);\n\t\t\t\t\t\t\tmidi.setInstrument(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmidi.setChannel(event.channel, pan);\n\t\t\t\t\t\t\tmidi.setInstrument(event.instrument);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'note':\n\t\t\t\t\t\tvar gapLengthInBeats = event.gap * beatsPerSecond;\n\t\t\t\t\t\tvar start = event.start;\n\t\t\t\t\t\t// The staccato and legato are indicated by event.gap.\n\t\t\t\t\t\t// event.gap is in seconds but the durations are in whole notes.\n\t\t\t\t\t\tvar end = start + event.duration - gapLengthInBeats;\n\t\t\t\t\t\tif (!notePlacement[start])\n\t\t\t\t\t\t\tnotePlacement[start] = [];\n\t\t\t\t\t\tnotePlacement[start].push({ pitch: event.pitch, volume: event.volume, cents: event.cents });\n\t\t\t\t\t\tif (!notePlacement[end])\n\t\t\t\t\t\t\tnotePlacement[end] = [];\n\t\t\t\t\t\tnotePlacement[end].push({ pitch: event.pitch, volume: 0 });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.log(\"MIDI create Unknown: \" + event.cmd);\n\t\t\t\t}\n\t\t\t}\n\t\t\taddNotes(midi, notePlacement, baseDuration);\n\t\t\tmidi.endTrack();\n\t\t}\n\n\t\treturn midi.getData();\n\t};\n\n\tfunction addNotes(midi, notePlacement, baseDuration) {\n\t\tvar times = Object.keys(notePlacement);\n\t\tfor (var h = 0; h < times.length; h++)\n\t\t\ttimes[h] = parseFloat(times[h]);\n\t\ttimes.sort(function(a,b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tvar lastTime = 0;\n\t\tfor (var i = 0; i < times.length; i++) {\n\t\t\tvar events = notePlacement[times[i]];\n\t\t\tif (times[i] > lastTime) {\n\t\t\t\tvar distance = (times[i] - lastTime) * baseDuration;\n\t\t\t\tmidi.addRest(distance);\n\t\t\t\tlastTime = times[i];\n\t\t\t}\n\t\t\tfor (var j = 0; j < events.length; j++) {\n\t\t\t\tvar event = events[j];\n\t\t\t\tif (event.volume) {\n\t\t\t\t\tmidi.startNote(event.pitch, event.volume, event.cents);\n\t\t\t\t} else {\n\t\t\t\t\tmidi.endNote(event.pitch);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n})();\n\nmodule.exports = create;\n","// abc_common.js: Some common utility functions.\n\nvar parseCommon = {};\n\nparseCommon.cloneArray = function(source) {\n\tvar destination = [];\n\tfor (var i = 0; i < source.length; i++) {\n\t\tdestination.push(Object.assign({},source[i]));\n\t}\n\treturn destination;\n};\n\nparseCommon.cloneHashOfHash = function(source) {\n\tvar destination = {};\n\tfor (var property in source)\n\t\tif (source.hasOwnProperty(property))\n\t\t\tdestination[property] = Object.assign({},source[property]);\n\treturn destination;\n};\n\nparseCommon.cloneHashOfArrayOfHash = function(source) {\n\tvar destination = {};\n\tfor (var property in source)\n\t\tif (source.hasOwnProperty(property))\n\t\t\tdestination[property] = parseCommon.cloneArray(source[property]);\n\treturn destination;\n};\n\nparseCommon.strip = function(str) {\n\treturn str.replace(/^\\s+/, '').replace(/\\s+$/, '');\n};\n\nparseCommon.startsWith = function(str, pattern) {\n\treturn str.indexOf(pattern) === 0;\n};\n\nparseCommon.endsWith = function(str, pattern) {\n\tvar d = str.length - pattern.length;\n\treturn d >= 0 && str.lastIndexOf(pattern) === d;\n};\n\nparseCommon.last = function(arr) {\n\tif (arr.length === 0)\n\t\treturn null;\n\treturn arr[arr.length-1];\n};\n\n\nmodule.exports = parseCommon;\n","// abc_parse.js: parses a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = require('./abc_common');\nvar parseDirective = require('./abc_parse_directive');\nvar ParseHeader = require('./abc_parse_header');\nvar ParseMusic = require('./abc_parse_music');\nvar Tokenizer = require('./abc_tokenizer');\nvar wrap = require('./wrap_lines');\n\nvar Tune = require('../data/abc_tune');\nvar TuneBuilder = require('../parse/tune-builder');\n\nvar Parse = function() {\n\t\"use strict\";\n\tvar tune = new Tune();\n\tvar tuneBuilder = new TuneBuilder(tune);\n\tvar tokenizer;\n\tvar wordsContinuation = '';\n\tvar symbolContinuation = '';\n\n\tthis.getTune = function() {\n\t\tvar t = {\n\t\t\tformatting: tune.formatting,\n\t\t\tlines: tune.lines,\n\t\t\tmedia: tune.media,\n\t\t\tmetaText: tune.metaText,\n\t\t\tmetaTextInfo: tune.metaTextInfo,\n\t\t\tversion: tune.version,\n\n\t\t\taddElementToEvents: tune.addElementToEvents,\n\t\t\taddUsefulCallbackInfo: tune.addUsefulCallbackInfo,\n\t\t\tgetTotalTime: tune.getTotalTime,\n\t\t\tgetTotalBeats: tune.getTotalBeats,\n\t\t\tgetBarLength: tune.getBarLength,\n\t\t\tgetBeatLength: tune.getBeatLength,\n\t\t\tgetBeatsPerMeasure: tune.getBeatsPerMeasure,\n\t\t\tgetBpm: tune.getBpm,\n\t\t\tgetMeter: tune.getMeter,\n\t\t\tgetMeterFraction: tune.getMeterFraction,\n\t\t\tgetPickupLength: tune.getPickupLength,\n\t\t\tgetKeySignature: tune.getKeySignature,\n\t\t\tgetElementFromChar: tune.getElementFromChar,\n\t\t\tmakeVoicesArray: tune.makeVoicesArray,\n\t\t\tmillisecondsPerMeasure: tune.millisecondsPerMeasure,\n\t\t\tsetupEvents: tune.setupEvents,\n\t\t\tsetTiming: tune.setTiming,\n\t\t\tsetUpAudio: tune.setUpAudio,\n\t\t\tdeline: tune.deline,\n\t\t\tfindSelectableElement: tune.findSelectableElement,\n\t\t\tgetSelectableArray: tune.getSelectableArray,\n\t\t};\n\t\tif (tune.lineBreaks)\n\t\t\tt.lineBreaks = tune.lineBreaks;\n\t\tif (tune.visualTranspose)\n\t\t\tt.visualTranspose = tune.visualTranspose;\n\t\treturn t;\n\t};\n\n\tfunction addPositioning(el, type, value) {\n\t\tif (!el.positioning) el.positioning = {};\n\t\tel.positioning[type] = value;\n\t}\n\n\tfunction addFont(el, type, value) {\n\t\tif (!el.fonts) el.fonts = {};\n\t\tel.fonts[type] = value;\n\t}\n\n\tvar multilineVars = {\n\t\treset: function() {\n\t\t\tfor (var property in this) {\n\t\t\t\tif (this.hasOwnProperty(property) && typeof this[property] !== \"function\") {\n\t\t\t\t\tdelete this[property];\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.iChar = 0;\n\t\t\tthis.key = {accidentals: [], root: 'none', acc: '', mode: '' };\n\t\t\tthis.meter = null; // if no meter is specified, free meter is assumed\n\t\t\tthis.origMeter = null;\t// this is for new voices that are created after we set the meter.\n\t\t\tthis.hasMainTitle = false;\n\t\t\tthis.default_length = 0.125;\n\t\t\tthis.clef = { type: 'treble', verticalPos: 0 };\n\t\t\tthis.octave = 0;\n\t\t\tthis.next_note_duration = 0;\n\t\t\tthis.start_new_line = true;\n\t\t\tthis.is_in_header = true;\n\t\t\tthis.partForNextLine = {};\n\t\t\tthis.tempoForNextLine = [];\n\t\t\tthis.havent_set_length = true;\n\t\t\tthis.voices = {};\n\t\t\tthis.staves = [];\n\t\t\tthis.macros = {};\n\t\t\tthis.currBarNumber = 1;\n\t\t\tthis.barCounter = {};\n\t\t\tthis.ignoredDecorations = [];\n\t\t\tthis.score_is_present = false;\t// Can't have original V: lines when there is the score directive\n\t\t\tthis.inEnding = false;\n\t\t\tthis.inTie = [];\n\t\t\tthis.inTieChord = {};\n\t\t\tthis.vocalPosition = \"auto\";\n\t\t\tthis.dynamicPosition = \"auto\";\n\t\t\tthis.chordPosition = \"auto\";\n\t\t\tthis.ornamentPosition = \"auto\";\n\t\t\tthis.volumePosition = \"auto\";\n\t\t\tthis.openSlurs = [];\n\t\t\tthis.freegchord = false;\n\t\t\tthis.endingHoldOver = {};\n\t\t},\n\t\tdifferentFont: function(type, defaultFonts) {\n\t\t\tif (this[type].decoration !== defaultFonts[type].decoration) return true;\n\t\t\tif (this[type].face !== defaultFonts[type].face) return true;\n\t\t\tif (this[type].size !== defaultFonts[type].size) return true;\n\t\t\tif (this[type].style !== defaultFonts[type].style) return true;\n\t\t\tif (this[type].weight !== defaultFonts[type].weight) return true;\n\t\t\treturn false;\n\t\t},\n\t\taddFormattingOptions: function(el, defaultFonts, elType) {\n\t\t\tif (elType === 'note') {\n\t\t\t\tif (this.vocalPosition !== 'auto') addPositioning(el, 'vocalPosition', this.vocalPosition);\n\t\t\t\tif (this.dynamicPosition !== 'auto') addPositioning(el, 'dynamicPosition', this.dynamicPosition);\n\t\t\t\tif (this.chordPosition !== 'auto') addPositioning(el, 'chordPosition', this.chordPosition);\n\t\t\t\tif (this.ornamentPosition !== 'auto') addPositioning(el, 'ornamentPosition', this.ornamentPosition);\n\t\t\t\tif (this.volumePosition !== 'auto') addPositioning(el, 'volumePosition', this.volumePosition);\n\t\t\t\tif (this.differentFont(\"annotationfont\", defaultFonts)) addFont(el, 'annotationfont', this.annotationfont);\n\t\t\t\tif (this.differentFont(\"gchordfont\", defaultFonts)) addFont(el, 'gchordfont', this.gchordfont);\n\t\t\t\tif (this.differentFont(\"vocalfont\", defaultFonts)) addFont(el, 'vocalfont', this.vocalfont);\n\t\t\t\tif (this.differentFont(\"tripletfont\", defaultFonts)) addFont(el, 'tripletfont', this.tripletfont);\n\t\t\t} else if (elType === 'bar') {\n\t\t\t\tif (this.dynamicPosition !== 'auto') addPositioning(el, 'dynamicPosition', this.dynamicPosition);\n\t\t\t\tif (this.chordPosition !== 'auto') addPositioning(el, 'chordPosition', this.chordPosition);\n\t\t\t\tif (this.ornamentPosition !== 'auto') addPositioning(el, 'ornamentPosition', this.ornamentPosition);\n\t\t\t\tif (this.volumePosition !== 'auto') addPositioning(el, 'volumePosition', this.volumePosition);\n\t\t\t\tif (this.differentFont(\"measurefont\", defaultFonts)) addFont(el, 'measurefont', this.measurefont);\n\t\t\t\tif (this.differentFont(\"repeatfont\", defaultFonts)) addFont(el, 'repeatfont', this.repeatfont);\n\t\t\t}\n\t\t},\n\t\tduplicateStartEndingHoldOvers: function() {\n\t\t\tthis.endingHoldOver = {\n\t\t\t\tinTie: [],\n\t\t\t\tinTieChord: {}\n\t\t\t};\n\t\t\tfor (var i = 0; i < this.inTie.length; i++) {\n\t\t\t\tthis.endingHoldOver.inTie.push([]);\n\t\t\t\tif (this.inTie[i]) { // if a voice is suppressed there might be a gap in the array.\n\t\t\t\t\tfor (var j = 0; j < this.inTie[i].length; j++) {\n\t\t\t\t\t\tthis.endingHoldOver.inTie[i].push(this.inTie[i][j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in this.inTieChord) {\n\t\t\t\tif (this.inTieChord.hasOwnProperty(key))\n\t\t\t\t\tthis.endingHoldOver.inTieChord[key] = this.inTieChord[key];\n\t\t\t}\n\t\t},\n\t\trestoreStartEndingHoldOvers: function() {\n\t\t\tif (!this.endingHoldOver.inTie)\n\t\t\t\treturn;\n\t\t\tthis.inTie = [];\n\t\t\tthis.inTieChord = {};\n\t\t\tfor (var i = 0; i < this.endingHoldOver.inTie.length; i++) {\n\t\t\t\tthis.inTie.push([]);\n\t\t\t\tfor (var j = 0; j < this.endingHoldOver.inTie[i].length; j++) {\n\t\t\t\t\tthis.inTie[i].push(this.endingHoldOver.inTie[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in this.endingHoldOver.inTieChord) {\n\t\t\t\tif (this.endingHoldOver.inTieChord.hasOwnProperty(key))\n\t\t\t\t\tthis.inTieChord[key] = this.endingHoldOver.inTieChord[key];\n\t\t\t}\n\t\t},\n\t};\n\n\tvar addWarning = function(str) {\n\t\tif (!multilineVars.warnings)\n\t\t\tmultilineVars.warnings = [];\n\t\tmultilineVars.warnings.push(str);\n\t};\n\n\tvar addWarningObject = function(warningObject) {\n\t\tif (!multilineVars.warningObjects)\n\t\t\tmultilineVars.warningObjects = [];\n\t\tmultilineVars.warningObjects.push(warningObject);\n\t};\n\n\tvar encode = function(str) {\n\t\tvar ret = str.replace(/\\x12/g, ' ');\n\t\tret = ret.replace(/&/g, '&');\n\t\tret = ret.replace(//g, '>');\n\t};\n\n\tvar warn = function(str, line, col_num) {\n\t\tif (!line) line = \" \";\n\t\tvar bad_char = line[col_num];\n\t\tif (bad_char === ' ' || !bad_char)\n\t\t\tbad_char = \"SPACE\";\n\t\tvar clean_line = encode(line.substring(col_num - 64, col_num)) + '' + bad_char + '' + encode(line.substring(col_num + 1).substring(0,64));\n\t\taddWarning(\"Music Line:\" + tokenizer.lineIndex + \":\" + (col_num+1) + ': ' + str + \": \" + clean_line);\n\t\taddWarningObject({message:str, line:line, startChar: multilineVars.iChar + col_num, column: col_num});\n\t};\n\n\tvar header;\n\tvar music;\n\n\tthis.getWarnings = function() {\n\t\treturn multilineVars.warnings;\n\t};\n\tthis.getWarningObjects = function() {\n\t\treturn multilineVars.warningObjects;\n\t};\n\n\tvar addWords = function(line, words) {\n\t\tif (words.indexOf('\\x12') >= 0) {\n\t\t\twordsContinuation += words\n\t\t\treturn\n\t\t}\n\t\twords = wordsContinuation + words\n\t\twordsContinuation = ''\n\n\t\tif (!line) { warn(\"Can't add words before the first line of music\", line, 0); return; }\n\t\twords = parseCommon.strip(words);\n\t\tif (words[words.length-1] !== '-')\n\t\t\twords = words + ' ';\t// Just makes it easier to parse below, since every word has a divider after it.\n\t\tvar word_list = [];\n\t\t// first make a list of words from the string we are passed. A word is divided on either a space or dash.\n\t\tvar last_divider = 0;\n\t\tvar replace = false;\n\t\tvar addWord = function(i) {\n\t\t\tvar word = parseCommon.strip(words.substring(last_divider, i));\n\t\t\tword = word.replace(/\\\\([-_*|~])/g, '$1')\n\t\t\tlast_divider = i+1;\n\t\t\tif (word.length > 0) {\n\t\t\t\tif (replace)\n\t\t\t\t\tword = word.replace(/~/g, ' ');\n\t\t\t\tvar div = words[i];\n\t\t\t\tif (div !== '_' && div !== '-')\n\t\t\t\t\tdiv = ' ';\n\t\t\t\tword_list.push({syllable: tokenizer.translateString(word), divider: div});\n\t\t\t\treplace = false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tvar escNext = false;\n\t\tfor (var i = 0; i < words.length; i++) {\n\t\t\tswitch (words[i]) {\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\x12':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tif (!escNext && !addWord(i) && word_list.length > 0) {\n\t\t\t\t\t\tparseCommon.last(word_list).divider = '-';\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'slur'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '|':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'bar'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '~':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\treplace = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tescNext = words[i] === '\\\\'\n\t\t}\n\n\t\tvar inSlur = false;\n\t\tline.forEach(function(el) {\n\t\t\tif (word_list.length !== 0) {\n\t\t\t\tif (word_list[0].skip) {\n\t\t\t\t\tswitch (word_list[0].to) {\n\t\t\t\t\t\tcase 'next': if (el.el_type === 'note' && el.pitches !== null && !inSlur) word_list.shift(); break;\n\t\t\t\t\t\tcase 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break;\n\t\t\t\t\t\tcase 'bar': if (el.el_type === 'bar') word_list.shift(); break;\n\t\t\t\t\t}\n\t\t\t\t\tif (el.el_type !== 'bar') {\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [{syllable: \"\", divider: \" \"}];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push({syllable: \"\", divider: \" \"});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (el.el_type === 'note' && el.rest === undefined && !inSlur) {\n\t\t\t\t\t\tvar lyric = word_list.shift();\n\t\t\t\t\t\tif (lyric.syllable)\n\t\t\t\t\t\t\tlyric.syllable = lyric.syllable.replace(/ +/g,'\\xA0');\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [ lyric ];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push(lyric);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tvar addSymbols = function(line, words) {\n\t\tif (words.indexOf('\\x12') >= 0) {\n\t\t\tsymbolContinuation += words\n\t\t\treturn\n\t\t}\n\t\twords = symbolContinuation + words\n\t\tsymbolContinuation = ''\n\n\t\t// TODO-PER: Currently copied from w: line. This needs to be read as symbols instead.\n\t\tif (!line) { warn(\"Can't add symbols before the first line of music\", line, 0); return; }\n\t\twords = parseCommon.strip(words);\n\t\tif (words[words.length-1] !== '-')\n\t\t\twords = words + ' ';\t// Just makes it easier to parse below, since every word has a divider after it.\n\t\tvar word_list = [];\n\t\t// first make a list of words from the string we are passed. A word is divided on either a space or dash.\n\t\tvar last_divider = 0;\n\t\tvar replace = false;\n\t\tvar addWord = function(i) {\n\t\t\tvar word = parseCommon.strip(words.substring(last_divider, i));\n\t\t\tlast_divider = i+1;\n\t\t\tif (word.length > 0) {\n\t\t\t\tif (replace)\n\t\t\t\t\tword = word.replace(/~/g, ' ');\n\t\t\t\tvar div = words[i];\n\t\t\t\tif (div !== '_' && div !== '-')\n\t\t\t\t\tdiv = ' ';\n\t\t\t\tword_list.push({syllable: tokenizer.translateString(word), divider: div});\n\t\t\t\treplace = false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tfor (var i = 0; i < words.length; i++) {\n\t\t\tswitch (words[i]) {\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\x12':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tif (!addWord(i) && word_list.length > 0) {\n\t\t\t\t\t\tparseCommon.last(word_list).divider = '-';\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'slur'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '|':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'bar'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '~':\n\t\t\t\t\treplace = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvar inSlur = false;\n\t\tline.forEach(function(el) {\n\t\t\tif (word_list.length !== 0) {\n\t\t\t\tif (word_list[0].skip) {\n\t\t\t\t\tswitch (word_list[0].to) {\n\t\t\t\t\t\tcase 'next': if (el.el_type === 'note' && el.pitches !== null && !inSlur) word_list.shift(); break;\n\t\t\t\t\t\tcase 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break;\n\t\t\t\t\t\tcase 'bar': if (el.el_type === 'bar') word_list.shift(); break;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (el.el_type === 'note' && el.rest === undefined && !inSlur) {\n\t\t\t\t\t\tvar lyric = word_list.shift();\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [ lyric ];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push(lyric);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tvar parseLine = function(line) {\n\t\tif (parseCommon.startsWith(line, '%%')) {\n\t\t\tvar err = parseDirective.addDirective(line.substring(2));\n\t\t\tif (err) warn(err, line, 2);\n\t\t\treturn;\n\t\t}\n\n\t\tvar i = line.indexOf('%');\n\t\tif (i >= 0)\n\t\t\tline = line.substring(0, i);\n\t\tline = line.replace(/\\s+$/, '');\n\n\t\tif (line.length === 0)\n\t\t\treturn;\n\n\t\tif (wordsContinuation) {\n\t\t\taddWords(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\t\treturn\n\t\t}\n\t\tif (symbolContinuation) {\n\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\t\treturn\n\t\t}\n\t\tif (line.length < 2 || line[1] !== ':' || music.lineContinuation) {\n\t\t\tmusic.parseMusic(line);\n\t\t\treturn\n\t\t}\n\n\t\tvar ret = header.parseHeader(line);\n\t\tif (ret.regular)\n\t\t\tmusic.parseMusic(line);\n\t\tif (ret.newline)\n\t\t\tmusic.startNewLine();\n\t\tif (ret.words)\n\t\t\taddWords(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\tif (ret.symbols)\n\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t};\n\n\tfunction appendLastMeasure(voice, nextVoice) {\n\t\tvoice.push({\n\t\t\tel_type: 'hint'\n\t\t});\n\t\tfor (var i = 0; i < nextVoice.length; i++) {\n\t\t\tvar element = nextVoice[i];\n\t\t\tvar hint = Object.assign({},element);\n\t\t\tvoice.push(hint);\n\t\t\tif (element.el_type === 'bar')\n\t\t\t\t\treturn;\n\t\t}\n\t}\n\n\tfunction addHintMeasure(staff, nextStaff) {\n\t\tfor (var i = 0; i < staff.length; i++) {\n\t\t\tvar stave = staff[i];\n\t\t\tvar nextStave = nextStaff[i];\n\t\t\tif (nextStave) { // Be sure there is the same number of staves on the next line.\n\t\t\t\tfor (var j = 0; j < nextStave.voices.length; j++) {\n\t\t\t\t\tvar nextVoice = nextStave.voices[j];\n\t\t\t\t\tvar voice = stave.voices[j];\n\t\t\t\t\tif (voice) { // Be sure there are the same number of voices on the previous line.\n\t\t\t\t\t\tappendLastMeasure(voice, nextVoice);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction addHintMeasures() {\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tvar line = tune.lines[i].staff;\n\t\t\tif (line) {\n\t\t\t\tvar j = i+1;\n\t\t\t\twhile (j < tune.lines.length && tune.lines[j].staff === undefined)\n\t\t\t\t\tj++;\n\t\t\t\tif (j < tune.lines.length) {\n\t\t\t\t\tvar nextLine = tune.lines[j].staff;\n\t\t\t\t\taddHintMeasure(line, nextLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.parse = function(strTune, switches, startPos) {\n\t\t// the switches are optional and cause a difference in the way the tune is parsed.\n\t\t// switches.header_only : stop parsing when the header is finished\n\t\t// switches.stop_on_warning : stop at the first warning encountered.\n\t\t// switches.print: format for the page instead of the browser.\n\t\t// switches.format: a hash of the desired formatting commands.\n\t\t// switches.hint_measures: put the next measure at the end of the current line.\n\t\t// switches.transpose: change the key signature, chords, and notes by a number of half-steps.\n\t\tif (!switches) switches = {};\n\t\tif (!startPos) startPos = 0;\n\t\ttune.reset();\n\n\t\t// Take care of whatever line endings come our way\n\t\t// Tack on newline temporarily to make the last line continuation work\n\t\tstrTune = strTune.replace(/\\r\\n?/g, '\\n') + '\\n';\n\n\t\t// get rid of latex commands. If a line starts with a backslash, then it is replaced by spaces to keep the character count the same.\n\t\tvar arr = strTune.split(\"\\n\\\\\");\n\t\tif (arr.length > 1) {\n\t\t\tfor (var i2 = 1; i2 < arr.length; i2++) {\n\t\t\t\twhile (arr[i2].length > 0 && arr[i2][0] !== \"\\n\") {\n\t\t\t\t\tarr[i2] = arr[i2].substr(1);\n\t\t\t\t\tarr[i2-1] += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tstrTune = arr.join(\" \"); //. the split removed two characters, so this puts them back\n\t\t}\n\t\t// take care of line continuations right away, but keep the same number of characters\n\t\tstrTune = strTune.replace(/\\\\([ \\t]*)(%.*)*\\n/g, function(all, backslash, comment){\n\t\t\tvar padding = comment ? Array(comment.length +1).join(' ') : \"\";\n\t\t\treturn backslash + \"\\x12\" + padding + '\\n';\n\t\t});\n\t\tvar lines = strTune.split('\\n')\n\t\tif (parseCommon.last(lines).length === 0)\t// remove the blank line we added above.\n\t\t\tlines.pop();\n\t\ttokenizer = new Tokenizer(lines, multilineVars);\n\t\theader = new ParseHeader(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t\tmusic = new ParseMusic(tokenizer, warn, multilineVars, tune, tuneBuilder, header);\n\n\t\tif (switches.print)\n\t\t\ttune.media = 'print';\n\t\tmultilineVars.reset();\n\t\tmultilineVars.iChar = startPos;\n\t\tif (switches.visualTranspose) {\n\t\t\tmultilineVars.globalTranspose = parseInt(switches.visualTranspose);\n\t\t\tif (multilineVars.globalTranspose === 0)\n\t\t\t\tmultilineVars.globalTranspose = undefined;\n\t\t\telse\n\t\t\t\ttuneBuilder.setVisualTranspose(switches.visualTranspose);\n\t\t} else\n\t\t\tmultilineVars.globalTranspose = undefined;\n\t\tif (switches.lineBreaks) {\n\t\t\t// The line break numbers are 0-based and they reflect the last measure of the current line.\n\t\t\tmultilineVars.lineBreaks = switches.lineBreaks;\n\t\t\t//multilineVars.continueall = true;\n\t\t}\n\t\theader.reset(tokenizer, warn, multilineVars, tune);\n\n\t\ttry {\n\t\t\tif (switches.format) {\n\t\t\t\tparseDirective.globalFormatting(switches.format);\n\t\t\t}\n\t\t\tvar line = tokenizer.nextLine();\n\t\t\twhile (line) {\n\t\t\t\tif (switches.header_only && multilineVars.is_in_header === false)\n\t\t\t\t\tthrow \"normal_abort\";\n\t\t\t\tif (switches.stop_on_warning && multilineVars.warnings)\n\t\t\t\t\tthrow \"normal_abort\";\n\n\t\t\t\tvar wasInHeader = multilineVars.is_in_header;\n\t\t\t\tparseLine(line);\n\t\t\t\tif (wasInHeader && !multilineVars.is_in_header) {\n\t\t\t\t\ttuneBuilder.setRunningFont(\"annotationfont\", multilineVars.annotationfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"gchordfont\", multilineVars.gchordfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"tripletfont\", multilineVars.tripletfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"vocalfont\", multilineVars.vocalfont);\n\t\t\t\t}\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t}\n\n\t\t\tif (wordsContinuation) {\n\t\t\t\taddWords(tuneBuilder.getCurrentVoice(), '');\n\t\t\t}\n\t\t\tif (symbolContinuation) {\n\t\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), '');\n\t\t\t}\n\t\t\tmultilineVars.openSlurs = tuneBuilder.cleanUp(multilineVars.barsperstaff, multilineVars.staffnonote, multilineVars.openSlurs);\n\n\t\t} catch (err) {\n\t\t\tif (err !== \"normal_abort\")\n\t\t\t\tthrow err;\n\t\t}\n\n\t\tvar ph = 11*72;\n\t\tvar pl = 8.5*72;\n\t\tswitch (multilineVars.papersize) {\n\t\t\t//case \"letter\": ph = 11*72; pl = 8.5*72; break;\n\t\t\tcase \"legal\": ph = 14*72; pl = 8.5*72; break;\n\t\t\tcase \"A4\": ph = 11.7*72; pl = 8.3*72; break;\n\t\t}\n\t\tif (multilineVars.landscape) {\n\t\t\tvar x = ph;\n\t\t\tph = pl;\n\t\t\tpl = x;\n\t\t}\n\t\tif (!tune.formatting.pagewidth)\n\t\t\ttune.formatting.pagewidth = pl;\n\t\tif (!tune.formatting.pageheight)\n\t\t\ttune.formatting.pageheight = ph;\n\n\t\tif (switches.hint_measures) {\n\t\t\taddHintMeasures();\n\t\t}\n\n\t\twrap.wrapLines(tune, multilineVars.lineBreaks, multilineVars.barNumbers);\n\t};\n};\n\nmodule.exports = Parse;\n","// abc_parse_book.js: parses a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = require('./abc_common');\n\nvar bookParser = function(book) {\n\t\"use strict\";\n\n\tvar directives = \"\";\n\tvar initialWhiteSpace = book.match(/(\\s*)/)\n\tbook = parseCommon.strip(book);\n\tvar tuneStrings = book.split(\"\\nX:\");\n\t// Put back the X: that we lost when splitting the tunes.\n\tfor (var i = 1; i < tuneStrings.length; i++)\n\t\ttuneStrings[i] = \"X:\" + tuneStrings[i];\n\t// Keep track of the character position each tune starts with. If the string starts with white space, count that, too.\n\tvar pos = initialWhiteSpace ? initialWhiteSpace[0].length : 0;\n\tvar tunes = [];\n\ttuneStrings.forEach(function(tune) {\n\t\ttunes.push({ abc: tune, startPos: pos});\n\t\tpos += tune.length + 1; // We also lost a newline when splitting, so count that.\n\t});\n\tif (tunes.length > 1 && !parseCommon.startsWith(tunes[0].abc, 'X:')) {\t// If there is only one tune, the X: might be missing, otherwise assume the top of the file is \"intertune\"\n\t\t// There could be file-wide directives in this, if so, we need to insert it into each tune. We can probably get away with\n\t\t// just looking for file-wide directives here (before the first tune) and inserting them at the bottom of each tune, since\n\t\t// the tune is parsed all at once. The directives will be seen before the engraver begins processing.\n\t\tvar dir = tunes.shift();\n\t\tvar arrDir = dir.abc.split('\\n');\n\t\tarrDir.forEach(function(line) {\n\t\t\tif (parseCommon.startsWith(line, '%%'))\n\t\t\t\tdirectives += line + '\\n';\n\t\t});\n\t}\n\tvar header = directives;\n\n\t// Now, the tune ends at a blank line, so truncate it if needed. There may be \"intertune\" stuff.\n\ttunes.forEach(function(tune) {\n\t\tvar end = tune.abc.indexOf('\\n\\n');\n\t\tif (end > 0)\n\t\t\ttune.abc = tune.abc.substring(0, end);\n\t\ttune.pure = tune.abc;\n\t\ttune.abc = directives + tune.abc;\n\n\t\t// for the user's convenience, parse and store the title separately. The title is between the first T: and the next \\n\n\t\ttune.title = \"\";\n\t\tvar title = tune.pure.split(\"T:\");\n\t\tif (title.length > 1) {\n\t\t\ttitle = title[1].split(\"\\n\");\n\t\t\ttune.title = parseCommon.strip(title[0]);\n\t\t}\n\n\t\t// for the user's convenience, parse and store the id separately. The id is between the first X: and the next \\n\n\t\tvar id = tune.pure.substring(2, tune.pure.indexOf(\"\\n\"));\n\t\ttune.id = parseCommon.strip(id);\n\t});\n\n\treturn {\n\t\theader: header,\n\t\ttunes: tunes\n\t};\n};\n\nmodule.exports = bookParser;\n\n","var parseCommon = require('./abc_common');\n\nvar parseDirective = {};\n\n(function() {\n\t\"use strict\";\n\tvar tokenizer;\n\tvar warn;\n\tvar multilineVars;\n\tvar tune;\n\tvar tuneBuilder;\n\tparseDirective.initialize = function(tokenizer_, warn_, multilineVars_, tune_, tuneBuilder_) {\n\t\ttokenizer = tokenizer_;\n\t\twarn = warn_;\n\t\tmultilineVars = multilineVars_;\n\t\ttune = tune_;\n\t\ttuneBuilder = tuneBuilder_;\n\t\tinitializeFonts();\n\t};\n\n\tfunction initializeFonts() {\n\t\tmultilineVars.annotationfont = { face: \"Helvetica\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.gchordfont = { face: \"Helvetica\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.historyfont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.infofont = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\tmultilineVars.measurefont = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\tmultilineVars.partsfont = { face: \"\\\"Times New Roman\\\"\", size: 15, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.repeatfont = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.textfont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.tripletfont = {face: \"Times\", size: 11, weight: \"normal\", style: \"italic\", decoration: \"none\"};\n\t\tmultilineVars.vocalfont = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.wordsfont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\n\t\t// These fonts are global for the entire tune.\n\t\ttune.formatting.composerfont = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\ttune.formatting.subtitlefont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tempofont = { face: \"\\\"Times New Roman\\\"\", size: 15, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.titlefont = { face: \"\\\"Times New Roman\\\"\", size: 20, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.footerfont = { face: \"\\\"Times New Roman\\\"\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.headerfont = { face: \"\\\"Times New Roman\\\"\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.voicefont = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tablabelfont = { face: \"\\\"Trebuchet MS\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tabnumberfont = { face: \"\\\"Arial\\\"\", size: 11, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tabgracefont = { face: \"\\\"Arial\\\"\", size: 8, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\n\t\t// these are the default fonts for these element types. In the printer, these fonts might change as the tune progresses.\n\t\ttune.formatting.annotationfont = multilineVars.annotationfont;\n\t\ttune.formatting.gchordfont = multilineVars.gchordfont;\n\t\ttune.formatting.historyfont = multilineVars.historyfont;\n\t\ttune.formatting.infofont = multilineVars.infofont;\n\t\ttune.formatting.measurefont = multilineVars.measurefont;\n\t\ttune.formatting.partsfont = multilineVars.partsfont;\n\t\ttune.formatting.repeatfont = multilineVars.repeatfont;\n\t\ttune.formatting.textfont = multilineVars.textfont;\n\t\ttune.formatting.tripletfont = multilineVars.tripletfont;\n\t\ttune.formatting.vocalfont = multilineVars.vocalfont;\n\t\ttune.formatting.wordsfont = multilineVars.wordsfont;\n\t}\n\n\tvar fontTypeCanHaveBox = { gchordfont: true, measurefont: true, partsfont: true, annotationfont: true, composerfont: true, historyfont: true, infofont: true, subtitlefont: true, textfont: true, titlefont: true, voicefont: true };\n\n\tvar fontTranslation = function(fontFace) {\n\t\t// This translates Postscript fonts for a web alternative.\n\t\t// Note that the postscript fonts contain italic and bold info in them, so what is returned is a hash.\n\n\t\tswitch (fontFace) {\n\t\t\tcase \"Arial-Italic\":\n\t\t\t\treturn { face: \"Arial\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Arial-Bold\":\n\t\t\t\treturn { face: \"Arial\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-Demi\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-DemiItalic\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Bookman-Light\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-LightItalic\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Courier\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Courier-Oblique\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Courier-Bold\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Courier-BoldOblique\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-Book\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-BookOblique\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-Demi\":\n\t\t\tcase \"Avant-Garde-Demi\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-DemiOblique\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Oblique\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Bold\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-BoldOblique\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-Oblique\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-Bold\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-BoldOblique\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Roman\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Italic\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Bold\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Palatino-BoldItalic\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Roman\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Italic\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Bold\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-BoldItalic\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Times\":\n\t\t\tcase \"Times-Roman\":\n\t\t\tcase \"Times-Narrow\":\n\t\t\tcase \"Times-Courier\":\n\t\t\tcase \"Times-New-Roman\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Times-Italic\":\n\t\t\tcase \"Times-Italics\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Times-Bold\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Times-BoldItalic\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"ZapfChancery-MediumItalic\":\n\t\t\t\treturn { face: \"\\\"Zapf Chancery\\\",cursive,serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\tvar getFontParameter = function(tokens, currentSetting, str, position, cmd) {\n\t\t// Every font parameter has the following format:\n\t\t// \n\t\t// Where:\n\t\t// face: either a standard web font name, or a postscript font, enumerated in fontTranslation. This could also be an * or be missing if the face shouldn't change.\n\t\t// utf8: This is optional, and specifies utf8. That's all that is supported so the field is just silently ignored.\n\t\t// size: The size, in pixels. This may be omitted if the size is not changing.\n\t\t// modifiers: zero or more of \"bold\", \"italic\", \"underline\"\n\t\t// box: Only applies to the measure numbers, gchords, and the parts. If present, then a box is drawn around the characters.\n\t\t// If face is present, then all the modifiers are cleared. If face is absent, then the modifiers are illegal.\n\t\t// The face can be a single word, a set of words separated by hyphens, or a quoted string.\n\t\t//\n\t\t// So, in practicality, there are three types of font definitions: a number only, an asterisk and a number only, or the full definition (with an optional size).\n\t\tfunction processNumberOnly() {\n\t\t\tvar size = parseInt(tokens[0].token);\n\t\t\ttokens.shift();\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Can't set just the size of the font since there is no default value.\", str, position);\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\", size: size};\n\t\t\t}\n\t\t\tif (tokens.length === 0) {\n\t\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size};\n\t\t\t}\n\t\t\tif (tokens.length === 1 && tokens[0].token === \"box\" && fontTypeCanHaveBox[cmd])\n\t\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size, box: true};\n\t\t\twarn(\"Extra parameters in font definition.\", str, position);\n\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size};\n\t\t}\n\n\t\t// format 1: asterisk and number only\n\t\tif (tokens[0].token === '*') {\n\t\t\ttokens.shift();\n\t\t\tif (tokens[0].type === 'number')\n\t\t\t\treturn processNumberOnly();\n\t\t\telse {\n\t\t\t\twarn(\"Expected font size number after *.\", str, position);\n\t\t\t}\n\t\t}\n\n\t\t// format 2: number only\n\t\tif (tokens[0].type === 'number') {\n\t\t\treturn processNumberOnly();\n\t\t}\n\n\t\t// format 3: whole definition\n\t\tvar face = [];\n\t\tvar size;\n\t\tvar weight = \"normal\";\n\t\tvar style = \"normal\";\n\t\tvar decoration = \"none\";\n\t\tvar box = false;\n\t\tvar state = 'face';\n\t\tvar hyphenLast = false;\n\t\twhile (tokens.length) {\n\t\t\tvar currToken = tokens.shift();\n\t\t\tvar word = currToken.token.toLowerCase();\n\t\t\tswitch (state) {\n\t\t\t\tcase 'face':\n\t\t\t\t\tif (hyphenLast || (word !== 'utf' && currToken.type !== 'number' && word !== \"bold\" && word !== \"italic\" && word !== \"underline\" && word !== \"box\")) {\n\t\t\t\t\t\tif (face.length > 0 && currToken.token === '-') {\n\t\t\t\t\t\t\thyphenLast = true;\n\t\t\t\t\t\t\tface[face.length-1] = face[face.length-1] + currToken.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (hyphenLast) {\n\t\t\t\t\t\t\t\thyphenLast = false;\n\t\t\t\t\t\t\t\tface[face.length-1] = face[face.length-1] + currToken.token;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\tface.push(currToken.token);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (currToken.type === 'number') {\n\t\t\t\t\t\t\tif (size) {\n\t\t\t\t\t\t\t\twarn(\"Font size specified twice in font definition.\", str, position);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsize = currToken.token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstate = 'modifier';\n\t\t\t\t\t\t} else if (word === \"bold\")\n\t\t\t\t\t\t\tweight = \"bold\";\n\t\t\t\t\t\telse if (word === \"italic\")\n\t\t\t\t\t\t\tstyle = \"italic\";\n\t\t\t\t\t\telse if (word === \"underline\")\n\t\t\t\t\t\t\tdecoration = \"underline\";\n\t\t\t\t\t\telse if (word === \"box\") {\n\t\t\t\t\t\t\tif (fontTypeCanHaveBox[cmd])\n\t\t\t\t\t\t\t\tbox = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\twarn(\"This font style doesn't support \\\"box\\\"\", str, position);\n\t\t\t\t\t\t\tstate = \"finished\";\n\t\t\t\t\t\t} else if (word === \"utf\") {\n\t\t\t\t\t\t\tcurrToken = tokens.shift(); // this gets rid of the \"8\" after \"utf\"\n\t\t\t\t\t\t\tstate = \"size\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\twarn(\"Unknown parameter \" + currToken.token + \" in font definition.\", str, position);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"size\":\n\t\t\t\t\tif (currToken.type === 'number') {\n\t\t\t\t\t\tif (size) {\n\t\t\t\t\t\t\twarn(\"Font size specified twice in font definition.\", str, position);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsize = currToken.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twarn(\"Expected font size in font definition.\", str, position);\n\t\t\t\t\t}\n\t\t\t\t\tstate = 'modifier';\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"modifier\":\n\t\t\t\t\tif (word === \"bold\")\n\t\t\t\t\t\tweight = \"bold\";\n\t\t\t\t\telse if (word === \"italic\")\n\t\t\t\t\t\tstyle = \"italic\";\n\t\t\t\t\telse if (word === \"underline\")\n\t\t\t\t\t\tdecoration = \"underline\";\n\t\t\t\t\telse if (word === \"box\") {\n\t\t\t\t\t\tif (fontTypeCanHaveBox[cmd])\n\t\t\t\t\t\t\tbox = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"This font style doesn't support \\\"box\\\"\", str, position);\n\t\t\t\t\t\tstate = \"finished\";\n\t\t\t\t\t} else\n\t\t\t\t\t\twarn(\"Unknown parameter \" + currToken.token + \" in font definition.\", str, position);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"finished\":\n\t\t\t\t\twarn(\"Extra characters found after \\\"box\\\" in font definition.\", str, position);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size === undefined) {\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Must specify the size of the font since there is no default value.\", str, position);\n\t\t\t\tsize = 12;\n\t\t\t} else\n\t\t\t\tsize = currentSetting.size;\n\t\t} else\n\t\t\tsize = parseFloat(size);\n\n\t\tface = face.join(' ');\n\t\tif (face === '') {\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Must specify the name of the font since there is no default value.\", str, position);\n\t\t\t\tface = \"sans-serif\";\n\t\t\t} else\n\t\t\t\tface = currentSetting.face;\n\t\t}\n\t\tvar psFont = fontTranslation(face);\n\t\tvar font = {};\n\t\tif (psFont) {\n\t\t\tfont.face = psFont.face;\n\t\t\tfont.weight = psFont.weight;\n\t\t\tfont.style = psFont.style;\n\t\t\tfont.decoration = psFont.decoration;\n\t\t\tfont.size = size;\n\t\t\tif (box)\n\t\t\t\tfont.box = true;\n\t\t\treturn font;\n\t\t}\n\t\tfont.face = face;\n\t\tfont.weight = weight;\n\t\tfont.style = style;\n\t\tfont.decoration = decoration;\n\t\tfont.size = size;\n\t\tif (box)\n\t\t\tfont.box = true;\n\t\treturn font;\n\t};\n\n\tvar getChangingFont = function(cmd, tokens, str) {\n\t\tif (tokens.length === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a font as a parameter.\";\n\t\tmultilineVars[cmd] = getFontParameter(tokens, multilineVars[cmd], str, 0, cmd);\n\t\tif (multilineVars.is_in_header) // If the font appears in the header, then it becomes the default font.\n\t\t\ttune.formatting[cmd] = multilineVars[cmd];\n\t\treturn null;\n\t};\n\tvar getGlobalFont = function(cmd, tokens, str) {\n\t\tif (tokens.length === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a font as a parameter.\";\n\t\ttune.formatting[cmd] = getFontParameter(tokens, tune.formatting[cmd], str, 0, cmd);\n\t\treturn null;\n\t};\n\n\tvar setScale = function(cmd, tokens) {\n\t\tvar scratch = \"\";\n\t\ttokens.forEach(function(tok) {\n\t\t\tscratch += tok.token;\n\t\t});\n\t\tvar num = parseFloat(scratch);\n\t\tif (isNaN(num) || num === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\";\n\t\ttune.formatting.scale = num;\n\n\t};\n\t// starts at 35\n\tvar drumNames = [\n\t\t\"acoustic-bass-drum\",\n\t\t\"bass-drum-1\",\n\t\t\"side-stick\",\n\t\t\"acoustic-snare\",\n\t\t\"hand-clap\",\n\t\t\"electric-snare\",\n\t\t\"low-floor-tom\",\n\t\t\"closed-hi-hat\",\n\t\t\"high-floor-tom\",\n\t\t\"pedal-hi-hat\",\n\t\t\"low-tom\",\n\t\t\"open-hi-hat\",\n\t\t\"low-mid-tom\",\n\t\t\"hi-mid-tom\",\n\t\t\"crash-cymbal-1\",\n\t\t\"high-tom\",\n\t\t\"ride-cymbal-1\",\n\t\t\"chinese-cymbal\",\n\t\t\"ride-bell\",\n\t\t\"tambourine\",\n\t\t\"splash-cymbal\",\n\t\t\"cowbell\",\n\t\t\"crash-cymbal-2\",\n\t\t\"vibraslap\",\n\t\t\"ride-cymbal-2\",\n\t\t\"hi-bongo\",\n\t\t\"low-bongo\",\n\t\t\"mute-hi-conga\",\n\t\t\"open-hi-conga\",\n\t\t\"low-conga\",\n\t\t\"high-timbale\",\n\t\t\"low-timbale\",\n\t\t\"high-agogo\",\n\t\t\"low-agogo\",\n\t\t\"cabasa\",\n\t\t\"maracas\",\n\t\t\"short-whistle\",\n\t\t\"long-whistle\",\n\t\t\"short-guiro\",\n\t\t\"long-guiro\",\n\t\t\"claves\",\n\t\t\"hi-wood-block\",\n\t\t\"low-wood-block\",\n\t\t\"mute-cuica\",\n\t\t\"open-cuica\",\n\t\t\"mute-triangle\",\n\t\t\"open-triangle\",\n\t];\n\n\tvar interpretPercMap = function(restOfString) {\n\t\tvar tokens = restOfString.split(/\\s+/); // Allow multiple spaces.\n\t\tif (tokens.length !== 2 && tokens.length !== 3)\n\t\t\treturn { error: 'Expected parameters \"abc-note\", \"drum-sound\", and optionally \"note-head\"'};\n\t\tvar key = tokens[0];\n\t\t// The percussion sound can either be a MIDI number or a drum name. If it is not a number then check for a name.\n\t\tvar pitch = parseInt(tokens[1], 10);\n\t\tif ((isNaN(pitch) || pitch < 35 || pitch > 81) && tokens[1]) {\n\t\t\tpitch = drumNames.indexOf(tokens[1].toLowerCase()) + 35;\n\t\t}\n\t\tif ((isNaN(pitch) || pitch < 35 || pitch > 81))\n\t\t\treturn { error: 'Expected drum name, received \"' + tokens[1] + '\"' };\n\t\tvar value = { sound: pitch };\n\t\tif (tokens.length === 3)\n\t\t\tvalue.noteHead = tokens[2];\n\t\treturn { key: key, value: value };\n\t};\n\n\tvar getRequiredMeasurement = function(cmd, tokens) {\n\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\treturn { error: \"Directive \\\"\" + cmd + \"\\\" requires a measurement as a parameter.\"};\n\t\treturn points.value;\n\t};\n\tvar oneParameterMeasurement = function(cmd, tokens) {\n\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a measurement as a parameter.\";\n\t\ttune.formatting[cmd] = points.value;\n\t\treturn null;\n\t};\n\n\tvar addMultilineVar = function(key, cmd, tokens, min, max) {\n\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\";\n\t\tvar i = tokens[0].intt;\n\t\tif (min !== undefined && i < min)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number greater than or equal to \" + min + \" as a parameter.\";\n\t\tif (max !== undefined && i > max)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number less than or equal to \" + max + \" as a parameter.\";\n\t\tmultilineVars[key] = i;\n\t\treturn null;\n\t};\n\n\tvar addMultilineVarBool = function(key, cmd, tokens) {\n\t\tif (tokens.length === 1 && (tokens[0].token === 'true' || tokens[0].token === 'false')) {\n\t\t\tmultilineVars[key] = tokens[0].token === 'true';\n\t\t\treturn null;\n\t\t}\n\t\tvar str = addMultilineVar(key, cmd, tokens, 0, 1);\n\t\tif (str !== null) return str;\n\t\tmultilineVars[key] = (multilineVars[key] === 1);\n\t\treturn null;\n\t};\n\n\tvar addMultilineVarOneParamChoice = function(key, cmd, tokens, choices) {\n\t\tif (tokens.length !== 1)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires one of [ \" + choices.join(\", \") + \" ] as a parameter.\";\n\t\tvar choice = tokens[0].token;\n\t\tvar found = false;\n\t\tfor (var i = 0; !found && i < choices.length; i++) {\n\t\t\tif (choices[i] === choice)\n\t\t\t\tfound = true;\n\t\t}\n\t\tif (!found)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires one of [ \" + choices.join(\", \") + \" ] as a parameter.\";\n\t\tmultilineVars[key] = choice;\n\t\treturn null;\n\t};\n\n\tvar midiCmdParam0 = [\n\t\t\"nobarlines\",\n\t\t\"barlines\",\n\t\t\"beataccents\",\n\t\t\"nobeataccents\",\n\t\t\"droneon\",\n\t\t\"droneoff\",\n\t\t\"drumon\",\n\t\t\"drumoff\",\n\t\t\"fermatafixed\",\n\t\t\"fermataproportional\",\n\t\t\"gchordon\",\n\t\t\"gchordoff\",\n\t\t\"controlcombo\",\n\t\t\"temperamentnormal\",\n\t\t\"noportamento\"\n\t];\n\tvar midiCmdParam1String = [\n\t\t\"gchord\",\n\t\t\"ptstress\",\n\t\t\"beatstring\"\n\t];\n\tvar midiCmdParam1Integer = [\n\t\t\"bassvol\",\n\t\t\"chordvol\",\n\t\t\"c\",\n\t\t\"channel\",\n\t\t\"beatmod\",\n\t\t\"deltaloudness\",\n\t\t\"drumbars\",\n\t\t\"gracedivider\",\n\t\t\"makechordchannels\",\n\t\t\"randomchordattack\",\n\t\t\"chordattack\",\n\t\t\"stressmodel\",\n\t\t\"transpose\",\n\t\t\"rtranspose\",\n\t\t\"vol\",\n\t\t\"volinc\",\n\t\t\"gchordbars\"\t\n\t];\n\tvar midiCmdParam1Integer1OptionalInteger = [\n\t\t\"program\"\n\t];\n\tvar midiCmdParam2Integer = [\n\t\t\"ratio\",\n\t\t\"snt\",\n\t\t\"bendvelocity\",\n\t\t\"pitchbend\",\n\t\t\"control\",\n\t\t\"temperamentlinear\"\n\t];\n\tvar midiCmdParam4Integer = [\n\t\t\"beat\"\n\t];\n\tvar midiCmdParam5Integer = [\n\t\t\"drone\"\n\t];\n\tvar midiCmdParam1String1Integer = [\n\t\t\"portamento\"\n\t];\n\tvar midiCmdParamFraction = [\n\t\t\"expand\",\n\t\t\"grace\",\n\t\t\"trim\"\n\t];\n\tvar midiCmdParam1StringVariableIntegers = [\n\t\t\"drum\",\n\t\t\"chordname\"\n\t];\n \tvar midiCmdParam1Integer1OptionalString = [\n \t\t\"bassprog\", \"chordprog\"\n \t];\n\n\n\tvar parseMidiCommand = function(midi, tune, restOfString) {\n\t\tvar midi_cmd = midi.shift().token;\n\t\tvar midi_params = [];\n\t\tif (midiCmdParam0.indexOf(midi_cmd) >= 0) {\n\t\t\t// NO PARAMETERS\n\t\t\tif (midi.length !== 0)\n\t\t\t\twarn(\"Unexpected parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t} else if (midiCmdParam1String.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING PARAMETER\n\t\t\tif (midi.length !== 1)\n\t\t\t\twarn(\"Expected one parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse\n\t\t\t\tmidi_params.push(midi[0].token);\n\t\t} else if (midiCmdParam1Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER\n\t\t\tif (midi.length !== 1)\n\t\t\t\twarn(\"Expected one parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t} else if (midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER, ONE OPTIONAL PARAMETER\n\t\t\tif (midi.length !== 1 && midi.length !== 2)\n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 2 && midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tif (midi.length === 2)\n\t\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam2Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// TWO INT PARAMETERS\n\t\t\tif (midi.length !== 2)\n\t\t\t\twarn(\"Expected two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected two integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1String1Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING PARAMETER, ONE INT PARAMETER\n\t\t\tif (midi.length !== 2)\n\t\t\t\twarn(\"Expected two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"alpha\" || midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected one string and one integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].token);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midi_cmd === 'drummap') {\n\t\t\t// BUILD AN OBJECT OF ABC NOTE => MIDI NOTE\n\t\t\tif (midi.length === 2 && midi[0].type === 'alpha' && midi[1].type === 'number') {\n\t\t\t\tif (!tune.formatting) tune.formatting = {};\n\t\t\t\tif (!tune.formatting.midi) tune.formatting.midi = {};\n\t\t\t\tif (!tune.formatting.midi.drummap) tune.formatting.midi.drummap = {};\n\t\t\t\ttune.formatting.midi.drummap[midi[0].token] = midi[1].intt;\n\t\t\t\tmidi_params = tune.formatting.midi.drummap;\n\t\t\t} else if (midi.length === 3 && midi[0].type === 'punct' && midi[1].type === 'alpha' && midi[2].type === 'number') {\n\t\t\t\tif (!tune.formatting) tune.formatting = {};\n\t\t\t\tif (!tune.formatting.midi) tune.formatting.midi = {};\n\t\t\t\tif (!tune.formatting.midi.drummap) tune.formatting.midi.drummap = {};\n\t\t\t\ttune.formatting.midi.drummap[midi[0].token+midi[1].token] = midi[2].intt;\n\t\t\t\tmidi_params = tune.formatting.midi.drummap;\n\t\t\t} else {\n\t\t\t\twarn(\"Expected one note name and one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t}\n\t\t} else if (midiCmdParamFraction.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE FRACTION PARAMETER\n\t\t\tif (midi.length !== 3)\n\t\t\t\twarn(\"Expected fraction parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].token !== \"/\" || midi[2].type !== \"number\")\n\t\t\t\twarn(\"Expected fraction parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam4Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// FOUR INT PARAMETERS\n\t\t\tif (midi.length !== 4)\n\t\t\t\twarn(\"Expected four parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\" || midi[2].type !== \"number\" || midi[3].type !== \"number\")\n\t\t\t\twarn(\"Expected four integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam5Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// FIVE INT PARAMETERS\n\t\t\tif (midi.length !== 5)\n\t\t\t\twarn(\"Expected five parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\" || midi[2].type !== \"number\" || midi[3].type !== \"number\" || midi[4].type !== \"number\")\n\t\t\t\twarn(\"Expected five integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t\tmidi_params.push(midi[4].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER, ONE OPTIONAL OCTAVE PARAMETER\n\t\t\tif (midi.length !== 1 || midi.length !== 4)\n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 4) {\n\t\t\t\tif (midi[1].token !== \"octave\")\n\t\t\t\t\twarn(\"Expected octave parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\tif (midi[2].token !== \"=\")\n\t\t\t\t\twarn(\"Expected octave parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\tif (midi[3].type !== \"number\")\n\t\t\t\t\twarn(\"Expected integer parameter for octave in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t} else {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tif (midi.length === 4)\n\t\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1StringVariableIntegers.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING, VARIABLE INT PARAMETERS\n\t\t\tif (midi.length < 2)\n\t\t\t\twarn(\"Expected string parameter and at least one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"alpha\")\n\t\t\t\twarn(\"Expected string parameter and at least one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tvar p = midi.shift();\n\t\t\t\tmidi_params.push(p.token);\n\t\t\t\twhile (midi.length > 0) {\n\t\t\t\t\tp = midi.shift();\n\t\t\t\t\tif (p.type !== \"number\")\n\t\t\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\t\tmidi_params.push(p.intt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t else if (midiCmdParam1Integer1OptionalString.indexOf(midi_cmd) >= 0){\n\n\t // ONE INT PARAMETER, ONE OPTIONAL string\n\t \tif (midi.length !== 1 && midi.length !== 2) \n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\") \n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 2 && midi[1].type !== \"alpha\") \n\t\t\t\twarn(\"Expected alpha parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t \tmidi_params.push(midi[0].intt);\n\n\t // Currently only bassprog and chordprog with optional octave shifts use this path\n\t if (midi.length === 2){\n\t var cmd = midi[1].token;\n\t if (cmd.indexOf(\"octave=\") != -1){\n\t cmd = cmd.replace(\"octave=\",\"\");\n\t cmd = parseInt(cmd);\n\t if (!isNaN(cmd)){\n\t // Limit range from -1 to 3 octaves\n\t if (cmd < -1){\n\t\t\t\t\twarn(\"Expected octave= in MIDI \" + midi_cmd + ' to be >= -1 (recv:'+cmd+')');\n\t cmd = -1;\n\t }\n\t if (cmd > 3){\n\t\t\t\t\twarn(\"Expected octave= in MIDI \" + midi_cmd + ' to be <= 3 (recv:'+cmd+')');\n\t cmd = 3;\n\t }\n\t midi_params.push(cmd);\n\t } else\n\t warn(\"Expected octave value in MIDI\" + midi_cmd);\n\t }\n\t else{\n\t warn(\"Expected octave= in MIDI\" + midi_cmd);\n\t }\n\t }\n\t }\n\t }\n\n\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\ttuneBuilder.appendElement('midi', -1, -1, { cmd: midi_cmd, params: midi_params });\n\t\telse {\n\t\t\tif (tune.formatting['midi'] === undefined)\n\t\t\t\ttune.formatting['midi'] = {};\n\t\t\ttune.formatting['midi'][midi_cmd] = midi_params;\n\t\t}\n\t};\n\n\tparseDirective.parseFontChangeLine = function(textstr) {\n\t\t// We don't want to match two dollar signs, so change those temporarily\n\t\ttextstr = textstr.replace(/\\$\\$/g,\"\\x03\")\n\t\tvar textParts = textstr.split('$');\n\t\tif (textParts.length > 1 && multilineVars.setfont) {\n\t\t\tvar textarr = [ ];\n\t\t\tif (textParts[0] !== '') // did the original string start with `$`?\n\t\t\t\ttextarr.push({ text: textParts[0] })\n\t\t\tfor (var i = 1; i < textParts.length; i++) {\n\t\t\t\tif (textParts[i][0] === '0')\n\t\t\t\t\ttextarr.push({ text: textParts[i].substring(1).replace(/\\x03/g,\"$$\") });\n\t\t\t\telse {\n\t\t\t\t\tvar whichFont = parseInt(textParts[i][0],10)\n\t\t\t\t\tif (multilineVars.setfont[whichFont])\n\t\t\t\t\t\ttextarr.push({font: multilineVars.setfont[whichFont], text: textParts[i].substring(1).replace(/\\x03/g,\"$$\") });\n\t\t\t\t\telse\n\t\t\t\t\t\ttextarr[textarr.length-1].text += '$' + textParts[i].replace(/\\x03/g,\"$$\");\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\treturn textarr;\n\t\t}\n\t\treturn textstr.replace(/\\x03/g,\"$$\");\n\t};\n\n\tvar positionChoices = [ 'auto', 'above', 'below', 'hidden' ];\n\tparseDirective.addDirective = function(str) {\n\t\tvar tokens = tokenizer.tokenize(str, 0, str.length);\t// 3 or more % in a row, or just spaces after %% is just a comment\n\t\tif (tokens.length === 0 || tokens[0].type !== 'alpha') return null;\n\t\tvar restOfString = str.substring(str.indexOf(tokens[0].token)+tokens[0].token.length);\n\t\trestOfString = tokenizer.stripComment(restOfString);\n\t\tvar cmd = tokens.shift().token.toLowerCase();\n\t\tvar scratch = \"\";\n\t\tvar line;\n\t\tswitch (cmd)\n\t\t{\n\t\t\t// The following directives were added to abc_parser_lint, but haven't been implemented here.\n\t\t\t// Most of them are direct translations from the directives that will be parsed in. See abcm2ps's format.txt for info on each of these.\n\t\t\t//\t\t\t\t\talignbars: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\taligncomposer: { type: \"string\", Enum: [ 'left', 'center','right' ], optional: true },\n\t\t\t//\t\t\t\t\tbstemdown: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tcontinueall: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tdynalign: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\texprabove: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\texprbelow: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tgchordbox: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tgracespacebefore: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tgracespaceinside: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tgracespaceafter: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tinfospace: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tlineskipfac: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxshrink: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxstaffsep: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxsysstaffsep: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tnotespacingfactor: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tparskipfac: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tslurheight: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tsplittune: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tsquarebreve: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tstemheight: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tstraightflags: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tstretchstaff: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\ttitleformat: { type: \"string\", optional: true },\n\t\t\tcase \"bagpipes\":tune.formatting.bagpipes = true;break;\n\t\t\tcase \"flatbeams\":tune.formatting.flatbeams = true;break;\n\t\t\tcase \"jazzchords\":tune.formatting.jazzchords = true;break;\n\t\t\tcase \"accentAbove\":tune.formatting.accentAbove = true;break;\n\t\t\tcase \"germanAlphabet\":tune.formatting.germanAlphabet = true;break;\n\t\t\tcase \"landscape\":multilineVars.landscape = true;break;\n\t\t\tcase \"papersize\":multilineVars.papersize = restOfString;break;\n\t\t\tcase \"graceslurs\":\n\t\t\t\tif (tokens.length !== 1)\n\t\t\t\t\treturn \"Directive graceslurs requires one parameter: 0 or 1\";\n\t\t\t\tif (tokens[0].token === '0' || tokens[0].token === 'false')\n\t\t\t\t\ttune.formatting.graceSlurs = false;\n\t\t\t\telse if (tokens[0].token === '1' || tokens[0].token === 'true')\n\t\t\t\t\ttune.formatting.graceSlurs = true;\n\t\t\t\telse\n\t\t\t\t\treturn \"Directive graceslurs requires one parameter: 0 or 1 (received \" + tokens[0].token + ')';\n\t\t\t\tbreak;\n\t\t\tcase \"lineThickness\":\n\t\t\t\tvar lt = parseStretchLast(tokens);\n\t\t\t\tif (lt.value !== undefined)\n\t\t\t\t\ttune.formatting.lineThickness = lt.value;\n\t\t\t\tif (lt.error)\n\t\t\t\t\treturn lt.error;\n\t\t\t\tbreak;\n\t\t\tcase \"stretchlast\":\n\t\t\t\tvar sl = parseStretchLast(tokens);\n\t\t\t\tif (sl.value !== undefined)\n\t\t\t\t\ttune.formatting.stretchlast = sl.value;\n\t\t\t\tif (sl.error)\n\t\t\t\t\treturn sl.error;\n\t\t\t\tbreak;\n\t\t\tcase \"titlecaps\":multilineVars.titlecaps = true;break;\n\t\t\tcase \"titleleft\":tune.formatting.titleleft = true;break;\n\t\t\tcase \"measurebox\":tune.formatting.measurebox = true;break;\n\n\t\t\tcase \"vocal\": return addMultilineVarOneParamChoice(\"vocalPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"dynamic\": return addMultilineVarOneParamChoice(\"dynamicPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"gchord\": return addMultilineVarOneParamChoice(\"chordPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"ornament\": return addMultilineVarOneParamChoice(\"ornamentPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"volume\": return addMultilineVarOneParamChoice(\"volumePosition\", cmd, tokens, positionChoices);\n\n\t\t\tcase \"botmargin\":\n\t\t\tcase \"botspace\":\n\t\t\tcase \"composerspace\":\n\t\t\tcase \"indent\":\n\t\t\tcase \"leftmargin\":\n\t\t\tcase \"linesep\":\n\t\t\tcase \"musicspace\":\n\t\t\tcase \"partsspace\":\n\t\t\tcase \"pageheight\":\n\t\t\tcase \"pagewidth\":\n\t\t\tcase \"rightmargin\":\n\t\t\tcase \"stafftopmargin\":\n\t\t\tcase \"staffsep\":\n\t\t\tcase \"staffwidth\":\n\t\t\tcase \"subtitlespace\":\n\t\t\tcase \"sysstaffsep\":\n\t\t\tcase \"systemsep\":\n\t\t\tcase \"textspace\":\n\t\t\tcase \"titlespace\":\n\t\t\tcase \"topmargin\":\n\t\t\tcase \"topspace\":\n\t\t\tcase \"vocalspace\":\n\t\t\tcase \"wordsspace\":\n\t\t\t\treturn oneParameterMeasurement(cmd, tokens);\n\t\t\tcase \"voicescale\":\n\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\treturn \"voicescale requires one float as a parameter\";\n\t\t\t\tvar voiceScale = tokens.shift();\n\t\t\t\tif (multilineVars.currentVoice) {\n\t\t\t\t\tmultilineVars.currentVoice.scale = voiceScale.floatt;\n\t\t\t\t\ttuneBuilder.changeVoiceScale(multilineVars.currentVoice.scale);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\tcase \"voicecolor\":\n\t\t\t\tif (tokens.length !== 1) // this could either be of type alpha or quote, but it's ok if it is a number\n\t\t\t\t\treturn \"voicecolor requires one string as a parameter\";\n\t\t\t\tvar voiceColor = tokens.shift();\n\t\t\t\tif (multilineVars.currentVoice) {\n\t\t\t\t\tmultilineVars.currentVoice.color = voiceColor.token;\n\t\t\t\t\ttuneBuilder.changeVoiceColor(multilineVars.currentVoice.color);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\tcase \"vskip\":\n\t\t\t\tvar vskip = Math.round(getRequiredMeasurement(cmd, tokens));\n\t\t\t\tif (vskip.error)\n\t\t\t\t\treturn vskip.error;\n\t\t\t\ttuneBuilder.addSpacing(vskip);\n\t\t\t\treturn null;\n\t\t\tcase \"scale\":\n\t\t\t\tsetScale(cmd, tokens);\n\t\t\t\tbreak;\n\t\t\tcase \"sep\":\n\t\t\t\tif (tokens.length === 0)\n\t\t\t\t\ttuneBuilder.addSeparator(14,14,85, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+5}); // If no parameters are given, then there is a default size.\n\t\t\t\telse {\n\t\t\t\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar spaceAbove = points.value;\n\n\t\t\t\t\tpoints = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar spaceBelow = points.value;\n\n\t\t\t\t\tpoints = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar lenLine = points.value;\n\t\t\t\t\ttuneBuilder.addSeparator(spaceAbove, spaceBelow, lenLine, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"barsperstaff\":\n\t\t\t\tscratch = addMultilineVar('barsperstaff', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"staffnonote\":\n\t\t\t\t// The sense of the boolean is opposite here. \"0\" means true.\n\t\t\t\tif (tokens.length !== 1)\n\t\t\t\t\treturn \"Directive staffnonote requires one parameter: 0 or 1\";\n\t\t\t\tif (tokens[0].token === '0')\n\t\t\t\t\tmultilineVars.staffnonote = true;\n\t\t\t\telse if (tokens[0].token === '1')\n\t\t\t\t\tmultilineVars.staffnonote = false;\n\t\t\t\telse\n\t\t\t\t\treturn \"Directive staffnonote requires one parameter: 0 or 1 (received \" + tokens[0].token + ')';\n\t\t\t\tbreak;\n\t\t\tcase \"printtempo\":\n\t\t\t\tscratch = addMultilineVarBool('printTempo', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"partsbox\":\n\t\t\t\tscratch = addMultilineVarBool('partsBox', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tmultilineVars.partsfont.box = multilineVars.partsBox;\n\t\t\t\tbreak;\n\t\t\tcase \"freegchord\":\n\t\t\t\tscratch = addMultilineVarBool('freegchord', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"measurenb\":\n\t\t\tcase \"barnumbers\":\n\t\t\t\tscratch = addMultilineVar('barNumbers', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"setbarnb\":\n\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number') {\n\t\t\t\t\treturn 'Directive setbarnb requires a number as a parameter.';\n\t\t\t\t}\n\t\t\t\tmultilineVars.currBarNumber = tuneBuilder.setBarNumberImmediate(tokens[0].intt);\n\t\t\t\tbreak;\n\t\t\tcase \"begintext\":\n\t\t\t\tvar textBlock = '';\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\twhile(line && line.indexOf('%%endtext') !== 0) {\n\t\t\t\t\tif (parseCommon.startsWith(line, \"%%\"))\n\t\t\t\t\t\ttextBlock += line.substring(2) + \"\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\ttextBlock += line + \"\\n\";\n\t\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\t}\n\t\t\t\ttuneBuilder.addText(textBlock, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+textBlock.length+7});\n\t\t\t\tbreak;\n\t\t\tcase \"continueall\":\n\t\t\t\tmultilineVars.continueall = true;\n\t\t\t\tbreak;\n\t\t\tcase \"beginps\":\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\twhile(line && line.indexOf('%%endps') !== 0) {\n\t\t\t\t\ttokenizer.nextLine();\n\t\t\t\t}\n\t\t\t\twarn(\"Postscript ignored\", str, 0);\n\t\t\t\tbreak;\n\t\t\tcase \"deco\":\n\t\t\t\tif (restOfString.length > 0)\n\t\t\t\t\tmultilineVars.ignoredDecorations.push(restOfString.substring(0, restOfString.indexOf(' ')));\n\t\t\t\twarn(\"Decoration redefinition ignored\", str, 0);\n\t\t\t\tbreak;\n\t\t\tcase \"text\":\n\t\t\t\tvar textstr = tokenizer.translateString(restOfString);\n\t\t\t\ttuneBuilder.addText(parseDirective.parseFontChangeLine(textstr), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length+7});\n\t\t\t\tbreak;\n\t\t\tcase \"center\":\n\t\t\t\tvar centerstr = tokenizer.translateString(restOfString);\n\t\t\t\ttuneBuilder.addCentered(parseDirective.parseFontChangeLine(centerstr));\n\t\t\t\tbreak;\n\t\t\tcase \"font\":\n\t\t\t\t// don't need to do anything for this; it is a useless directive\n\t\t\t\tbreak;\n\t\t\tcase \"setfont\":\n\t\t\t\tvar sfTokens = tokenizer.tokenize(restOfString, 0, restOfString.length);\n//\t\t\t\tvar sfDone = false;\n\t\t\t\tif (sfTokens.length >= 4) {\n\t\t\t\t\tif (sfTokens[0].token === '-' && sfTokens[1].type === 'number') {\n\t\t\t\t\t\tvar sfNum = parseInt(sfTokens[1].token);\n\t\t\t\t\t\tif (sfNum >= 1 && sfNum <= 9) {\n\t\t\t\t\t\t\tif (!multilineVars.setfont)\n\t\t\t\t\t\t\t\tmultilineVars.setfont = [];\n\t\t\t\t\t\t\tsfTokens.shift();\n\t\t\t\t\t\t\tsfTokens.shift();\n\t\t\t\t\t\t\tmultilineVars.setfont[sfNum] = getFontParameter(sfTokens, multilineVars.setfont[sfNum], str, 0, 'setfont');\n//\t\t\t\t\t\t\tvar sfSize = sfTokens.pop();\n//\t\t\t\t\t\t\tif (sfSize.type === 'number') {\n//\t\t\t\t\t\t\t\tsfSize = parseInt(sfSize.token);\n//\t\t\t\t\t\t\t\tvar sfFontName = '';\n//\t\t\t\t\t\t\t\tfor (var sfi = 2; sfi < sfTokens.length; sfi++)\n//\t\t\t\t\t\t\t\t\tsfFontName += sfTokens[sfi].token;\n//\t\t\t\t\t\t\t\tmultilineVars.setfont[sfNum] = { face: sfFontName, size: sfSize };\n//\t\t\t\t\t\t\t\tsfDone = true;\n//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\tif (!sfDone)\n//\t\t\t\t\treturn \"Bad parameters: \" + cmd;\n\t\t\t\tbreak;\n\t\t\tcase \"gchordfont\":\n\t\t\tcase \"partsfont\":\n\t\t\tcase \"tripletfont\":\n\t\t\tcase \"vocalfont\":\n\t\t\tcase \"textfont\":\n\t\t\tcase \"annotationfont\":\n\t\t\tcase \"historyfont\":\n\t\t\tcase \"infofont\":\n\t\t\tcase \"measurefont\":\n\t\t\tcase \"repeatfont\":\n\t\t\tcase \"wordsfont\":\n\t\t\t\treturn getChangingFont(cmd, tokens, str);\n\t\t\tcase \"composerfont\":\n\t\t\tcase \"subtitlefont\":\n\t\t\tcase \"tempofont\":\n\t\t\tcase \"titlefont\":\n\t\t\tcase \"voicefont\":\n\t\t\tcase \"footerfont\":\n\t\t\tcase \"headerfont\":\n\t\t\t\treturn getGlobalFont(cmd, tokens, str);\n\t\t\tcase \"barlabelfont\":\n\t\t\tcase \"barnumberfont\":\n\t\t\tcase \"barnumfont\":\n\t\t\t\treturn getChangingFont(\"measurefont\", tokens, str);\n\t\t\tcase \"staves\":\n\t\t\tcase \"score\":\n\t\t\t\tmultilineVars.score_is_present = true;\n\t\t\t\tvar addVoice = function(id, newStaff, bracket, brace, continueBar) {\n\t\t\t\t\tif (newStaff || multilineVars.staves.length === 0) {\n\t\t\t\t\t\tmultilineVars.staves.push({index: multilineVars.staves.length, numVoices: 0});\n\t\t\t\t\t}\n\t\t\t\t\tvar staff = parseCommon.last(multilineVars.staves);\n\t\t\t\t\tif (bracket !== undefined && staff.bracket === undefined) staff.bracket = bracket;\n\t\t\t\t\tif (brace !== undefined && staff.brace === undefined) staff.brace = brace;\n\t\t\t\t\tif (continueBar) staff.connectBarLines = 'end';\n\t\t\t\t\tif (multilineVars.voices[id] === undefined) {\n\t\t\t\t\t\tmultilineVars.voices[id] = {staffNum: staff.index, index: staff.numVoices};\n\t\t\t\t\t\tstaff.numVoices++;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tvar openParen = false;\n\t\t\t\tvar openBracket = false;\n\t\t\t\tvar openBrace = false;\n\t\t\t\tvar justOpenParen = false;\n\t\t\t\tvar justOpenBracket = false;\n\t\t\t\tvar justOpenBrace = false;\n\t\t\t\tvar continueBar = false;\n\t\t\t\tvar lastVoice;\n\t\t\t\tvar addContinueBar = function() {\n\t\t\t\t\tcontinueBar = true;\n\t\t\t\t\tif (lastVoice) {\n\t\t\t\t\t\tvar ty = 'start';\n\t\t\t\t\t\tif (lastVoice.staffNum > 0) {\n\t\t\t\t\t\t\tif (multilineVars.staves[lastVoice.staffNum-1].connectBarLines === 'start' ||\n\t\t\t\t\t\t\t\tmultilineVars.staves[lastVoice.staffNum-1].connectBarLines === 'continue')\n\t\t\t\t\t\t\t\tty = 'continue';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultilineVars.staves[lastVoice.staffNum].connectBarLines = ty;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\twhile (tokens.length) {\n\t\t\t\t\tvar t = tokens.shift();\n\t\t\t\t\tswitch (t.token) {\n\t\t\t\t\t\tcase '(':\n\t\t\t\t\t\t\tif (openParen) warn(\"Can't nest parenthesis in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openParen = true;justOpenParen = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\tif (!openParen || justOpenParen) warn(\"Unexpected close parenthesis in %%score\", str, t.start);\n\t\t\t\t\t\t\telse openParen = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '[':\n\t\t\t\t\t\t\tif (openBracket) warn(\"Can't nest brackets in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBracket = true;justOpenBracket = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ']':\n\t\t\t\t\t\t\tif (!openBracket || justOpenBracket) warn(\"Unexpected close bracket in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBracket = false;multilineVars.staves[lastVoice.staffNum].bracket = 'end';}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '{':\n\t\t\t\t\t\t\tif (openBrace ) warn(\"Can't nest braces in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBrace = true;justOpenBrace = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '}':\n\t\t\t\t\t\t\tif (!openBrace || justOpenBrace) warn(\"Unexpected close brace in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBrace = false;multilineVars.staves[lastVoice.staffNum].brace = 'end';}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '|':\n\t\t\t\t\t\t\taddContinueBar();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tvar vc = \"\";\n\t\t\t\t\t\t\twhile (t.type === 'alpha' || t.type === 'number') {\n\t\t\t\t\t\t\t\tvc += t.token;\n\t\t\t\t\t\t\t\tif (t.continueId)\n\t\t\t\t\t\t\t\t\tt = tokens.shift();\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar newStaff = !openParen || justOpenParen;\n\t\t\t\t\t\t\tvar bracket = justOpenBracket ? 'start' : openBracket ? 'continue' : undefined;\n\t\t\t\t\t\t\tvar brace = justOpenBrace ? 'start' : openBrace ? 'continue' : undefined;\n\t\t\t\t\t\t\taddVoice(vc, newStaff, bracket, brace, continueBar);\n\t\t\t\t\t\t\tjustOpenParen = false;\n\t\t\t\t\t\t\tjustOpenBracket = false;\n\t\t\t\t\t\t\tjustOpenBrace = false;\n\t\t\t\t\t\t\tcontinueBar = false;\n\t\t\t\t\t\t\tlastVoice = multilineVars.voices[vc];\n\t\t\t\t\t\t\tif (cmd === 'staves')\n\t\t\t\t\t\t\t\taddContinueBar();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"newpage\":\n\t\t\t\tvar pgNum = tokenizer.getInt(restOfString);\n\t\t\t\ttuneBuilder.addNewPage(pgNum.digits === 0 ? -1 : pgNum.value);\n\t\t\t\tbreak;\n\n\t\t\tcase \"abc\":\n\t\t\t\tvar arr = restOfString.split(' ');\n\t\t\t\tswitch (arr[0]) {\n\t\t\t\t\tcase \"-copyright\":\n\t\t\t\t\tcase \"-creator\":\n\t\t\t\t\tcase \"-edited-by\":\n\t\t\t\t\tcase \"-version\":\n\t\t\t\t\tcase \"-charset\":\n\t\t\t\t\t\tvar subCmd = arr.shift();\n\t\t\t\t\t\ttuneBuilder.addMetaText(cmd+subCmd, arr.join(' '), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length+5});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Unknown directive: \" + cmd+arr[0];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"header\":\n\t\t\tcase \"footer\":\n\t\t\t\tvar footerStr = tokenizer.getMeat(restOfString, 0, restOfString.length);\n\t\t\t\tfooterStr = restOfString.substring(footerStr.start, footerStr.end);\n\t\t\t\tif (footerStr[0] === '\"' && footerStr[footerStr.length-1] === '\"' )\n\t\t\t\t\tfooterStr = footerStr.substring(1, footerStr.length-1);\n\t\t\t\tvar footerArr = footerStr.split('\\t');\n\t\t\t\tvar footer = {};\n\t\t\t\tif (footerArr.length === 1)\n\t\t\t\t\tfooter = { left: \"\", center: footerArr[0], right: \"\" };\n\t\t\t\telse if (footerArr.length === 2)\n\t\t\t\t\tfooter = { left: footerArr[0], center: footerArr[1], right: \"\" };\n\t\t\t\telse\n\t\t\t\t\tfooter = { left: footerArr[0], center: footerArr[1], right: footerArr[2] };\n\t\t\t\tif (footerArr.length > 3)\n\t\t\t\t\twarn(\"Too many tabs in \" + cmd + \": \" + footerArr.length + \" found.\", restOfString, 0);\n\n\t\t\t\ttuneBuilder.addMetaTextObj(cmd, footer, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+str.length});\n\t\t\t\tbreak;\n\n\t\t\tcase \"midi\":\n\t\t\t\tvar midi = tokenizer.tokenize(restOfString, 0, restOfString.length, true);\n\t\t\t\tif (midi.length > 0 && midi[0].token === '=')\n\t\t\t\t\tmidi.shift();\n\t\t\t\tif (midi.length === 0)\n\t\t\t\t\twarn(\"Expected midi command\", restOfString, 0);\n\t\t\t\telse\n\t\t\t\t\tparseMidiCommand(midi, tune, restOfString);\n\t\t\t\tbreak;\n\t\t\tcase \"percmap\":\n\t\t\t\tvar percmap = interpretPercMap(restOfString);\n\t\t\t\tif (percmap.error)\n\t\t\t\t\twarn(percmap.error, str, 8);\n\t\t\t\telse {\n\t\t\t\t\tif (!tune.formatting.percmap)\n\t\t\t\t\t\ttune.formatting.percmap = {};\n\t\t\t\t\ttune.formatting.percmap[percmap.key] = percmap.value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"map\":\n\t\t\tcase \"playtempo\":\n\t\t\tcase \"auquality\":\n\t\t\tcase \"continuous\":\n\t\t\tcase \"nobarcheck\":\n\t\t\t\t// TODO-PER: Actually handle the parameters of these\n\t\t\t\ttune.formatting[cmd] = restOfString;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn \"Unknown directive: \" + cmd;\n\t\t}\n\t\treturn null;\n\t};\n\tparseDirective.globalFormatting = function(formatHash) {\n\t\tfor (var cmd in formatHash) {\n\t\t\tif (formatHash.hasOwnProperty(cmd)) {\n\t\t\t\tvar value = ''+formatHash[cmd];\n\t\t\t\tvar tokens = tokenizer.tokenize(value, 0, value.length);\n\t\t\t\tvar scratch;\n\t\t\t\tswitch (cmd) {\n\t\t\t\t\tcase \"titlefont\":\n\t\t\t\t\tcase \"gchordfont\":\n\t\t\t\t\tcase \"composerfont\":\n\t\t\t\t\tcase \"footerfont\":\n\t\t\t\t\tcase \"headerfont\":\n\t\t\t\t\tcase \"historyfont\":\n\t\t\t\t\tcase \"infofont\":\n\t\t\t\t\tcase \"measurefont\":\n\t\t\t\t\tcase \"partsfont\":\n\t\t\t\t\tcase \"repeatfont\":\n\t\t\t\t\tcase \"subtitlefont\":\n\t\t\t\t\tcase \"tempofont\":\n\t\t\t\t\tcase \"textfont\":\n\t\t\t\t\tcase \"voicefont\":\n\t\t\t\t\tcase \"tripletfont\":\n\t\t\t\t\tcase \"vocalfont\":\n\t\t\t\t\tcase \"wordsfont\":\n\t\t\t\t\tcase \"annotationfont\":\n\t\t\t\t\tcase \"tablabelfont\":\n\t\t\t\t\tcase \"tabnumberfont\":\n\t\t\t\t\tcase \"tabgracefont\":\n\t\t\t\t\t\tgetChangingFont(cmd, tokens, value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"scale\":\n\t\t\t\t\t\tsetScale(cmd, tokens);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"partsbox\":\n\t\t\t\t\t\tscratch = addMultilineVarBool('partsBox', cmd, tokens);\n\t\t\t\t\t\tif (scratch !== null) warn(scratch);\n\t\t\t\t\t\tmultilineVars.partsfont.box = multilineVars.partsBox;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"freegchord\":\n\t\t\t\t\t\tscratch = addMultilineVarBool('freegchord', cmd, tokens);\n\t\t\t\t\t\tif (scratch !== null) warn(scratch);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"fontboxpadding\":\n\t\t\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\t\t\twarn(\"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\");\n\t\t\t\t\t\ttune.formatting.fontboxpadding = tokens[0].floatt;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stafftopmargin\":\n\t\t\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\t\t\twarn(\"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\");\n\t\t\t\t\t\ttune.formatting.stafftopmargin = tokens[0].floatt;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stretchlast\":\n\t\t\t\t\t\tvar sl = parseStretchLast(tokens);\n\t\t\t\t\t\tif (sl.value !== undefined)\n\t\t\t\t\t\t\ttune.formatting.stretchlast = sl.value;\n\t\t\t\t\t\tif (sl.error)\n\t\t\t\t\t\t\treturn sl.error;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twarn(\"Formatting directive unrecognized: \", cmd, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction parseStretchLast(tokens) {\n\t\tif (tokens.length === 0)\n\t\t\treturn { value: 1 }; // if there is no value then the presence of this is the same as \"true\"\n\t\telse if (tokens.length === 1) {\n\t\t\tif (tokens[0].type === \"number\") {\n\t\t\t\tif (tokens[0].floatt >= 0 || tokens[0].floatt <= 1)\n\t\t\t\t\treturn {value: tokens[0].floatt};\n\t\t\t} else if (tokens[0].token === 'false') {\n\t\t\t\treturn { value: 0 };\n\t\t\t} else if (tokens[0].token === 'true') {\n\t\t\t\treturn {value: 1};\n\t\t\t}\n\t\t}\n\t\treturn { error: \"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received \" + tokens[0].token + ')' };\n\t}\n})();\n\nmodule.exports = parseDirective;\n","// abc_parse_header.js: parses a the header fields from a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = require('./abc_common');\nvar parseDirective = require('./abc_parse_directive');\nvar parseKeyVoice = require('./abc_parse_key_voice');\n\nvar ParseHeader = function(tokenizer, warn, multilineVars, tune, tuneBuilder) {\n\tthis.reset = function(tokenizer, warn, multilineVars, tune) {\n\t\tparseKeyVoice.initialize(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t\tparseDirective.initialize(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t};\n\tthis.reset(tokenizer, warn, multilineVars, tune);\n\n\tthis.setTitle = function(title, origSize) {\n\t\tif (multilineVars.hasMainTitle)\n\t\t\ttuneBuilder.addSubtitle(title, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+origSize+2});\t// display secondary title\n\t\telse\n\t\t{\n\t\t\ttuneBuilder.addMetaText(\"title\", title, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+origSize+2});\n\t\t\tmultilineVars.hasMainTitle = true;\n\t\t}\n\t};\n\n\tthis.setMeter = function(line) {\n\t\tline = tokenizer.stripComment(line);\n\t\tif (line === 'C') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'common_time'};\n\t\t} else if (line === 'C|') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'cut_time'};\n\t\t} else if (line === 'o') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_perfectum'};\n\t\t} else if (line === 'c') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_imperfectum'};\n\t\t} else if (line === 'o.') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_perfectum_prolatio'};\n\t\t} else if (line === 'c.') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_imperfectum_prolatio'};\n\t\t} else if (line.length === 0 || line.toLowerCase() === 'none') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar tokens = tokenizer.tokenize(line, 0, line.length);\n\t\t\t// the form is [open_paren] decimal [ plus|dot decimal ]... [close_paren] slash decimal [plus same_as_before]\n\t\t\ttry {\n\t\t\t\tvar parseNum = function() {\n\t\t\t\t\t// handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren]\n\t\t\t\t\tvar ret = {value: 0, num: \"\"};\n\n\t\t\t\t\tvar tok = tokens.shift();\n\t\t\t\t\tif (tok.token === '(')\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\twhile (1) {\n\t\t\t\t\t\tif (tok.type !== 'number') throw \"Expected top number of meter\";\n\t\t\t\t\t\tret.value += parseInt(tok.token);\n\t\t\t\t\t\tret.num += tok.token;\n\t\t\t\t\t\tif (tokens.length === 0 || tokens[0].token === '/') return ret;\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\t\tif (tok.token === ')') {\n\t\t\t\t\t\t\tif (tokens.length === 0 || tokens[0].token === '/') return ret;\n\t\t\t\t\t\t\tthrow \"Unexpected paren in meter\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tok.token !== '.' && tok.token !== '+') throw \"Expected top number of meter\";\n\t\t\t\t\t\tret.num += tok.token;\n\t\t\t\t\t\tif (tokens.length === 0) throw \"Expected top number of meter\";\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\treturn ret;\t// just to suppress warning\n\t\t\t\t};\n\n\t\t\t\tvar parseFraction = function() {\n\t\t\t\t\t// handles this much: parseNum slash decimal\n\t\t\t\t\tvar ret = parseNum();\n\t\t\t\t\tif (tokens.length === 0) return ret;\n\t\t\t\t\tvar tok = tokens.shift();\n\t\t\t\t\tif (tok.token !== '/') throw \"Expected slash in meter\";\n\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\tif (tok.type !== 'number') throw \"Expected bottom number of meter\";\n\t\t\t\t\tret.den = tok.token;\n\t\t\t\t\tret.value = ret.value / parseInt(ret.den);\n\t\t\t\t\treturn ret;\n\t\t\t\t};\n\n\t\t\t\tif (tokens.length === 0) throw \"Expected meter definition in M: line\";\n\t\t\t\tvar meter = {type: 'specified', value: [ ]};\n\t\t\t\tvar totalLength = 0;\n\t\t\t\twhile (1) {\n\t\t\t\t\tvar ret = parseFraction();\n\t\t\t\t\ttotalLength += ret.value;\n\t\t\t\t\tvar mv = { num: ret.num };\n\t\t\t\t\tif (ret.den !== undefined)\n\t\t\t\t\t\tmv.den = ret.den;\n\t\t\t\t\tmeter.value.push(mv);\n\t\t\t\t\tif (tokens.length === 0) break;\n\t\t\t\t\t//var tok = tokens.shift();\n\t\t\t\t\t//if (tok.token !== '+') throw \"Extra characters in M: line\";\n\t\t\t\t}\n\n\t\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\t\tmultilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125;\n\t\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t\t}\n\t\t\t\treturn meter;\n\t\t\t} catch (e) {\n\t\t\t\twarn(e, line, 0);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tthis.calcTempo = function(relTempo) {\n\t\tvar dur = 1/4;\n\t\tif (multilineVars.meter && multilineVars.meter.type === 'specified') {\n\t\t\tdur = 1 / parseInt(multilineVars.meter.value[0].den);\n\t\t} else if (multilineVars.origMeter && multilineVars.origMeter.type === 'specified') {\n\t\t\tdur = 1 / parseInt(multilineVars.origMeter.value[0].den);\n\t\t}\n\t\t//var dur = multilineVars.default_length ? multilineVars.default_length : 1;\n\t\tfor (var i = 0; i < relTempo.duration; i++)\n\t\t\trelTempo.duration[i] = dur * relTempo.duration[i];\n\t\treturn relTempo;\n\t};\n\n\tthis.resolveTempo = function() {\n\t\tif (multilineVars.tempo) {\t// If there's a tempo waiting to be resolved\n\t\t\tthis.calcTempo(multilineVars.tempo);\n\t\t\ttune.metaText.tempo = multilineVars.tempo;\n\t\t\tdelete multilineVars.tempo;\n\t\t}\n\t};\n\n\tthis.addUserDefinition = function(line, start, end) {\n\t\tvar equals = line.indexOf('=', start);\n\t\tif (equals === -1) {\n\t\t\twarn(\"Need an = in a macro definition\", line, start);\n\t\t\treturn;\n\t\t}\n\n\t\tvar before = parseCommon.strip(line.substring(start, equals));\n\t\tvar after = parseCommon.strip(line.substring(equals+1));\n\n\t\tif (before.length !== 1) {\n\t\t\twarn(\"Macro definitions can only be one character\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tvar legalChars = \"HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~\";\n\t\tif (legalChars.indexOf(before) === -1) {\n\t\t\twarn(\"Macro definitions must be H-Y, h-w, or tilde\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tif (after.length === 0) {\n\t\t\twarn(\"Missing macro definition\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tif (multilineVars.macros === undefined)\n\t\t\tmultilineVars.macros = {};\n\t\tmultilineVars.macros[before] = after;\n\t};\n\n\tthis.setDefaultLength = function(line, start, end) {\n\t\tvar len = line.substring(start, end).replace(/ /g, \"\");\n\t\tvar len_arr = len.split('/');\n\t\tif (len_arr.length === 2) {\n\t\t\tvar n = parseInt(len_arr[0]);\n\t\t\tvar d = parseInt(len_arr[1]);\n\t\t\tif (d > 0) {\n\t\t\t\tmultilineVars.default_length = n / d;\t// a whole note is 1\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t} else if (len_arr.length === 1 && len_arr[0] === '1') {\n\t\t\tmultilineVars.default_length = 1;\n\t\t\tmultilineVars.havent_set_length = false;\n\t\t}\n\t};\n\n\n\tvar tempoString = {\n\n\t\tlarghissimo: 20,\n\t\tadagissimo: 24,\n\t\tsostenuto: 28,\n\t\tgrave: 32,\n\t\tlargo: 40,\n\t\tlento: 50,\n\t\tlarghetto: 60,\n\t\tadagio: 68,\n\t\tadagietto: 74,\n\t\tandante: 80,\n\t\tandantino: 88,\n\t\t\"marcia moderato\": 84,\n\t\t\"andante moderato\": 100,\n\t\tmoderato: 112,\n\t\tallegretto: 116,\n\t\t\"allegro moderato\": 120,\n\t\tallegro: 126,\n\t\tanimato: 132,\n\t\tagitato: 140,\n\t\tveloce: 148,\n\t\t\"mosso vivo\": 156,\n\t\tvivace: 164,\n\t\tvivacissimo: 172,\n\t\tallegrissimo: 176,\n\t\tpresto: 184,\n\t\tprestissimo: 210,\n\t};\n\n\tthis.setTempo = function(line, start, end, iChar) {\n\t\t//Q - tempo; can be used to specify the notes per minute, e.g. If\n\t\t//the meter denominator is a 4 note then Q:120 or Q:C=120\n\t\t//is 120 quarter notes per minute. Similarly Q:C3=40 would be 40\n\t\t//dotted half notes per minute. An absolute tempo may also be\n\t\t//set, e.g. Q:1/8=120 is 120 eighth notes per minute,\n\t\t//irrespective of the meter's denominator.\n\t\t//\n\t\t// This is either a number, \"C=number\", \"Cnumber=number\", or fraction [fraction...]=number\n\t\t// It depends on the M: field, which may either not be present, or may appear after this.\n\t\t// If M: is not present, an eighth note is used.\n\t\t// That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an M: field.\n\t\t// So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars.\n\t\t// The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1.\n\t\t// In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional.\n\t\ttry {\n\t\t\tvar tokens = tokenizer.tokenize(line, start, end);\n\n\t\t\tif (tokens.length === 0) throw \"Missing parameter in Q: field\";\n\n\t\t\tvar tempo = { startChar: iChar+start-2, endChar: iChar+end };\n\t\t\tvar delaySet = true;\n\t\t\tvar token = tokens.shift();\n\t\t\tif (token.type === 'quote') {\n\t\t\t\ttempo.preString = token.token;\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (tokens.length === 0) {\t// It's ok to just get a string for the tempo\n\t\t\t\t\t// If the string is a well-known tempo, put in the bpm\n\t\t\t\t\tif (tempoString[tempo.preString.toLowerCase()]) {\n\t\t\t\t\t\ttempo.bpm = tempoString[tempo.preString.toLowerCase()];\n\t\t\t\t\t\ttempo.suppressBpm = true;\n\t\t\t\t\t}\n\t\t\t\t\treturn {type: 'immediate', tempo: tempo};\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (token.type === 'alpha' && token.token === 'C')\t { // either type 2 or type 3\n\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after C in Q: field\";\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (token.type === 'punct' && token.token === '=') {\n\t\t\t\t\t// This is a type 2 format. The duration is an implied 1\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected number after = in Q: field\";\n\t\t\t\t\ttempo.duration = [1];\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t} else if (token.type === 'number') {\n\t\t\t\t\t// This is a type 3 format.\n\t\t\t\t\ttempo.duration = [parseInt(token.token)];\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing = after duration in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' || token.token !== '=') throw \"Expected = after duration in Q: field\";\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected number after = in Q: field\";\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t} else throw \"Expected number or equal after C in Q: field\";\n\n\t\t\t} else if (token.type === 'number') {\t// either type 1 or type 4\n\t\t\t\tvar num = parseInt(token.token);\n\t\t\t\tif (tokens.length === 0 || tokens[0].type === 'quote') {\n\t\t\t\t\t// This is type 1\n\t\t\t\t\ttempo.duration = [1];\n\t\t\t\t\ttempo.bpm = num;\n\t\t\t\t} else {\t// This is type 4\n\t\t\t\t\tdelaySet = false;\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' && token.token !== '/') throw \"Expected fraction in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\tvar den = parseInt(token.token);\n\t\t\t\t\ttempo.duration = [num/den];\n\t\t\t\t\t// We got the first fraction, keep getting more as long as we find them.\n\t\t\t\t\twhile (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') {\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\tnum = parseInt(token.token);\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'punct' && token.token !== '/') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\tden = parseInt(token.token);\n\t\t\t\t\t\ttempo.duration.push(num/den);\n\t\t\t\t\t}\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' && token.token !== '=') throw \"Expected = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected tempo in Q: field\";\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t}\n\t\t\t} else throw \"Unknown value in Q: field\";\n\t\t\tif (tokens.length !== 0) {\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (token.type === 'quote') {\n\t\t\t\t\ttempo.postString = token.token;\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t}\n\t\t\t\tif (tokens.length !== 0) throw \"Unexpected string at end of Q: field\";\n\t\t\t}\n\t\t\tif (multilineVars.printTempo === false)\n\t\t\t\ttempo.suppress = true;\n\t\t\treturn {type: delaySet?'delaySet':'immediate', tempo: tempo};\n\t\t} catch (msg) {\n\t\t\twarn(msg, line, start);\n\t\t\treturn {type: 'none'};\n\t\t}\n\t};\n\n\tthis.letter_to_inline_header = function(line, i, startLine)\n\t{\n\t\tvar needsNewLine = false\n\t\tvar ws = tokenizer.eatWhiteSpace(line, i);\n\t\ti +=ws;\n\t\tif (line.length >= i+5 && line[i] === '[' && line[i+2] === ':') {\n\t\t\tvar e = line.indexOf(']', i);\n\t\t\tvar startChar = multilineVars.iChar + i;\n\t\t\tvar endChar = multilineVars.iChar + e + 1;\n\t\t\tswitch(line.substring(i, i+3))\n\t\t\t{\n\t\t\t\tcase \"[I:\":\n\t\t\t\t\tvar err = parseDirective.addDirective(line.substring(i+3, e));\n\t\t\t\t\tif (err) warn(err, line, i);\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[M:\":\n\t\t\t\t\tvar meter = this.setMeter(line.substring(i+3, e));\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic() && meter)\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('meter', startChar, endChar, meter);\n\t\t\t\t\telse\n\t\t\t\t\t\tmultilineVars.meter = meter;\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[K:\":\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(i+3, e), true);\n\t\t\t\t\tif (result.foundClef && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', startChar, endChar, multilineVars.clef);\n\t\t\t\t\tif (result.foundKey && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', startChar, endChar, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[P:\":\n\t\t\t\t\tvar part = parseDirective.parseFontChangeLine(line.substring(i+3, e))\n\t\t\t\t\tif (startLine || tune.lines.length <= tune.lineNum)\n\t\t\t\t\t\tmultilineVars.partForNextLine = { title: part, startChar: startChar, endChar: endChar };\n\t\t\t\t\telse\n\t\t\t\t\t\ttuneBuilder.appendElement('part', startChar, endChar, {title: part});\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[L:\":\n\t\t\t\t\tthis.setDefaultLength(line, i+3, e);\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[Q:\":\n\t\t\t\t\tif (e > 0) {\n\t\t\t\t\t\tvar tempo = this.setTempo(line, i+3, e, multilineVars.iChar);\n\t\t\t\t\t\tif (tempo.type === 'delaySet') {\n\t\t\t\t\t\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('tempo', startChar, endChar, this.calcTempo(tempo.tempo));\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, this.calcTempo(tempo.tempo)]\n\t\t\t\t\t\t} else if (tempo.type === 'immediate') {\n\t\t\t\t\t\t\tif (!startLine && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('tempo', startChar, endChar, tempo.tempo);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, tempo.tempo]\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ e-i+1+ws, line[i+1], line.substring(i+3, e)];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[V:\":\n\t\t\t\t\tif (e > 0) {\n\t\t\t\t\t\tneedsNewLine = parseKeyVoice.parseVoice(line, i+3, e);\n\t\t\t\t\t\t//startNewLine();\n\t\t\t\t\t\treturn [ e-i+1+ws, line[i+1], line.substring(i+3, e), needsNewLine];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[r:\":\n\t\t\t\t\treturn [ e-i+1+ws ];\n\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO: complain about unhandled header\n\t\t\t}\n\t\t}\n\t\treturn [ 0 ];\n\t};\n\n\tthis.letter_to_body_header = function(line, i)\n\t{\n\t\tvar needsNewLine = false\n\t\tif (line.length >= i+3) {\n\t\t\tswitch(line.substring(i, i+2))\n\t\t\t{\n\t\t\t\tcase \"I:\":\n\t\t\t\t\tvar err = parseDirective.addDirective(line.substring(i+2));\n\t\t\t\t\tif (err) warn(err, line, i);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"M:\":\n\t\t\t\t\tvar meter = this.setMeter(line.substring(i+2));\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic() && meter)\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('meter', multilineVars.iChar + i, multilineVars.iChar + line.length, meter);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"K:\":\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(i+2), tuneBuilder.hasBeginMusic());\n\t\t\t\t\tif (result.foundClef && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', multilineVars.iChar + i, multilineVars.iChar + line.length, multilineVars.clef);\n\t\t\t\t\tif (result.foundKey && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', multilineVars.iChar + i, multilineVars.iChar + line.length, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"P:\":\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendElement('part', multilineVars.iChar + i, multilineVars.iChar + line.length, {title: line.substring(i+2)});\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"L:\":\n\t\t\t\t\tthis.setDefaultLength(line, i+2, line.length);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"Q:\":\n\t\t\t\t\tvar e = line.indexOf('\\x12', i+2);\n\t\t\t\t\tif (e === -1) e = line.length;\n\t\t\t\t\tvar tempo = this.setTempo(line, i+2, e, multilineVars.iChar);\n\t\t\t\t\tif (tempo.type === 'delaySet') tuneBuilder.appendElement('tempo', multilineVars.iChar + i, multilineVars.iChar + line.length, this.calcTempo(tempo.tempo));\n\t\t\t\t\telse if (tempo.type === 'immediate') tuneBuilder.appendElement('tempo', multilineVars.iChar + i, multilineVars.iChar + line.length, tempo.tempo);\n\t\t\t\treturn [ e, line[i], parseCommon.strip(line.substring(i+2))];\n\t\t\t\tcase \"V:\":\n\t\t\t\t\tneedsNewLine = parseKeyVoice.parseVoice(line, i+2, line.length);\n//\t\t\t\t\t\tstartNewLine();\n\t\t\t\t\treturn [ line.length, line[i], parseCommon.strip(line.substring(i+2)), needsNewLine];\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO: complain about unhandled header\n\t\t\t}\n\t\t}\n\t\treturn [ 0 ];\n\t};\n\n\tvar metaTextHeaders = {\n\t\tA: 'author',\n\t\tB: 'book',\n\t\tC: 'composer',\n\t\tD: 'discography',\n\t\tF: 'url',\n\t\tG: 'group',\n\t\tI: 'instruction',\n\t\tN: 'notes',\n\t\tO: 'origin',\n\t\tR: 'rhythm',\n\t\tS: 'source',\n\t\tW: 'unalignedWords',\n\t\tZ: 'transcription'\n\t};\n\n\tthis.parseHeader = function(line) {\n\t\tvar field = metaTextHeaders[line[0]];\n\t\tvar origSize = line.length-2\n\t\tvar restOfLine = tokenizer.translateString(tokenizer.stripComment(line.substring(2)))\n\t\tif (field === 'unalignedWords' || field === 'notes') {\n\t\t\t// These fields can be multi-line\n\t\t\ttuneBuilder.addMetaTextArray(field, parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t} else if (field !== undefined) {\n\t\t\t// these fields are single line\n\t\t\ttuneBuilder.addMetaText(field, parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t} else {\n\t\t\tvar startChar = multilineVars.iChar;\n\t\t\tvar endChar = startChar + line.length;\n\t\t\tswitch(line[0])\n\t\t\t{\n\t\t\t\tcase 'H':\n\t\t\t\t\t// History is a little different because once it starts it continues until another header field is encountered\n\t\t\t\t\ttuneBuilder.addMetaTextArray(\"history\", parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\tline = tokenizer.peekLine()\n\t\t\t\t\twhile (line && line[1] !== ':') {\n\t\t\t\t\t\ttokenizer.nextLine()\n\t\t\t\t\t\ttuneBuilder.addMetaTextArray(\"history\", parseDirective.parseFontChangeLine(tokenizer.translateString(tokenizer.stripComment(line))), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\t\tline = tokenizer.peekLine()\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'K':\n\t\t\t\t\t// since the key is the last thing that can happen in the header, we can resolve the tempo now\n\t\t\t\t\tthis.resolveTempo();\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(2), false);\n\t\t\t\t\tif (!multilineVars.is_in_header && tuneBuilder.hasBeginMusic()) {\n\t\t\t\t\t\tif (result.foundClef)\n\t\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', startChar, endChar, multilineVars.clef);\n\t\t\t\t\t\tif (result.foundKey)\n\t\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', startChar, endChar, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.is_in_header = false;\t// The first key signifies the end of the header.\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'L':\n\t\t\t\t\tthis.setDefaultLength(line, 2, line.length);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'M':\n\t\t\t\t\tmultilineVars.origMeter = multilineVars.meter = this.setMeter(line.substring(2));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'P':\n\t\t\t\t\t// TODO-PER: There is more to do with parts, but the writer doesn't care.\n\t\t\t\t\tif (multilineVars.is_in_header)\n\t\t\t\t\t\ttuneBuilder.addMetaText(\"partOrder\", parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\telse\n\t\t\t\t\t\tmultilineVars.partForNextLine = { title: restOfLine, startChar: startChar, endChar: endChar};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Q':\n\t\t\t\t\tvar tempo = this.setTempo(line, 2, line.length, multilineVars.iChar);\n\t\t\t\t\tif (tempo.type === 'delaySet') multilineVars.tempo = tempo.tempo;\n\t\t\t\t\telse if (tempo.type === 'immediate') {\n\t\t\t\t\t\tif (!tune.metaText.tempo)\n\t\t\t\t\t\t\ttune.metaText.tempo = tempo.tempo;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, tempo.tempo]\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'T':\n\t\t\t\t\tif (multilineVars.titlecaps)\n\t\t\t\t\t\trestOfLine = restOfLine.toUpperCase();\t\t\n\t\t\t\t\tthis.setTitle(parseDirective.parseFontChangeLine(tokenizer.theReverser(restOfLine)), origSize);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tthis.addUserDefinition(line, 2, line.length);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'V':\n\t\t\t\t\tparseKeyVoice.parseVoice(line, 2, line.length);\n\t\t\t\t\tif (!multilineVars.is_in_header)\n\t\t\t\t\t\treturn {newline: true};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's':\n\t\t\t\t\treturn {symbols: true};\n\t\t\t\tcase 'w':\n\t\t\t\t\treturn {words: true};\n\t\t\t\tcase 'X':\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'm':\n\t\t\t\t\twarn(\"Ignored header\", line, 0);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {regular: true};\n\t\t\t}\n\t\t}\n\t\treturn {};\n\t};\n};\n\nmodule.exports = ParseHeader;\n","var parseDirective = require('./abc_parse_directive');\nvar transpose = require('./abc_transpose');\n\nvar parseKeyVoice = {};\n\n(function() {\n\tvar tokenizer;\n\tvar warn;\n\tvar multilineVars;\n\tvar tune;\n\tvar tuneBuilder;\n\tparseKeyVoice.initialize = function(tokenizer_, warn_, multilineVars_, tune_, tuneBuilder_) {\n\t\ttokenizer = tokenizer_;\n\t\twarn = warn_;\n\t\tmultilineVars = multilineVars_;\n\t\ttune = tune_;\n\t\ttuneBuilder = tuneBuilder_;\n\t};\n\n\tparseKeyVoice.standardKey = function(keyName, root, acc, localTranspose) {\n\t\treturn transpose.keySignature(multilineVars, keyName, root, acc, localTranspose);\n\t};\n\n\tvar clefLines = {\n\t\t'treble': { clef: 'treble', pitch: 4, mid: 0 },\n\t\t'treble+8': { clef: 'treble+8', pitch: 4, mid: 0 },\n\t\t'treble-8': { clef: 'treble-8', pitch: 4, mid: 0 },\n\t\t'treble^8': { clef: 'treble+8', pitch: 4, mid: 0 },\n\t\t'treble_8': { clef: 'treble-8', pitch: 4, mid: 0 },\n\t\t'treble1': { clef: 'treble', pitch: 2, mid: 2 },\n\t\t'treble2': { clef: 'treble', pitch: 4, mid: 0 },\n\t\t'treble3': { clef: 'treble', pitch: 6, mid: -2 },\n\t\t'treble4': { clef: 'treble', pitch: 8, mid: -4 },\n\t\t'treble5': { clef: 'treble', pitch: 10, mid: -6 },\n\t\t'perc': { clef: 'perc', pitch: 6, mid: 0 },\n\t\t'none': { clef: 'none', mid: 0 },\n\t\t'bass': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass+8': { clef: 'bass+8', pitch: 8, mid: -12 },\n\t\t'bass-8': { clef: 'bass-8', pitch: 8, mid: -12 },\n\t\t'bass^8': { clef: 'bass+8', pitch: 8, mid: -12 },\n\t\t'bass_8': { clef: 'bass-8', pitch: 8, mid: -12 },\n\t\t'bass+16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass-16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass^16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass_16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass1': { clef: 'bass', pitch: 2, mid: -6 },\n\t\t'bass2': { clef: 'bass', pitch: 4, mid: -8 },\n\t\t'bass3': { clef: 'bass', pitch: 6, mid: -10 },\n\t\t'bass4': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass5': { clef: 'bass', pitch: 10, mid: -14 },\n\t\t'tenor': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'tenor1': { clef: 'alto', pitch: 2, mid: -2 },\n\t\t'tenor2': { clef: 'alto', pitch: 4, mid: -4 },\n\t\t'tenor3': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'tenor4': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'tenor5': { clef: 'alto', pitch: 10, mid: -10 },\n\t\t'alto': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'alto1': { clef: 'alto', pitch: 2, mid: -2 },\n\t\t'alto2': { clef: 'alto', pitch: 4, mid: -4 },\n\t\t'alto3': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'alto4': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'alto5': { clef: 'alto', pitch: 10, mid: -10 },\n\t\t'alto+8': { clef: 'alto+8', pitch: 6, mid: -6 },\n\t\t'alto-8': { clef: 'alto-8', pitch: 6, mid: -6 },\n\t\t'alto^8': { clef: 'alto+8', pitch: 6, mid: -6 },\n\t\t'alto_8': { clef: 'alto-8', pitch: 6, mid: -6 }\n\t};\n\n\tvar calcMiddle = function(clef, oct) {\n\t\tvar value = clefLines[clef];\n\t\tvar mid = value ? value.mid : 0;\n\t\treturn mid+oct;\n\t};\n\n\tparseKeyVoice.fixClef = function(clef) {\n\t\tvar value = clefLines[clef.type];\n\t\tif (value) {\n\t\t\tclef.clefPos = value.pitch;\n\t\t\tclef.type = value.clef;\n\t\t}\n\t};\n\n\tparseKeyVoice.deepCopyKey = function(key) {\n\t\tvar ret = { accidentals: [], root: key.root, acc: key.acc, mode: key.mode };\n\t\tkey.accidentals.forEach(function(k) {\n\t\tret.accidentals.push(Object.assign({},k));\n\t\t});\n\t\treturn ret;\n\t};\n\n\tvar pitches = {A: 5, B: 6, C: 0, D: 1, E: 2, F: 3, G: 4, a: 12, b: 13, c: 7, d: 8, e: 9, f: 10, g: 11};\n\n\tparseKeyVoice.addPosToKey = function(clef, key) {\n\t\t// Shift the key signature from the treble positions to whatever position is needed for the clef.\n\t\t// This may put the key signature unnaturally high or low, so if it does, then shift it.\n\t\tvar mid = clef.verticalPos;\n\t\tkey.accidentals.forEach(function(acc) {\n\t\t\tvar pitch = pitches[acc.note];\n\t\t\tpitch = pitch - mid;\n\t\t\tacc.verticalPos = pitch;\n\t\t});\n\t\tif (key.impliedNaturals)\n\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\tvar pitch = pitches[acc.note];\n\t\t\t\tpitch = pitch - mid;\n\t\t\t\tacc.verticalPos = pitch;\n\t\t\t});\n\n\t\tif (mid < -10) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat'))\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (acc.note === 'A' && acc.acc === 'sharp' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\tif ((acc.note === 'G' || acc.note === 'F') && acc.acc === 'flat' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat'))\n\t\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (acc.note === 'A' && acc.acc === 'sharp' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t\tif ((acc.note === 'G' || acc.note === 'F') && acc.acc === 'flat' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t});\n\t\t} else if (mid < -4) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (mid === -8 && (acc.note === 'f' || acc.note === 'g') && acc.acc === 'sharp' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (mid === -8 && (acc.note === 'f' || acc.note === 'g') && acc.acc === 'sharp' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t});\n\t\t} else if (mid >= 7) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos += 7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos += 7;\n\t\t\t\t});\n\t\t}\n\t};\n\n\tparseKeyVoice.fixKey = function(clef, key) {\n\t\tvar fixedKey = Object.assign({},key);\n\t\tparseKeyVoice.addPosToKey(clef, fixedKey);\n\t\treturn fixedKey;\n\t};\n\n\tvar parseMiddle = function(str) {\n\t\tvar i = 0;\n\t\tvar p = str[i++];\n\t\tif (p === '^' || p === '_')\n\t\t\tp = str[i++];\n\t var mid = pitches[p];\n\t\tif (mid === undefined)\n\t\t\tmid = 6; // If a legal middle note wasn't received, just ignore it.\n\t\tfor ( ; i < str.length; i++) {\n\t\t\tif (str[i] === ',') mid -= 7;\n\t\t\telse if (str[i] === \"'\") mid += 7;\n\t\t\telse break;\n\t\t}\n\t\treturn { mid: mid - 6, str: str.substring(i) };\t// We get the note in the middle of the staff. We want the note that appears as the first ledger line below the staff.\n\t};\n\n\tvar normalizeAccidentals = function(accs) {\n\t\tfor (var i = 0; i < accs.length; i++) {\n\t\t\tif (accs[i].note === 'b')\n\t\t\t\taccs[i].note = 'B';\n\t\t\telse if (accs[i].note === 'a')\n\t\t\t\taccs[i].note = 'A';\n\t\t\telse if (accs[i].note === 'F')\n\t\t\t\taccs[i].note = 'f';\n\t\t\telse if (accs[i].note === 'E')\n\t\t\t\taccs[i].note = 'e';\n\t\t\telse if (accs[i].note === 'D')\n\t\t\t\taccs[i].note = 'd';\n\t\t\telse if (accs[i].note === 'C')\n\t\t\t\taccs[i].note = 'c';\n\t\t\telse if (accs[i].note === 'G' && accs[i].acc === 'sharp')\n\t\t\t\taccs[i].note = 'g';\n\t\t\telse if (accs[i].note === 'g' && accs[i].acc === 'flat')\n\t\t\t\taccs[i].note = 'G';\n\t\t}\n\t};\n\n\tparseKeyVoice.parseKey = function(str, isInline)\t// (and clef)\n\t{\n\t\t// returns:\n\t\t//\t\t{ foundClef: true, foundKey: true }\n\t\t// Side effects:\n\t\t//\t\tcalls warn() when there is a syntax error\n\t\t//\t\tsets these members of multilineVars:\n\t\t//\t\t\tclef\n\t\t//\t\t\tkey\n\t\t//\t\t\tstyle\n\t\t//\n\t\t// The format is:\n\t\t// K: [⟨key⟩] [⟨modifiers⟩*]\n\t\t// modifiers are any of the following in any order:\n\t\t// [⟨clef⟩] [middle=⟨pitch⟩] [transpose=[-]⟨number⟩] [stafflines=⟨number⟩] [staffscale=⟨number⟩][style=⟨style⟩]\n\t\t// key is none|HP|Hp|⟨specified_key⟩\n\t\t// clef is [clef=] [⟨clef type⟩] [⟨line number⟩] [+8|-8]\n\t\t// specified_key is ⟨pitch⟩[#|b][mode(first three chars are significant)][accidentals*]\n\t\tif (str.length === 0) {\n\t\t\t// an empty K: field is the same as K:none\n\t\t\tstr = 'none';\n\t\t}\n\t\tvar tokens = tokenizer.tokenize(str, 0, str.length);\n\t\tvar ret = {};\n\n\t\t// Be sure that a key was passed in\n\t\tif (tokens.length === 0) {\n\t\t\twarn(\"Must pass in key signature.\", str, 0);\n\t\t\treturn ret;\n\t\t}\n\n\t\t// first the key\n\t\tswitch (tokens[0].token) {\n\t\t\tcase 'HP':\n\t\t\t\tparseDirective.addDirective(\"bagpipes\");\n\t\t\t\tmultilineVars.key = { root: \"HP\", accidentals: [], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tcase 'Hp':\n\t\t\t\tparseDirective.addDirective(\"bagpipes\");\n\t\t\t\tmultilineVars.key = { root: \"Hp\", accidentals: [{acc: 'natural', note: 'g'}, {acc: 'sharp', note: 'f'}, {acc: 'sharp', note: 'c'}], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tcase 'none':\n\t\t\t\t// we got the none key - that's the same as C to us\n\t\t\t\tmultilineVars.key = { root: \"none\", accidentals: [], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar retPitch = tokenizer.getKeyPitch(tokens[0].token);\n\t\t\t\tif (retPitch.len > 0) {\n\t\t\t\t\tret.foundKey = true;\n\t\t\t\t\tvar acc = \"\";\n\t\t\t\t\tvar mode = \"\";\n\t\t\t\t\t// The accidental and mode might be attached to the pitch, so we might want to just remove the first character.\n\t\t\t\t\tif (tokens[0].token.length > 1)\n\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\tvar key = retPitch.token;\n\t\t\t\t\t// We got a pitch to start with, so we might also have an accidental and a mode\n\t\t\t\t\tif (tokens.length > 0) {\n\t\t\t\t\t\tvar retAcc = tokenizer.getSharpFlat(tokens[0].token);\n\t\t\t\t\t\tif (retAcc.len > 0) {\n\t\t\t\t\t\t\tif (tokens[0].token.length > 1)\n\t\t\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\tkey += retAcc.token;\n\t\t\t\t\t\t\tacc = retAcc.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens.length > 0) {\n\t\t\t\t\t\t\tvar retMode = tokenizer.getMode(tokens[0].token);\n\t\t\t\t\t\t\tif (retMode.len > 0) {\n\t\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\t\tkey += retMode.token;\n\t\t\t\t\t\t\t\tmode = retMode.token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Be sure that the key specified is in the list: not all keys are physically possible, like Cbmin.\n\t\t\t\t\t\tif (parseKeyVoice.standardKey(key, retPitch.token, acc, 0) === undefined) {\n\t\t\t\t\t\t\twarn(\"Unsupported key signature: \" + key, str, 0);\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// We need to do a deep copy because we are going to modify it\n\t\t\t\t\tvar oldKey = parseKeyVoice.deepCopyKey(multilineVars.key);\n\t\t\t\t\t//TODO-PER: HACK! To get the local transpose to work, the transposition is done for each line. This caused the global transposition variable to be factored in twice, so, instead of rewriting that right now, I'm just subtracting one of them here.\n\t\t\t\t\tvar keyCompensate = !isInline && multilineVars.globalTranspose ? -multilineVars.globalTranspose : 0;\n\t\t\t\t\t//console.log(\"parse\", JSON.stringify(multilineVars), isInline)\n\t\t\t\t\tvar savedOrigKey;\n\t\t\t\t\tif (isInline)\n\t\t\t\t\t\tsavedOrigKey = multilineVars.globalTransposeOrigKeySig\n\t\t\t\t\tmultilineVars.key = parseKeyVoice.deepCopyKey(parseKeyVoice.standardKey(key, retPitch.token, acc, keyCompensate));\n\t\t\t\t\tif (isInline)\n\t\t\t\t\t\tmultilineVars.globalTransposeOrigKeySig = savedOrigKey\n\t\t\t\t\tmultilineVars.key.mode = mode;\n\t\t\t\t\tif (oldKey) {\n\t\t\t\t\t\t// Add natural in all places that the old key had an accidental.\n\t\t\t\t\t\tvar kk;\n\t\t\t\t\t\tfor (var k = 0; k < multilineVars.key.accidentals.length; k++) {\n\t\t\t\t\t\t\tfor (kk = 0; kk < oldKey.accidentals.length; kk++) {\n\t\t\t\t\t\t\t\tif (oldKey.accidentals[kk].note && multilineVars.key.accidentals[k].note.toLowerCase() === oldKey.accidentals[kk].note.toLowerCase())\n\t\t\t\t\t\t\t\t\toldKey.accidentals[kk].note = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (kk = 0; kk < oldKey.accidentals.length; kk++) {\n\t\t\t\t\t\t\tif (oldKey.accidentals[kk].note) {\n\t\t\t\t\t\t\t\tif (!multilineVars.key.impliedNaturals)\n\t\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals = [];\n\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals.push({ acc: 'natural', note: oldKey.accidentals[kk].note });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// There are two special cases of deprecated syntax. Ignore them if they occur\n\t\tif (tokens.length === 0) return ret;\n\t\tif (tokens[0].token === 'exp') tokens.shift();\n\t\tif (tokens.length === 0) return ret;\n\t\tif (tokens[0].token === 'oct') tokens.shift();\n\n\t\t// now see if there are extra accidentals\n\t\tif (tokens.length === 0) return ret;\n\t\tvar accs = tokenizer.getKeyAccidentals2(tokens);\n\t\tif (accs.warn)\n\t\t\twarn(accs.warn, str, 0);\n\t\t// If we have extra accidentals, first replace ones that are of the same pitch before adding them to the end.\n\t\tif (accs.accs) {\n\t\t\tif (!ret.foundKey) {\t\t// if there are only extra accidentals, make sure this is set.\n\t\t\t\tret.foundKey = true;\n\t\t\t\tmultilineVars.key = { root: \"none\", acc: \"\", mode: \"\", accidentals: [] };\n\t\t\t}\n\t\t\tnormalizeAccidentals(accs.accs);\n\t\t\tfor (var i = 0; i < accs.accs.length; i++) {\n\t\t\t\tvar found = false;\n\t\t\t\tfor (var j = 0; j < multilineVars.key.accidentals.length && !found; j++) {\n\t\t\t\t\tif (multilineVars.key.accidentals[j].note === accs.accs[i].note) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tif (multilineVars.key.accidentals[j].acc !== accs.accs[i].acc) {\n\t\t\t\t\t\t\t// If the accidental is different, then replace it. If it is the same, then the declaration was redundant, so just ignore it.\n\t\t\t\t\t\t\tmultilineVars.key.accidentals[j].acc = accs.accs[i].acc;\n\t\t\t\t\t\t\tif (!multilineVars.key.explicitAccidentals)\n\t\t\t\t\t\t\t\tmultilineVars.key.explicitAccidentals = [];\n\t\t\t\t\t\t\tmultilineVars.key.explicitAccidentals.push(accs.accs[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (!multilineVars.key.explicitAccidentals)\n\t\t\t\t\t\tmultilineVars.key.explicitAccidentals = [];\n\t\t\t\t\tmultilineVars.key.explicitAccidentals.push(accs.accs[i]);\n\t\t\t\t\tmultilineVars.key.accidentals.push(accs.accs[i]);\n\t\t\t\t\tif (multilineVars.key.impliedNaturals) {\n\t\t\t\t\t\tfor (var kkk = 0; kkk < multilineVars.key.impliedNaturals.length; kkk++) {\n\t\t\t\t\t\t\tif (multilineVars.key.impliedNaturals[kkk].note === accs.accs[i].note)\n\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals.splice(kkk, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now see if any optional parameters are present. They have the form \"key=value\", except that \"clef=\" is optional\n\t\tvar token;\n\t\twhile (tokens.length > 0) {\n\t\t\tswitch (tokens[0].token) {\n\t\t\t\tcase \"m\":\n\t\t\t\tcase \"middle\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after middle\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after middle\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after middle=\", str, 0); return ret; }\n\t\t\t\t\tvar pitch = tokenizer.getPitchFromTokens(tokens);\n\t\t\t\t\tif (pitch.warn)\n\t\t\t\t\t\twarn(pitch.warn, str, 0);\n\t\t\t\t\tif (pitch.position)\n\t\t\t\t\t\tmultilineVars.clef.verticalPos = pitch.position - 6;\t// we get the position from the middle line, but want to offset it to the first ledger line.\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"transpose\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after transpose\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after transpose\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after transpose=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after transpose\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.transpose = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stafflines\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after stafflines\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after stafflines\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after stafflines=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after stafflines\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.stafflines = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"staffscale\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after staffscale\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after staffscale\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after staffscale=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after staffscale\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.staffscale = tokens[0].floatt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"octave\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after octave\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after octave\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after octave=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after octave\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.octave = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"style\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after style\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after style\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after style=\", str, 0); return ret; }\n\t\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\t\tcase \"normal\":\n\t\t\t\t\t\tcase \"harmonic\":\n\t\t\t\t\t\tcase \"rhythm\":\n\t\t\t\t\t\tcase \"x\":\n\t\t\t\t\t\tcase \"triangle\":\n\t\t\t\t\t\t\tmultilineVars.style = tokens[0].token;\n\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\twarn(\"error parsing style element: \" + tokens[0].token, str, tokens[0].start);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"clef\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after clef\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after clef\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after clef=\", str, 0); return ret; }\n\t\t\t\t\t//break; yes, we want to fall through. That allows \"clef=\" to be optional.\n\t\t\t\tcase \"treble\":\n\t\t\t\tcase \"bass\":\n\t\t\t\tcase \"alto\":\n\t\t\t\tcase \"tenor\":\n\t\t\t\tcase \"perc\":\n\t\t\t\tcase \"none\":\n\t\t\t\t\t// clef is [clef=] [⟨clef type⟩] [⟨line number⟩] [+8|-8]\n\t\t\t\t\tvar clef = tokens.shift();\n\t\t\t\t\tswitch (clef.token) {\n\t\t\t\t\t\tcase 'treble':\n\t\t\t\t\t\tcase 'tenor':\n\t\t\t\t\t\tcase 'alto':\n\t\t\t\t\t\tcase 'bass':\n\t\t\t\t\t\tcase 'perc':\n\t\t\t\t\t\tcase 'none':\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'C': clef.token = 'alto'; break;\n\t\t\t\t\t\tcase 'F': clef.token = 'bass'; break;\n\t\t\t\t\t\tcase 'G': clef.token = 'treble'; break;\n\t\t\t\t\t\tcase 'c': clef.token = 'alto'; break;\n\t\t\t\t\t\tcase 'f': clef.token = 'bass'; break;\n\t\t\t\t\t\tcase 'g': clef.token = 'treble'; break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\twarn(\"Expected clef name. Found \" + clef.token, str, clef.start);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tokens.length > 0 && tokens[0].type === 'number') {\n\t\t\t\t\t\tclef.token += tokens[0].token;\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\tif (tokens.length > 1 && (tokens[0].token === '-' || tokens[0].token === '+' || tokens[0].token === '^' || tokens[0].token === '_') && tokens[1].token === '8') {\n\t\t\t\t\t\tclef.token += tokens[0].token + tokens[1].token;\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.clef = {type: clef.token, verticalPos: calcMiddle(clef.token, 0)};\n\t\t\t\t\tif (multilineVars.currentVoice && multilineVars.currentVoice.transpose !== undefined)\n\t\t\t\t\t\tmultilineVars.clef.transpose = multilineVars.currentVoice.transpose;\n\t\t\t\t\tret.foundClef = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\twarn(\"Unknown parameter: \" + tokens[0].token, str, tokens[0].start);\n\t\t\t\t\ttokens.shift();\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t};\n\n\tvar setCurrentVoice = function(id) {\n\t\tvar currentVoice = multilineVars.voices[id]\n\t\tif (multilineVars.currentVoice) {\n\t\t\tif (multilineVars.currentVoice.index === currentVoice.index && multilineVars.currentVoice.staffNum === currentVoice.staffNum)\n\t\t\t\treturn // there was no change so don't reset it.\n\t\t}\n\t\tmultilineVars.currentVoice = currentVoice;\n\t\treturn tuneBuilder.setCurrentVoice(currentVoice.staffNum, currentVoice.index, id);\n\t};\n\n\tparseKeyVoice.parseVoice = function(line, i, e) {\n\t\t//First truncate the string to the first non-space character after V: through either the\n\t\t//end of the line or a % character. Then remove trailing spaces, too.\n\t\tvar ret = tokenizer.getMeat(line, i, e);\n\t\tvar start = ret.start;\n\t\tvar end = ret.end;\n\t\t//The first thing on the line is the ID. It can be any non-space string and terminates at the\n\t\t//first space.\n\t\tvar id = tokenizer.getToken(line, start, end);\n\t\tif (id.length === 0) {\n\t\t\twarn(\"Expected a voice id\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tvar isNew = false;\n\t\tif (multilineVars.voices[id] === undefined) {\n\t\t\tmultilineVars.voices[id] = {};\n\t\t\tisNew = true;\n\t\t\tif (multilineVars.score_is_present)\n\t\t\t\twarn(\"Can't have an unknown V: id when the %score directive is present\", line, start);\n\t\t}\n\t\tstart += id.length;\n\t\tstart += tokenizer.eatWhiteSpace(line, start);\n\n\t\tvar staffInfo = {startStaff: isNew};\n\t\tvar addNextTokenToStaffInfo = function(name) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse\n\t\t\t\tstaffInfo[name] = attr.token;\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar addNextTokenToVoiceInfo = function(id, name, type) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tif (type === 'number')\n\t\t\t\t\tattr.token = parseFloat(attr.token);\n\t\t\t\tmultilineVars.voices[id][name] = attr.token;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar getNextToken = function(name, type) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tif (type === 'number')\n\t\t\t\t\tattr.token = parseFloat(attr.token);\n\t\t\t\treturn attr.token;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar addNextNoteTokenToVoiceInfo = function(id, name) {\n\t\t\tvar noteToTransposition = {\n\t\t\t\t\"_B\": 2,\n\t\t\t\t\"_E\": 9,\n\t\t\t\t\"_b\": -10,\n\t\t\t\t\"_e\": -3\n\t\t\t};\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tvar t = noteToTransposition[attr.token];\n\t\t\t\tif (!t)\n\t\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice\", line, start);\n\t\t\t\telse\n\t\t\t\t\tmultilineVars.voices[id][name] = t;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\n\t\t//Then the following items can occur in any order:\n\t\twhile (start < end) {\n\t\t\tvar token = tokenizer.getVoiceToken(line, start, end);\n\t\t\tstart += token.len;\n\n\t\t\tif (token.warn) {\n\t\t\t\twarn(\"Error parsing voice: \" + token.warn, line, start);\n\t\t\t} else {\n\t\t\t\tvar attr = null;\n\t\t\t\tswitch (token.token) {\n\t\t\t\t\tcase 'clef':\n\t\t\t\t\tcase 'cl':\n\t\t\t\t\t\taddNextTokenToStaffInfo('clef');\n\t\t\t\t\t\t// TODO-PER: check for a legal clef; do octavizing\n\t\t\t\t\t\tvar oct = 0;\n\t//\t\t\t\t\t\t\tfor (var ii = 0; ii < staffInfo.clef.length; ii++) {\n\t//\t\t\t\t\t\t\t\tif (staffInfo.clef[ii] === ',') oct -= 7;\n\t//\t\t\t\t\t\t\t\telse if (staffInfo.clef[ii] === \"'\") oct += 7;\n\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staffInfo.clef !== undefined) {\n\t\t\t\t\t\t staffInfo.clef = staffInfo.clef.replace(/[',]/g, \"\"); //'//comment for emacs formatting of regexp\n\t\t\t\t\t\t\tif (staffInfo.clef.indexOf('+16') !== -1) {\n\t\t\t\t\t\t\t\toct += 14;\n\t\t\t\t\t\t\t\tstaffInfo.clef = staffInfo.clef.replace('+16', '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstaffInfo.verticalPos = calcMiddle(staffInfo.clef, oct);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'treble':\n\t\t\t\t\tcase 'bass':\n\t\t\t\t\tcase 'tenor':\n\t\t\t\t\tcase 'alto':\n\t\t\t\t\tcase 'perc':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\tcase 'treble\\'':\n\t\t\t\t\tcase 'bass\\'':\n\t\t\t\t\tcase 'tenor\\'':\n\t\t\t\t\tcase 'alto\\'':\n\t\t\t\t\tcase 'none\\'':\n\t\t\t\t\tcase 'treble\\'\\'':\n\t\t\t\t\tcase 'bass\\'\\'':\n\t\t\t\t\tcase 'tenor\\'\\'':\n\t\t\t\t\tcase 'alto\\'\\'':\n\t\t\t\t\tcase 'none\\'\\'':\n\t\t\t\t\tcase 'treble,':\n\t\t\t\t\tcase 'bass,':\n\t\t\t\t\tcase 'tenor,':\n\t\t\t\t\tcase 'alto,':\n\t\t\t\t\tcase 'none,':\n\t\t\t\t\tcase 'treble,,':\n\t\t\t\t\tcase 'bass,,':\n\t\t\t\t\tcase 'tenor,,':\n\t\t\t\t\tcase 'alto,,':\n\t\t\t\t\tcase 'none,,':\n\t\t\t\t\t\t// TODO-PER: handle the octave indicators on the clef by changing the middle property\n\t\t\t\t\t\tvar oct2 = 0;\n\t//\t\t\t\t\t\t\tfor (var iii = 0; iii < token.token.length; iii++) {\n\t//\t\t\t\t\t\t\t\tif (token.token[iii] === ',') oct2 -= 7;\n\t//\t\t\t\t\t\t\t\telse if (token.token[iii] === \"'\") oct2 += 7;\n\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t staffInfo.clef = token.token.replace(/[',]/g, \"\"); //'//comment for emacs formatting of regexp\n\t\t\t\t\t\tstaffInfo.verticalPos = calcMiddle(staffInfo.clef, oct2);\n\t\t\t\t\t\tmultilineVars.voices[id].clef = token.token;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'staves':\n\t\t\t\t\tcase 'stave':\n\t\t\t\t\tcase 'stv':\n\t\t\t\t\t\taddNextTokenToStaffInfo('staves');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'brace':\n\t\t\t\t\tcase 'brc':\n\t\t\t\t\t\taddNextTokenToStaffInfo('brace');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bracket':\n\t\t\t\t\tcase 'brk':\n\t\t\t\t\t\taddNextTokenToStaffInfo('bracket');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'name':\n\t\t\t\t\tcase 'nm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('name');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'subname':\n\t\t\t\t\tcase 'sname':\n\t\t\t\t\tcase 'snm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('subname');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'merge':\n\t\t\t\t\t\tstaffInfo.startStaff = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stem':\n\t\t\t\t\tcase 'stems':\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.warn !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for stems in voice: \" + attr.warn, line, start);\n\t\t\t\t\t\telse if (attr.err !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for stems in voice: \" + attr.err, line, start);\n\t\t\t\t\t\telse if (attr.token === 'up' || attr.token === 'down')\n\t\t\t\t\t\t\tmultilineVars.voices[id].stem = attr.token;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"Expected up or down for voice stem\", line, start);\n\t\t\t\t\t\tstart += attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'up':\n\t\t\t\t\tcase 'down':\n\t\t\t\t\t\tmultilineVars.voices[id].stem = token.token;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'middle':\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('verticalPos');\n\t\t\t\t\t\tstaffInfo.verticalPos = parseMiddle(staffInfo.verticalPos).mid;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'gchords':\n\t\t\t\t\tcase 'gch':\n\t\t\t\t\t\tmultilineVars.voices[id].suppressChords = true;\n\t\t\t\t\t\t// gchords can stand on its own, or it could be gchords=0.\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.token === \"0\")\n\t\t\t\t\t\t\tstart = start + attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'space':\n\t\t\t\t\tcase 'spc':\n\t\t\t\t\t\taddNextTokenToStaffInfo('spacing');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'scale':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'scale', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'score':\n\t\t\t\t\t\taddNextNoteTokenToVoiceInfo(id, 'scoreTranspose');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'transpose':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'transpose', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stafflines':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'stafflines', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'staffscale':\n\t\t\t\t\t\t// TODO-PER: This is passed to the engraver, but the engraver ignores it.\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'staffscale', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'octave':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'octave', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t// TODO-PER: This is accepted, but not implemented, yet.\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'volume', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cue':\n\t\t\t\t\t\t// TODO-PER: This is accepted, but not implemented, yet.\n\t\t\t\t\t\tvar cue = getNextToken('cue', 'string');\n\t\t\t\t\t\tif (cue === 'on')\n\t\t\t\t\t\t\tmultilineVars.voices[id].scale = 0.6;\n\t\t\t\t\t\telse multilineVars.voices[id].scale = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"style\":\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.warn !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for style in voice: \" + attr.warn, line, start);\n\t\t\t\t\t\telse if (attr.err !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for style in voice: \" + attr.err, line, start);\n\t\t\t\t\t\telse if (attr.token === 'normal' || attr.token === 'harmonic' || attr.token === 'rhythm' || attr.token === 'x' || attr.token === 'triangle')\n\t\t\t\t\t\t\tmultilineVars.voices[id].style = attr.token;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"Expected one of [normal, harmonic, rhythm, x, triangle] for voice style\", line, start);\n\t\t\t\t\t\tstart += attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// default:\n\t\t\t\t\t// Use this to find V: usages that aren't handled.\n\t\t\t\t\t// \tconsole.log(\"parse voice\", token, tune.metaText.title);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstart += tokenizer.eatWhiteSpace(line, start);\n\t\t}\n\n\t\t// now we've filled up staffInfo, figure out what to do with this voice\n\t\t// TODO-PER: It is unclear from the standard and the examples what to do with brace, bracket, and staves, so they are ignored for now.\n\t\tif (staffInfo.startStaff || multilineVars.staves.length === 0) {\n\t\t\tmultilineVars.staves.push({index: multilineVars.staves.length, meter: multilineVars.origMeter});\n\t\t\tif (!multilineVars.score_is_present)\n\t\t\t\tmultilineVars.staves[multilineVars.staves.length-1].numVoices = 0;\n\t\t}\n\t\tif (multilineVars.voices[id].staffNum === undefined) {\n\t\t\t// store where to write this for quick access later.\n\t\t\tmultilineVars.voices[id].staffNum = multilineVars.staves.length-1;\n\t\t\tvar vi = 0;\n\t\t\tfor(var v in multilineVars.voices) {\n\t\t\t\tif(multilineVars.voices.hasOwnProperty(v)) {\n\t\t\t\t\tif (multilineVars.voices[v].staffNum === multilineVars.voices[id].staffNum)\n\t\t\t\t\t\tvi++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmultilineVars.voices[id].index = vi-1;\n\t\t}\n\t\tvar s = multilineVars.staves[multilineVars.voices[id].staffNum];\n\t\tif (!multilineVars.score_is_present)\n\t\t\ts.numVoices++;\n\t\tif (staffInfo.clef) s.clef = {type: staffInfo.clef, verticalPos: staffInfo.verticalPos};\n\t\tif (staffInfo.spacing) s.spacing_below_offset = staffInfo.spacing;\n\t\tif (staffInfo.verticalPos) s.verticalPos = staffInfo.verticalPos;\n\n\t\tif (staffInfo.name) {if (s.name) s.name.push(staffInfo.name); else s.name = [ staffInfo.name ];}\n\t\tif (staffInfo.subname) {if (s.subname) s.subname.push(staffInfo.subname); else s.subname = [ staffInfo.subname ];}\n\n\t\treturn setCurrentVoice(id);\n\t};\n\n})();\n\nmodule.exports = parseKeyVoice;\n","var parseKeyVoice = require('./abc_parse_key_voice');\nvar transpose = require('./abc_transpose');\n\nvar tokenizer;\nvar warn;\nvar multilineVars;\nvar tune;\nvar tuneBuilder;\nvar header;\n\nvar {\n legalAccents,\n volumeDecorations,\n dynamicDecorations,\n accentPseudonyms,\n accentDynamicPseudonyms,\n nonDecorations,\n durations,\n pitches,\n rests,\n accMap,\n tripletQ\n} = require('./abc_parse_settings')\n\nvar MusicParser = function(_tokenizer, _warn, _multilineVars, _tune, _tuneBuilder, _header) {\n\ttokenizer = _tokenizer;\n\twarn = _warn;\n\tmultilineVars = _multilineVars;\n\ttune = _tune;\n\ttuneBuilder = _tuneBuilder;\n\theader = _header;\n\tthis.lineContinuation = false;\n}\n\n//\n// Parse line of music\n//\n// This is a stream of <(bar-marking|header|note-group)...> in any order, with optional spaces between each element\n// core-note is with no spaces within that\n// chord is with no spaces within that\n// grace-notes is spaces are allowed\n// note-group is spaces are allowed between items\n// bar-marking is or spaces allowed\n// header is spaces can occur between the colon, in the field, and before the close bracket\n// header can also be the only thing on a line. This is true even if it is a continuation line. In this case the brackets are not required.\n// a space is a back-tick, a space, or a tab. If it is a back-tick, then there is no end-beam.\n\n// Line preprocessing: anything after a % is ignored (the double %% should have been taken care of before this)\n// Then, all leading and trailing spaces are ignored.\n// If there was a line continuation, the \\n was replaced by a \\r and the \\ was replaced by a space. This allows the construct\n// of having a header mid-line conceptually, but actually be at the start of the line. This is equivolent to putting the header in [ ].\n\n// TODO-PER: How to handle ! for line break?\n// TODO-PER: dots before bar, dots before slur\n// TODO-PER: U: redefinable symbols.\n\n// Ambiguous symbols:\n// \"[\" can be the start of a chord, the start of a header element or part of a bar line.\n// --- if it is immediately followed by \"|\", it is a bar line\n// --- if it is immediately followed by K: L: M: V: it is a header (note: there are other headers mentioned in the standard, but I'm not sure how they would be used.)\n// --- otherwise it is the beginning of a chord\n// \"(\" can be the start of a slur or a triplet\n// --- if it is followed by a number from 2-9, then it is a triplet\n// --- otherwise it is a slur\n// \"]\"\n// --- if there is a chord open, then this is the close\n// --- if it is after a [|, then it is an invisible bar line\n// --- otherwise, it is par of a bar\n// \".\" can be a bar modifier or a slur modifier, or a decoration\n// --- if it comes immediately before a bar, it is a bar modifier\n// --- if it comes immediately before a slur, it is a slur modifier\n// --- otherwise it is a decoration for the next note.\n// number:\n// --- if it is after a bar, with no space, it is an ending marker\n// --- if it is after a ( with no space, it is a triplet count\n// --- if it is after a pitch or octave or slash, then it is a duration\n\n// Unambiguous symbols (except inside quoted strings):\n// vertical-bar, colon: part of a bar\n// ABCDEFGabcdefg: pitch\n// xyzZ: rest\n// comma, prime: octave\n// close-paren: end-slur\n// hyphen: tie\n// tilde, v, u, bang, plus, THLMPSO: decoration\n// carat, underscore, equal: accidental\n// ampersand: time reset\n// open-curly, close-curly: grace notes\n// double-quote: chord symbol\n// less-than, greater-than, slash: duration\n// back-tick, space, tab: space\n\nvar isInTie = function(multilineVars, overlayLevel, el) {\n\tif (multilineVars.inTie[overlayLevel] === undefined)\n\t\treturn false;\n\t// If this is single voice music then the voice index isn't set, so we use the first voice.\n\tvar voiceIndex = multilineVars.currentVoice ? multilineVars.currentVoice.staffNum * 100 + multilineVars.currentVoice.index : 0;\n\tif (multilineVars.inTie[overlayLevel][voiceIndex]) {\n\t\tif (el.pitches !== undefined || el.rest.type !== 'spacer')\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nvar el = { };\nMusicParser.prototype.parseMusic = function(line) {\n\theader.resolveTempo();\n\t//multilineVars.havent_set_length = false;\t// To late to set this now.\n\tmultilineVars.is_in_header = false;\t// We should have gotten a key header by now, but just in case, this is definitely out of the header.\n\tvar i = 0;\n\tvar startOfLine = multilineVars.iChar;\n\t// see if there is nothing but a comment on this line. If so, just ignore it. A full line comment is optional white space followed by %\n\twhile (tokenizer.isWhiteSpace(line[i]) && i < line.length)\n\t\ti++;\n\tif (i === line.length || line[i] === '%')\n\t\treturn;\n\n\t// Start with the standard staff, clef and key symbols on each line\n\tvar delayStartNewLine = multilineVars.start_new_line;\n\tif (multilineVars.continueall === undefined)\n\t\tmultilineVars.start_new_line = true;\n\telse\n\t\tmultilineVars.start_new_line = false;\n\tvar tripletNotesLeft = 0;\n\n\t// See if the line starts with a header field\n\tvar retHeader = header.letter_to_body_header(line, i);\n\tif (retHeader[0] > 0) {\n\t\ti += retHeader[0];\n\t\t// fixes bug on this: c[V:2]d\n\t\tif (retHeader[1] === 'V')\n\t\t\tthis.startNewLine();\n\t\t\t// delayStartNewLine = true;\n\t\t// TODO-PER: Handle inline headers\n\t}\n\n\tvar overlayLevel = 0;\n\twhile (i < line.length)\n\t{\n\t\tvar startI = i;\n\t\tif (line[i] === '%')\n\t\t\tbreak;\n\n\t\tvar retInlineHeader = header.letter_to_inline_header(line, i, delayStartNewLine);\n\t\tif (retInlineHeader[0] > 0) {\n\t\t\ti += retInlineHeader[0];\n\t\t\t//console.log(\"inline header\", retInlineHeader)\n\t\t\tif (retInlineHeader[1] === 'V')\n\t\t\t\tdelayStartNewLine = true; // fixes bug on this: c[V:2]d\n\t\t\t// TODO-PER: Handle inline headers\n\t\t\t//multilineVars.start_new_line = false;\n\t\t} else {\n\t\t\t// Wait until here to actually start the line because we know we're past the inline statements.\n\t\t\tif (!tuneBuilder.hasBeginMusic() || (delayStartNewLine && !this.lineContinuation)) {\n\t\t\t\tthis.startNewLine();\n\t\t\t\tdelayStartNewLine = false;\n\t\t\t}\n\n\t\t\t// We need to decide if the following characters are a bar-marking or a note-group.\n\t\t\t// Unfortunately, that is ambiguous. Both can contain chord symbols and decorations.\n\t\t\t// If there is a grace note either before or after the chord symbols and decorations, then it is definitely a note-group.\n\t\t\t// If there is a bar marker, it is definitely a bar-marking.\n\t\t\t// If there is either a core-note or chord, it is definitely a note-group.\n\t\t\t// So, loop while we find grace-notes, chords-symbols, or decorations. [It is an error to have more than one grace-note group in a row; the others can be multiple]\n\t\t\t// Then, if there is a grace-note, we know where to go.\n\t\t\t// Else see if we have a chord, core-note, slur, triplet, or bar.\n\n\t\t\tvar ret;\n\t\t\twhile (1) {\n\t\t\t\tret = tokenizer.eatWhiteSpace(line, i);\n\t\t\t\tif (ret > 0) {\n\t\t\t\t\ti += ret;\n\t\t\t\t}\n\t\t\t\tif (i > 0 && line[i-1] === '\\x12') {\n\t\t\t\t\t// there is one case where a line continuation isn't the same as being on the same line, and that is if the next character after it is a header.\n\t\t\t\t\tret = header.letter_to_body_header(line, i);\n\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\tif (ret[1] === 'V')\n\t\t\t\t\t\t\tthis.startNewLine(); // fixes bug on this: c\\\\nV:2]\\\\nd\n\t\t\t\t\t\t// TODO: insert header here\n\t\t\t\t\t\ti = ret[0];\n\t\t\t\t\t\tmultilineVars.start_new_line = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// gather all the grace notes, chord symbols and decorations\n\t\t\t\tret = letter_to_spacer(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\ti += ret[0];\n\t\t\t\t}\n\n\t\t\t\tret = letter_to_chord(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t// There could be more than one chord here if they have different positions.\n\t\t\t\t\t// If two chords have the same position, then connect them with newline.\n\t\t\t\t\tif (!el.chord)\n\t\t\t\t\t\tel.chord = [];\n\t\t\t\t\tvar chordName = tokenizer.translateString(ret[1]);\n\t\t\t\t\tchordName = chordName.replace(/;/g, \"\\n\");\n\t\t\t\t\tvar addedChord = false;\n\t\t\t\t\tfor (var ci = 0; ci < el.chord.length; ci++) {\n\t\t\t\t\t\tif (el.chord[ci].position === ret[2]) {\n\t\t\t\t\t\t\taddedChord = true;\n\t\t\t\t\t\t\tel.chord[ci].name += \"\\n\" + chordName;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (addedChord === false) {\n\t\t\t\t\t\tif (ret[2] === null && ret[3])\n\t\t\t\t\t\t\tel.chord.push({name: chordName, rel_position: ret[3]});\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.chord.push({name: chordName, position: ret[2]});\n\t\t\t\t\t}\n\n\t\t\t\t\ti += ret[0];\n\t\t\t\t\tvar ii = tokenizer.skipWhiteSpace(line.substring(i));\n\t\t\t\t\tif (ii > 0)\n\t\t\t\t\t\tel.force_end_beam_last = true;\n\t\t\t\t\ti += ii;\n\t\t\t\t} else {\n\t\t\t\t\tif (nonDecorations.indexOf(line[i]) === -1)\n\t\t\t\t\t\tret = letter_to_accent(line, i);\n\t\t\t\t\telse ret = [ 0 ];\n\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\tif (ret[1] === null) {\n\t\t\t\t\t\t\tif (i + 1 < line.length)\n\t\t\t\t\t\t\t\tthis.startNewLine();\t// There was a ! in the middle of the line. Start a new line if there is anything after it.\n\t\t\t\t\t\t} else if (ret[1].length > 0) {\n\t\t\t\t\t\t\tif (ret[1].indexOf(\"style=\") === 0) {\n\t\t\t\t\t\t\t\tel.style = ret[1].substr(6);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (el.decoration === undefined)\n\t\t\t\t\t\t\t\t\tel.decoration = [];\n\t\t\t\t\t\t\t\tif (ret[1] === 'beambr1')\n\t\t\t\t\t\t\t\t\tel.beambr = 1;\n\t\t\t\t\t\t\t\telse if (ret[1] === \"beambr2\")\n\t\t\t\t\t\t\t\t\tel.beambr = 2;\n\t\t\t\t\t\t\t\telse el.decoration.push(ret[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti += ret[0];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = letter_to_grace(line, i);\n\t\t\t\t\t\t// TODO-PER: Be sure there aren't already grace notes defined. That is an error.\n\t\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\t\tel.gracenotes = ret[1];\n\t\t\t\t\t\t\ti += ret[0];\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tret = letter_to_bar(line, i);\n\t\t\tif (ret[0] > 0) {\n\t\t\t\t// This is definitely a bar\n\t\t\t\toverlayLevel = 0;\n\t\t\t\tif (el.gracenotes !== undefined) {\n\t\t\t\t\t// Attach the grace note to an invisible note\n\t\t\t\t\tel.rest = { type: 'spacer' };\n\t\t\t\t\tel.duration = 0.125; // TODO-PER: I don't think the duration of this matters much, but figure out if it does.\n\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+i, startOfLine+i+ret[0], el);\n\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\tel = {};\n\t\t\t\t}\n\t\t\t\tvar bar = {type: ret[1]};\n\t\t\t\tif (bar.type.length === 0)\n\t\t\t\t\twarn(\"Unknown bar type\", line, i);\n\t\t\t\telse {\n\t\t\t\t\tif (multilineVars.inEnding && bar.type !== 'bar_thin') {\n\t\t\t\t\t\tbar.endEnding = true;\n\t\t\t\t\t\tmultilineVars.inEnding = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (ret[2]) {\n\t\t\t\t\t\tbar.startEnding = ret[2];\n\t\t\t\t\t\tif (multilineVars.inEnding)\n\t\t\t\t\t\t\tbar.endEnding = true;\n\t\t\t\t\t\tmultilineVars.inEnding = true;\n\t\t\t\t\t\tif (ret[1] === \"bar_right_repeat\") {\n\t\t\t\t\t\t\t// restore the tie and slur state from the start repeat\n\t\t\t\t\t\t\tmultilineVars.restoreStartEndingHoldOvers();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// save inTie, inTieChord\n\t\t\t\t\t\t\tmultilineVars.duplicateStartEndingHoldOvers();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (el.decoration !== undefined)\n\t\t\t\t\t\tbar.decoration = el.decoration;\n\t\t\t\t\tif (el.chord !== undefined)\n\t\t\t\t\t\tbar.chord = el.chord;\n\t\t\t\t\tif (bar.startEnding && multilineVars.barFirstEndingNum === undefined)\n\t\t\t\t\t\tmultilineVars.barFirstEndingNum = multilineVars.currBarNumber;\n\t\t\t\t\telse if (bar.startEnding && bar.endEnding && multilineVars.barFirstEndingNum)\n\t\t\t\t\t\tmultilineVars.currBarNumber = multilineVars.barFirstEndingNum;\n\t\t\t\t\telse if (bar.endEnding)\n\t\t\t\t\t\tmultilineVars.barFirstEndingNum = undefined;\n\t\t\t\t\tif (bar.type !== 'bar_invisible' && multilineVars.measureNotEmpty) {\n\t\t\t\t\t\tvar isFirstVoice = multilineVars.currentVoice === undefined || (multilineVars.currentVoice.staffNum === 0 && multilineVars.currentVoice.index === 0);\n\t\t\t\t\t\tif (isFirstVoice) {\n\t\t\t\t\t\t\tmultilineVars.currBarNumber++;\n\t\t\t\t\t\t\tif (multilineVars.barNumbers && multilineVars.currBarNumber % multilineVars.barNumbers === 0)\n\t\t\t\t\t\t\t\tbar.barNumber = multilineVars.currBarNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'bar');\n\t\t\t\t\ttuneBuilder.appendElement('bar', startOfLine+startI, startOfLine+i+ret[0], bar);\n\t\t\t\t\tmultilineVars.measureNotEmpty = false;\n\t\t\t\t\tel = {};\n\t\t\t\t}\n\t\t\t\ti += ret[0];\n\t\t\t} else if (line[i] === '&') {\t// backtrack to beginning of measure\n\t\t\t\tret = letter_to_overlay(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\ttuneBuilder.appendElement('overlay', startOfLine, startOfLine+1, {});\n\t\t\t\t\ti += 1;\n\t\t\t\t\toverlayLevel++;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// This is definitely a note group\n\t\t\t\t//\n\t\t\t\t// Look for as many open slurs and triplets as there are. (Note: only the first triplet is valid.)\n\t\t\t\tret = letter_to_open_slurs_and_triplets(line, i);\n\t\t\t\tif (ret.consumed > 0) {\n\t\t\t\t\tif (ret.startSlur !== undefined)\n\t\t\t\t\t\tel.startSlur = ret.startSlur;\n\t\t\t\t\tif (ret.dottedSlur)\n\t\t\t\t\t\tel.dottedSlur = true;\n\t\t\t\t\tif (ret.triplet !== undefined) {\n\t\t\t\t\t\tif (tripletNotesLeft > 0)\n\t\t\t\t\t\t\twarn(\"Can't nest triplets\", line, i);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tel.startTriplet = ret.triplet;\n\t\t\t\t\t\t\tel.tripletMultiplier = ret.tripletQ / ret.triplet;\n\t\t\t\t\t\t\tel.tripletR = ret.num_notes;\n\t\t\t\t\t\t\ttripletNotesLeft = ret.num_notes === undefined ? ret.triplet : ret.num_notes;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ti += ret.consumed;\n\t\t\t\t}\n\n\t\t\t\t// handle chords.\n\t\t\t\tif (line[i] === '[') {\n\t\t\t\t\tvar chordStartChar = i;\n\t\t\t\t\ti++;\n\t\t\t\t\tvar chordDuration = null;\n\t\t\t\t\tvar rememberEndBeam = false;\n\n\t\t\t\t\tvar done = false;\n\t\t\t\t\twhile (!done) {\n\t\t\t\t\t\tvar accent = letter_to_accent(line, i);\n\t\t\t\t\t\tif (accent[0] > 0) {\n\t\t\t\t\t\t\ti += accent[0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar chordNote = getCoreNote(line, i, {}, false);\n\t\t\t\t\t\tif (chordNote !== null && chordNote.pitch !== undefined) {\n\t\t\t\t\t\t\tif (accent[0] > 0) { // If we found a decoration above, it modifies the entire chord. \"style\" is handled below.\n\t\t\t\t\t\t\t\tif (accent[1].indexOf(\"style=\") !== 0) {\n\t\t\t\t\t\t\t\t\tif (el.decoration === undefined)\n\t\t\t\t\t\t\t\t\t\tel.decoration = [];\n\t\t\t\t\t\t\t\t\tel.decoration.push(accent[1]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (chordNote.end_beam) {\n\t\t\t\t\t\t\t\tel.end_beam = true;\n\t\t\t\t\t\t\t\tdelete chordNote.end_beam;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (el.pitches === undefined) {\n\t\t\t\t\t\t\t\tel.duration = chordNote.duration;\n\t\t\t\t\t\t\t\tel.pitches = [ chordNote ];\n\t\t\t\t\t\t\t} else\t// Just ignore the note lengths of all but the first note. The standard isn't clear here, but this seems less confusing.\n\t\t\t\t\t\t\t\tel.pitches.push(chordNote);\n\t\t\t\t\t\t\tdelete chordNote.duration;\n\t\t\t\t\t\t\tif (accent[0] > 0) { // If we found a style above, it modifies the individual pitch, not the entire chord.\n\t\t\t\t\t\t\t\tif (accent[1].indexOf(\"style=\") === 0) {\n\t\t\t\t\t\t\t\t\tel.pitches[el.pitches.length-1].style = accent[1].substr(6);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (multilineVars.inTieChord[el.pitches.length]) {\n\t\t\t\t\t\t\t\tchordNote.endTie = true;\n\t\t\t\t\t\t\t\tmultilineVars.inTieChord[el.pitches.length] = undefined;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (chordNote.startTie)\n\t\t\t\t\t\t\t\tmultilineVars.inTieChord[el.pitches.length] = true;\n\n\t\t\t\t\t\t\ti = chordNote.endChar;\n\t\t\t\t\t\t\tdelete chordNote.endChar;\n\t\t\t\t\t\t} else if (line[i] === ' ') {\n\t\t\t\t\t\t\t// Spaces are not allowed in chords, but we can recover from it by ignoring it.\n\t\t\t\t\t\t\twarn(\"Spaces are not allowed in chords\", line, i);\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (i < line.length && line[i] === ']') {\n\t\t\t\t\t\t\t\t// consume the close bracket\n\t\t\t\t\t\t\t\ti++;\n\n\t\t\t\t\t\t\t\tif (multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\t\t\t\tel.duration = el.duration * multilineVars.next_note_duration;\n\t\t\t\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isInTie(multilineVars, overlayLevel, el)) {\n\t\t\t\t\t\t\t\t\tel.pitches.forEach(function(pitch) { pitch.endTie = true; });\n\t\t\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (tripletNotesLeft > 0 && !(el.rest && el.rest.type === \"spacer\")) {\n\t\t\t\t\t\t\t\t\ttripletNotesLeft--;\n\t\t\t\t\t\t\t\t\tif (tripletNotesLeft === 0) {\n\t\t\t\t\t\t\t\t\t\tel.endTriplet = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvar postChordDone = false;\n\t\t\t\t\t\t\t\twhile (i < line.length && !postChordDone) {\n\t\t\t\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\t\t\t\tcase ' ':\n\t\t\t\t\t\t\t\t\t\tcase '\\t':\n\t\t\t\t\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\t\t\t\t\tif (el.endSlur === undefined) el.endSlur = 1; else el.endSlur++;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '-':\n\t\t\t\t\t\t\t\t\t\t\tel.pitches.forEach(function(pitch) { pitch.startTie = {}; });\n\t\t\t\t\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, true);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\t\t\t\t\tvar br2 = getBrokenRhythm(line, i);\n\t\t\t\t\t\t\t\t\t\t\ti += br2[0] - 1;\t// index gets incremented below, so we'll let that happen\n\t\t\t\t\t\t\t\t\t\t\tmultilineVars.next_note_duration = br2[2];\n\t\t\t\t\t\t\t\t\t\t\tif (chordDuration)\n\t\t\t\t\t\t\t\t\t\t\t\tchordDuration = chordDuration * br2[1];\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tchordDuration = br2[1];\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\t\t\t\tcase '/':\n\t\t\t\t\t\t\t\t\t\t\tvar fraction = tokenizer.getFraction(line, i);\n\t\t\t\t\t\t\t\t\t\t\tchordDuration = fraction.value;\n\t\t\t\t\t\t\t\t\t\t\ti = fraction.index;\n\t\t\t\t\t\t\t\t\t\t\tvar ch = line[i]\n\t\t\t\t\t\t\t\t\t\t\tif (ch === ' ')\n\t\t\t\t\t\t\t\t\t\t\t\trememberEndBeam = true;\n\t\t\t\t\t\t\t\t\t\t\tif (ch === '-' || ch === ')' || ch === ' ' || ch === '<' || ch === '>')\n\t\t\t\t\t\t\t\t\t\t\t\ti--; // Subtracting one because one is automatically added below\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tpostChordDone = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\t\t\t\t\t\tchordDuration = 0;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tpostChordDone = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (!postChordDone) {\n\t\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\twarn(\"Expected ']' to end the chords\", line, i);\n\n\t\t\t\t\t\t\tif (el.pitches !== undefined) {\n\t\t\t\t\t\t\t\tif (chordDuration !== null) {\n\t\t\t\t\t\t\t\t\tel.duration = el.duration * chordDuration;\n\t\t\t\t\t\t\t\t\tif (rememberEndBeam)\n\t\t\t\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\t\t\t\tel = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// Single pitch\n\t\t\t\t\tvar el2 = {};\n\t\t\t\t\tvar core = getCoreNote(line, i, el2, true);\n\t\t\t\t\tif (el2.endTie !== undefined) setIsInTie(multilineVars, overlayLevel, true);\n\t\t\t\t\tif (core !== null) {\n\t\t\t\t\t\tif (core.pitch !== undefined) {\n\t\t\t\t\t\t\tel.pitches = [ { } ];\n\t\t\t\t\t\t\t// TODO-PER: straighten this out so there is not so much copying: getCoreNote shouldn't change e'\n\t\t\t\t\t\t\tif (core.accidental !== undefined) el.pitches[0].accidental = core.accidental;\n\t\t\t\t\t\t\tel.pitches[0].pitch = core.pitch;\n\t\t\t\t\t\t\tel.pitches[0].name = core.name;\n\t\t\t\t\t\t\tif (core.midipitch || core.midipitch === 0)\n\t\t\t\t\t\t\t\tel.pitches[0].midipitch = core.midipitch;\n\t\t\t\t\t\t\tif (core.endSlur !== undefined) el.pitches[0].endSlur = core.endSlur;\n\t\t\t\t\t\t\tif (core.endTie !== undefined) el.pitches[0].endTie = core.endTie;\n\t\t\t\t\t\t\tif (core.startSlur !== undefined) el.pitches[0].startSlur = core.startSlur;\n\t\t\t\t\t\t\tif (el.startSlur !== undefined) el.pitches[0].startSlur = el.startSlur;\n\t\t\t\t\t\t\tif (el.dottedSlur !== undefined) el.pitches[0].dottedSlur = true;\n\t\t\t\t\t\t\tif (core.startTie !== undefined) el.pitches[0].startTie = core.startTie;\n\t\t\t\t\t\t\tif (el.startTie !== undefined) el.pitches[0].startTie = el.startTie;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tel.rest = core.rest;\n\t\t\t\t\t\t\tif (core.endSlur !== undefined) el.endSlur = core.endSlur;\n\t\t\t\t\t\t\tif (core.endTie !== undefined) el.rest.endTie = core.endTie;\n\t\t\t\t\t\t\tif (core.startSlur !== undefined) el.startSlur = core.startSlur;\n\t\t\t\t\t\t\tif (core.startTie !== undefined) el.rest.startTie = core.startTie;\n\t\t\t\t\t\t\tif (el.startTie !== undefined) el.rest.startTie = el.startTie;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (core.chord !== undefined) el.chord = core.chord;\n\t\t\t\t\t\tif (core.duration !== undefined) el.duration = core.duration;\n\t\t\t\t\t\tif (core.decoration !== undefined) el.decoration = core.decoration;\n\t\t\t\t\t\tif (core.graceNotes !== undefined) el.graceNotes = core.graceNotes;\n\t\t\t\t\t\tdelete el.startSlur;\n\t\t\t\t\t\tdelete el.dottedSlur;\n\t\t\t\t\t\tif (isInTie(multilineVars, overlayLevel, el)) {\n\t\t\t\t\t\t\tif (el.pitches !== undefined) {\n\t\t\t\t\t\t\t\tel.pitches[0].endTie = true;\n\t\t\t\t\t\t\t} else if (el.rest.type !== 'spacer') {\n\t\t\t\t\t\t\t\tel.rest.endTie = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (core.startTie || el.startTie)\n\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, true);\n\t\t\t\t\t\ti = core.endChar;\n\n\t\t\t\t\t\tif (tripletNotesLeft > 0 && !(core.rest && core.rest.type === \"spacer\")) {\n\t\t\t\t\t\t\ttripletNotesLeft--;\n\t\t\t\t\t\t\tif (tripletNotesLeft === 0) {\n\t\t\t\t\t\t\t\tel.endTriplet = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (core.end_beam)\n\t\t\t\t\t\t\taddEndBeam(el);\n\n\t\t\t\t\t\t// If there is a whole rest, then it should be the duration of the measure, not it's own duration. We need to special case it.\n\t\t\t\t\t\t// If the time signature length is greater than 4/4, though, then a whole rest has no special treatment.\n\t\t\t\t\t\tif (el.rest && el.rest.type === 'rest' && el.duration === 1 && durationOfMeasure(multilineVars) <= 1) {\n\t\t\t\t\t\t\tel.rest.type = 'whole';\n\n\t\t\t\t\t\t\tel.duration = durationOfMeasure(multilineVars);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Create a warning if this is not a displayable duration.\n\t\t\t\t\t\t// The first item on a line is a regular note value, each item after that represents a dot placed after the previous note.\n\t\t\t\t\t\t// Only durations less than a whole note are tested because whole note durations have some tricky rules.\n\n\t\t\t\t\t\tif (el.duration < 1 && durations.indexOf(el.duration) === -1 && el.duration !== 0) {\n\t\t\t\t\t\t\tif (!el.rest || el.rest.type !== 'spacer')\n\t\t\t\t\t\t\t\twarn(\"Duration not representable: \" + line.substring(startI, i), line, i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\t\tvar succeeded = tuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\tif (!succeeded) {\n\t\t\t\t\t\t\tthis.startNewLine()\n\t\t\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\t\tel = {};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i === startI) {\t// don't know what this is, so ignore it.\n\t\t\t\t\tif (line[i] !== ' ' && line[i] !== '`')\n\t\t\t\t\t\twarn(\"Unknown character ignored\", line, i);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tthis.lineContinuation = line.indexOf('\\x12') >= 0 || (retHeader[0] > 0)\n\tif (!this.lineContinuation) { el = { } }\n};\n\nvar setIsInTie =function(multilineVars, overlayLevel, value) {\n\t// If this is single voice music then the voice index isn't set, so we use the first voice.\n\tvar voiceIndex = multilineVars.currentVoice ? multilineVars.currentVoice.staffNum * 100 + multilineVars.currentVoice.index : 0;\n\tif (multilineVars.inTie[overlayLevel] === undefined)\n\t\tmultilineVars.inTie[overlayLevel] = [];\n\tmultilineVars.inTie[overlayLevel][voiceIndex] = value;\n};\n\nvar letter_to_chord = function(line, i) {\n\tif (line[i] === '\"')\n\t{\n\t\tvar chord = tokenizer.getBrackettedSubstring(line, i, 5);\n\t\tif (!chord[2])\n\t\t\twarn(\"Missing the closing quote while parsing the chord symbol\", line , i);\n\t\t// If it starts with ^, then the chord appears above.\n\t\t// If it starts with _ then the chord appears below.\n\t\t// (note that the 2.0 draft standard defines them as not chords, but annotations and also defines @.)\n\t\tif (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '^') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'above';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '_') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'below';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '<') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'left';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '>') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'right';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '@') {\n\t\t\t// @-15,5.7\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tvar x = tokenizer.getFloat(chord[1]);\n\t\t\tif (x.digits === 0)\n\t\t\t\twarn(\"Missing first position in absolutely positioned annotation.\", line , i);\n\t\t\tchord[1] = chord[1].substring(x.digits);\n\t\t\tif (chord[1][0] !== ',')\n\t\t\t\twarn(\"Missing comma absolutely positioned annotation.\", line , i);\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tvar y = tokenizer.getFloat(chord[1]);\n\t\t\tif (y.digits === 0)\n\t\t\t\twarn(\"Missing second position in absolutely positioned annotation.\", line , i);\n\t\t\tchord[1] = chord[1].substring(y.digits);\n\t\t\tvar ws = tokenizer.skipWhiteSpace(chord[1]);\n\t\t\tchord[1] = chord[1].substring(ws);\n\t\t\tchord[2] = null;\n\t\t\tchord[3] = { x: x.value, y: y.value };\n\t\t} else {\n\t\t\tif (multilineVars.freegchord !== true) {\n\t\t\t\tchord[1] = chord[1].replace(/([ABCDEFG0-9])b/g, \"$1♭\");\n\t\t\t\tchord[1] = chord[1].replace(/([ABCDEFG0-9])#/g, \"$1♯\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g, \"$1$2°$3\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)o$/g, \"$1$2°\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g, \"$1$2ø$3\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)\\^([^A-Za-z])/g, \"$1$2∆$3\");\n\t\t\t}\n\t\t\tchord[2] = 'default';\n\t\t\tchord[1] = transpose.chordName(multilineVars, chord[1]);\n\t\t}\n\t\treturn chord;\n\t}\n\treturn [0, \"\"];\n};\n\nvar letter_to_grace = function(line, i) {\n\t// Grace notes are an array of: startslur, note, endslur, space; where note is accidental, pitch, duration\n\tif (line[i] === '{') {\n\t\t// fetch the gracenotes string and consume that into the array\n\t\tvar gra = tokenizer.getBrackettedSubstring(line, i, 1, '}');\n\t\tif (!gra[2])\n\t\t\twarn(\"Missing the closing '}' while parsing grace note\", line, i);\n\t\t// If there is a slur after the grace construction, then move it to the last note inside the grace construction\n\t\tif (line[i+gra[0]] === ')') {\n\t\t\tgra[0]++;\n\t\t\tgra[1] += ')';\n\t\t}\n\n\t\tvar gracenotes = [];\n\t\tvar ii = 0;\n\t\tvar inTie = false;\n\t\twhile (ii < gra[1].length) {\n\t\t\tvar acciaccatura = false;\n\t\t\tif (gra[1][ii] === '/') {\n\t\t\t\tacciaccatura = true;\n\t\t\t\tii++;\n\t\t\t}\n\t\t\tvar note = getCoreNote(gra[1], ii, {}, false);\n\t\t\tif (note !== null) {\n\t\t\t\t// The grace note durations should not be affected by the default length: they should be based on 1/16, so if that isn't the default, then multiply here.\n\t\t\t\tnote.duration = note.duration / (multilineVars.default_length * 8);\n\t\t\t\tif (acciaccatura)\n\t\t\t\t\tnote.acciaccatura = true;\n\t\t\t\tif (note.rest) {\n\t\t\t\t\t// don't allow rests inside gracenotes\n\t\t\t\t\twarn(\"Rests not allowed as grace notes '\" + gra[1][ii] + \"' while parsing grace note\", line, i);\n\t\t\t\t} else\n\t\t\t\t\tgracenotes.push(note);\n\n\t\t\t\tif (inTie) {\n\t\t\t\t\tnote.endTie = true;\n\t\t\t\t\tinTie = false;\n\t\t\t\t}\n\t\t\t\tif (note.startTie)\n\t\t\t\t\tinTie = true;\n\n\t\t\t\tii = note.endChar;\n\t\t\t\tdelete note.endChar;\n\n\t\t\t\tif (note.end_beam) {\n\t\t\t\t\tnote.endBeam = true;\n\t\t\t\t\tdelete note.end_beam;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// We shouldn't get anything but notes or a space here, so report an error\n\t\t\t\tif (gra[1][ii] === ' ') {\n\t\t\t\t\tif (gracenotes.length > 0)\n\t\t\t\t\t\tgracenotes[gracenotes.length-1].endBeam = true;\n\t\t\t\t} else\n\t\t\t\t\twarn(\"Unknown character '\" + gra[1][ii] + \"' while parsing grace note\", line, i);\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\t\tif (gracenotes.length)\n\t\t\treturn [gra[0], gracenotes];\n\t}\n\treturn [ 0 ];\n};\n\nfunction letter_to_overlay(line, i) {\n\tif (line[i] === '&') {\n\t\tvar start = i;\n\t\twhile (line[i] && line[i] !== ':' && line[i] !== '|')\n\t\t\ti++;\n\t\treturn [ i-start, line.substring(start+1, i) ];\n\t}\n\treturn [ 0 ];\n}\n\nfunction durationOfMeasure(multilineVars) {\n\t// TODO-PER: This could be more complicated if one of the unusual measures is used.\n\tvar meter = multilineVars.origMeter;\n\tif (!meter || meter.type !== 'specified')\n\t\treturn 1;\n\tif (!meter.value || meter.value.length === 0)\n\t\treturn 1;\n\treturn parseInt(meter.value[0].num, 10) / parseInt(meter.value[0].den, 10);\n}\n\n\n\n\nvar letter_to_accent = function(line, i) {\n\tvar macro = multilineVars.macros[line[i]];\n\n\tif (macro !== undefined) {\n\t\tif (macro[0] === '!' || macro[0] === '+')\n\t\t\tmacro = macro.substring(1);\n\t\tif (macro[macro.length-1] === '!' || macro[macro.length-1] === '+')\n\t\t\tmacro = macro.substring(0, macro.length-1);\n\t\tif (legalAccents.includes(macro))\n\t\t\treturn [ 1, macro ];\n\t\telse if (volumeDecorations.includes(macro)) {\n\t\t\tif (multilineVars.volumePosition === 'hidden')\n\t\t\t\tmacro = \"\";\n\t\t\treturn [1, macro];\n\t\t} else if (dynamicDecorations.includes(macro)) {\n\t\t\tif (multilineVars.dynamicPosition === 'hidden')\n\t\t\t\tmacro = \"\";\n\t\t\treturn [1, macro];\n\t\t} else {\n\t\t\tif (!multilineVars.ignoredDecorations.includes(macro))\n\t\t\t\twarn(\"Unknown macro: \" + macro, line, i);\n\t\t\treturn [1, '' ];\n\t\t}\n\t}\n\tswitch (line[i])\n\t{\n\t\tcase '.':\n\t\t\tif (line[i+1] === '(' || line[i+1] === '-') // a dot then open paren is a dotted slur; likewise dot dash is dotted tie.\n\t\t\t\tbreak;\n\t\t\treturn [1, 'staccato'];\n\t\tcase 'u':return [1, 'upbow'];\n\t\tcase 'v':return [1, 'downbow'];\n\t\tcase '~':return [1, 'irishroll'];\n\t\tcase '!':\n\t\tcase '+':\n\t\t\tvar ret = tokenizer.getBrackettedSubstring(line, i, 5);\n\t\t\t// Be sure that the accent is recognizable.\n\t\t\tif (ret[1].length > 1 && (ret[1][0] === '^' || ret[1][0] ==='_'))\n\t\t\t\tret[1] = ret[1].substring(1);\t// TODO-PER: The test files have indicators forcing the ornament to the top or bottom, but that isn't in the standard. We'll just ignore them.\n\t\t\tif (legalAccents.includes(ret[1]))\n\t\t\t\treturn ret;\n\t\t\tif (volumeDecorations.includes(ret[1])) {\n\t\t\t\tif (multilineVars.volumePosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t\tif (dynamicDecorations.includes(ret[1])) {\n\t\t\t\tif (multilineVars.dynamicPosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tvar ind = accentPseudonyms.findIndex(function (acc) { return ret[1] === acc[0]})\n\t\t\tif (ind >= 0) {\n\t\t\t\tret[1] = accentPseudonyms[ind][1];\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tind = accentDynamicPseudonyms.findIndex(function (acc) { return ret[1] === acc[0]})\n\t\t\tif (ind >= 0) {\n\t\t\t\tret[1] = accentDynamicPseudonyms[ind][1];\n\t\t\t\tif (multilineVars.dynamicPosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// We didn't find the accent in the list, so consume the space, but don't return an accent.\n\t\t\t// Although it is possible that ! was used as a line break, so accept that.\n\t\t\tif (line[i] === '!' && (ret[0] === 1 || line[i+ret[0]-1] !== '!'))\n\t\t\t\treturn [1, null ];\n\t\t\twarn(\"Unknown decoration: \" + ret[1], line, i);\n\t\t\tret[1] = \"\";\n\t\t\treturn ret;\n\t\tcase 'H':return [1, 'fermata'];\n\t\tcase 'J':return [1, 'slide'];\n\t\tcase 'L':return [1, 'accent'];\n\t\tcase 'M':return [1, 'mordent'];\n\t\tcase 'O':return[1, 'coda'];\n\t\tcase 'P':return[1, 'pralltriller'];\n\t\tcase 'R':return [1, 'roll'];\n\t\tcase 'S':return [1, 'segno'];\n\t\tcase 'T':return [1, 'trill'];\n\t}\n\treturn [0, 0];\n};\n\nvar letter_to_spacer = function(line, i) {\n\tvar start = i;\n\twhile (tokenizer.isWhiteSpace(line[i]))\n\t\ti++;\n\treturn [ i-start ];\n};\n\n// returns the class of the bar line\n// the number of the repeat\n// and the number of characters used up\n// if 0 is returned, then the next element was not a bar line\nvar letter_to_bar = function(line, curr_pos) {\n\tvar ret = tokenizer.getBarLine(line, curr_pos);\n\tif (ret.len === 0)\n\t\treturn [0,\"\"];\n\tif (ret.warn) {\n\t\twarn(ret.warn, line, curr_pos);\n\t\treturn [ret.len,\"\"];\n\t}\n\n\t// Now see if this is a repeated ending\n\t// A repeated ending is all of the characters 1,2,3,4,5,6,7,8,9,0,-, and comma\n\t// It can also optionally start with '[', which is ignored.\n\t// Also, it can have white space before the '['.\n\tfor (var ws = 0; ws < line.length; ws++)\n\t\tif (line[curr_pos + ret.len + ws] !== ' ')\n\t\t\tbreak;\n\tvar orig_bar_len = ret.len;\n\tif (line[curr_pos+ret.len+ws] === '[') {\n\t\tret.len += ws + 1;\n\t}\n\n\t// It can also be a quoted string. It is unclear whether that construct requires '[', but it seems like it would. otherwise it would be confused with a regular chord.\n\tif (line[curr_pos+ret.len] === '\"' && line[curr_pos+ret.len-1] === '[') {\n\t\tvar ending = tokenizer.getBrackettedSubstring(line, curr_pos+ret.len, 5);\n\t\treturn [ret.len+ending[0], ret.token, ending[1]];\n\t}\n\tvar retRep = tokenizer.getTokenOf(line.substring(curr_pos+ret.len), \"1234567890-,\");\n\tif (retRep.len === 0 || retRep.token[0] === '-')\n\t\treturn [orig_bar_len, ret.token];\n\n\treturn [ret.len+retRep.len, ret.token, retRep.token];\n};\n\nvar letter_to_open_slurs_and_triplets = function(line, i) {\n\t// consume spaces, and look for all the open parens. If there is a number after the open paren,\n\t// that is a triplet. Otherwise that is a slur. Collect all the slurs and the first triplet.\n\tvar ret = {};\n\tvar start = i;\n\tif (line[i] === '.' && line[i+1] === '(') {\n\t\tret.dottedSlur = true;\n\t\ti++;\n\t}\n\twhile (line[i] === '(' || tokenizer.isWhiteSpace(line[i])) {\n\t\tif (line[i] === '(') {\n\t\t\tif (i+1 < line.length && (line[i+1] >= '2' && line[i+1] <= '9')) {\n\t\t\t\tif (ret.triplet !== undefined)\n\t\t\t\t\twarn(\"Can't nest triplets\", line, i);\n\t\t\t\telse {\n\t\t\t\t\tret.triplet = line[i+1] - '0';\n\t\t\t\t\tret.tripletQ = tripletQ[ret.triplet];\n\t\t\t\t\tret.num_notes = ret.triplet;\n\t\t\t\t\tif (i+2 < line.length && line[i+2] === ':') {\n\t\t\t\t\t\t// We are expecting \"(p:q:r\" or \"(p:q\" or \"(p::r\"\n\t\t\t\t\t\t// That is: \"put p notes into the time of q for the next r notes\"\n\t\t\t\t\t\t// if r is missing, then it is equal to p.\n\t\t\t\t\t\t// if q is missing, it is determined from this table:\n\t\t\t\t\t\t// (2 notes in the time of 3\n\t\t\t\t\t\t// (3 notes in the time of 2\n\t\t\t\t\t\t// (4 notes in the time of 3\n\t\t\t\t\t\t// (5 notes in the time of n | if time sig is (6/8, 9/8, 12/8), n=3, else n=2\n\t\t\t\t\t\t// (6 notes in the time of 2\n\t\t\t\t\t\t// (7 notes in the time of n\n\t\t\t\t\t\t// (8 notes in the time of 3\n\t\t\t\t\t\t// (9 notes in the time of n\n\t\t\t\t\t\tif (i+3 < line.length && line[i+3] === ':') {\n\t\t\t\t\t\t\t// The second number, 'q', is not present.\n\t\t\t\t\t\t\tif (i+4 < line.length && (line[i+4] >= '1' && line[i+4] <= '9')) {\n\t\t\t\t\t\t\t\tret.num_notes = line[i+4] - '0';\n\t\t\t\t\t\t\t\ti += 3;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\twarn(\"expected number after the two colons after the triplet to mark the duration\", line, i);\n\t\t\t\t\t\t} else if (i+3 < line.length && (line[i+3] >= '1' && line[i+3] <= '9')) {\n\t\t\t\t\t\t\tret.tripletQ = line[i+3] - '0';\n\t\t\t\t\t\t\tif (i+4 < line.length && line[i+4] === ':') {\n\t\t\t\t\t\t\t\tif (i+5 < line.length && (line[i+5] >= '1' && line[i+5] <= '9')) {\n\t\t\t\t\t\t\t\t\tret.num_notes = line[i+5] - '0';\n\t\t\t\t\t\t\t\t\ti += 4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ti += 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\twarn(\"expected number after the triplet to mark the duration\", line, i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (ret.startSlur === undefined)\n\t\t\t\t\tret.startSlur = 1;\n\t\t\t\telse\n\t\t\t\t\tret.startSlur++;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\tret.consumed = i-start;\n\treturn ret;\n};\n\nMusicParser.prototype.startNewLine = function() {\n\tvar params = { startChar: -1, endChar: -1};\n\tif (multilineVars.partForNextLine.title)\n\t\tparams.part = multilineVars.partForNextLine;\n\tparams.clef = multilineVars.currentVoice && multilineVars.staves[multilineVars.currentVoice.staffNum].clef !== undefined ? Object.assign({},multilineVars.staves[multilineVars.currentVoice.staffNum].clef) : Object.assign({},multilineVars.clef);\n\tvar scoreTranspose = multilineVars.currentVoice ? multilineVars.currentVoice.scoreTranspose : 0;\n\tparams.key = parseKeyVoice.standardKey(multilineVars.key.root+multilineVars.key.acc+multilineVars.key.mode, multilineVars.key.root, multilineVars.key.acc, scoreTranspose);\n\tparams.key.mode = multilineVars.key.mode;\n\tif (multilineVars.key.impliedNaturals)\n\t\tparams.key.impliedNaturals = multilineVars.key.impliedNaturals;\n\tif (multilineVars.key.explicitAccidentals) {\n\t\tfor (var i = 0; i < multilineVars.key.explicitAccidentals.length; i++) {\n\t\t\tvar found = false;\n\t\t\tfor (var j = 0; j < params.key.accidentals.length; j++) {\n\t\t\t\tif (params.key.accidentals[j].note === multilineVars.key.explicitAccidentals[i].note) {\n\t\t\t\t\t// If the note is already in the list, override it with the new value\n\t\t\t\t\tparams.key.accidentals[j].acc = multilineVars.key.explicitAccidentals[i].acc;\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found)\n\t\t\t\tparams.key.accidentals.push(multilineVars.key.explicitAccidentals[i]);\n\t\t}\n\t}\n\tmultilineVars.targetKey = params.key;\n\tif (params.key.explicitAccidentals)\n\t\tdelete params.key.explicitAccidentals;\n\tparseKeyVoice.addPosToKey(params.clef, params.key);\n\tif (multilineVars.meter !== null) {\n\t\tif (multilineVars.currentVoice) {\n\t\t\tmultilineVars.staves.forEach(function(st) {\n\t\t\t\tst.meter = multilineVars.meter;\n\t\t\t});\n\t\t\tparams.meter = multilineVars.staves[multilineVars.currentVoice.staffNum].meter;\n\t\t\tmultilineVars.staves[multilineVars.currentVoice.staffNum].meter = null;\n\t\t} else\n\t\t\tparams.meter = multilineVars.meter;\n\t\tmultilineVars.meter = null;\n\t} else if (multilineVars.currentVoice && multilineVars.staves[multilineVars.currentVoice.staffNum].meter) {\n\t\t// Make sure that each voice gets the meter marking.\n\t\tparams.meter = multilineVars.staves[multilineVars.currentVoice.staffNum].meter;\n\t\tmultilineVars.staves[multilineVars.currentVoice.staffNum].meter = null;\n\t}\n\tif (multilineVars.currentVoice && multilineVars.currentVoice.name)\n\t\tparams.name = multilineVars.currentVoice.name;\n\tif (multilineVars.vocalfont)\n\t\tparams.vocalfont = multilineVars.vocalfont;\n\tif (multilineVars.tripletfont)\n\t\tparams.tripletfont = multilineVars.tripletfont;\n\tif (multilineVars.gchordfont)\n\t\tparams.gchordfont = multilineVars.gchordfont;\n\tif (multilineVars.style)\n\t\tparams.style = multilineVars.style;\n\tif (multilineVars.currentVoice) {\n\t\tvar staff = multilineVars.staves[multilineVars.currentVoice.staffNum];\n\t\tif (staff.brace) params.brace = staff.brace;\n\t\tif (staff.bracket) params.bracket = staff.bracket;\n\t\tif (staff.connectBarLines) params.connectBarLines = staff.connectBarLines;\n\t\tif (staff.name) params.name = staff.name[multilineVars.currentVoice.index];\n\t\tif (staff.subname) params.subname = staff.subname[multilineVars.currentVoice.index];\n\t\tif (multilineVars.currentVoice.stem)\n\t\t\tparams.stem = multilineVars.currentVoice.stem;\n\t\tif (multilineVars.currentVoice.stafflines)\n\t\t\tparams.stafflines = multilineVars.currentVoice.stafflines;\n\t\tif (multilineVars.currentVoice.staffscale)\n\t\t\tparams.staffscale = multilineVars.currentVoice.staffscale;\n\t\tif (multilineVars.currentVoice.scale)\n\t\t\tparams.scale = multilineVars.currentVoice.scale;\n\t\tif (multilineVars.currentVoice.color)\n\t\t\tparams.color = multilineVars.currentVoice.color;\n\t\tif (multilineVars.currentVoice.style)\n\t\t\tparams.style = multilineVars.currentVoice.style;\n\t\tif (multilineVars.currentVoice.transpose)\n\t\t\tparams.clef.transpose = multilineVars.currentVoice.transpose;\n\t\tparams.currentVoice = multilineVars.currentVoice\n\t\tvar voices = Object.keys(multilineVars.voices)\n\t\tfor (var mv = 0; mv < voices.length; mv++) {\n\t\t\tif (params.currentVoice.staffNum === multilineVars.voices[voices[mv]].staffNum && params.currentVoice.index === multilineVars.voices[voices[mv]].index)\n\t\t\t\tparams.currentVoiceName = voices[mv]\n\t\t}\n\t}\n\tvar isFirstVoice = multilineVars.currentVoice === undefined || (multilineVars.currentVoice.staffNum === 0 && multilineVars.currentVoice.index === 0);\n\tif (multilineVars.barNumbers === 0 && isFirstVoice && multilineVars.currBarNumber !== 1)\n\t\tparams.barNumber = multilineVars.currBarNumber;\n\ttuneBuilder.startNewLine(params);\n\tif (multilineVars.key.impliedNaturals)\n\t\tdelete multilineVars.key.impliedNaturals;\n\n\tmultilineVars.partForNextLine = {};\n\tif (multilineVars.tempoForNextLine.length === 4)\n\t\ttuneBuilder.appendElement(multilineVars.tempoForNextLine[0],multilineVars.tempoForNextLine[1],multilineVars.tempoForNextLine[2],multilineVars.tempoForNextLine[3]);\n\tmultilineVars.tempoForNextLine = [];\n}\n\n// TODO-PER: make this a method in el.\nvar addEndBeam = function(el) {\n\tif (el.duration !== undefined && el.duration < 0.25)\n\t\tel.end_beam = true;\n\treturn el;\n};\n\nvar getCoreNote = function(line, index, el, canHaveBrokenRhythm) {\n\t//var el = { startChar: index };\n\tvar isComplete = function(state) {\n\t\treturn (state === 'octave' || state === 'duration' || state === 'Zduration' || state === 'broken_rhythm' || state === 'end_slur');\n\t};\n\tvar dottedTie;\n\tif (line[index] === '.' && line[index+1] === '-') {\n\t\tdottedTie = true;\n\t\tindex++;\n\t}\n\tvar state = 'startSlur';\n\tvar durationSetByPreviousNote = false;\n\twhile (1) {\n\t\tswitch(line[index]) {\n\t\t\tcase '(':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\tif (el.startSlur === undefined) el.startSlur = 1; else el.startSlur++;\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ')':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tif (el.endSlur === undefined) el.endSlur = 1; else el.endSlur++;\n\t\t\t\t} else return null;\n\t\t\t\tbreak;\n\t\t\tcase '^':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'sharp';state = 'sharp2';}\n\t\t\t\telse if (state === 'sharp2') {el.accidental = 'dblsharp';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '_':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'flat';state = 'flat2';}\n\t\t\t\telse if (state === 'flat2') {el.accidental = 'dblflat';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '=':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'natural';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\t\tif (state === 'startSlur' || state === 'sharp2' || state === 'flat2' || state === 'pitch') {\n\t\t\t\t\tel.pitch = pitches[line[index]];\n\t\t\t\t\tel.pitch += 7 * (multilineVars.currentVoice && multilineVars.currentVoice.octave !== undefined ? multilineVars.currentVoice.octave : multilineVars.octave);\n\t\t\t\t\tel.name = line[index];\n\t\t\t\t\tif (el.accidental)\n\t\t\t\t\t\tel.name = accMap[el.accidental] + el.name;\n\t\t\t\t\ttranspose.note(multilineVars, el);\n\t\t\t\t\tstate = 'octave';\n\t\t\t\t\t// At this point we have a valid note. The rest is optional. Set the duration in case we don't get one below\n\t\t\t\t\tif (canHaveBrokenRhythm && multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\tel.duration = multilineVars.default_length * multilineVars.next_note_duration;\n\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\tdurationSetByPreviousNote = true;\n\t\t\t\t\t} else\n\t\t\t\t\t\tel.duration = multilineVars.default_length;\n\t\t\t\t\t// If the clef is percussion, there is probably some translation of the pitch to a particular drum kit item.\n\t\t\t\t\tif ((multilineVars.clef && multilineVars.clef.type === \"perc\") ||\n\t\t\t\t\t\t(multilineVars.currentVoice && multilineVars.currentVoice.clef === \"perc\")) {\n\t\t\t\t\t\tvar key = line[index];\n\t\t\t\t\t\tif (el.accidental) {\n\t\t\t\t\t\t\tkey = accMap[el.accidental] + key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tune.formatting && tune.formatting.midi && tune.formatting.midi.drummap)\n\t\t\t\t\t\tel.midipitch = tune.formatting.midi.drummap[key];\n\t\t\t\t\t}\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ',':\n\t\t\t\tif (state === 'octave') {el.pitch -= 7; el.name += ','; }\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '\\'':\n\t\t\t\tif (state === 'octave') {el.pitch += 7; el.name += \"'\"; }\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'y':\n\t\t\tcase 'z':\n\t\t\tcase 'Z':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\tel.rest = { type: rests[line[index]] };\n\t\t\t\t\t// There shouldn't be some of the properties that notes have. If some sneak in due to bad syntax in the abc file,\n\t\t\t\t\t// just nix them here.\n\t\t\t\t\tdelete el.accidental;\n\t\t\t\t\tdelete el.startSlur;\n\t\t\t\t\tdelete el.startTie;\n\t\t\t\t\tdelete el.endSlur;\n\t\t\t\t\tdelete el.endTie;\n\t\t\t\t\tdelete el.end_beam;\n\t\t\t\t\tdelete el.grace_notes;\n\t\t\t\t\t// At this point we have a valid note. The rest is optional. Set the duration in case we don't get one below\n\t\t\t\t\tif (el.rest.type.indexOf('multimeasure') >= 0) {\n\t\t\t\t\t\tel.duration = tune.getBarLength();\n\t\t\t\t\t\tel.rest.text = 1;\n\t\t\t\t\t\tstate = 'Zduration';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (canHaveBrokenRhythm && multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\t\tel.duration = multilineVars.default_length * multilineVars.next_note_duration;\n\t\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\t\tdurationSetByPreviousNote = true;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tel.duration = multilineVars.default_length;\n\t\t\t\t\t\tstate = 'duration';\n\t\t\t\t\t}\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9':\n\t\t\tcase '0':\n\t\t\tcase '/':\n\t\t\t\tif (state === 'octave' || state === 'duration') {\n\t\t\t\t\tvar fraction = tokenizer.getFraction(line, index);\n\t\t\t\t\t//if (!durationSetByPreviousNote)\n\t\t\t\t\tel.duration = el.duration * fraction.value;\n\t\t\t\t\t// TODO-PER: We can test the returned duration here and give a warning if it isn't the one expected.\n\t\t\t\t\tel.endChar = fraction.index;\n\t\t\t\t\twhile (fraction.index < line.length && (tokenizer.isWhiteSpace(line[fraction.index]) || line[fraction.index] === '-')) {\n\t\t\t\t\t\tif (line[fraction.index] === '-')\n\t\t\t\t\t\t\tel.startTie = {};\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel = addEndBeam(el);\n\t\t\t\t\t\tfraction.index++;\n\t\t\t\t\t}\n\t\t\t\t\tindex = fraction.index-1;\n\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t} else if (state === 'sharp2') {\n\t\t\t\t\tel.accidental = 'quartersharp';state = 'pitch';\n\t\t\t\t} else if (state === 'flat2') {\n\t\t\t\t\tel.accidental = 'quarterflat';state = 'pitch';\n\t\t\t\t} else if (state === 'Zduration') {\n\t\t\t\t\tvar num = tokenizer.getNumber(line, index);\n\t\t\t\t\tel.duration = num.num * tune.getBarLength();\n\t\t\t\t\tel.rest.text = num.num;\n\t\t\t\t\tel.endChar = num.index;\n\t\t\t\t\treturn el;\n\t\t\t\t} else return null;\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\t// This is the first character, so it must have been meant for the previous note. Correct that here.\n\t\t\t\t\ttuneBuilder.addTieToLastNote(dottedTie);\n\t\t\t\t\tel.endTie = true;\n\t\t\t\t} else if (state === 'octave' || state === 'duration' || state === 'end_slur') {\n\t\t\t\t\tel.startTie = {};\n\t\t\t\t\tif (!durationSetByPreviousNote && canHaveBrokenRhythm)\n\t\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Peek ahead to the next character. If it is a space, then we have an end beam.\n\t\t\t\t\t\tif (tokenizer.isWhiteSpace(line[index + 1]))\n\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\tel.endChar = index+1;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t}\n\t\t\t\t} else if (state === 'broken_rhythm') {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ' ':\n\t\t\tcase '\\t':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tel.end_beam = true;\n\t\t\t\t\t// look ahead to see if there is a tie\n\t\t\t\t\tdottedTie = false;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (line[index] === '.' && line[index+1] === '-') {\n\t\t\t\t\t\t\tdottedTie = true;\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (line[index] === '-') {\n\t\t\t\t\t\t\tel.startTie = {};\n\t\t\t\t\t\t\tif (dottedTie)\n\t\t\t\t\t\t\t\tel.startTie.style = \"dotted\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} while (index < line.length &&\n\t\t\t\t\t\t(tokenizer.isWhiteSpace(line[index]) || line[index] === '-') ||\n\t\t\t\t\t\t(line[index] === '.' && line[index+1] === '-'));\n\t\t\t\t\tel.endChar = index;\n\t\t\t\t\tif (!durationSetByPreviousNote && canHaveBrokenRhythm && (line[index] === '<' || line[index] === '>')) {\t// TODO-PER: Don't need the test for < and >, but that makes the endChar work out for the regression test.\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '>':\n\t\t\tcase '<':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tif (canHaveBrokenRhythm) {\n\t\t\t\t\t\tvar br2 = getBrokenRhythm(line, index);\n\t\t\t\t\t\tindex += br2[0] - 1;\t// index gets incremented below, so we'll let that happen\n\t\t\t\t\t\tmultilineVars.next_note_duration = br2[2];\n\t\t\t\t\t\tel.duration = br2[1]*el.duration;\n\t\t\t\t\t\tstate = 'end_slur';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.endChar = index;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\treturn null;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tel.endChar = index;\n\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t}\n\t\tindex++;\n\t\tif (index === line.length) {\n\t\t\tif (isComplete(state)) {el.endChar = index;return el;}\n\t\t\telse return null;\n\t\t}\n\t}\n\treturn null;\n};\n\nvar getBrokenRhythm = function(line, index) {\n\tswitch (line[index]) {\n\t\tcase '>':\n\t\t\tif (index < line.length - 2 && line[index + 1] === '>' && line[index + 2] === '>')\t// triple >>>\n\t\t\t\treturn [3, 1.875, 0.125];\n\t\t\telse if (index < line.length - 1 && line[index + 1] === '>')\t// double >>\n\t\t\t\treturn [2, 1.75, 0.25];\n\t\t\telse\n\t\t\t\treturn [1, 1.5, 0.5];\n\t\tcase '<':\n\t\t\tif (index < line.length - 2 && line[index + 1] === '<' && line[index + 2] === '<')\t// triple <<<\n\t\t\t\treturn [3, 0.125, 1.875];\n\t\t\telse if (index < line.length - 1 && line[index + 1] === '<')\t// double <<\n\t\t\t\treturn [2, 0.25, 1.75];\n\t\t\telse\n\t\t\t\treturn [1, 0.5, 1.5];\n\t}\n\treturn null;\n};\n\nmodule.exports = MusicParser;\n","module.exports.legalAccents = [\n 'trill',\n 'lowermordent',\n 'uppermordent',\n 'mordent',\n 'pralltriller',\n 'accent',\n 'fermata',\n 'invertedfermata',\n 'tenuto',\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '+',\n 'wedge',\n 'open',\n 'thumb',\n 'snap',\n 'turn',\n 'roll',\n 'breath',\n 'shortphrase',\n 'mediumphrase',\n 'longphrase',\n 'segno',\n 'coda',\n 'D.S.',\n 'D.C.',\n 'fine',\n 'beambr1',\n 'beambr2',\n 'slide',\n 'marcato',\n 'upbow',\n 'downbow',\n '/',\n '//',\n '///',\n '////',\n 'trem1',\n 'trem2',\n 'trem3',\n 'trem4',\n 'turnx',\n 'invertedturn',\n 'invertedturnx',\n 'trill(',\n 'trill)',\n 'arpeggio',\n 'xstem',\n 'mark',\n 'umarcato',\n 'style=normal',\n 'style=harmonic',\n 'style=rhythm',\n 'style=x',\n 'style=triangle',\n 'D.C.alcoda',\n 'D.C.alfine',\n 'D.S.alcoda',\n 'D.S.alfine',\n 'editorial',\n 'courtesy'\n];\n\nmodule.exports.volumeDecorations = [\n 'p',\n 'pp',\n 'f',\n 'ff',\n 'mf',\n 'mp',\n 'ppp',\n 'pppp',\n 'fff',\n 'ffff',\n 'sfz'\n];\n\nmodule.exports.dynamicDecorations = [\n 'crescendo(',\n 'crescendo)',\n 'diminuendo(',\n 'diminuendo)',\n 'glissando(',\n 'glissando)',\n '~(',\n '~)'\n];\n\nmodule.exports.accentPseudonyms = [\n ['<', 'accent'],\n ['>', 'accent'],\n ['tr', 'trill'],\n ['plus', '+'],\n ['emphasis', 'accent'],\n ['^', 'umarcato'],\n ['marcato', 'umarcato']\n];\n\nmodule.exports.accentDynamicPseudonyms = [\n ['<(', 'crescendo('],\n ['<)', 'crescendo)'],\n ['>(', 'diminuendo('],\n ['>)', 'diminuendo)']\n];\n\nmodule.exports.nonDecorations = 'ABCDEFGabcdefgxyzZ[]|^_{'; // use this to prescreen so we don't have to look for a decoration at every note.\n\nmodule.exports.durations = [\n 0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.25, 0.375, 0.4375, 0.46875,\n 0.484375, 0.4921875, 0.125, 0.1875, 0.21875, 0.234375, 0.2421875, 0.24609375,\n 0.0625, 0.09375, 0.109375, 0.1171875, 0.12109375, 0.123046875, 0.03125,\n 0.046875, 0.0546875, 0.05859375, 0.060546875, 0.0615234375, 0.015625,\n 0.0234375, 0.02734375, 0.029296875, 0.0302734375, 0.03076171875\n];\n\nmodule.exports.pitches = {\n A: 5,\n B: 6,\n C: 0,\n D: 1,\n E: 2,\n F: 3,\n G: 4,\n a: 12,\n b: 13,\n c: 7,\n d: 8,\n e: 9,\n f: 10,\n g: 11\n};\n\nmodule.exports.rests = {\n x: 'invisible',\n X: 'invisible-multimeasure',\n y: 'spacer',\n z: 'rest',\n Z: 'multimeasure'\n};\n\nmodule.exports.accMap = {\n dblflat: '__',\n flat: '_',\n natural: '=',\n sharp: '^',\n dblsharp: '^^',\n quarterflat: '_/',\n quartersharp: '^/'\n};\n\nmodule.exports.tripletQ = {\n 2: 3,\n 3: 2,\n 4: 3,\n 5: 2, // TODO-PER: not handling 6/8 rhythm yet\n 6: 2,\n 7: 2, // TODO-PER: not handling 6/8 rhythm yet\n 8: 3,\n 9: 2 // TODO-PER: not handling 6/8 rhythm yet\n};\n","// abc_tokenizer.js: tokenizes an ABC Music Notation string to support abc_parse.\n\nvar parseCommon = require('./abc_common');\n\n// this is a series of functions that get a particular element out of the passed stream.\n// the return is the number of characters consumed, so 0 means that the element wasn't found.\n// also returned is the element found. This may be a different length because spaces may be consumed that aren't part of the string.\n// The return structure for most calls is { len: num_chars_consumed, token: str }\nvar Tokenizer = function(lines, multilineVars) {\n\tthis.lineIndex = 0\n\tthis.lines = lines\n\tthis.multilineVars = multilineVars;\n\n\tthis.skipWhiteSpace = function(str) {\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t if (!this.isWhiteSpace(str[i]))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn str.length;\t// It must have been all white space\n\t};\n\tvar finished = function(str, i) {\n\t\treturn i >= str.length;\n\t};\n\tthis.eatWhiteSpace = function(line, index) {\n\t\tfor (var i = index; i < line.length; i++) {\n\t\t if (!this.isWhiteSpace(line[i]))\n\t\t\t\treturn i-index;\n\t\t}\n\t\treturn i-index;\n\t};\n\n\t// This just gets the basic pitch letter, ignoring leading spaces, and normalizing it to a capital\n\tthis.getKeyPitch = function(str) {\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tswitch (str[i]) {\n\t\t\tcase 'A':return {len: i+1, token: 'A'};\n\t\t\tcase 'B':return {len: i+1, token: 'B'};\n\t\t\tcase 'C':return {len: i+1, token: 'C'};\n\t\t\tcase 'D':return {len: i+1, token: 'D'};\n\t\t\tcase 'E':return {len: i+1, token: 'E'};\n\t\t\tcase 'F':return {len: i+1, token: 'F'};\n\t\t\tcase 'G':return {len: i+1, token: 'G'};\n//\t\t\tcase 'a':return {len: i+1, token: 'A'};\n//\t\t\tcase 'b':return {len: i+1, token: 'B'};\n//\t\t\tcase 'c':return {len: i+1, token: 'C'};\n//\t\t\tcase 'd':return {len: i+1, token: 'D'};\n//\t\t\tcase 'e':return {len: i+1, token: 'E'};\n//\t\t\tcase 'f':return {len: i+1, token: 'F'};\n//\t\t\tcase 'g':return {len: i+1, token: 'G'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\t// This just gets the basic accidental, ignoring leading spaces, and only the ones that appear in a key\n\tthis.getSharpFlat = function(str) {\n\t\tif (str === 'bass')\n\t\t\treturn {len: 0};\n\t\tswitch (str[0]) {\n\t\t\tcase '#':return {len: 1, token: '#'};\n\t\t\tcase 'b':return {len: 1, token: 'b'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\tthis.getMode = function(str) {\n\t\tvar skipAlpha = function(str, start) {\n\t\t\t// This returns the index of the next non-alphabetic char, or the entire length of the string if not found.\n\t\t while (start < str.length && ((str[start] >= 'a' && str[start] <= 'z') || (str[start] >= 'A' && str[start] <= 'Z')))\n\t\t\t\tstart++;\n\t\t\treturn start;\n\t\t};\n\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tvar firstThree = str.substring(i,i+3).toLowerCase();\n\t\tif (firstThree.length > 1 && firstThree[1] === ' ' || firstThree[1] === '^' || firstThree[1] === '_' || firstThree[1] === '=') firstThree = firstThree[0];\t// This will handle the case of 'm'\n\t\tswitch (firstThree) {\n\t\t\tcase 'mix':return {len: skipAlpha(str, i), token: 'Mix'};\n\t\t\tcase 'dor':return {len: skipAlpha(str, i), token: 'Dor'};\n\t\t\tcase 'phr':return {len: skipAlpha(str, i), token: 'Phr'};\n\t\t\tcase 'lyd':return {len: skipAlpha(str, i), token: 'Lyd'};\n\t\t\tcase 'loc':return {len: skipAlpha(str, i), token: 'Loc'};\n\t\t\tcase 'aeo':return {len: skipAlpha(str, i), token: 'm'};\n\t\t\tcase 'maj':return {len: skipAlpha(str, i), token: ''};\n\t\t\tcase 'ion':return {len: skipAlpha(str, i), token: ''};\n\t\t\tcase 'min':return {len: skipAlpha(str, i), token: 'm'};\n\t\t\tcase 'm':return {len: skipAlpha(str, i), token: 'm'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\tthis.getClef = function(str, bExplicitOnly) {\n\t\tvar strOrig = str;\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\t// The word 'clef' is optional, but if it appears, a clef MUST appear\n\t\tvar needsClef = false;\n\t\tvar strClef = str.substring(i);\n\t\tif (parseCommon.startsWith(strClef, 'clef=')) {\n\t\t\tneedsClef = true;\n\t\t\tstrClef = strClef.substring(5);\n\t\t\ti += 5;\n\t\t}\n\t\tif (strClef.length === 0 && needsClef)\n\t\t\treturn {len: i+5, warn: \"No clef specified: \" + strOrig};\n\n\t\tvar j = this.skipWhiteSpace(strClef);\n\t\tif (finished(strClef, j))\n\t\t\treturn {len: 0};\n\t\tif (j > 0) {\n\t\t\ti += j;\n\t\t\tstrClef = strClef.substring(j);\n\t\t}\n\t\tvar name = null;\n\t\tif (parseCommon.startsWith(strClef, 'treble'))\n\t\t\tname = 'treble';\n\t\telse if (parseCommon.startsWith(strClef, 'bass3'))\n\t\t\tname = 'bass3';\n\t\telse if (parseCommon.startsWith(strClef, 'bass'))\n\t\t\tname = 'bass';\n\t\telse if (parseCommon.startsWith(strClef, 'tenor'))\n\t\t\tname = 'tenor';\n\t\telse if (parseCommon.startsWith(strClef, 'alto2'))\n\t\t\tname = 'alto2';\n\t\telse if (parseCommon.startsWith(strClef, 'alto1'))\n\t\t\tname = 'alto1';\n\t\telse if (parseCommon.startsWith(strClef, 'alto'))\n\t\t\tname = 'alto';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'none')))\n\t\t\tname = 'none';\n\t\telse if (parseCommon.startsWith(strClef, 'perc'))\n\t\t\tname = 'perc';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'C')))\n\t\t\tname = 'tenor';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'F')))\n\t\t\tname = 'bass';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'G')))\n\t\t\tname = 'treble';\n\t\telse\n\t\t\treturn {len: i+5, warn: \"Unknown clef specified: \" + strOrig};\n\n\t\tstrClef = strClef.substring(name.length);\n\t\tj = this.isMatch(strClef, '+8');\n\t\tif (j > 0)\n\t\t\tname += \"+8\";\n\t\telse {\n\t\t\tj = this.isMatch(strClef, '-8');\n\t\t\tif (j > 0)\n\t\t\t\tname += \"-8\";\n\t\t}\n\t\treturn {len: i+name.length, token: name, explicit: needsClef};\n\t};\n\n\t// This returns one of the legal bar lines\n\t// This is called alot and there is no obvious tokenable items, so this is broken apart.\n\tthis.getBarLine = function(line, i) {\n\t\tswitch (line[i]) {\n\t\t\tcase ']':\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase '|': return {len: 2, token: \"bar_thick_thin\"};\n\t\t\t\t\tcase '[':\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tif ((line[i] >= '1' && line[i] <= '9') || line[i] === '\"')\n\t\t\t\t\t\t\treturn {len: 2, token: \"bar_invisible\"};\n\t\t\t\t\t\treturn {len: 1, warn: \"Unknown bar symbol\"};\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 1, token: \"bar_invisible\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ':':\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase ':': return {len: 2, token: \"bar_dbl_repeat\"};\n\t\t\t\t\tcase '|':\t// :|\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\tcase ']':\t// :|]\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\t\t\tcase '|':\t// :|]|\n\t\t\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\t\t\tif (line[i] === ':') return {len: 5, token: \"bar_dbl_repeat\"};\n\t\t\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase '|':\t// :||\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\tif (line[i] === ':') return {len: 4, token: \"bar_dbl_repeat\"};\n\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\treturn {len: 2, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 1, warn: \"Unknown bar symbol\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '[':\t// [\n\t\t\t\t++i;\n\t\t\t\tif (line[i] === '|') {\t// [|\n\t\t\t\t\t++i;\n\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\tcase ':': return {len: 3, token: \"bar_left_repeat\"};\n\t\t\t\t\t\tcase ']': return {len: 3, token: \"bar_invisible\"};\n\t\t\t\t\t\tdefault: return {len: 2, token: \"bar_thick_thin\"};\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((line[i] >= '1' && line[i] <= '9') || line[i] === '\"')\n\t\t\t\t\t\treturn {len: 1, token: \"bar_invisible\"};\n\t\t\t\t\treturn {len: 0};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '|':\t// |\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase ']': return {len: 2, token: \"bar_thin_thick\"};\n\t\t\t\t\tcase '|': // ||\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tif (line[i] === ':') return {len: 3, token: \"bar_left_repeat\"};\n\t\t\t\t\t\treturn {len: 2, token: \"bar_thin_thin\"};\n\t\t\t\t\tcase ':':\t// |:\n\t\t\t\t\t\tvar colons = 0;\n\t\t\t\t\t\twhile (line[i+colons] === ':') colons++;\n\t\t\t\t\t\treturn { len: 1+colons, token: \"bar_left_repeat\"};\n\t\t\t\t\tdefault: return {len: 1, token: \"bar_thin\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\t// this returns all the characters in the string that match one of the characters in the legalChars string\n\tthis.getTokenOf = function(str, legalChars) {\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (legalChars.indexOf(str[i]) < 0)\n\t\t\t\treturn {len: i, token: str.substring(0, i)};\n\t\t}\n\t\treturn {len: i, token: str};\n\t};\n\n\tthis.getToken = function(str, start, end) {\n\t\t// This returns the next set of chars that doesn't contain spaces\n\t\tvar i = start;\n\t\twhile (i < end && !this.isWhiteSpace(str[i]))\n\t\t\ti++;\n\t\treturn str.substring(start, i);\n\t};\n\n\t// This just sees if the next token is the word passed in, with possible leading spaces\n\tthis.isMatch = function(str, match) {\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn 0;\n\t\tif (parseCommon.startsWith(str.substring(i), match))\n\t\t\treturn i+match.length;\n\t\treturn 0;\n\t};\n\n\tthis.getPitchFromTokens = function(tokens) {\n\t\tvar ret = { };\n\t\tvar pitches = {A: 5, B: 6, C: 0, D: 1, E: 2, F: 3, G: 4, a: 12, b: 13, c: 7, d: 8, e: 9, f: 10, g: 11};\n\t\tret.position = pitches[tokens[0].token];\n\t\tif (ret.position === undefined)\n\t\t\treturn { warn: \"Pitch expected. Found: \" + tokens[0].token };\n\t\ttokens.shift();\n\t\twhile (tokens.length) {\n\t\t\tswitch (tokens[0].token) {\n\t\t\t\tcase ',': ret.position -= 7; tokens.shift(); break;\n\t\t\t\tcase '\\'': ret.position += 7; tokens.shift(); break;\n\t\t\t\tdefault: return ret;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t};\n\n\tthis.getKeyAccidentals2 = function(tokens) {\n\t\tvar accs;\n\t\t// find and strip off all accidentals in the token list\n\t\twhile (tokens.length > 0) {\n\t\t\tvar acc;\n\t\t\tif (tokens[0].token === '^') {\n\t\t\t\tacc = 'sharp';\n\t\t\t\ttokens.shift();\n\t\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\tcase '^': acc = 'dblsharp'; tokens.shift(); break;\n\t\t\t\t\tcase '/': acc = 'quartersharp'; tokens.shift(); break;\n\t\t\t\t}\n\t\t\t} else if (tokens[0].token === '=') {\n\t\t\t\tacc = 'natural';\n\t\t\t\ttokens.shift();\n\t\t\t} else if (tokens[0].token === '_') {\n\t\t\t\tacc = 'flat';\n\t\t\t\ttokens.shift();\n\t\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\tcase '_': acc = 'dblflat'; tokens.shift(); break;\n\t\t\t\t\tcase '/': acc = 'quarterflat'; tokens.shift(); break;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Not an accidental, we'll assume that a later parse will recognize it.\n\t\t\t\treturn { accs: accs };\n\t\t\t}\n\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\tswitch (tokens[0].token[0])\n\t\t\t{\n\t\t\t\tcase 'a':\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'e':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'A':\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'D':\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'G':\n\t\t\t\t\tif (accs === undefined)\n\t\t\t\t\t\taccs = [];\n\t\t\t\t\taccs.push({ acc: acc, note: tokens[0].token[0] });\n\t\t\t\t\tif (tokens[0].token.length === 1)\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {accs: accs, warn: 'Expected note name after ' + acc + ' Found: ' + tokens[0].token };\n\t\t\t}\n\t\t}\n\t\treturn { accs: accs };\n\t};\n\n\t// This gets an accidental marking for the key signature. It has the accidental then the pitch letter.\n\tthis.getKeyAccidental = function(str) {\n\t\tvar accTranslation = {\n\t\t\t'^': 'sharp',\n\t\t\t'^^': 'dblsharp',\n\t\t\t'=': 'natural',\n\t\t\t'_': 'flat',\n\t\t\t'__': 'dblflat',\n\t\t\t'_/': 'quarterflat',\n\t\t\t'^/': 'quartersharp'\n\t\t};\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tvar acc = null;\n\t\tswitch (str[i])\n\t\t{\n\t\t\tcase '^':\n\t\t\tcase '_':\n\t\t\tcase '=':\n\t\t\t\tacc = str[i];\n\t\t\t\tbreak;\n\t\t\tdefault:return {len: 0};\n\t\t}\n\t\ti++;\n\t\tif (finished(str, i))\n\t\t\treturn {len: 1, warn: 'Expected note name after accidental'};\n\t\tswitch (str[i])\n\t\t{\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\t\treturn {len: i+1, token: {acc: accTranslation[acc], note: str[i]}};\n\t\t\tcase '^':\n\t\t\tcase '_':\n\t\t\tcase '/':\n\t\t\t\tacc += str[i];\n\t\t\t\ti++;\n\t\t\t\tif (finished(str, i))\n\t\t\t\t\treturn {len: 2, warn: 'Expected note name after accidental'};\n\t\t\t\tswitch (str[i])\n\t\t\t\t{\n\t\t\t\t\tcase 'a':\n\t\t\t\t\tcase 'b':\n\t\t\t\t\tcase 'c':\n\t\t\t\t\tcase 'd':\n\t\t\t\t\tcase 'e':\n\t\t\t\t\tcase 'f':\n\t\t\t\t\tcase 'g':\n\t\t\t\t\tcase 'A':\n\t\t\t\t\tcase 'B':\n\t\t\t\t\tcase 'C':\n\t\t\t\t\tcase 'D':\n\t\t\t\t\tcase 'E':\n\t\t\t\t\tcase 'F':\n\t\t\t\t\tcase 'G':\n\t\t\t\t\t\treturn {len: i+1, token: {acc: accTranslation[acc], note: str[i]}};\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 2, warn: 'Expected note name after accidental'};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn {len: 1, warn: 'Expected note name after accidental'};\n\t\t}\n\t};\n\n\tthis.isWhiteSpace = function(ch) {\n\t\treturn ch === ' ' || ch === '\\t' || ch === '\\x12';\n\t};\n\n\tthis.getMeat = function(line, start, end) {\n\t\t// This removes any comments starting with '%' and trims the ends of the string so that there are no leading or trailing spaces.\n\t\t// it returns just the start and end characters that contain the meat.\n\t\tvar comment = line.indexOf('%', start);\n\t\tif (comment >= 0 && comment < end)\n\t\t\tend = comment;\n\t\twhile (start < end && (line[start] === ' ' || line[start] === '\\t' || line[start] === '\\x12'))\n\t\t\tstart++;\n\t\twhile (start < end && (line[end-1] === ' ' || line[end-1] === '\\t' || line[end-1] === '\\x12'))\n\t\t\tend--;\n\t\treturn {start: start, end: end};\n\t};\n\n\tvar isLetter = function(ch) {\n\t\treturn (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n\t};\n\n\tvar isNumber = function(ch) {\n\t\treturn (ch >= '0' && ch <= '9');\n\t};\n\n\tthis.tokenize = function(line, start, end, alphaUntilWhiteSpace) {\n\t\t// this returns all the tokens inside the passed string. A token is a punctuation mark, a string of digits, a string of letters.\n\t\t// Quoted strings are one token.\n\t\t// If there is a minus sign next to a number, then it is included in the number.\n\t\t// If there is a period immediately after a number, with a number immediately following, then a float is returned.\n\t\t// The type of token is returned: quote, alpha, number, punct\n\t\t// If alphaUntilWhiteSpace is true, then the behavior of the alpha token changes.\n\n\t\tvar ret = this.getMeat(line, start, end);\n\t\tstart = ret.start;\n\t\tend = ret.end;\n\t\tvar tokens = [];\n\t\tvar i;\n\t\twhile (start < end) {\n\t\t\tif (line[start] === '\"') {\n\t\t\t\ti = start+1;\n\t\t\t\twhile (i < end && line[i] !== '\"') i++;\n\t\t\t\ttokens.push({ type: 'quote', token: line.substring(start+1, i), start: start+1, end: i});\n\t\t\t\ti++;\n\t\t\t} else if (isLetter(line[start])) {\n\t\t\t\ti = start+1;\n\t\t\t\tif (alphaUntilWhiteSpace)\n\t\t\t\t\twhile (i < end && !this.isWhiteSpace(line[i])) i++;\n\t\t\t\telse\n\t\t\t\t\twhile (i < end && isLetter(line[i])) i++;\n\t\t\t\ttokens.push({ type: 'alpha', token: line.substring(start, i), continueId: isNumber(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (line[start] === '.' && isNumber(line[i+1])) {\n\t\t\t\ti = start+1;\n\t\t\t\tvar int2 = null;\n\t\t\t\tvar float2 = null;\n\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\n\t\t\t\tfloat2 = parseFloat(line.substring(start, i));\n\t\t\t\ttokens.push({ type: 'number', token: line.substring(start, i), intt: int2, floatt: float2, continueId: isLetter(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (isNumber(line[start]) || (line[start] === '-' && isNumber(line[i+1]))) {\n\t\t\t\ti = start+1;\n\t\t\t\tvar intt = null;\n\t\t\t\tvar floatt = null;\n\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\t\t\t\tif (line[i] === '.' && isNumber(line[i+1])) {\n\t\t\t\t\ti++;\n\t\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\t\t\t\t} else\n\t\t\t\t\tintt = parseInt(line.substring(start, i));\n\n\t\t\t\tfloatt = parseFloat(line.substring(start, i));\n\t\t\t\ttokens.push({ type: 'number', token: line.substring(start, i), intt: intt, floatt: floatt, continueId: isLetter(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (line[start] === ' ' || line[start] === '\\t') {\n\t\t\t\ti = start+1;\n\t\t\t} else {\n\t\t\t\ttokens.push({ type: 'punct', token: line[start], start: start, end: start+1});\n\t\t\t\ti = start+1;\n\t\t\t}\n\t\t\tstart = i;\n\t\t}\n\t\treturn tokens;\n\t};\n\n\tthis.getVoiceToken = function(line, start, end) {\n\t\t// This finds the next token. A token is delimited by a space or an equal sign. If it starts with a quote, then the portion between the quotes is returned.\n\t\tvar i = start;\n\t\twhile (i < end && this.isWhiteSpace(line[i]) || line[i] === '=')\n\t\t\ti++;\n\n\t\tif (line[i] === '\"') {\n\t\t\tvar close = line.indexOf('\"', i+1);\n\t\t\tif (close === -1 || close >= end)\n\t\t\t\treturn {len: 1, err: \"Missing close quote\"};\n\t\t\treturn {len: close-start+1, token: this.translateString(line.substring(i+1, close))};\n\t\t} else {\n\t\t\tvar ii = i;\n\t\t\twhile (ii < end && !this.isWhiteSpace(line[ii]) && line[ii] !== '=')\n\t\t\t\tii++;\n\t\t\treturn {len: ii-start+1, token: line.substring(i, ii)};\n\t\t}\n\t};\n\n\tvar charMap = {\n\t\t\"`a\": 'à', \"'a\": \"á\", \"^a\": \"â\", \"~a\": \"ã\", \"\\\"a\": \"ä\", \"oa\": \"å\", \"aa\": \"å\", \"=a\": \"ā\", \"ua\": \"ă\", \";a\": \"ą\",\n\t\t\"`e\": 'è', \"'e\": \"é\", \"^e\": \"ê\", \"\\\"e\": \"ë\", \"=e\": \"ē\", \"ue\": \"ĕ\", \";e\": \"ę\", \".e\": \"ė\",\n\t\t\"`i\": 'ì', \"'i\": \"í\", \"^i\": \"î\", \"\\\"i\": \"ï\", \"=i\": \"ī\", \"ui\": \"ĭ\", \";i\": \"į\",\n\t\t\"`o\": 'ò', \"'o\": \"ó\", \"^o\": \"ô\", \"~o\": \"õ\", \"\\\"o\": \"ö\", \"=o\": \"ō\", \"uo\": \"ŏ\", \"/o\": \"ø\",\n\t\t\"`u\": 'ù', \"'u\": \"ú\", \"^u\": \"û\", \"~u\": \"ũ\", \"\\\"u\": \"ü\", \"ou\": \"ů\", \"=u\": \"ū\", \"uu\": \"ŭ\", \";u\": \"ų\",\n\t\t\"`A\": 'À', \"'A\": \"Á\", \"^A\": \"Â\", \"~A\": \"Ã\", \"\\\"A\": \"Ä\", \"oA\": \"Å\", \"AA\": \"Å\", \"=A\": \"Ā\", \"uA\": \"Ă\", \";A\": \"Ą\",\n\t\t\"`E\": 'È', \"'E\": \"É\", \"^E\": \"Ê\", \"\\\"E\": \"Ë\", \"=E\": \"Ē\", \"uE\": \"Ĕ\", \";E\": \"Ę\", \".E\": \"Ė\",\n\t\t\"`I\": 'Ì', \"'I\": \"Í\", \"^I\": \"Î\", \"~I\": \"Ĩ\", \"\\\"I\": \"Ï\", \"=I\": \"Ī\", \"uI\": \"Ĭ\", \";I\": \"Į\", \".I\": \"İ\",\n\t\t\"`O\": 'Ò', \"'O\": \"Ó\", \"^O\": \"Ô\", \"~O\": \"Õ\", \"\\\"O\": \"Ö\", \"=O\": \"Ō\", \"uO\": \"Ŏ\", \"/O\": \"Ø\",\n\t\t\"`U\": 'Ù', \"'U\": \"Ú\", \"^U\": \"Û\", \"~U\": \"Ũ\", \"\\\"U\": \"Ü\", \"oU\": \"Ů\", \"=U\": \"Ū\", \"uU\": \"Ŭ\", \";U\": \"Ų\",\n\t\t\"ae\": \"æ\", \"AE\": \"Æ\", \"oe\": \"œ\", \"OE\": \"Œ\", \"ss\": \"ß\",\n\t\t\"'c\": \"ć\", \"^c\": \"ĉ\", \"uc\": \"č\", \"cc\": \"ç\", \".c\": \"ċ\", \"cC\": \"Ç\", \"'C\": \"Ć\", \"^C\": \"Ĉ\", \"uC\": \"Č\", \".C\": \"Ċ\",\n\t\t\"~N\": \"Ñ\", \"~n\": \"ñ\",\n\t\t\"=s\": \"š\", \"vs\": \"š\",\n\t\t\"DH\": \"Ð\", \"dh\": \"ð\",\n\t\t\"HO\": \"Ő\", \"Ho\": \"ő\", \"HU\": \"Ű\", \"Hu\": \"ű\",\n\t\t\"'Y\": \"Ý\", \"'y\": \"ý\", \"^Y\": \"Ŷ\", \"^y\": \"ŷ\", \"\\\"Y\": \"Ÿ\", \"\\\"y\": \"ÿ\",\n\t\t\"vS\": \"Š\", \"vZ\": \"Ž\", \"vz\": 'ž'\n\n// More chars: IJ ij Ď ď Đ đ Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň ʼn Ŋ ŋ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š Ţ ţ Ť ť Ŧ ŧ Ŵ ŵ Ź ź Ż ż Ž\n\t};\n\tvar charMap1 = {\n\t\t\"#\": \"♯\",\n\t\t\"b\": \"♭\",\n\t\t\"=\": \"♮\"\n\t};\n\tvar charMap2 = {\n\t\t\"201\": \"♯\",\n\t\t\"202\": \"♭\",\n\t\t\"203\": \"♮\",\n\t\t\"241\": \"¡\",\n\t\t\"242\": \"¢\", \"252\": \"a\", \"262\": \"2\", \"272\": \"o\", \"302\": \"Â\", \"312\": \"Ê\", \"322\": \"Ò\", \"332\": \"Ú\", \"342\": \"â\", \"352\": \"ê\", \"362\": \"ò\", \"372\": \"ú\",\n\t\t\"243\": \"£\", \"253\": \"«\", \"263\": \"3\", \"273\": \"»\", \"303\": \"Ã\", \"313\": \"Ë\", \"323\": \"Ó\", \"333\": \"Û\", \"343\": \"ã\", \"353\": \"ë\", \"363\": \"ó\", \"373\": \"û\",\n\t\t\"244\": \"¤\", \"254\": \"¬\", \"264\": \" ́\", \"274\": \"1⁄4\", \"304\": \"Ä\", \"314\": \"Ì\", \"324\": \"Ô\", \"334\": \"Ü\", \"344\": \"ä\", \"354\": \"ì\", \"364\": \"ô\", \"374\": \"ü\",\n\t\t\"245\": \"¥\", \"255\": \"-\", \"265\": \"μ\", \"275\": \"1⁄2\", \"305\": \"Å\", \"315\": \"Í\", \"325\": \"Õ\", \"335\": \"Ý\", \"345\": \"å\", \"355\": \"í\", \"365\": \"õ\", \"375\": \"ý\",\n\t\t\"246\": \"¦\", \"256\": \"®\", \"266\": \"¶\", \"276\": \"3⁄4\", \"306\": \"Æ\", \"316\": \"Î\", \"326\": \"Ö\", \"336\": \"Þ\", \"346\": \"æ\", \"356\": \"î\", \"366\": \"ö\", \"376\": \"þ\",\n\t\t\"247\": \"§\", \"257\": \" ̄\", \"267\": \"·\", \"277\": \"¿\", \"307\": \"Ç\", \"317\": \"Ï\", \"327\": \"×\", \"337\": \"ß\", \"347\": \"ç\", \"357\": \"ï\", \"367\": \"÷\", \"377\": \"ÿ\",\n\t\t\"250\": \" ̈\", \"260\": \"°\", \"270\": \" ̧\", \"300\": \"À\", \"310\": \"È\", \"320\": \"Ð\", \"330\": \"Ø\", \"340\": \"à\", \"350\": \"è\", \"360\": \"ð\", \"370\": \"ø\",\n\t\t\"251\": \"©\", \"261\": \"±\", \"271\": \"1\", \"301\": \"Á\", \"311\": \"É\", \"321\": \"Ñ\", \"331\": \"Ù\", \"341\": \"á\", \"351\": \"é\", \"361\": \"ñ\", \"371\": \"ù\" };\n\tthis.translateString = function(str) {\n\t\tvar arr = str.split('\\\\');\n\t\tif (arr.length === 1) return str;\n\t\tvar out = null;\n\t\tarr.forEach(function(s) {\n\t\t\tif (out === null)\n\t\t\t\tout = s;\n\t\t\telse {\n\t\t\t\tvar c = charMap[s.substring(0, 2)];\n\t\t\t\tif (c !== undefined)\n\t\t\t\t\tout += c + s.substring(2);\n\t\t\t\telse {\n\t\t\t\t\tc = charMap2[s.substring(0, 3)];\n\t\t\t\t\tif (c !== undefined)\n\t\t\t\t\t\tout += c + s.substring(3);\n\t\t\t\t\telse {\n\t\t\t\t\t\tc = charMap1[s.substring(0, 1)];\n\t\t\t\t\t\tif (c !== undefined)\n\t\t\t\t\t\t\tout += c + s.substring(1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tout += \"\\\\\" + s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn out;\n\t};\n\tthis.getNumber = function(line, index) {\n\t\tvar num = 0;\n\t\twhile (index < line.length) {\n\t\t\tswitch (line[index]) {\n\t\t\t\tcase '0':num = num*10;index++;break;\n\t\t\t\tcase '1':num = num*10+1;index++;break;\n\t\t\t\tcase '2':num = num*10+2;index++;break;\n\t\t\t\tcase '3':num = num*10+3;index++;break;\n\t\t\t\tcase '4':num = num*10+4;index++;break;\n\t\t\t\tcase '5':num = num*10+5;index++;break;\n\t\t\t\tcase '6':num = num*10+6;index++;break;\n\t\t\t\tcase '7':num = num*10+7;index++;break;\n\t\t\t\tcase '8':num = num*10+8;index++;break;\n\t\t\t\tcase '9':num = num*10+9;index++;break;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {num: num, index: index};\n\t\t\t}\n\t\t}\n\t\treturn {num: num, index: index};\n\t};\n\n\tthis.getFraction = function(line, index) {\n\t\tvar num = 1;\n\t\tvar den = 1;\n\t\tif (line[index] !== '/') {\n\t\t\tvar ret = this.getNumber(line, index);\n\t\t\tnum = ret.num;\n\t\t\tindex = ret.index;\n\t\t}\n\t\tif (line[index] === '/') {\n\t\t\tindex++;\n\t\t\tif (line[index] === '/') {\n\t\t\t\tvar div = 0.5;\n\t\t\t\twhile (line[index++] === '/')\n\t\t\t\t\tdiv = div /2;\n\t\t\t\treturn {value: num * div, index: index-1};\n\t\t\t} else {\n\t\t\t\tvar iSave = index;\n\t\t\t\tvar ret2 = this.getNumber(line, index);\n\t\t\t\tif (ret2.num === 0 && iSave === index)\t// If we didn't use any characters, it is an implied 2\n\t\t\t\t\tret2.num = 2;\n\t\t\t\tif (ret2.num !== 0)\n\t\t\t\t\tden = ret2.num;\n\t\t\t\tindex = ret2.index;\n\t\t\t}\n\t\t}\n\n\t\treturn {value: num/den, index: index};\n\t};\n\n//\n// MAE 10 Jan 2023 - For better handling of tunes that have tune numbers in front of them.\n//\n// Previous version would take:\n// 21. Woman of the House, The\n// and return:\n// The 21. Woman of the House\n// \n// This fix results in:\n// 21. The Woman of the House\n//\n// Also added additional checks and handlers for lower case \", the\" and \", a\" since I found several tune collections with those tune name constructs\n//\n// Find an optional title number at the start of a tune title\nfunction getTitleNumber(str){\n\n const regex = /^(\\d+)\\./;\n\n // Use the exec method to search for the pattern in the string\n const match = regex.exec(str);\n\n // Check if a match is found\n if (match) {\n\n\t// The matched number is captured in the first group (index 1)\n\tconst foundNumber = match[1];\n\treturn foundNumber;\n\n } else {\n\n\t// Return null if no match is found\n\treturn null;\n\t\n }\n\n}\n\nvar thePatterns = [\n\t{ match: /,\\s*[Tt]he$/, replace: \"The \" },\n\t{ match: /,\\s*[Aa]$/, replace: \"A \" },\n\t{ match: /,\\s*[Aa]n$/, replace: \"An \" },\n]\n\nthis.theReverser = function (str) {\n\n for (var i = 0; i < thePatterns.length; i++) {\n\t\tvar thisPattern = thePatterns[i]\n\t\tvar match = str.match(thisPattern.match)\n\t\tif (match) {\n\t\t\tvar theTitleNumber = getTitleNumber(str);\n\t\t\tif (theTitleNumber){\n\t\t\n\t\t\t //console.log(\"theReverser The titlenumber:\"+theTitleNumber); \n\t\t\n\t\t\t str = str.replace(theTitleNumber+\".\",\"\");\n\t\t\t str = str.trim();\n\t\t\t}\n\t\t\tvar len = match[0].length\n\t\t\tvar result = thisPattern.replace + str.substring(0, str.length - len);\n\t\t\n\t\t\tif (theTitleNumber){\n\t\t\t result = theTitleNumber+\". \"+result;\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\n\t\t}\n\t}\n\n return str;\n\n };\n\n\tthis.stripComment = function(str) {\n\t\tvar i = str.indexOf('%');\n\t\tif (i >= 0)\n\t\t\treturn parseCommon.strip(str.substring(0, i));\n\t\treturn parseCommon.strip(str);\n\t};\n\n\tthis.getInt = function(str) {\n\t\t// This parses the beginning of the string for a number and returns { value: num, digits: num }\n\t\t// If digits is 0, then the string didn't point to a number.\n\t\tvar x = parseInt(str);\n\t\tif (isNaN(x))\n\t\t\treturn {digits: 0};\n\t\tvar s = \"\" + x;\n\t\tvar i = str.indexOf(s);\t// This is to account for leading spaces\n\t\treturn {value: x, digits: i+s.length};\n\t};\n\n\tthis.getFloat = function(str) {\n\t\t// This parses the beginning of the string for a number and returns { value: num, digits: num }\n\t\t// If digits is 0, then the string didn't point to a number.\n\t\tvar x = parseFloat(str);\n\t\tif (isNaN(x))\n\t\t\treturn {digits: 0};\n\t\tvar s = \"\" + x;\n\t\tvar i = str.indexOf(s);\t// This is to account for leading spaces\n\t\treturn {value: x, digits: i+s.length};\n\t};\n\n\tthis.getMeasurement = function(tokens) {\n\t\tif (tokens.length === 0) return { used: 0 };\n\t\tvar used = 1;\n\t\tvar num = '';\n\t\tif (tokens[0].token === '-') {\n\t\t\ttokens.shift();\n\t\t\tnum = '-';\n\t\t\tused++;\n\t\t}\n\t\telse if (tokens[0].type !== 'number') return { used: 0 };\n\t\tnum += tokens.shift().token;\n\t\tif (tokens.length === 0) return { used: 1, value: parseInt(num) };\n\t\tvar x = tokens.shift();\n\t\tif (x.token === '.') {\n\t\t\tused++;\n\t\t\tif (tokens.length === 0) return { used: used, value: parseInt(num) };\n\t\t\tif (tokens[0].type === 'number') {\n\t\t\t\tx = tokens.shift();\n\t\t\t\tnum = num + '.' + x.token;\n\t\t\t\tused++;\n\t\t\t\tif (tokens.length === 0) return { used: used, value: parseFloat(num) };\n\t\t\t}\n\t\t\tx = tokens.shift();\n\t\t}\n\t\tswitch (x.token) {\n\t\t\tcase 'pt': return { used: used+1, value: parseFloat(num) };\n\t\t\tcase 'px': return { used: used+1, value: parseFloat(num) };\n\t\t\tcase 'cm': return { used: used+1, value: parseFloat(num)/2.54*72 };\n\t\t\tcase 'in': return { used: used+1, value: parseFloat(num)*72 };\n\t\t\tdefault: tokens.unshift(x); return { used: used, value: parseFloat(num) };\n\t\t}\n\t};\n\tvar substInChord = function(str) {\n\t\tstr = str.replace(/\\\\n/g, \"\\n\");\n\t\tstr = str.replace(/\\\\\"/g, '\"');\n\t\treturn str;\n\t};\n\tthis.getBrackettedSubstring = function(line, i, maxErrorChars, _matchChar)\n\t{\n\t\t// This extracts the sub string by looking at the first character and searching for that\n\t\t// character later in the line (or search for the optional _matchChar).\n\t\t// For instance, if the first character is a quote it will look for\n\t\t// the end quote. If the end of the line is reached, then only up to the default number\n\t\t// of characters are returned, so that a missing end quote won't eat up the entire line.\n\t\t// It returns the substring and the number of characters consumed.\n\t\t// The number of characters consumed is normally two more than the size of the substring,\n\t\t// but in the error case it might not be.\n\t\tvar matchChar = _matchChar || line[i];\n\t\tvar pos = i+1;\n\t\tvar esc = false;\n\t\twhile ((pos < line.length) && (esc || line[pos] !== matchChar)) {\n\t\t\tesc = line[pos] === '\\\\';\n\t\t\t++pos;\n\t\t}\n\t\tif (line[pos] === matchChar)\n\t\t\treturn [pos-i+1,substInChord(line.substring(i+1, pos)), true];\n\t\telse\t// we hit the end of line, so we'll just pick an arbitrary num of chars so the line doesn't disappear.\n\t\t{\n\t\t\tpos = i+maxErrorChars;\n\t\t\tif (pos > line.length-1)\n\t\t\t\tpos = line.length-1;\n\t\t\treturn [pos-i+1, substInChord(line.substring(i+1, pos)), false];\n\t\t}\n\t};\n};\n\nTokenizer.prototype.peekLine = function() {\n\treturn this.lines[this.lineIndex]\n}\n\nTokenizer.prototype.nextLine = function() {\n\tif (this.lineIndex > 0) {\n\t\tthis.multilineVars.iChar += this.lines[this.lineIndex-1].length + 1;\n\t}\n\tif (this.lineIndex < this.lines.length) {\n\t\tvar result = this.lines[this.lineIndex]\n\t\tthis.lineIndex++\n\t\treturn result\n\t}\n\treturn null\n}\n\nmodule.exports = Tokenizer;\n","// abc_transpose.js: Handles the automatic transposition of key signatures, chord symbols, and notes.\n\nvar allNotes = require(\"./all-notes\");\nvar transposeChordName = require(\"../parse/transpose-chord\")\nvar keyAccidentals = require('../const/key-accidentals');\nvar transpose = {};\n\nvar keyIndex = {\n\t'C': 0,\n\t'C#': 1,\n\t'Db': 1,\n\t'D': 2,\n\t'D#': 3,\n\t'Eb': 3,\n\t'E': 4,\n\t'F': 5,\n\t'F#': 6,\n\t'Gb': 6,\n\t'G': 7,\n\t'G#': 8,\n\t'Ab': 8,\n\t'A': 9,\n\t'A#': 10,\n\t'Bb': 10,\n\t'B': 11\n};\nvar newKey = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab', 'A', 'Bb', 'B'];\nvar newKeyMinor = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'Bb', 'B'];\n\ntranspose.keySignature = function(multilineVars, keyName, root, acc, localTranspose) {\n\tif (multilineVars.clef.type === \"perc\" || multilineVars.clef.type === \"none\")\n\t\treturn { accidentals: keyAccidentals(keyName), root: root, acc: acc };\n\tif (!localTranspose) localTranspose = 0;\n\tmultilineVars.localTransposeVerticalMovement = 0;\n\tmultilineVars.localTransposePreferFlats = false;\n\tvar k = keyAccidentals(keyName);\n\tif (!k) return multilineVars.key; // If the key isn't in the list, it is non-standard. We won't attempt to transpose it.\n\tmultilineVars.localTranspose = (multilineVars.globalTranspose ? multilineVars.globalTranspose : 0) + localTranspose;\n\n\tif (!multilineVars.localTranspose)\n\t\treturn { accidentals: k, root: root, acc: acc };\n\tmultilineVars.globalTransposeOrigKeySig = k;\n\tif (multilineVars.localTranspose % 12 === 0) {\n\t\tmultilineVars.localTransposeVerticalMovement = (multilineVars.localTranspose / 12) * 7;\n\t\treturn { accidentals: k, root: root, acc: acc };\n\t}\n\n\tvar baseKey = keyName[0];\n\tif (keyName[1] === 'b' || keyName[1] === '#') {\n\t\tbaseKey += keyName[1];\n\t\tkeyName = keyName.substr(2);\n\t} else\n\t\tkeyName = keyName.substr(1);\n\tvar thisKeyIndex = keyIndex[baseKey]\n\tvar recognized = thisKeyIndex !== undefined\n\tif (!recognized) {\n\t\t// Either the key sig is \"none\" or we don't recognize it. Either way we don't change it, and we assume key of C for the purposes of this calculation.\n\t\tthisKeyIndex = 0\n\t\tbaseKey = \"C\"\n\t\tkeyName = \"\"\n\t}\n\tvar index = thisKeyIndex + multilineVars.localTranspose;\n\twhile (index < 0) index += 12;\n\tif (index > 11) index = index % 12;\n\tvar newKeyName = (keyName[0] === 'm' ? newKeyMinor[index] : newKey[index]);\n\tvar transposedKey = newKeyName + keyName;\n\tvar newKeySig = keyAccidentals(transposedKey);\n\tif (newKeySig.length > 0 && newKeySig[0].acc === 'flat')\n\t\tmultilineVars.localTransposePreferFlats = true;\n\tvar distance = transposedKey.charCodeAt(0) - baseKey.charCodeAt(0);\n\tif (multilineVars.localTranspose > 0) {\n\t\tif (distance < 0)\n\t\t\tdistance += 7;\n\t\telse if (distance === 0) {\n\t\t\t// There's a funny thing that happens when the key changes only an accidental's distance, for instance, from Ab to A.\n\t\t\t// If the distance is positive (we are raising pitch), and the change is higher (that is, Ab -> A), then raise an octave.\n\t\t\t// This test is easier because we know the keys are not equal (or we wouldn't get this far), so if the base key is a flat key, then\n\t\t\t// the transposed key must be higher. Likewise, if the transposed key is sharp, then the base key must be lower. And one\n\t\t\t// of those two things must be true because they are not both natural.\n\t\t\tif (baseKey[1] === '#' || transposedKey[1] === 'b')\n\t\t\t\tdistance += 7;\n\t\t}\n\t} else if (multilineVars.localTranspose < 0) {\n\t\tif (distance > 0)\n\t\t\tdistance -= 7;\n\t\telse if (distance === 0) {\n\t\t\t// There's a funny thing that happens when the key changes only an accidental's distance, for instance, from Ab to A.\n\t\t\t// If the distance is negative (we are dropping pitch), and the change is lower (that is, A -> Ab), then drop an octave.\n\t\t\tif (baseKey[1] === 'b' || transposedKey[1] === '#')\n\t\t\t\tdistance -= 7;\n\t\t}\n\t}\n\n\tif (multilineVars.localTranspose > 0)\n\t\tmultilineVars.localTransposeVerticalMovement = distance + Math.floor(multilineVars.localTranspose / 12) * 7;\n\telse\n\t\tmultilineVars.localTransposeVerticalMovement = distance + Math.ceil(multilineVars.localTranspose / 12) * 7;\n\tif (recognized)\n\t\treturn { accidentals: newKeySig, root: newKeyName[0], acc: newKeyName.length > 1 ? newKeyName[1] : \"\" };\n\telse\n\t\treturn { accidentals: [], root: root, acc: acc };\n};\n\ntranspose.chordName = function(multilineVars, chord) {\n\treturn transposeChordName(chord, multilineVars.localTranspose, multilineVars.localTransposePreferFlats, multilineVars.freegchord)\n};\n\nvar pitchToLetter = [ 'c', 'd', 'e', 'f', 'g', 'a', 'b' ];\nfunction accidentalChange(origPitch, newPitch, accidental, origKeySig, newKeySig) {\n\tvar origPitchLetter = pitchToLetter[(origPitch + 49) % 7]; // Make sure it is a positive pitch before normalizing.\n\tvar origAccidental = 0;\n\tfor (var i = 0; i < origKeySig.length; i++) {\n\t\tif (origKeySig[i].note.toLowerCase() === origPitchLetter)\n\t\t\torigAccidental = accidentals[origKeySig[i].acc];\n\t}\n\n\tvar currentAccidental = accidentals[accidental];\n\tvar delta = currentAccidental - origAccidental;\n\n\tvar newPitchLetter = pitchToLetter[(newPitch + 49) % 7]; // Make sure it is a positive pitch before normalizing.\n\tvar newAccidental = 0;\n\tfor (var j = 0; j < newKeySig.accidentals.length; j++) {\n\t\tif (newKeySig.accidentals[j].note.toLowerCase() === newPitchLetter)\n\t\t\tnewAccidental = accidentals[newKeySig.accidentals[j].acc];\n\t}\n\tvar calcAccidental = delta + newAccidental;\n\tif (calcAccidental < -2) {\n\t\tnewPitch--;\n\t\tcalcAccidental += (newPitchLetter === 'c' || newPitchLetter === 'f') ? 1 : 2;\n\t}\n\tif (calcAccidental > 2) {\n\t\tnewPitch++;\n\t\tcalcAccidental -= (newPitchLetter === 'b' || newPitchLetter === 'e') ? 1 : 2;\n\t}\n\treturn [newPitch, calcAccidental];\n}\n\nvar accidentals = {\n\tdblflat: -2,\n\tflat: -1,\n\tnatural: 0,\n\tsharp: 1,\n\tdblsharp: 2\n};\nvar accidentals2 = {\n\t\"-2\": \"dblflat\",\n\t\"-1\": \"flat\",\n\t\"0\": \"natural\",\n\t\"1\": \"sharp\",\n\t\"2\": \"dblsharp\"\n};\nvar accidentals3 = {\n\t\"-2\": \"__\",\n\t\"-1\": \"_\",\n\t\"0\": \"=\",\n\t\"1\": \"^\",\n\t\"2\": \"^^\"\n};\n//var count = 0\ntranspose.note = function(multilineVars, el) {\n\t// the \"el\" that is passed in has el.name, el.accidental, and el.pitch. \"pitch\" is the vertical position (0=middle C)\n\t// localTranspose is the number of half steps\n\t// localTransposeVerticalMovement is the vertical distance to move.\n\t//console.log(count++,multilineVars.localTranspose, el)\n\tif (!multilineVars.localTranspose || multilineVars.clef.type === \"perc\")\n\t\treturn;\n\tvar origPitch = el.pitch;\n\tif (multilineVars.localTransposeVerticalMovement) {\n\t\tel.pitch = el.pitch + multilineVars.localTransposeVerticalMovement;\n\t\tif (el.name) {\n\t\t\tvar actual = el.accidental ? el.name.substring(1) : el.name\n\t\t\tvar acc = el.accidental ? el.name[0] : ''\n\t\t\tvar p = allNotes.pitchIndex(actual)\n\t\t\tel.name = acc + allNotes.noteName(p+multilineVars.localTransposeVerticalMovement)\n\t\t}\n\t}\n\n\tif (el.accidental) {\n\t\tvar ret = accidentalChange(origPitch, el.pitch, el.accidental, multilineVars.globalTransposeOrigKeySig, multilineVars.targetKey);\n\t\tel.pitch = ret[0];\n\t\tel.accidental = accidentals2[ret[1]];\n\t\tif (el.name) {\n\t\t\tel.name = accidentals3[ret[1]] + el.name.replace(/[_^=]/g,'');\n\t\t}\n\t}\n\n};\n\nmodule.exports = transpose;\n","var allNotes = {};\n\nconst allPitches = [\n\t'C,,,', 'D,,,', 'E,,,', 'F,,,', 'G,,,', 'A,,,', 'B,,,',\n\t'C,,', 'D,,', 'E,,', 'F,,', 'G,,', 'A,,', 'B,,',\n\t'C,', 'D,', 'E,', 'F,', 'G,', 'A,', 'B,',\n\t'C', 'D', 'E', 'F', 'G', 'A', 'B',\n\t'c', 'd', 'e', 'f', 'g', 'a', 'b',\n\t\"c'\", \"d'\", \"e'\", \"f'\", \"g'\", \"a'\", \"b'\",\n\t\"c''\", \"d''\", \"e''\", \"f''\", \"g''\", \"a''\", \"b''\",\n\t\"c'''\", \"d'''\", \"e'''\", \"f'''\", \"g'''\", \"a'''\", \"b'''\",\n];\n\nallNotes.pitchIndex = function(noteName) {\n\treturn allPitches.indexOf(noteName)\n}\n\nallNotes.noteName = function(pitchIndex) {\n\treturn allPitches[pitchIndex]\n}\n\nmodule.exports = allNotes;\n","var sharpChords = ['C', 'C♯', 'D', \"D♯\", 'E', 'F', \"F♯\", 'G', 'G♯', 'A', 'A♯', 'B'];\nvar flatChords = ['C', 'D♭', 'D', 'E♭', 'E', 'F', 'G♭', 'G', 'A♭', 'A', 'B♭', 'B'];\nvar sharpChordsFree = ['C', 'C#', 'D', \"D#\", 'E', 'F', \"F#\", 'G', 'G#', 'A', 'A#', 'B'];\nvar flatChordsFree = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B'];\n\nfunction transposeChordName(chord, steps, preferFlats, freeGCchord) {\n\tif (!steps || (steps % 12 === 0)) // The chords are the same if it is an exact octave change.\n\t\treturn chord;\n\n\t// There are two things in the chord that might need to be transposed:\n\t// The chord will start with a letter from A-G, and might have one accidental after it.\n\t// That accidental might be an actual sharp or flat char, or it might be a pound sign or lower case \"b\".\n\t// Then there is a bunch of stuff that isn't transposed and should just be copied. That is stuff like \"7\" and more complicated chords.\n\t// But there is one other exception: right after a slash there will be a bass note and possibly an accidental. That should also be transposed.\n\n\twhile (steps < 0) steps += 12;\n\tif (steps > 11) steps = steps % 12;\n\n\t// (chord name w/accidental) (a bunch of stuff) (/) (bass note) (anything else)\n\tvar match = chord.match(/^([A-G][b#♭♯]?)([^\\/]+)?\\/?([A-G][b#♭♯]?)?(.+)?/)\n\tif (!match)\n\t\treturn chord; // We don't recognize the format of the chord, so skip it.\n\tvar name = match[1]\n\tvar extra1 = match[2]\n\tvar bass = match[3]\n\tvar extra2 = match[4]\n\tvar index = sharpChords.indexOf(name)\n\tif (index < 0)\n\t\tindex = flatChords.indexOf(name)\n\tif (index < 0)\n\t\tindex = sharpChordsFree.indexOf(name)\n\tif (index < 0)\n\t\tindex = flatChordsFree.indexOf(name)\n\tif (index < 0)\n\t\treturn chord; // This should never happen, but if we can't find the chord just bail.\t\n\n\tindex += steps\n\tindex = index % 12\n\n\tif (preferFlats) {\n\t\tif (freeGCchord) chord = flatChordsFree[index]\n\t\telse chord = flatChords[index]\n\t} else {\n\t\tif (freeGCchord) chord = sharpChordsFree[index]\n\t\telse chord = sharpChords[index]\n\t}\n\n\tif (extra1)\n\t\tchord += extra1\n\n\tif (bass) {\n\t\tvar index = sharpChords.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = flatChords.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = sharpChordsFree.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = flatChordsFree.indexOf(bass)\n\t\tchord += '/'\n\t\tif (index >= 0) {\n\t\t\tindex += steps\n\t\t\tindex = index % 12\n\t\t\tif (preferFlats) {\n\t\t\t\tif (freeGCchord) chord += flatChordsFree[index]\n\t\t\t\telse chord += flatChords[index]\n\t\t\t} else {\n\t\t\t\tif (freeGCchord) chord += sharpChordsFree[index]\n\t\t\t\telse chord += sharpChords[index]\n\t\t\t}\n\t\t} else\n\t\t\tchord += bass; // Don't know what to do so do nothing\n\t}\n\n\tif (extra2)\n\t\tchord += extra2\n\n\treturn chord;\n}\n\nmodule.exports = transposeChordName","var parseKeyVoice = require('../parse/abc_parse_key_voice');\n//var parseCommon = require('../parse/abc_common');\n//var parseDirective = require('./abc_parse_directive');\n\nvar TuneBuilder = function (tune) {\n\tvar self = this;\n\tvar voiceDefs = {}\n\tvar currentVoiceName = ''\n\ttune.reset();\n\n\tthis.setVisualTranspose = function (visualTranspose) {\n\t\tif (visualTranspose)\n\t\t\ttune.visualTranspose = visualTranspose;\n\t};\n\n\tthis.cleanUp = function (barsperstaff, staffnonote, currSlur) {\n\t\tcloseLine(tune);\t// Close the last line.\n\t\tdelete tune.runningFonts;\n\n\t\tsimplifyMetaText(tune)\n\t\t//addRichTextToAnnotationsAndLyrics(tune)\n\n\t\t// If the tempo was created with a string like \"Allegro\", then the duration of a beat needs to be set at the last moment, when it is most likely known.\n\t\tif (tune.metaText.tempo && tune.metaText.tempo.bpm && !tune.metaText.tempo.duration)\n\t\t\ttune.metaText.tempo.duration = [tune.getBeatLength()];\n\n\t\t// Remove any blank lines\n\t\tvar anyDeleted = false;\n\t\tvar i, s, v;\n\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff !== undefined) {\n\t\t\t\tvar hasAny = false;\n\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++) {\n\t\t\t\t\tif (tune.lines[i].staff[s] === undefined) {\n\t\t\t\t\t\tanyDeleted = true;\n\t\t\t\t\t\ttune.lines[i].staff[s] = null;\n\t\t\t\t\t\t//tune.lines[i].staff[s] = { voices: []};\t// TODO-PER: There was a part missing in the abc music. How should we recover?\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (v = 0; v < tune.lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\t\t\tif (tune.lines[i].staff[s].voices[v] === undefined)\n\t\t\t\t\t\t\t\ttune.lines[i].staff[s].voices[v] = [];\t// TODO-PER: There was a part missing in the abc music. How should we recover?\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif (containsNotes(tune.lines[i].staff[s].voices[v])) hasAny = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hasAny) {\n\t\t\t\t\ttune.lines[i] = null;\n\t\t\t\t\tanyDeleted = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (anyDeleted) {\n\t\t\ttune.lines = tune.lines.filter(function (line) { return !!line });\n\t\t\ttune.lines.forEach(function (line) {\n\t\t\t\tif (line.staff)\n\t\t\t\t\tline.staff = line.staff.filter(function (line) { return !!line });\n\t\t\t});\n\t\t}\n\n\t\t// if we exceeded the number of bars allowed on a line, then force a new line\n\t\tif (barsperstaff) {\n\t\t\twhile (wrapMusicLines(tune.lines, barsperstaff)) {\n\t\t\t\t// This will keep wrapping until the end of the piece.\n\t\t\t}\n\t\t}\n\n\t\t// If we were passed staffnonote, then we want to get rid of all staffs that contain only rests.\n\t\tif (staffnonote) {\n\t\t\tanyDeleted = false;\n\t\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\t\tif (tune.lines[i].staff !== undefined) {\n\t\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++) {\n\t\t\t\t\t\tvar keepThis = false;\n\t\t\t\t\t\tfor (v = 0; v < tune.lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\t\t\tif (containsNotesStrict(tune.lines[i].staff[s].voices[v])) {\n\t\t\t\t\t\t\t\tkeepThis = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!keepThis) {\n\t\t\t\t\t\t\tanyDeleted = true;\n\t\t\t\t\t\t\ttune.lines[i].staff[s] = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (anyDeleted) {\n\t\t\t\ttune.lines.forEach(function (line) {\n\t\t\t\t\tif (line.staff)\n\t\t\t\t\t\tline.staff = line.staff.filter(function (staff) { return !!staff });\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfixTitles(tune.lines);\n\n\t\t// Remove the temporary working variables\n\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff) {\n\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++)\n\t\t\t\t\tdelete tune.lines[i].staff[s].workingClef;\n\t\t\t}\n\t\t}\n\n\t\t// If there are overlays, create new voices for them.\n\t\twhile (resolveOverlays(tune)) {\n\t\t\t// keep resolving overlays as long as any are found.\n\t\t}\n\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tvar staff = tune.lines[i].staff;\n\t\t\tif (staff) {\n\t\t\t\tfor (tune.staffNum = 0; tune.staffNum < staff.length; tune.staffNum++) {\n\t\t\t\t\tif (staff[tune.staffNum].clef)\n\t\t\t\t\t\tparseKeyVoice.fixClef(staff[tune.staffNum].clef);\n\t\t\t\t\tfor (tune.voiceNum = 0; tune.voiceNum < staff[tune.staffNum].voices.length; tune.voiceNum++) {\n\t\t\t\t\t\tvar voice = staff[tune.staffNum].voices[tune.voiceNum];\n\t\t\t\t\t\tcleanUpSlursInLine(voice, tune.staffNum, tune.voiceNum, currSlur);\n\t\t\t\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\t\t\t\tif (voice[j].el_type === 'clef')\n\t\t\t\t\t\t\t\tparseKeyVoice.fixClef(voice[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (voice.length > 0 && voice[voice.length - 1].barNumber) {\n\t\t\t\t\t\t\t// Don't hang a bar number on the last bar line: it should go on the next line.\n\t\t\t\t\t\t\tvar nextLine = getNextMusicLine(tune.lines, i);\n\t\t\t\t\t\t\tif (nextLine)\n\t\t\t\t\t\t\t\tnextLine.staff[0].barNumber = voice[voice.length - 1].barNumber;\n\t\t\t\t\t\t\tdelete voice[voice.length - 1].barNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove temporary variables that the outside doesn't need to know about\n\t\tdelete tune.staffNum;\n\t\tdelete tune.voiceNum;\n\t\tdelete tune.lineNum;\n\t\tdelete tune.potentialStartBeam;\n\t\tdelete tune.potentialEndBeam;\n\t\tdelete tune.vskipPending;\n\n\t\treturn currSlur;\n\t};\n\n\tthis.addTieToLastNote = function (dottedTie) {\n\t\t// TODO-PER: if this is a chord, which note?\n\t\tvar el = getLastNote(tune);\n\t\tif (el && el.pitches && el.pitches.length > 0) {\n\t\t\tel.pitches[0].startTie = {};\n\t\t\tif (dottedTie)\n\t\t\t\tel.pitches[0].startTie.style = 'dotted';\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tthis.appendElement = function (type, startChar, endChar, hashParams) {\n\t\thashParams.el_type = type;\n\t\tif (startChar !== null)\n\t\t\thashParams.startChar = startChar;\n\t\tif (endChar !== null)\n\t\t\thashParams.endChar = endChar;\n\t\tif (type === 'note') { // && (hashParams.rest !== undefined || hashParams.end_beam === undefined)) {\n\t\t\t// Now, add the startBeam and endBeam where it is needed.\n\t\t\t// end_beam is already set on the places where there is a forced end_beam. We'll remove that here after using that info.\n\t\t\t// this.potentialStartBeam either points to null or the start beam.\n\t\t\t// this.potentialEndBeam either points to null or the start beam.\n\t\t\t// If we have a beam break (note is longer than a quarter, or an end_beam is on this element), then set the beam if we have one.\n\t\t\t// reset the variables for the next notes.\n\t\t\tvar dur = getDuration(hashParams);\n\t\t\tif (dur >= 0.25) {\t// The beam ends on the note before this.\n\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.force_end_beam_last && tune.potentialStartBeam !== undefined) {\n\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.end_beam && tune.potentialStartBeam !== undefined) {\t// the beam is forced to end on this note, probably because of a space in the ABC\n\t\t\t\tif (hashParams.rest === undefined)\n\t\t\t\t\tendBeamHere(hashParams, tune);\n\t\t\t\telse\n\t\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.rest === undefined) {\t// this a short note and we aren't about to end the beam\n\t\t\t\tif (tune.potentialStartBeam === undefined) {\t// We aren't collecting notes for a beam, so start here.\n\t\t\t\t\tif (!hashParams.end_beam) {\n\t\t\t\t\t\ttune.potentialStartBeam = hashParams;\n\t\t\t\t\t\tdelete tune.potentialEndBeam;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttune.potentialEndBeam = hashParams;\t// Continue the beaming, look for the end next note.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// end_beam goes on rests and notes which precede rests _except_ when a rest (or set of adjacent rests) has normal notes on both sides (no spaces)\n\t\t\t//\t\t\tif (hashParams.rest !== undefined)\n\t\t\t//\t\t\t{\n\t\t\t//\t\t\t\thashParams.end_beam = true;\n\t\t\t//\t\t\t\tvar el2 = getLastNote(tune);\n\t\t\t//\t\t\t\tif (el2) el2.end_beam = true;\n\t\t\t//\t\t\t\t// TODO-PER: implement exception mentioned in the comment.\n\t\t\t//\t\t\t}\n\t\t} else {\t// It's not a note, so there definitely isn't beaming after it.\n\t\t\tendBeamLast(tune);\n\t\t}\n\t\tdelete hashParams.end_beam;\t// We don't want this temporary variable hanging around.\n\t\tdelete hashParams.force_end_beam_last;\t// We don't want this temporary variable hanging around.\n\t\tif (hashParams.rest && hashParams.rest.type === 'invisible') {\n\t\t\tdelete hashParams.decoration // the decorations on invisible rests should be invisible, too.\n\t\t}\n\t\tif (tune.lines.length <= tune.lineNum || tune.lines[tune.lineNum].staff.length <= tune.staffNum) {\n\t\t\t//console.log(\"pushNote IGNORED\", tune.lines[tune.lineNum])\n\t\t\t// TODO-PER: This prevents a crash, but it drops the element. Need to figure out how to start a new line, or delay adding this.\n\t\t\treturn false;\n\t\t}\n\n\t\tpushNote(self, tune, hashParams, voiceDefs, currentVoiceName);\n\t\treturn true\n\t};\n\n\tthis.appendStartingElement = function (type, startChar, endChar, hashParams2) {\n\t\t//console.log('appendStartingElement', hashParams2)\n\t\t// If we're in the middle of beaming, then end the beam.\n\t\tcloseLine(tune);\n\n\t\t// We only ever want implied naturals the first time.\n\t\tvar impliedNaturals;\n\t\tif (type === 'key') {\n\t\t\timpliedNaturals = hashParams2.impliedNaturals;\n\t\t\tdelete hashParams2.impliedNaturals;\n\t\t\tdelete hashParams2.explicitAccidentals;\n\t\t}\n\n\t\t// Clone the object because it will be sticking around for the next line and we don't want the extra fields in it.\n\t\tvar hashParams = Object.assign({}, hashParams2);\n\n\t\t// be sure that we are on a music type line before doing the following.\n\t\tif (!tune.lines[tune.lineNum]) return\n\t\tvar staff = tune.lines[tune.lineNum].staff\n\t\tif (!staff) return\n\n\t\t// If tune is the first item in tune staff, then we might have to initialize the staff, first.\n\t\tif (staff.length <= tune.staffNum) {\n\t\t\tstaff[tune.staffNum] = {};\n\t\t\tstaff[tune.staffNum].clef = Object.assign({}, staff[0].clef);\n\t\t\tstaff[tune.staffNum].key = Object.assign({}, staff[0].key);\n\t\t\tif (staff[0].meter)\n\t\t\t\tstaff[tune.staffNum].meter = Object.assign({}, staff[0].meter);\n\t\t\tstaff[tune.staffNum].workingClef = Object.assign({}, staff[0].workingClef);\n\t\t\tstaff[tune.staffNum].voices = [[]];\n\t\t}\n\t\t// If tune is a clef type, then we replace the working clef on the line. This is kept separate from\n\t\t// the clef in case there is an inline clef field. We need to know what the current position for\n\t\t// the note is.\n\t\tif (type === 'clef') {\n\t\t\tstaff[tune.staffNum].workingClef = hashParams;\n\t\t}\n\n\t\t// These elements should not be added twice, so if the element exists on tune line without a note or bar before it, just replace the staff version.\n\t\tvar voice = staff[tune.staffNum].voices[tune.voiceNum];\n\t\tfor (var i = 0; i < voice.length; i++) {\n\t\t\tif (voice[i].el_type === 'note' || voice[i].el_type === 'bar') {\n\t\t\t\thashParams.el_type = type;\n\t\t\t\thashParams.startChar = startChar;\n\t\t\t\thashParams.endChar = endChar;\n\t\t\t\tif (impliedNaturals)\n\t\t\t\t\thashParams.accidentals = impliedNaturals.concat(hashParams.accidentals);\n\t\t\t\tvoice.push(hashParams);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (voice[i].el_type === type) {\n\t\t\t\thashParams.el_type = type;\n\t\t\t\thashParams.startChar = startChar;\n\t\t\t\thashParams.endChar = endChar;\n\t\t\t\tif (impliedNaturals)\n\t\t\t\t\thashParams.accidentals = impliedNaturals.concat(hashParams.accidentals);\n\t\t\t\tvoice[i] = hashParams;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// We didn't see either that type or a note, so replace the element to the staff.\n\t\tstaff[tune.staffNum][type] = hashParams2;\n\t};\n\n\tthis.addSubtitle = function (str, info) {\n\t\tpushLine(tune, { subtitle: { text: str, startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addSpacing = function (num) {\n\t\ttune.vskipPending = num;\n\t};\n\n\tthis.addNewPage = function (num) {\n\t\tpushLine(tune, { newpage: num });\n\t};\n\n\tthis.addSeparator = function (spaceAbove, spaceBelow, lineLength, info) {\n\t\tpushLine(tune, { separator: { spaceAbove: Math.round(spaceAbove), spaceBelow: Math.round(spaceBelow), lineLength: Math.round(lineLength), startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addText = function (str, info) {\n\t\tpushLine(tune, { text: { text: str, startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addCentered = function (str) {\n\t\tpushLine(tune, { text: [{ text: str, center: true }] });\n\t};\n\n\t//\tanyVoiceContainsNotes: function(line) {\n\t//\t\tfor (var i = 0; i < line.staff.voices.length; i++) {\n\t//\t\t\tif (containsNotes(line.staff.voices[i]))\n\t//\t\t\t\treturn true;\n\t//\t\t}\n\t//\t\treturn false;\n\t//\t},\n\tthis.changeVoiceScale = function (scale) {\n\t\tself.appendElement('scale', null, null, { size: scale });\n\t};\n\tthis.changeVoiceColor = function (color) {\n\t\tself.appendElement('color', null, null, { color: color });\n\t};\n\n\tthis.startNewLine = function (params) {\n\t\t//console.log(\"startNewLine\", tune.lineNum, params, voiceDefs)\n\t\t// If the pointed to line doesn't exist, just create that. If the line does exist, but doesn't have any music on it, just use it.\n\t\t// If it does exist and has music, then increment the line number. If the new element doesn't exist, create it.\n\t\tcloseLine(tune);\t// Close the previous line.\n\t\tif (params.currentVoiceName) {\n\t\t\tcurrentVoiceName = params.currentVoiceName\n\t\t\tvoiceDefs[params.currentVoiceName] = params\n\t\t}\n\n\t\tif (tune.lines[tune.lineNum] === undefined) createLine(self, tune, params);\n\t\telse if (tune.lines[tune.lineNum].staff === undefined) {\n\t\t\ttune.lineNum++;\n\t\t\tthis.startNewLine(params);\n\t\t} else if (tune.lines[tune.lineNum].staff[tune.staffNum] === undefined) createStaff(self, tune, params);\n\t\telse if (tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum] === undefined) createVoice(self, tune, params);\n\t\telse if (!containsNotes(tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum])) {\n\t\t\t// We don't need a new line but we might need to update parts of it.\n\t\t\tif (params.part)\n\t\t\t\tself.appendElement('part', params.part.startChar, params.part.endChar, { title: params.part.title });\n\t\t} else {\n\t\t\ttune.lineNum++;\n\t\t\tthis.startNewLine(params);\n\t\t}\n\t};\n\n\tthis.setRunningFont = function (type, font) {\n\t\t// This is called at tune start to set the current default fonts so we know whether to record a change.\n\t\ttune.runningFonts[type] = font;\n\t};\n\n\tthis.setBarNumberImmediate = function (barNumber) {\n\t\t// If tune is called right at the beginning of a line, then correct the measure number that is already written.\n\t\t// If tune is called at the beginning of a measure, then correct the measure number that was just created.\n\t\t// If tune is called in the middle of a measure, then subtract one from it, because it will be incremented before applied.\n\t\tvar currentVoice = this.getCurrentVoice();\n\t\tif (currentVoice && currentVoice.length > 0) {\n\t\t\tvar lastElement = currentVoice[currentVoice.length - 1];\n\t\t\tif (lastElement.el_type === 'bar') {\n\t\t\t\tif (lastElement.barNumber !== undefined) // the measure number might not be written for tune bar, don't override that.\n\t\t\t\t\tlastElement.barNumber = barNumber;\n\t\t\t} else\n\t\t\t\treturn barNumber - 1;\n\t\t}\n\t\treturn barNumber;\n\t};\n\n\tthis.hasBeginMusic = function () {\n\t\t// return true if there exists at least one line that contains \"staff\"\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tthis.isFirstLine = function (index) {\n\t\tfor (var i = index - 1; i >= 0; i--) {\n\t\t\tif (tune.lines[i].staff !== undefined) return false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tthis.getCurrentVoice = function () {\n\t\t//console.log(\"getCurrentVoice\", tune.lineNum)\n\t\tvar currLine = tune.lines[tune.lineNum];\n\t\tif (!currLine)\n\t\t\treturn null;\n\t\tvar currStaff = currLine.staff[tune.staffNum];\n\t\tif (!currStaff)\n\t\t\treturn null;\n\t\tif (currStaff.voices[tune.voiceNum] !== undefined)\n\t\t\treturn currStaff.voices[tune.voiceNum];\n\t\telse return null;\n\t};\n\n\tthis.setCurrentVoice = function (staffNum, voiceNum, name) {\n\t\t//console.log(\"setCurrentVoice\", tune.lineNum, staffNum, voiceNum, name, voiceDefs)\n\t\ttune.staffNum = staffNum;\n\t\ttune.voiceNum = voiceNum;\n\t\tcurrentVoiceName = name\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff) {\n\t\t\t\tif (tune.lines[i].staff[staffNum] === undefined || tune.lines[i].staff[staffNum].voices[voiceNum] === undefined ||\n\t\t\t\t\t!containsNotes(tune.lines[i].staff[staffNum].voices[voiceNum])) {\n\t\t\t\t\t//console.log(\"cv2\", i, tune.lines[i].staff[staffNum])\n\t\t\t\t\ttune.lineNum = i;\n\t\t\t\t\tif (!tune.lines[i].staff[staffNum] || !!tune.lines[i].staff[staffNum].voices[voiceNum]) return true\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//console.log(\"cv3\", i, tune.lineNum, tune.lines[tune.lineNum])\n\t\ttune.lineNum = i;\n\t\treturn false\n\t};\n\n\tthis.addMetaText = function (key, value, info) {\n\t\tif (tune.metaText[key] === undefined) {\n\t\t\ttune.metaText[key] = value;\n\t\t\ttune.metaTextInfo[key] = info;\n\t\t} else {\n\t\t\tif (typeof tune.metaText[key] === 'string' && typeof value === 'string')\n\t\t\t\ttune.metaText[key] += \"\\n\" + value;\n\t\t\telse {\n\t\t\t\tif (tune.metaText[key] === 'string')\n\t\t\t\t\ttune.metaText[key] = [{ text: tune.metaText[key] }]\n\t\t\t\tif (typeof value === 'string')\n\t\t\t\t\tvalue = [{ text: value }]\n\t\t\t\ttune.metaText[key] = tune.metaText[key].concat(value)\n\t\t\t}\n\t\t\ttune.metaTextInfo[key].endChar = info.endChar;\n\t\t}\n\t};\n\n\tthis.addMetaTextArray = function (key, value, info) {\n\t\tif (tune.metaText[key] === undefined) {\n\t\t\ttune.metaText[key] = [value];\n\t\t\ttune.metaTextInfo[key] = info;\n\t\t} else {\n\t\t\ttune.metaText[key].push(value);\n\t\t\ttune.metaTextInfo[key].endChar = info.endChar;\n\t\t}\n\t};\n\tthis.addMetaTextObj = function (key, value, info) {\n\t\ttune.metaText[key] = value;\n\t\ttune.metaTextInfo[key] = info;\n\t};\n};\n\nfunction isArrayOfStrings(arr) {\n\tif (!arr) return false\n\tif (typeof arr === \"string\") return false\n\t//var str = ''\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (typeof arr[i] !== 'string')\n\t\t\treturn false\n\t}\n\treturn true\n}\n\nfunction simplifyMetaText(tune) {\n\tif (isArrayOfStrings(tune.metaText.notes))\n\t\ttune.metaText.notes = tune.metaText.notes.join(\"\\n\")\n\tif (isArrayOfStrings(tune.metaText.history))\n\t\ttune.metaText.history = tune.metaText.history.join(\"\\n\")\n}\n\n// function addRichTextToAnnotationsAndLyrics(tune) {\n// \tvar lines = tune.lines\n// \tfor (var i = 0; i < lines.length; i++) {\n// \t\tif (lines[i].staff !== undefined) {\n// \t\t\tfor (var s = 0; s < lines[i].staff.length; s++) {\n// \t\t\t\tfor (var v = 0; v < lines[i].staff[s].voices.length; v++) {\n// \t\t\t\t\tvar voice = lines[i].staff[s].voices[v];\n// \t\t\t\t\tfor (var n = 0; n < voice.length; n++) {\n// \t\t\t\t\t\tvar element = voice[n]\n// \t\t\t\t\t\tif (element.chord) {\n// \t\t\t\t\t\t\tfor (var c = 0; c < element.chord.length; c++) {\n// \t\t\t\t\t\t\t\telement.chord[c].name = parseDirective.parseFontChangeLine(element.chord[c].name)\n// \t\t\t\t\t\t\t\tconsole.log(element.chord[c].name)\n// \t\t\t\t\t\t\t}\n// \t\t\t\t\t\t}\n// \t\t\t\t\t\tif (element.lyric) {\n// \t\t\t\t\t\t\tfor (var l = 0; l < element.lyric.length; l++) {\n// \t\t\t\t\t\t\t\telement.lyric[l].syllable = parseDirective.parseFontChangeLine(element.lyric[l].syllable)\n// \t\t\t\t\t\t\t\tconsole.log(element.lyric[l].syllable)\n// \t\t\t\t\t\t\t}\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t}\n// \t\t\t}\n// \t\t}\n// \t}\n\n// }\n\nfunction resolveOverlays(tune) {\n\tvar madeChanges = false;\n\tvar durationsPerLines = [];\n\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\tvar line = tune.lines[i];\n\t\tif (line.staff) {\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tvar overlayVoice = [];\n\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\toverlayVoice.push({ hasOverlay: false, voice: [], snip: [] });\n\t\t\t\t\tdurationsPerLines[i] = 0;\n\t\t\t\t\tvar durationThisBar = 0;\n\t\t\t\t\tvar inOverlay = false;\n\t\t\t\t\tvar overlayDuration = 0;\n\t\t\t\t\tvar snipStart = -1;\n\t\t\t\t\tfor (var kk = 0; kk < voice.length; kk++) {\n\t\t\t\t\t\tvar event = voice[kk];\n\t\t\t\t\t\tif (event.el_type === \"overlay\" && !inOverlay) {\n\t\t\t\t\t\t\tmadeChanges = true;\n\t\t\t\t\t\t\tinOverlay = true;\n\t\t\t\t\t\t\tsnipStart = kk;\n\t\t\t\t\t\t\toverlayVoice[k].hasOverlay = true;\n\t\t\t\t\t\t\tif (overlayDuration === 0)\n\t\t\t\t\t\t\t\toverlayDuration = durationsPerLines[i];\n\t\t\t\t\t\t\t// If this isn't the first line, we also need invisible rests on the previous lines.\n\t\t\t\t\t\t\t// So, if the next voice doesn't appear in a previous line, create it\n\t\t\t\t\t\t\tfor (var ii = 0; ii < i; ii++) {\n\t\t\t\t\t\t\t\tif (durationsPerLines[ii] && tune.lines[ii].staff && staff.voices.length >= tune.lines[ii].staff[0].voices.length) {\n\t\t\t\t\t\t\t\t\ttune.lines[ii].staff[0].voices.push([{\n\t\t\t\t\t\t\t\t\t\tel_type: \"note\",\n\t\t\t\t\t\t\t\t\t\tduration: durationsPerLines[ii],\n\t\t\t\t\t\t\t\t\t\trest: { type: \"invisible\" },\n\t\t\t\t\t\t\t\t\t\tstartChar: event.startChar,\n\t\t\t\t\t\t\t\t\t\tendChar: event.endChar\n\t\t\t\t\t\t\t\t\t}]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (event.el_type === \"bar\") {\n\t\t\t\t\t\t\tif (inOverlay) {\n\t\t\t\t\t\t\t\t// delete the overlay events from this array without messing up this loop.\n\t\t\t\t\t\t\t\tinOverlay = false;\n\t\t\t\t\t\t\t\toverlayVoice[k].snip.push({ start: snipStart, len: kk - snipStart });\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event); // Also end the overlay with the barline.\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// This keeps the voices lined up: if the overlay isn't in the first measure then we need a bunch of invisible rests.\n\t\t\t\t\t\t\t\tif (durationThisBar > 0)\n\t\t\t\t\t\t\t\t\toverlayVoice[k].voice.push({ el_type: \"note\", duration: durationThisBar, rest: { type: \"invisible\" }, startChar: event.startChar, endChar: event.endChar });\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdurationThisBar = 0;\n\t\t\t\t\t\t} else if (event.el_type === \"note\") {\n\t\t\t\t\t\t\tif (inOverlay) {\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdurationThisBar += event.duration;\n\t\t\t\t\t\t\t\tdurationsPerLines[i] += event.duration;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (event.el_type === \"scale\" || event.el_type === \"stem\" || event.el_type === \"overlay\" || event.el_type === \"style\" || event.el_type === \"transpose\" || event.el_type === \"color\") {\n\t\t\t\t\t\t\t// These types of events are duplicated on the overlay layer.\n\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (overlayVoice[k].hasOverlay && overlayVoice[k].snip.length === 0) {\n\t\t\t\t\t\t// there was no closing bar, so we didn't set the snip amount.\n\t\t\t\t\t\toverlayVoice[k].snip.push({ start: snipStart, len: voice.length - snipStart });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (k = 0; k < overlayVoice.length; k++) {\n\t\t\t\t\tvar ov = overlayVoice[k];\n\t\t\t\t\tif (ov.hasOverlay) {\n\t\t\t\t\t\tov.voice.splice(0, 0, { el_type: \"stem\", direction: \"down\" })\n\t\t\t\t\t\tstaff.voices.push(ov.voice);\n\t\t\t\t\t\tfor (var kkk = ov.snip.length - 1; kkk >= 0; kkk--) {\n\t\t\t\t\t\t\tvar snip = ov.snip[kkk];\n\t\t\t\t\t\t\tstaff.voices[k].splice(snip.start, snip.len);\n\t\t\t\t\t\t\tstaff.voices[k].splice(snip.start + 1, 0, { el_type: \"stem\", direction: \"auto\" });\n\t\t\t\t\t\t\tvar indexOfLastBar = findLastBar(staff.voices[k], snip.start);\n\t\t\t\t\t\t\tstaff.voices[k].splice(indexOfLastBar, 0, { el_type: \"stem\", direction: \"up\" });\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// remove ending marks from the overlay voice so they are not repeated\n\t\t\t\t\t\tfor (kkk = 0; kkk < staff.voices[staff.voices.length - 1].length; kkk++) {\n\t\t\t\t\t\t\tstaff.voices[staff.voices.length - 1][kkk] = Object.assign({}, staff.voices[staff.voices.length - 1][kkk]);\n\t\t\t\t\t\t\tvar el = staff.voices[staff.voices.length - 1][kkk];\n\t\t\t\t\t\t\tif (el.el_type === 'bar' && el.startEnding) {\n\t\t\t\t\t\t\t\tdelete el.startEnding;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (el.el_type === 'bar' && el.endEnding)\n\t\t\t\t\t\t\t\tdelete el.endEnding;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn madeChanges;\n};\n\nfunction findLastBar(voice, start) {\n\tfor (var i = start - 1; i > 0 && voice[i].el_type !== \"bar\"; i--) {\n\n\t}\n\treturn i;\n}\n\nfunction fixTitles(lines) {\n\t// We might have name and subname defined. We now know what line everything is on, so we can determine which to use.\n\tvar firstMusicLine = true;\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = lines[i];\n\t\tif (line.staff) {\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tif (staff.title) {\n\t\t\t\t\tvar hasATitle = false;\n\t\t\t\t\tfor (var k = 0; k < staff.title.length; k++) {\n\t\t\t\t\t\tif (staff.title[k]) {\n\t\t\t\t\t\t\tstaff.title[k] = (firstMusicLine) ? staff.title[k].name : staff.title[k].subname;\n\t\t\t\t\t\t\tif (staff.title[k])\n\t\t\t\t\t\t\t\thasATitle = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tstaff.title[k] = '';\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tstaff.title[k] = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasATitle)\n\t\t\t\t\t\tdelete staff.title;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfirstMusicLine = false;\n\t\t}\n\t}\n}\n\nfunction cleanUpSlursInLine(line, staffNum, voiceNum, currSlur) {\n\tif (!currSlur[staffNum])\n\t\tcurrSlur[staffNum] = [];\n\tif (!currSlur[staffNum][voiceNum])\n\t\tcurrSlur[staffNum][voiceNum] = [];\n\tvar x;\n\t//\t\t\tvar lyr = null;\t// TODO-PER: debugging.\n\n\tvar addEndSlur = function (obj, num, chordPos) {\n\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\t// There isn't an exact match for note position, but we'll take any other open slur.\n\t\t\tfor (x = 0; x < currSlur[staffNum][voiceNum].length; x++) {\n\t\t\t\tif (currSlur[staffNum][voiceNum][x] !== undefined) {\n\t\t\t\t\tchordPos = x;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\t\tvar offNum = chordPos * 100 + 1;\n\t\t\t\tobj.endSlur.forEach(function (x) { if (offNum === x) --offNum; });\n\t\t\t\tcurrSlur[staffNum][voiceNum][chordPos] = [offNum];\n\t\t\t}\n\t\t}\n\t\tvar slurNum;\n\t\tfor (var i = 0; i < num; i++) {\n\t\t\tslurNum = currSlur[staffNum][voiceNum][chordPos].pop();\n\t\t\tobj.endSlur.push(slurNum);\n\t\t\t//\t\t\t\t\tlyr.syllable += '<' + slurNum;\t// TODO-PER: debugging\n\t\t}\n\t\tif (currSlur[staffNum][voiceNum][chordPos].length === 0)\n\t\t\tdelete currSlur[staffNum][voiceNum][chordPos];\n\t\treturn slurNum;\n\t};\n\n\tvar addStartSlur = function (obj, num, chordPos, usedNums) {\n\t\tobj.startSlur = [];\n\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos] = [];\n\t\t}\n\t\tvar nextNum = chordPos * 100 + 1;\n\t\tfor (var i = 0; i < num; i++) {\n\t\t\tif (usedNums) {\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t}\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].forEach(function (x) { if (nextNum === x) ++nextNum; });\n\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].push(nextNum);\n\t\t\tobj.startSlur.push({ label: nextNum });\n\t\t\tif (obj.dottedSlur) {\n\t\t\t\tobj.startSlur[obj.startSlur.length - 1].style = 'dotted';\n\t\t\t\tdelete obj.dottedSlur;\n\t\t\t}\n\t\t\t//\t\t\t\t\tlyr.syllable += ' ' + nextNum + '>';\t// TODO-PER:debugging\n\t\t\tnextNum++;\n\t\t}\n\t};\n\n\tfor (var i = 0; i < line.length; i++) {\n\t\tvar el = line[i];\n\t\t//\t\t\t\tif (el.lyric === undefined)\t// TODO-PER: debugging\n\t\t//\t\t\t\t\tel.lyric = [{ divider: '-' }];\t// TODO-PER: debugging\n\t\t//\t\t\t\tlyr = el.lyric[0];\t// TODO-PER: debugging\n\t\t//\t\t\t\tlyr.syllable = '';\t// TODO-PER: debugging\n\t\tif (el.el_type === 'note') {\n\t\t\tif (el.gracenotes) {\n\t\t\t\tfor (var g = 0; g < el.gracenotes.length; g++) {\n\t\t\t\t\tif (el.gracenotes[g].endSlur) {\n\t\t\t\t\t\tvar gg = el.gracenotes[g].endSlur;\n\t\t\t\t\t\tel.gracenotes[g].endSlur = [];\n\t\t\t\t\t\tfor (var ggg = 0; ggg < gg; ggg++)\n\t\t\t\t\t\t\taddEndSlur(el.gracenotes[g], 1, 20);\n\t\t\t\t\t}\n\t\t\t\t\tif (el.gracenotes[g].startSlur) {\n\t\t\t\t\t\tx = el.gracenotes[g].startSlur;\n\t\t\t\t\t\taddStartSlur(el.gracenotes[g], x, 20);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.endSlur) {\n\t\t\t\tx = el.endSlur;\n\t\t\t\tel.endSlur = [];\n\t\t\t\taddEndSlur(el, x, 0);\n\t\t\t}\n\t\t\tif (el.startSlur) {\n\t\t\t\tx = el.startSlur;\n\t\t\t\taddStartSlur(el, x, 0);\n\t\t\t}\n\t\t\tif (el.pitches) {\n\t\t\t\tvar usedNums = [];\n\t\t\t\tfor (var p = 0; p < el.pitches.length; p++) {\n\t\t\t\t\tif (el.pitches[p].endSlur) {\n\t\t\t\t\t\tvar k = el.pitches[p].endSlur;\n\t\t\t\t\t\tel.pitches[p].endSlur = [];\n\t\t\t\t\t\tfor (var j = 0; j < k; j++) {\n\t\t\t\t\t\t\tvar slurNum = addEndSlur(el.pitches[p], 1, p + 1);\n\t\t\t\t\t\t\tusedNums.push(slurNum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (p = 0; p < el.pitches.length; p++) {\n\t\t\t\t\tif (el.pitches[p].startSlur) {\n\t\t\t\t\t\tx = el.pitches[p].startSlur;\n\t\t\t\t\t\taddStartSlur(el.pitches[p], x, p + 1, usedNums);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Correct for the weird gracenote case where ({g}a) should match.\n\t\t\t\t// The end slur was already assigned to the note, and needs to be moved to the first note of the graces.\n\t\t\t\tif (el.gracenotes && el.pitches[0].endSlur && el.pitches[0].endSlur[0] === 100 && el.pitches[0].startSlur) {\n\t\t\t\t\tif (el.gracenotes[0].endSlur)\n\t\t\t\t\t\tel.gracenotes[0].endSlur.push(el.pitches[0].startSlur[0].label);\n\t\t\t\t\telse\n\t\t\t\t\t\tel.gracenotes[0].endSlur = [el.pitches[0].startSlur[0].label];\n\t\t\t\t\tif (el.pitches[0].endSlur.length === 1)\n\t\t\t\t\t\tdelete el.pitches[0].endSlur;\n\t\t\t\t\telse if (el.pitches[0].endSlur[0] === 100)\n\t\t\t\t\t\tel.pitches[0].endSlur.shift();\n\t\t\t\t\telse if (el.pitches[0].endSlur[el.pitches[0].endSlur.length - 1] === 100)\n\t\t\t\t\t\tel.pitches[0].endSlur.pop();\n\t\t\t\t\tif (currSlur[staffNum][voiceNum][1].length === 1)\n\t\t\t\t\t\tdelete currSlur[staffNum][voiceNum][1];\n\t\t\t\t\telse\n\t\t\t\t\t\tcurrSlur[staffNum][voiceNum][1].pop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction wrapMusicLines(lines, barsperstaff) {\n\tfor (i = 0; i < lines.length; i++) {\n\t\tif (lines[i].staff !== undefined) {\n\t\t\tfor (s = 0; s < lines[i].staff.length; s++) {\n\t\t\t\tvar permanentItems = [];\n\t\t\t\tfor (v = 0; v < lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\tvar voice = lines[i].staff[s].voices[v];\n\t\t\t\t\tvar barNumThisLine = 0;\n\t\t\t\t\tfor (var n = 0; n < voice.length; n++) {\n\t\t\t\t\t\tif (voice[n].el_type === 'bar') {\n\t\t\t\t\t\t\tbarNumThisLine++;\n\t\t\t\t\t\t\tif (barNumThisLine >= barsperstaff) {\n\t\t\t\t\t\t\t\t// push everything else to the next line, if there is anything else,\n\t\t\t\t\t\t\t\t// and there is a next line. If there isn't a next line, create one.\n\t\t\t\t\t\t\t\tif (n < voice.length - 1) {\n\t\t\t\t\t\t\t\t\tvar nextLine = getNextMusicLine(lines, i);\n\t\t\t\t\t\t\t\t\tif (!nextLine) {\n\t\t\t\t\t\t\t\t\t\tvar cp = JSON.parse(JSON.stringify(lines[i]));\n\t\t\t\t\t\t\t\t\t\tlines.push(Object.assign({}, cp));\n\t\t\t\t\t\t\t\t\t\tnextLine = lines[lines.length - 1];\n\t\t\t\t\t\t\t\t\t\tfor (var ss = 0; ss < nextLine.staff.length; ss++) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var vv = 0; vv < nextLine.staff[ss].voices.length; vv++)\n\t\t\t\t\t\t\t\t\t\t\t\tnextLine.staff[ss].voices[vv] = [];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar startElement = n + 1;\n\t\t\t\t\t\t\t\t\tvar section = lines[i].staff[s].voices[v].slice(startElement);\n\t\t\t\t\t\t\t\t\tlines[i].staff[s].voices[v] = lines[i].staff[s].voices[v].slice(0, startElement);\n\t\t\t\t\t\t\t\t\tnextLine.staff[s].voices[v] = permanentItems.concat(section.concat(nextLine.staff[s].voices[v]));\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (!voice[n].duration) {\n\t\t\t\t\t\t\tpermanentItems.push(voice[n]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getNextMusicLine(lines, currentLine) {\n\tcurrentLine++;\n\twhile (lines.length > currentLine) {\n\t\tif (lines[currentLine].staff)\n\t\t\treturn lines[currentLine];\n\t\tcurrentLine++;\n\t}\n\treturn null;\n}\n\nfunction getLastNote(tune) {\n\tif (!tune.lines[tune.lineNum]) return null\n\tif (!tune.lines[tune.lineNum].staff) return null\n\tif (!tune.lines[tune.lineNum].staff[tune.staffNum]) return null\n\tvar voice = tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum]\n\tif (!voice) return null\n\tfor (var i = voice.length - 1; i >= 0; i--) {\n\t\tvar el = voice[i];\n\t\tif (el.el_type === 'note') {\n\t\t\treturn el;\n\t\t}\n\t}\n\treturn null;\n};\n\nfunction getDuration(el) {\n\tif (el.duration) return el.duration;\n\treturn 0;\n};\n\nfunction closeLine(tune) {\n\tif (tune.potentialStartBeam && tune.potentialEndBeam) {\n\t\ttune.potentialStartBeam.startBeam = true;\n\t\ttune.potentialEndBeam.endBeam = true;\n\t}\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n};\n\nfunction containsNotes(voice) {\n\tfor (var i = 0; i < voice.length; i++) {\n\t\tif (voice[i].el_type === 'note' || voice[i].el_type === 'bar')\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nfunction containsNotesStrict(voice) {\n\tfor (var i = 0; i < voice.length; i++) {\n\t\tif (voice[i].el_type === 'note' && (voice[i].rest === undefined || voice[i].chord !== undefined))\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nfunction pushLine(tune, hash) {\n\tif (tune.vskipPending) {\n\t\thash.vskip = tune.vskipPending;\n\t\tdelete tune.vskipPending;\n\t}\n\ttune.lines.push(hash);\n};\n\nfunction pushNote(self, tune, hp, voiceDefs, currentVoiceName) {\n\t//console.log(\"pushNote\", tune.lineNum, tune.staffNum, hp.pitches ? JSON.stringify(hp.pitches) : hp.pitches)\n\tvar currStaff = tune.lines[tune.lineNum].staff[tune.staffNum];\n\n\tif (hp.pitches !== undefined) {\n\t\tvar mid = currStaff.workingClef.verticalPos;\n\t\thp.pitches.forEach(function (p) { p.verticalPos = p.pitch - mid; });\n\t}\n\tif (hp.gracenotes !== undefined) {\n\t\tvar mid2 = currStaff.workingClef.verticalPos;\n\t\thp.gracenotes.forEach(function (p) { p.verticalPos = p.pitch - mid2; });\n\t}\n\tif (currStaff.voices.length <= tune.voiceNum) {\n\t\t//console.log(\"should create?\", currentVoiceName, voiceDefs)\n\t\tif (!voiceDefs[currentVoiceName])\n\t\t\tvoiceDefs[currentVoiceName] = {}\n\t\tcreateVoice(self, tune, voiceDefs[currentVoiceName])\n\t}\n\tcurrStaff.voices[tune.voiceNum].push(hp);\n}\n\nfunction endBeamHere(hashParams, tune) {\n\ttune.potentialStartBeam.startBeam = true;\n\thashParams.endBeam = true;\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n}\nfunction endBeamLast(tune) {\n\tif (tune.potentialStartBeam !== undefined && tune.potentialEndBeam !== undefined) {\t// Do we have a set of notes to beam?\n\t\ttune.potentialStartBeam.startBeam = true;\n\t\ttune.potentialEndBeam.endBeam = true;\n\t}\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n}\n\nfunction setLineFont(tune, type, font) {\n\t// If we haven't encountered the font type yet then we are using the default font so it doesn't\n\t// need to be noted. If we have encountered it, then only record it if it is different from the last time.\n\tif (tune.runningFonts[type]) {\n\t\tvar isDifferent = false;\n\t\tvar keys = Object.keys(font);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tif (tune.runningFonts[type][keys[i]] !== font[keys[i]])\n\t\t\t\tisDifferent = true;\n\t\t}\n\t\tif (isDifferent) {\n\t\t\ttune.lines[tune.lineNum].staff[tune.staffNum][type] = font;\n\t\t}\n\t}\n\ttune.runningFonts[type] = font;\n}\n\nfunction createVoice(self, tune, params) {\n\t//console.log(\"createVoice\", params)\n\tvar thisStaff = tune.lines[tune.lineNum].staff[tune.staffNum];\n\tthisStaff.voices[tune.voiceNum] = [];\n\tif (!thisStaff.title)\n\t\tthisStaff.title = [];\n\tthisStaff.title[tune.voiceNum] = { name: params.name, subname: params.subname };\n\tif (params.style)\n\t\tself.appendElement('style', null, null, { head: params.style });\n\tif (params.stem)\n\t\tself.appendElement('stem', null, null, { direction: params.stem });\n\telse if (tune.voiceNum > 0) {\n\t\tif (thisStaff.voices[0] !== undefined) {\n\t\t\tvar found = false;\n\t\t\tfor (var i = 0; i < thisStaff.voices[0].length; i++) {\n\t\t\t\tif (thisStaff.voices[0].el_type === 'stem')\n\t\t\t\t\tfound = true;\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tvar stem = { el_type: 'stem', direction: 'up' };\n\t\t\t\tthisStaff.voices[0].splice(0, 0, stem);\n\t\t\t}\n\t\t}\n\t\tself.appendElement('stem', null, null, { direction: 'down' });\n\t}\n\tif (params.scale)\n\t\tself.appendElement('scale', null, null, { size: params.scale });\n\tif (params.color)\n\t\tself.appendElement('color', null, null, { color: params.color });\n}\n\nfunction createStaff(self, tune, params) {\n\tif (params.key && params.key.impliedNaturals) {\n\t\tparams.key.accidentals = params.key.accidentals.concat(params.key.impliedNaturals);\n\t\tdelete params.key.impliedNaturals;\n\t}\n\n\ttune.lines[tune.lineNum].staff[tune.staffNum] = { voices: [], clef: params.clef, key: params.key, workingClef: params.clef };\n\tvar staff = tune.lines[tune.lineNum].staff[tune.staffNum]\n\tif (params.stafflines !== undefined) {\n\t\tstaff.clef.stafflines = params.stafflines;\n\t\tstaff.workingClef.stafflines = params.stafflines;\n\t}\n\tif (params.staffscale) {\n\t\tstaff.staffscale = params.staffscale;\n\t}\n\tif (params.annotationfont) setLineFont(tune, \"annotationfont\", params.annotationfont);\n\tif (params.gchordfont) setLineFont(tune, \"gchordfont\", params.gchordfont);\n\tif (params.tripletfont) setLineFont(tune, \"tripletfont\", params.tripletfont);\n\tif (params.vocalfont) setLineFont(tune, \"vocalfont\", params.vocalfont);\n\tif (params.bracket) staff.bracket = params.bracket;\n\tif (params.brace) staff.brace = params.brace;\n\tif (params.connectBarLines) staff.connectBarLines = params.connectBarLines;\n\tif (params.barNumber) staff.barNumber = params.barNumber;\n\tcreateVoice(self, tune, params);\n\t// Some stuff just happens for the first voice\n\tif (params.part)\n\t\tself.appendElement('part', params.part.startChar, params.part.endChar, { title: params.part.title });\n\tif (params.meter !== undefined) staff.meter = params.meter;\n\tif (tune.vskipPending) {\n\t\ttune.lines[tune.lineNum].vskip = tune.vskipPending;\n\t\tdelete tune.vskipPending;\n\t}\n}\n\nfunction createLine(self, tune, params) {\n\ttune.lines[tune.lineNum] = { staff: [] };\n\tcreateStaff(self, tune, params);\n}\n\nmodule.exports = TuneBuilder;\n","// wrap_lines.js: does line wrap on an already parsed tune.\n\nfunction wrapLines(tune, lineBreaks, barNumbers) {\n\tif (!lineBreaks || tune.lines.length === 0)\n\t\treturn;\n\n\t// tune.lines contains nested arrays: there is an array of lines (that's the part this function rewrites),\n\t// there is an array of staffs per line (for instance, piano will have 2, orchestra will have many)\n\t// there is an array of voices per staff (for instance, 4-part harmony might have bass and tenor on a single staff)\n\tvar lines = tune.deline({lineBreaks: false});\n\tvar linesBreakElements = findLineBreaks(lines, lineBreaks);\n\t//console.log(JSON.stringify(linesBreakElements))\n\ttune.lines = addLineBreaks(lines, linesBreakElements, barNumbers);\n\ttune.lineBreaks = linesBreakElements;\n}\n\nfunction addLineBreaks(lines, linesBreakElements, barNumbers) {\n\t// linesBreakElements is an array of all of the elements that break for a new line\n\t// The objects in the array look like:\n\t// {\"ogLine\":0,\"line\":0,\"staff\":0,\"voice\":0,\"start\":0, \"end\":21}\n\t// ogLine is the original line that it came from,\n\t// line is the target line.\n\t// then copy all the elements from start to end for the staff and voice specified.\n\t// If the item doesn't contain \"staff\" then it is a non music line and should just be copied.\n\tvar outputLines = [];\n\tvar lastKeySig = []; // This is per staff - if the key changed then this will be populated.\n\tvar lastStem = [];\n\tvar currentBarNumber = 1;\n\tfor (var i = 0; i < linesBreakElements.length; i++) {\n\t\tvar action = linesBreakElements[i];\n\t\tif (lines[action.ogLine].staff) {\n\t\t\tvar inputStaff = lines[action.ogLine].staff[action.staff];\n\t\t\tif (!outputLines[action.line]) {\n\t\t\t\toutputLines[action.line] = {staff: []}\n\t\t\t}\n\t\t\tif (!outputLines[action.line].staff[action.staff]) {\n\t\t\t\toutputLines[action.line].staff[action.staff] = {voices: []};\n\t\t\t\tif (barNumbers !== undefined && action.staff === 0 && action.line > 0) {\n\t\t\t\t\toutputLines[action.line].staff[action.staff].barNumber = currentBarNumber;\n\t\t\t\t}\n\t\t\t\tvar keys = Object.keys(inputStaff)\n\t\t\t\tfor (var k = 0; k < keys.length; k++) {\n\t\t\t\t\tvar skip = keys[k] === \"voices\";\n\t\t\t\t\tif (keys[k] === \"meter\" && action.line !== 0)\n\t\t\t\t\t\tskip = true;\n\t\t\t\t\tif (!skip)\n\t\t\t\t\t\toutputLines[action.line].staff[action.staff][keys[k]] = inputStaff[keys[k]];\n\t\t\t\t}\n\t\t\t\tif (lastKeySig[action.staff])\n\t\t\t\t\toutputLines[action.line].staff[action.staff].key = lastKeySig[action.staff];\n\n\t\t\t}\n\t\t\tif (!outputLines[action.line].staff[action.staff].voices[action.voice]) {\n\t\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice] = [];\n\t\t\t}\n\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice] =\n\t\t\t\tlines[action.ogLine].staff[action.staff].voices[action.voice].slice(action.start, action.end+1);\n\t\t\tif (lastStem[action.staff*10+action.voice])\n\t\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice].unshift({el_type: \"stem\", direction: lastStem[action.staff*10+action.voice].direction})\n\t\t\tvar currVoice = outputLines[action.line].staff[action.staff].voices[action.voice];\n\t\t\tfor (var kk = currVoice.length-1; kk >= 0; kk--) {\n\t\t\t\tif (currVoice[kk].el_type === \"key\") {\n\t\t\t\t\tlastKeySig[action.staff] = {\n\t\t\t\t\t\troot: currVoice[kk].root,\n\t\t\t\t\t\tacc: currVoice[kk].acc,\n\t\t\t\t\t\tmode: currVoice[kk].mode,\n\t\t\t\t\t\taccidentals: currVoice[kk].accidentals.filter(function (acc) { return acc.acc !== 'natural' })\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (kk = currVoice.length-1; kk >= 0; kk--) {\n\t\t\t\tif (currVoice[kk].el_type === \"stem\") {\n\t\t\t\t\tlastStem[action.staff*10+action.voice] = {\n\t\t\t\t\t\tdirection: currVoice[kk].direction,\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (barNumbers !== undefined && action.staff === 0 && action.voice === 0) {\n\t\t\t\tfor (kk = 0; kk < currVoice.length; kk++) {\n\t\t\t\t\tif (currVoice[kk].el_type === 'bar') {\n\t\t\t\t\t\tcurrentBarNumber++\n\t\t\t\t\t\tif (kk === currVoice.length-1)\n\t\t\t\t\t\t\tdelete currVoice[kk].barNumber\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurrVoice[kk].barNumber = currentBarNumber\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\toutputLines[action.line] = lines[action.ogLine];\n\t\t}\n\t}\n\t// There could be some missing info - if the tune passed in was incomplete or had different lengths for different voices or was missing a voice altogether - just fill in the gaps.\n\tfor (var ii = 0; ii < outputLines.length; ii++) {\n\t\tif (outputLines[ii].staff) {\n\t\t\toutputLines[ii].staff = outputLines[ii].staff.filter(function (el) {\n\t\t\t\treturn el != null;\n\t\t\t});\n\t\t}\n\t}\n\treturn outputLines;\n}\n\n\nfunction findLineBreaks(lines, lineBreakArray) {\n\t// lineBreakArray is an array of all of the sections of the tune - often there will just be one\n\t// section unless there is a subtitle or other non-music lines. Each of the elements of\n\t// Each element of lineBreakArray is an array of the zero-based last measure of the line.\n\tvar lineBreakIndexes = [];\n\tvar lbai = 0;\n\tvar lineCounter = 0;\n\tvar outputLine = 0;\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = lines[i];\n\t\tif (line.staff) {\n\t\t\tvar lineStart = lineCounter;\n\t\t\tvar lineBreaks = lineBreakArray[lbai];\n\t\t\tlbai++;\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\toutputLine = lineStart;\n\t\t\t\t\tvar measureNumber = 0;\n\t\t\t\t\tvar lbi = 0;\n\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\tvar start = 0;\n\t\t\t\t\tfor (var e = 0; e < voice.length; e++) {\n\t\t\t\t\t\tvar el = voice[e];\n\n\t\t\t\t\t\tif (el.el_type === 'bar') {\n\t\t\t\t\t\t\tif (lineBreaks[lbi] === measureNumber) {\n\t\t\t\t\t\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine, staff: j, voice: k, start: start, end: e})\n\t\t\t\t\t\t\t\tstart = e + 1;\n\t\t\t\t\t\t\t\toutputLine++;\n\t\t\t\t\t\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t\t\t\t\t\t\tlbi++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmeasureNumber++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine, staff: j, voice: k, start: start, end: voice.length})\n\t\t\t\t\toutputLine++;\n\t\t\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine })\n\t\t\toutputLine++;\n\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t}\n\t}\n\treturn lineBreakIndexes;\n}\n\n\nfunction freeFormLineBreaks(widths, lineBreakPoint) {\n\tvar lineBreaks = [];\n\tvar totals = [];\n\tvar totalThisLine = 0;\n\t// run through each measure and see if the accumulation is less than the ideal.\n\t// if it passes the ideal, then see whether the last or this one is closer to the ideal.\n\tfor (var i = 0; i < widths.length; i++) {\n\t\tvar width = widths[i];\n\t\tvar attemptedWidth = totalThisLine + width;\n\t\tif (attemptedWidth < lineBreakPoint)\n\t\t\ttotalThisLine = attemptedWidth;\n\t\telse {\n\t\t\t// This just passed the ideal, so see whether the previous or the current number of measures is closer.\n\t\t\tvar oldDistance = lineBreakPoint - totalThisLine;\n\t\t\tvar newDistance = attemptedWidth - lineBreakPoint;\n\t\t\tif (oldDistance < newDistance && totalThisLine > 0) {\n\t\t\t\tlineBreaks.push(i - 1);\n\t\t\t\ttotals.push(Math.round(totalThisLine - width));\n\t\t\t\ttotalThisLine = width;\n\t\t\t} else {\n\t\t\t\tif (i < widths.length-1) {\n\t\t\t\t\tlineBreaks.push(i);\n\t\t\t\t\ttotals.push(Math.round(totalThisLine));\n\t\t\t\t\ttotalThisLine = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ttotals.push(Math.round(totalThisLine));\n\treturn { lineBreaks: lineBreaks, totals: totals };\n}\n\nfunction clone(arr) {\n\tvar newArr = [];\n\tfor (var i = 0; i < arr.length; i++)\n\t\tnewArr.push(arr[i]);\n\treturn newArr;\n}\n\nfunction oneTry(measureWidths, idealWidths, accumulator, lineAccumulator, lineWidths, lastVariance, highestVariance, currLine, lineBreaks, startIndex, otherTries) {\n\tfor (var i = startIndex; i < measureWidths.length; i++) {\n\t\tvar measureWidth = measureWidths[i];\n\t\taccumulator += measureWidth;\n\t\tlineAccumulator += measureWidth;\n\t\tvar thisVariance = Math.abs(accumulator - idealWidths[currLine]);\n\t\tvar varianceIsClose = Math.abs(thisVariance - lastVariance) < idealWidths[0] / 10; // see if the difference is less than 10%, if so, run the test both ways.\n\t\tif (varianceIsClose) {\n\t\t\tif (thisVariance < lastVariance) {\n\t\t\t\t// Also attempt one less measure on the current line - sometimes that works out better.\n\t\t\t\tvar newWidths = clone(lineWidths);\n\t\t\t\tvar newBreaks = clone(lineBreaks);\n\t\t\t\tnewBreaks.push(i-1);\n\t\t\t\tnewWidths.push(lineAccumulator - measureWidth);\n\t\t\t\totherTries.push({\n\t\t\t\t\taccumulator: accumulator,\n\t\t\t\t\tlineAccumulator: measureWidth,\n\t\t\t\t\tlineWidths: newWidths,\n\t\t\t\t\tlastVariance: Math.abs(accumulator - idealWidths[currLine+1]),\n\t\t\t\t\thighestVariance: Math.max(highestVariance, lastVariance),\n\t\t\t\t\tcurrLine: currLine+1,\n\t\t\t\t\tlineBreaks: newBreaks,\n\t\t\t\t\tstartIndex: i+1});\n\t\t\t} else if (thisVariance > lastVariance && i < measureWidths.length-1) {\n\t\t\t\t// Also attempt one extra measure on this line.\n\t\t\t\tnewWidths = clone(lineWidths);\n\t\t\t\tnewBreaks = clone(lineBreaks);\n\t\t\t\t// newBreaks[newBreaks.length-1] = i;\n\t\t\t\t// newWidths[newWidths.length-1] = lineAccumulator;\n\t\t\t\totherTries.push({\n\t\t\t\t\taccumulator: accumulator,\n\t\t\t\t\tlineAccumulator: lineAccumulator,\n\t\t\t\t\tlineWidths: newWidths,\n\t\t\t\t\tlastVariance: thisVariance,\n\t\t\t\t\thighestVariance: Math.max(highestVariance, thisVariance),\n\t\t\t\t\tcurrLine: currLine,\n\t\t\t\t\tlineBreaks: newBreaks,\n\t\t\t\t\tstartIndex: i+1});\n\t\t\t}\n\t\t}\n\t\tif (thisVariance > lastVariance) {\n\t\t\tlineBreaks.push(i - 1);\n\t\t\tcurrLine++;\n\t\t\thighestVariance = Math.max(highestVariance, lastVariance);\n\t\t\tlastVariance = Math.abs(accumulator - idealWidths[currLine]);\n\t\t\tlineWidths.push(lineAccumulator - measureWidth);\n\t\t\tlineAccumulator = measureWidth;\n\t\t} else {\n\t\t\tlastVariance = thisVariance;\n\t\t}\n\t}\n\tlineWidths.push(lineAccumulator);\n}\n\nfunction optimizeLineWidths(widths, lineBreakPoint, lineBreaks, explanation) {\n\t//\tfigure out how many lines\n\tvar numLines = Math.ceil(widths.total / lineBreakPoint); // + 1 TODO-PER: this used to be plus one - not sure why\n\n\t//\tget the ideal width for a line (cumulative width / num lines) - approx the same as lineBreakPoint except for rounding\n\tvar idealWidth = Math.floor(widths.total / numLines);\n\n\t//\tget each ideal line width (1*ideal, 2*ideal, 3*ideal, etc)\n\tvar idealWidths = [];\n\tfor (var i = 0; i < numLines; i++)\n\t\tidealWidths.push(idealWidth*(i+1));\n\n\t//\tfrom first measure, step through accum. Widths until the abs of the ideal is greater than the last one.\n\t// This can sometimes look funny in edge cases, so when the length is within 10%, try one more or one less to see which is better.\n\t// This is better than trying all the possibilities because that would get to be a huge number for even a medium size piece.\n\t// This method seems to never generate more than about 16 tries and it is usually 4 or less.\n\tvar otherTries = [];\n\totherTries.push({\n\t\taccumulator: 0,\n\t\tlineAccumulator: 0,\n\t\tlineWidths: [],\n\t\tlastVariance: 999999,\n\t\thighestVariance: 0,\n\t\tcurrLine: 0,\n\t\tlineBreaks: [], // These are the zero-based last measure on each line\n\t\tstartIndex: 0});\n\tvar index = 0;\n\twhile (index < otherTries.length) {\n\t\toneTry(widths.measureWidths,\n\t\t\tidealWidths,\n\t\t\totherTries[index].accumulator,\n\t\t\totherTries[index].lineAccumulator,\n\t\t\totherTries[index].lineWidths,\n\t\t\totherTries[index].lastVariance,\n\t\t\totherTries[index].highestVariance,\n\t\t\totherTries[index].currLine,\n\t\t\totherTries[index].lineBreaks,\n\t\t\totherTries[index].startIndex,\n\t\t\totherTries);\n\t\tindex++;\n\t}\n\tfor (i = 0; i < otherTries.length; i++) {\n\t\tvar otherTry = otherTries[i];\n\t\totherTry.variances = [];\n\t\totherTry.aveVariance = 0;\n\t\tfor (var j = 0; j < otherTry.lineWidths.length; j++) {\n\t\t\tvar lineWidth = otherTry.lineWidths[j];\n\t\t\totherTry.variances.push(lineWidth - idealWidths[0]);\n\t\t\totherTry.aveVariance += Math.abs(lineWidth - idealWidths[0]);\n\t\t}\n\t\totherTry.aveVariance = otherTry.aveVariance / otherTry.lineWidths.length;\n\t\texplanation.attempts.push({ type: \"optimizeLineWidths\", lineBreaks: otherTry.lineBreaks, variances: otherTry.variances, aveVariance: otherTry.aveVariance, widths: widths.measureWidths });\n\t}\n\tvar smallest = 9999999;\n\tvar smallestIndex = -1;\n\tfor (i = 0; i < otherTries.length; i++) {\n\t\totherTry = otherTries[i];\n\t\tif (otherTry.aveVariance < smallest) {\n\t\t\tsmallest = otherTry.aveVariance;\n\t\t\tsmallestIndex = i;\n\t\t}\n\t}\n\treturn { failed: false, lineBreaks: otherTries[smallestIndex].lineBreaks, variance: otherTries[smallestIndex].highestVariance };\n}\n\nfunction fixedMeasureLineBreaks(widths, lineBreakPoint, preferredMeasuresPerLine) {\n\tvar lineBreaks = [];\n\tvar totals = [];\n\tvar thisWidth = 0;\n\tvar failed = false;\n\tfor (var i = 0; i < widths.length; i++) {\n\t\tthisWidth += widths[i];\n\t\tif (thisWidth > lineBreakPoint) {\n\t\t\tfailed = true;\n\t\t}\n\t\tif (i % preferredMeasuresPerLine === (preferredMeasuresPerLine-1)) {\n\t\t\tif (i !== widths.length-1) // Don't bother putting a line break for the last line - it's already a break.\n\t\t\t\tlineBreaks.push(i);\n\t\t\ttotals.push(Math.round(thisWidth));\n\t\t\tthisWidth = 0;\n\t\t}\n\t}\n\treturn { failed: failed, totals: totals, lineBreaks: lineBreaks };\n}\n\nfunction getRevisedTuneParams(lineBreaks, staffWidth, params) {\n\n\tvar revisedParams = {\n\t\tlineBreaks: lineBreaks,\n\t\tstaffwidth: staffWidth\n\t};\n\tfor (var key in params) {\n\t\tif (params.hasOwnProperty(key) && key !== 'wrap' && key !== 'staffwidth') {\n\t\t\trevisedParams[key] = params[key];\n\t\t}\n\t}\n\n\treturn { revisedParams: revisedParams };\n}\n\nfunction calcLineWraps(tune, widths, params) {\n\t// For calculating how much can go on the line, it depends on the width of the line. It is a convenience to just divide it here\n\t// by the minimum spacing instead of multiplying the min spacing later.\n\t// The scaling works differently: this is done by changing the scaling of the outer SVG, so the scaling needs to be compensated\n\t// for here, because the actual width will be different from the calculated numbers.\n\n\t// If the desired width is less than the margin, just punt and return the original tune\n\t//console.log(widths)\n\tif (widths.length === 0 || params.staffwidth < widths[0].left) {\n\t\treturn {\n\t\t\treParse: false,\n\t\t\texplanation: \"Staff width is narrower than the margin\",\n\t\t\trevisedParams: params\n\t\t};\n\t}\n\tvar scale = params.scale ? Math.max(params.scale, 0.1) : 1;\n\tvar minSpacing = params.wrap.minSpacing ? Math.max(parseFloat(params.wrap.minSpacing), 1) : 1;\n\tvar minSpacingLimit = params.wrap.minSpacingLimit ? Math.max(parseFloat(params.wrap.minSpacingLimit), 1) : minSpacing - 0.1;\n\tvar maxSpacing = params.wrap.maxSpacing ? Math.max(parseFloat(params.wrap.maxSpacing), 1) : undefined;\n\tif (params.wrap.lastLineLimit && !maxSpacing)\n\t\tmaxSpacing = Math.max(parseFloat(params.wrap.lastLineLimit), 1);\n\t// var targetHeight = params.wrap.targetHeight ? Math.max(parseInt(params.wrap.targetHeight, 10), 100) : undefined;\n\tvar preferredMeasuresPerLine = params.wrap.preferredMeasuresPerLine ? Math.max(parseInt(params.wrap.preferredMeasuresPerLine, 10), 0) : undefined;\n\n\tvar accumulatedLineBreaks = [];\n\tvar explanations = [];\n\tfor (var s = 0; s < widths.length; s++) {\n\t\tvar section = widths[s];\n\t\tvar usableWidth = params.staffwidth - section.left;\n\t\tvar lineBreakPoint = usableWidth / minSpacing / scale;\n\t\tvar minLineSize = usableWidth / maxSpacing / scale;\n\t\tvar allowableVariance = usableWidth / minSpacingLimit / scale;\n\t\tvar explanation = {\n\t\t\twidths: section,\n\t\t\tlineBreakPoint: lineBreakPoint,\n\t\t\tminLineSize: minLineSize,\n\t\t\tattempts: [],\n\t\t\tstaffWidth: params.staffwidth,\n\t\t\tminWidth: Math.round(allowableVariance)\n\t\t};\n\n\t\t// If there is a preferred number of measures per line, test that first. If none of the lines is too long, then we're finished.\n\t\tvar lineBreaks = null;\n\t\tif (preferredMeasuresPerLine) {\n\t\t\tvar f = fixedMeasureLineBreaks(section.measureWidths, lineBreakPoint, preferredMeasuresPerLine);\n\t\t\texplanation.attempts.push({\n\t\t\t\ttype: \"Fixed Measures Per Line\",\n\t\t\t\tpreferredMeasuresPerLine: preferredMeasuresPerLine,\n\t\t\t\tlineBreaks: f.lineBreaks,\n\t\t\t\tfailed: f.failed,\n\t\t\t\ttotals: f.totals\n\t\t\t});\n\t\t\tif (!f.failed)\n\t\t\t\tlineBreaks = f.lineBreaks;\n\t\t}\n\n\t\t// If we don't have lineBreaks yet, use the free form method of line breaks.\n\t\t// This will be called either if Preferred Measures is not used, or if the music is just weird - like a single measure is way too crowded.\n\t\tif (!lineBreaks) {\n\t\t\tvar ff = freeFormLineBreaks(section.measureWidths, lineBreakPoint);\n\t\t\texplanation.attempts.push({type: \"Free Form\", lineBreaks: ff.lineBreaks, totals: ff.totals});\n\t\t\tlineBreaks = ff.lineBreaks;\n\n\t\t\t// We now have an acceptable number of lines, but the measures may not be optimally distributed. See if there is a better distribution.\n\t\t\tif (lineBreaks.length > 0 && section.measureWidths.length < 25) {\n\t\t\t\t// Only do this if everything doesn't fit on one line.\n\t\t\t\t// This is an intensive operation and it is optional so just do it for shorter music.\n\t\t\t\tff = optimizeLineWidths(section, lineBreakPoint, lineBreaks, explanation);\n\t\t\t\texplanation.attempts.push({\n\t\t\t\t\ttype: \"Optimize\",\n\t\t\t\t\tfailed: ff.failed,\n\t\t\t\t\treason: ff.reason,\n\t\t\t\t\tlineBreaks: ff.lineBreaks,\n\t\t\t\t\ttotals: ff.totals\n\t\t\t\t});\n\t\t\t\tif (!ff.failed)\n\t\t\t\t\tlineBreaks = ff.lineBreaks;\n\t\t\t}\n\t\t}\n\t\taccumulatedLineBreaks.push(lineBreaks);\n\t\texplanations.push(explanation);\n\t}\n\t// If the vertical space exceeds targetHeight, remove a line and try again. If that is too crowded, then don't use it.\n\tvar staffWidth = params.staffwidth;\n\tvar ret = getRevisedTuneParams(accumulatedLineBreaks, staffWidth, params);\n\tret.explanation = explanations;\n\tret.reParse = true;\n\treturn ret;\n}\n\nmodule.exports = { wrapLines: wrapLines, calcLineWraps: calcLineWraps };\n","var keyAccidentals = require(\"../const/key-accidentals\");\nvar { relativeMajor, transposeKey, relativeMode } = require(\"../const/relative-major\");\nvar transposeChordName = require(\"../parse/transpose-chord\")\n\nvar strTranspose;\n\n(function () {\n\t\"use strict\";\n\tstrTranspose = function (abc, abcTune, steps) {\n\t\tif (abcTune === \"TEST\") // Backdoor way to get entry points for unit tests\n\t\t\treturn { keyAccidentals: keyAccidentals, relativeMajor: relativeMajor, transposeKey: transposeKey, relativeMode: relativeMode, transposeChordName: transposeChordName}\n\t\tsteps = parseInt(steps, 10)\n\t\tvar changes = [];\n\t\tvar i;\n\t\tfor (i = 0; i < abcTune.length; i++)\n\t\t\tchanges = changes.concat(transposeOneTune(abc, abcTune[i], steps))\n\n\t\t// Reverse sort so that we are replacing strings from the end to the beginning so that the indexes aren't invalidated as we go.\n\t\t// (Because voices can be written in different ways we can't count on the notes being encountered in the order they appear in the string.)\n\t\tchanges = changes.sort(function (a, b) {\n\t\t\treturn b.start - a.start\n\t\t})\n\t\tvar output = abc.split('')\n\t\tfor (i = 0; i < changes.length; i++) {\n\t\t\tvar ch = changes[i]\n\t\t\toutput.splice(ch.start, ch.end - ch.start, ch.note)\n\t\t}\n\t\treturn output.join('')\n\t}\n\n\tfunction transposeOneTune(abc, abcTune, steps) {\n\t\tvar changes = []\n\n\t\t// Don't transpose bagpipe music - that is a special case and is always a particular key\n\t\tvar key = abcTune.getKeySignature()\n\t\tif (key.root === 'Hp' || key.root === \"HP\")\n\t\t\treturn changes;\n\n\t\tchanges = changes.concat(changeAllKeySigs(abc, steps))\n\n\t\tfor (var i = 0; i < abcTune.lines.length; i++) {\n\t\t\tvar staves = abcTune.lines[i].staff\n\t\t\tif (staves) {\n\t\t\t\tfor (var j = 0; j < staves.length; j++) {\n\t\t\t\t\tvar staff = staves[j]\n\t\t\t\t\tif (staff.clef.type !== \"perc\")\n\t\t\t\t\t\tchanges = changes.concat(transposeVoices(abc, staff.voices, staff.key, steps))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction changeAllKeySigs(abc, steps) {\n\t\tvar changes = [];\n\t\tvar arr = abc.split(\"K:\")\n\t\t// now each line except the first one will start with whatever is right after \"K:\"\n\t\tvar count = arr[0].length\n\t\tfor (var i = 1; i < arr.length; i++) {\n\t\t\tvar segment = arr[i]\n\t\t\tvar match = segment.match(/^( *)([A-G])([#b]?)(\\w*)/)\n\t\t\tif (match) {\n\t\t\t\tvar start = count + 2 + match[1].length // move past the 'K:' and optional white space\n\t\t\t\tvar key = match[2] + match[3] + match[4] // key name, accidental, and mode\n\t\t\t\tvar destinationKey = newKey({ root: match[2], acc: match[3], mode: match[4] }, steps)\n\t\t\t\tvar dest = destinationKey.root + destinationKey.acc + destinationKey.mode\n\t\t\t\tchanges.push({ start: start, end: start + key.length, note: dest })\n\t\t\t}\n\t\t\tcount += segment.length + 2\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction transposeVoices(abc, voices, key, steps) {\n\t\tvar changes = [];\n\t\tvar destinationKey = newKey(key, steps)\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tchanges = changes.concat(transposeVoice(abc, voices[i], key.root, createKeyAccidentals(key), destinationKey, steps))\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction createKeyAccidentals(key) {\n\t\tvar ret = {}\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tvar acc = key.accidentals[i];\n\t\t\tif (acc.acc === 'flat')\n\t\t\t\tret[acc.note.toUpperCase()] = '_'\n\t\t\telse if (acc.acc === 'sharp')\n\t\t\t\tret[acc.note.toUpperCase()] = '^'\n\t\t}\n\t\treturn ret\n\t}\n\n\tfunction setLetterDistance(destinationKey, keyRoot, steps) {\n\t\tvar letterDistance = letters.indexOf(destinationKey.root) - letters.indexOf(keyRoot)\n\t\tif (keyRoot === \"none\")\n\t\t\tletterDistance = letters.indexOf(destinationKey.root)\n\t\tif (letterDistance === 0) {\n\t\t\t// This could either be a half step (like Eb => E) or almost an octave (like E => Eb)\n\t\t\tif (steps > 2) // If it is a large leap, then we are going up an octave\n\t\t\t\tletterDistance += 7\n\t\t\telse if (steps === -12) // If it is a large leap, then we are going down an octave\t\n\t\t\t \tletterDistance -= 7\n\t\t} else if (steps > 0 && letterDistance < 0) \n\t\t\tletterDistance += 7\n\t\telse if (steps < 0 && letterDistance > 0) \n\t\t\tletterDistance -= 7\n\n\t\tif (steps > 12)\n\t\t\tletterDistance += 7\n\t\telse if (steps < -12)\n\t\t\tletterDistance -= 7\n\n\t\treturn letterDistance\n\t}\n\n\tfunction transposeVoice(abc, voice, keyRoot, keyAccidentals, destinationKey, steps) {\n\t\tvar changes = []\n\t\tvar letterDistance = setLetterDistance(destinationKey, keyRoot, steps)\n\n\t\tvar measureAccidentals = {}\n\t\tvar transposedMeasureAccidentals = {}\n\t\tfor (var i = 0; i < voice.length; i++) {\n\t\t\tvar el = voice[i];\n\t\t\tif (el.chord) {\n\t\t\t\tfor (var c = 0; c < el.chord.length; c++) {\n\t\t\t\t\tvar ch = el.chord[c]\n\t\t\t\t\tif (ch.position === 'default') {\n\t\t\t\t\t\tvar prefersFlats = destinationKey.accidentals.length && destinationKey.accidentals[0].acc === 'flat'\n\t\t\t\t\t\tvar newChord = transposeChordName(ch.name, steps, prefersFlats, true)\n\t\t\t\t\t\tnewChord = newChord.replace(/♭/g, \"b\").replace(/♯/g, \"#\")\n\t\t\t\t\t\tif (newChord !== ch.name) // If we didn't recognize the chord the input is returned unchanged and there is nothing to replace\n\t\t\t\t\t\t\tchanges.push(replaceChord(abc, el.startChar, el.endChar, newChord))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.el_type === 'note' && el.pitches) {\n\t\t\t\tfor (var j = 0; j < el.pitches.length; j++) {\n\t\t\t\t\tvar note = parseNote(el.pitches[j].name, keyRoot, keyAccidentals, measureAccidentals)\n\t\t\t\t\tif (note.acc)\n\t\t\t\t\t\tmeasureAccidentals[note.name.toUpperCase()] = note.acc\n\t\t\t\t\tvar newPitch = transposePitch(note, destinationKey, letterDistance, transposedMeasureAccidentals)\n\t\t\t\t\tif (newPitch.acc)\n\t\t\t\t\t\ttransposedMeasureAccidentals[newPitch.upper] = newPitch.acc\n\t\t\t\t\tchanges.push(replaceNote(abc, el.startChar, el.endChar, newPitch.acc + newPitch.name, j))\n\t\t\t\t}\n\t\t\t\tif (el.gracenotes) {\n\t\t\t\t\tfor (var g = 0; g < el.gracenotes.length; g++) {\n\t\t\t\t\t\tvar grace = parseNote(el.gracenotes[g].name, keyRoot, keyAccidentals, measureAccidentals)\n\t\t\t\t\t\tif (grace.acc)\n\t\t\t\t\t\t\tmeasureAccidentals[grace.name.toUpperCase()] = grace.acc\n\t\t\t\t\t\tvar newGrace = transposePitch(grace, destinationKey, letterDistance, measureAccidentals)\n\t\t\t\t\t\tif (newGrace.acc)\n\t\t\t\t\t\t\ttransposedMeasureAccidentals[newGrace.upper] = newGrace.acc\n\t\t\t\t\t\tchanges.push(replaceGrace(abc, el.startChar, el.endChar, newGrace.acc + newGrace.name, g))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (el.el_type === \"bar\") {\n\t\t\t\tmeasureAccidentals = {}\n\t\t\t\ttransposedMeasureAccidentals = {}\n\t\t\t} else if (el.el_type === \"keySignature\") {\n\t\t\t\tkeyRoot = el.root\n\t\t\t\tkeyAccidentals = createKeyAccidentals(el)\n\t\t\t\tdestinationKey = newKey(el, steps)\n\t\t\t\tletterDistance = setLetterDistance(destinationKey, keyRoot, steps)\n\t\t\t}\n\t\t}\n\t\treturn changes\n\t}\n\n\tvar letters = \"CDEFGAB\"\n\tvar octaves = [\",,,,\", \",,,\", \",,\", \",\", \"\", \"'\", \"''\", \"'''\", \"''''\"]\n\n\tfunction newKey(key, steps) {\n\t\tif (key.root === \"none\") {\n\t\t\treturn { root: transposeKey(\"C\", steps), mode: \"\", acc: \"\", accidentals: [] }\n\t\t}\n\t\tvar major = relativeMajor(key.root + key.acc + key.mode)\n\t\tvar newMajor = transposeKey(major, steps)\n\t\tvar newMode = relativeMode(newMajor, key.mode)\n\t\tvar acc = keyAccidentals(newMajor)\n\t\treturn { root: newMode[0], mode: key.mode, acc: newMode.length > 1 ? newMode[1] : '', accidentals: acc }\n\t}\n\n\tfunction transposePitch(note, key, letterDistance, measureAccidentals) {\n\t\t// Depending on what the current note and new note are, the octave might have changed\n\t\t// The letterDistance is how far the change is to see if we passed \"C\" when transposing.\n\n\t\tvar pitch = note.pitch\n\t\tvar origDistFromC = letters.indexOf(note.name)\n\t\tvar root = letters.indexOf(key.root)\n\t\tvar index = (root + pitch) % 7\n\t\t// if the note crosses \"c\" then the octave changes, so that is true of \"B\" when going up one step, \"A\" and \"B\" when going up two steps, etc., and reverse when going down.\n\t\tvar newDistFromC = origDistFromC + letterDistance\n\t\tvar oct = note.oct\n\t\twhile (newDistFromC > 6) {\n\t\t\toct++\n\t\t\tnewDistFromC -= 7\n\t\t}\n\t\twhile (newDistFromC < 0) {\n\t\t\toct--\n\t\t\tnewDistFromC += 7\n\t\t}\n\n\t\tvar name = letters[index]\n\n\t\tvar acc = '';\n\t\tvar adj = note.adj\n\t\t// the amount of adjustment depends on the key - if there is a sharp in the key sig, then -1 is a natural, if there isn't, then -1 is a flat.\n\t\tvar keyAcc = '=';\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tif (key.accidentals[i].note.toLowerCase() === name.toLowerCase()) {\n\t\t\t\tadj = adj + (key.accidentals[i].acc === 'flat' ? -1 : 1)\n\t\t\t\tkeyAcc = (key.accidentals[i].acc === 'flat' ? '_' : '^')\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tswitch (adj) {\n\t\t\tcase -2: acc = \"__\"; break;\n\t\t\tcase -1: acc = \"_\"; break;\n\t\t\tcase 0: acc = \"=\"; break;\n\t\t\tcase 1: acc = \"^\"; break;\n\t\t\tcase 2: acc = \"^^\"; break;\n\t\t\tcase -3:\n\t\t\t\t// This requires a triple flat, so bump down the pitch and try again\n\t\t\t\tvar newNote = {}\n\t\t\t\tnewNote.pitch = note.pitch - 1\n\t\t\t\tnewNote.oct = note.oct\n\t\t\t\tnewNote.name = letters[letters.indexOf(note.name) - 1]\n\t\t\t\tif (!newNote.name) {\n\t\t\t\t\tnewNote.name = \"B\"\n\t\t\t\t\tnewNote.oct--\n\t\t\t\t}\n\t\t\t\tif (newNote.name === \"B\" || newNote.name === \"E\")\n\t\t\t\t\tnewNote.adj = note.adj + 1;\n\t\t\t\telse\n\t\t\t\t\tnewNote.adj = note.adj + 2;\n\t\t\t\treturn transposePitch(newNote, key, letterDistance + 1, measureAccidentals)\n\t\t\tcase 3:\n\t\t\t\t// This requires a triple sharp, so bump up the pitch and try again\n\t\t\t\tvar newNote = {}\n\t\t\t\tnewNote.pitch = note.pitch + 1\n\t\t\t\tnewNote.oct = note.oct\n\t\t\t\tnewNote.name = letters[letters.indexOf(note.name) + 1]\n\t\t\t\tif (!newNote.name) {\n\t\t\t\t\tnewNote.name = \"C\"\n\t\t\t\t\tnewNote.oct++\n\t\t\t\t}\n\t\t\t\tif (newNote.name === \"C\" || newNote.name === \"F\")\n\t\t\t\t\tnewNote.adj = note.adj - 1;\n\t\t\t\telse\n\t\t\t\t\tnewNote.adj = note.adj - 2;\n\t\t\t\treturn transposePitch(newNote, key, letterDistance + 1, measureAccidentals)\n\t\t}\n\t\tif ((measureAccidentals[name] === acc || (!measureAccidentals[name] && acc === keyAcc)) && !note.courtesy)\n\t\t\tacc = \"\"\n\n\t\tswitch (oct) {\n\t\t\tcase 0: name = name + \",,,\"; break;\n\t\t\tcase 1: name = name + \",,\"; break;\n\t\t\tcase 2: name = name + \",\"; break;\n\t\t\t// case 3: it is already correct\n\t\t\tcase 4: name = name.toLowerCase(); break;\n\t\t\tcase 5: name = name.toLowerCase() + \"'\"; break;\n\t\t\tcase 6: name = name.toLowerCase() + \"''\"; break;\n\t\t\tcase 7: name = name.toLowerCase() + \"'''\"; break;\n\t\t\tcase 8: name = name.toLowerCase() + \"''''\"; break;\n\t\t}\n\t\tif (oct > 4)\n\t\t\tname = name.toLowerCase();\n\n\t\treturn { acc: acc, name: name, upper: name.toUpperCase() }\n\t}\n\n\tvar regPitch = /([_^=]*)([A-Ga-g])([,']*)/\n\tvar regNote = /([_^=]*[A-Ga-g][,']*)(\\d*\\/*\\d*)([\\>\\<\\-\\)\\.\\s\\\\]*)/\n\tvar regOptionalNote = /([_^=]*[A-Ga-g][,']*)?(\\d*\\/*\\d*)?([\\>\\<\\-\\)]*)?/\n\tvar regSpace = /(\\s*)$/\n\n\t// This the relationship of the note to the tonic and an octave. So what is returned is a distance in steps from the tonic and the amount of adjustment from\n\t// a normal scale. That is - in the key of D an F# is two steps from the tonic and no adjustment. A G# is three steps from the tonic and one half-step higher.\n\t// I don't think there is any adjustment needed for minor keys since the adjustment is based on the key signature and the accidentals.\n\tfunction parseNote(note, keyRoot, keyAccidentals, measureAccidentals) {\n\t\tvar root = keyRoot === \"none\" ? 0 : letters.indexOf(keyRoot)\n\t\tvar reg = note.match(regPitch)\n\t\t// reg[1] : \"__\", \"_\", \"\", \"=\", \"^\", or \"^^\"\n\t\t// reg[2] : A-G a-g\n\t\t// reg[3] : commas or apostrophes\n\t\tvar name = reg[2].toUpperCase()\n\t\tvar pos = letters.indexOf(name) - root;\n\t\tif (pos < 0) pos += 7\n\t\tvar oct = octaves.indexOf(reg[3])\n\t\tif (name === reg[2]) // See if it is a capital letter and subtract an octave if so.\n\t\t\toct--;\n\t\tvar currentAcc = measureAccidentals[name] || keyAccidentals[name] || \"=\" // use the key accidentals if they exist, but override with the measure accidentals, and if neither of them exist, use a natural.\n\t\treturn { acc: reg[1], name: name, pitch: pos, oct: oct, adj: calcAdjustment(reg[1], keyAccidentals[name], measureAccidentals[name]), courtesy: reg[1] === currentAcc }\n\t}\n\n\tfunction replaceNote(abc, start, end, newPitch, index) {\n\t\t// There may be more than just the note between the start and end - there could be spaces, there could be a chord symbol, there could be a decoration.\n\t\t// This could also be a part of a chord. If so, then the particular note needs to be teased out.\n\t\tvar note = abc.substring(start, end)\n\t\tvar match = note.match(new RegExp(regNote.source + regSpace.source), '')\n\t\tif (match) {\n\t\t\t// This will match a single note\n\t\t\tvar noteLen = match[1].length\n\t\t\tvar trailingLen = match[2].length + match[3].length + match[4].length\n\t\t\tvar leadingLen = end - start - noteLen - trailingLen\n\t\t\tstart += leadingLen\n\t\t\tend -= trailingLen\n\t\t} else {\n\t\t\t// I don't know how to capture more than one note, so I'm separating them. There is a limit of the number of notes in a chord depending on the repeats I have here, but it is unlikely to happen in real music.\n\t\t\tvar regPreBracket = /([^\\[]*)/\n\t\t\tvar regOpenBracket = /\\[/\n\t\t\tvar regCloseBracket = /\\-?](\\d*\\/*\\d*)?([\\>\\<\\-\\)]*)/\n\t\t\tmatch = note.match(new RegExp(regPreBracket.source + regOpenBracket.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regOptionalNote.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regOptionalNote.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regCloseBracket.source + regSpace.source))\n\n\t\t\tif (match) {\n\t\t\t\t// This will match a chord\n\t\t\t\t// Get the number of chars used by the previous notes in this chord\n\t\t\t\tvar count = 1 + match[1].length // one character for the open bracket\n\t\t\t\tfor (var i = 0; i < index; i++) { // index is the iteration through the chord. This function gets called for each one.\n\t\t\t\t\tif (match[i * 3 + 2])\n\t\t\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\t\t\tif (match[i * 3 + 3])\n\t\t\t\t\t\tcount += match[i * 3 + 3].length\n\t\t\t\t\tif (match[i * 3 + 4])\n\t\t\t\t\t\tcount += match[i * 3 + 4].length\n\t\t\t\t}\n\t\t\t\tstart += count\n\t\t\t\tvar endLen = match[index * 3 + 2] ? match[index * 3 + 2].length : 0\n\t\t\t\t// endLen += match[index * 3 + 3] ? match[index * 3 + 3].length : 0\n\t\t\t\t// endLen += match[index * 3 + 4] ? match[index * 3 + 4].length : 0\n\n\t\t\t\tend = start + endLen\n\t\t\t}\n\t\t}\n\t\treturn { start: start, end: end, note: newPitch }\n\t}\n\n\tfunction replaceGrace(abc, start, end, newGrace, index) {\n\t\tvar note = abc.substring(start, end)\n\t\t// I don't know how to capture more than one note, so I'm separating them. There is a limit of the number of notes in a chord depending on the repeats I have here, but it is unlikely to happen in real music.\n\t\tvar regOpenBrace = /\\{/\n\t\tvar regCloseBrace = /\\}/\n\t\tvar regPreBrace = /([^\\{]*)/\n\t\tvar regPreNote = /(\\/*)/\n\t\tvar match = note.match(new RegExp(regPreBrace.source + regOpenBrace.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regCloseBrace.source))\n\t\tif (match) {\n\t\t\t// This will match all notes inside a grace symbol\n\t\t\t// Get the number of chars used by the previous graces\n\t\t\tvar count = 1 + match[1].length // one character for the open brace, and whatever comes before the brace\n\t\t\tfor (var i = 0; i < index; i++) { // index is the iteration through the chord. This function gets called for each one.\n\t\t\t\tif (match[i * 3 + 2])\n\t\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\t\tif (match[i * 3 + 3])\n\t\t\t\t\tcount += match[i * 3 + 3].length\n\t\t\t\tif (match[i * 3 + 4])\n\t\t\t\t\tcount += match[i * 3 + 4].length\n\t\t\t\tif (match[i * 3 + 5])\n\t\t\t\t\tcount += match[i * 3 + 5].length\n\t\t\t}\n\t\t\tif (match[index * 3 + 2])\n\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\tstart += count\n\t\t\tvar endLen = match[index * 3 + 3] ? match[index * 3 + 3].length : 0\n\t\t\tendLen += match[index * 3 + 4] ? match[index * 3 + 4].length : 0\n\t\t\tendLen += match[index * 3 + 5] ? match[index * 3 + 5].length : 0\n\n\t\t\tend = start + endLen\n\t\t}\n\t\treturn { start: start, end: end, note: newGrace }\n\t}\n\n\tfunction replaceChord(abc, start, end, newChord) {\n\t\t// Isolate the chord and just replace that\n\t\tvar match = abc.substring(start, end).match(/([^\"]+)?(\".+\")+/)\n\t\tif (match[1])\n\t\t\tstart += match[1].length\n\t\tend = start + match[2].length\n\t\t// leave the quote in, so skip one more\n\t\treturn { start: start + 1, end: end - 1, note: newChord }\n\t}\n\n\tfunction calcAdjustment(thisAccidental, keyAccidental, measureAccidental) {\n\t\tif (!thisAccidental && measureAccidental) {\n\t\t\t// There was no accidental on this note, but there was earlier in the measure, so we'll use that\n\t\t\tthisAccidental = measureAccidental\n\t\t}\n\t\tif (!thisAccidental)\n\t\t\treturn 0; // there is no deviation from the key.\n\n\t\tswitch (keyAccidental) {\n\t\t\tcase undefined:\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -2;\n\t\t\t\t\tcase '_': return -1;\n\t\t\t\t\tcase '=': return 0;\n\t\t\t\t\tcase '^': return 1;\n\t\t\t\t\tcase '^^': return 2;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t\tcase '_':\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -1;\n\t\t\t\t\tcase '_': return 0;\n\t\t\t\t\tcase '=': return 1;\n\t\t\t\t\tcase '^': return 2;\n\t\t\t\t\tcase '^^': return 3;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t\tcase '^':\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -3;\n\t\t\t\t\tcase '_': return -2;\n\t\t\t\t\tcase '=': return -1;\n\t\t\t\t\tcase '^': return 0;\n\t\t\t\t\tcase '^^': return 1;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t}\n\t\treturn 0// this should never happen\n\t}\n})();\n\nmodule.exports = strTranspose;\n","// abc_midi_flattener.js: Turn a linear series of events into a series of MIDI commands.\n\n// We input a set of voices, but the notes are still complex. This pass changes the logical definitions\n// of the grace notes, decorations, ties, triplets, rests, transpositions, keys, and accidentals into actual note durations.\n// It also extracts guitar chords to a separate voice and resolves their rhythm.\n\nvar flatten;\nvar ChordTrack = require(\"./chord-track\");\nvar pitchesToPerc = require('./pitches-to-perc');\n\n(function() {\n\t\"use strict\";\n\n\tvar barAccidentals;\n\tvar accidentals;\n\tvar transpose;\n\tvar bagpipes;\n\tvar tracks;\n\tvar startingTempo;\n\tvar startingMeter;\n\tvar tempoChangeFactor = 1;\n\tvar instrument;\n\tvar currentInstrument;\n\t// var channel;\n\tvar currentTrack;\n\tvar lastNoteDurationPosition;\n\tvar currentTrackName;\n\tvar lastEventTime;\n\tvar chordTrack;\n\n\tvar meter = { num: 4, den: 4 };\n\tvar drumInstrument = 128;\n\tvar lastBarTime;\n\tvar doBeatAccents = true;\n\tvar stressBeat1 = 105;\n\tvar stressBeatDown = 95;\n\tvar stressBeatUp = 85;\n\tvar beatFraction = 0.25;\n\tvar nextVolume;\n\tvar nextVolumeDelta;\n\tvar slurCount = 0;\n\n\tvar drumTrack;\n\tvar drumTrackFinished;\n\tvar drumDefinition = {};\n\tvar drumBars;\n\n\tvar pickupLength = 0;\n\tvar percmap;\n\n\t// The gaps per beat. The first two are in seconds, the third is in fraction of a duration.\n\tvar normalBreakBetweenNotes = 0; //0.000520833333325*1.5; // for articulation (matches muse score value)\n\tvar slurredBreakBetweenNotes = -0.001; // make the slurred notes actually overlap\n\tvar staccatoBreakBetweenNotes = 0.4; // some people say staccato is half duration, some say 3/4 so this splits it\n\n\tflatten = function(voices, options, percmap_, midiOptions) {\n\t\tif (!options) options = {};\n\t\tif (!midiOptions) midiOptions = {};\n\t\tbarAccidentals = [];\n\t\taccidentals = [0,0,0,0,0,0,0];\n\t\tbagpipes = false;\n\t\ttracks = [];\n\t\tstartingTempo = options.qpm;\n\t\tstartingMeter = undefined;\n\t\ttempoChangeFactor = 1;\n\t\tinstrument = undefined;\n\t\tcurrentInstrument = undefined;\n\t\t// channel = undefined;\n\t\tcurrentTrack = undefined;\n\t\tcurrentTrackName = undefined;\n\t\tlastEventTime = 0;\n\t\tpercmap = percmap_;\n\n\t\tmeter = { num: 4, den: 4 };\n\n\t\tdoBeatAccents = true;\n\t\tstressBeat1 = 105;\n\t\tstressBeatDown = 95;\n\t\tstressBeatUp = 85;\n\t\tbeatFraction = 0.25;\n\t\tnextVolume = undefined;\n\t\tnextVolumeDelta = undefined;\n\t\tslurCount = 0;\n\n\t\t// For the drum/metronome track.\n\t\tdrumTrack = [];\n\t\tdrumTrackFinished = false;\n\t\tdrumDefinition = {};\n\t\tdrumBars = 1;\n\n\t\tif (voices.length > 0 && voices[0].length > 0)\n\t\t\tpickupLength = voices[0][0].pickupLength;\n\n\t\t// For resolving chords.\n\t\tif (options.bassprog !== undefined && !midiOptions.bassprog)\n\t\t\tmidiOptions.bassprog = [options.bassprog]\n\t\tif (options.bassvol !== undefined && !midiOptions.bassvol)\n\t\t\tmidiOptions.bassvol = [options.bassvol]\n\t\tif (options.chordprog !== undefined && !midiOptions.chordprog)\n\t\t\tmidiOptions.chordprog = [options.chordprog]\n\t\tif (options.chordvol !== undefined && !midiOptions.chordvol)\n\t\t\tmidiOptions.chordvol = [options.chordvol]\n\t\tif (options.gchord !== undefined && !midiOptions.gchord)\n\t\t\tmidiOptions.gchord = [options.gchord]\n\t\tchordTrack = new ChordTrack(voices.length, options.chordsOff, midiOptions, meter)\n\n\t\t// First adjust the input to resolve ties, set the starting time for each note, etc. That will make the rest of the logic easier\n\t\tpreProcess(voices, options);\n\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\ttranspose = 0;\n\t\t\tchordTrack.setTranspose(transpose)\n\t\t\tlastNoteDurationPosition = -1;\n\t\t\tvar voice = voices[i];\n\t\t\tcurrentTrack = [{ cmd: 'program', channel: i, instrument: instrument }];\n\t\t\tcurrentTrackName = undefined;\n\t\t\tlastBarTime = 0;\n\t\t\tchordTrack.setLastBarTime(0)\n\t\t\tvar voiceOff = false;\n\t\t\tif (options.voicesOff === true)\n\t\t\t\tvoiceOff = true;\n\t\t\telse if (options.voicesOff && options.voicesOff.length && options.voicesOff.indexOf(i) >= 0)\n\t\t\t\tvoiceOff = true;\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar element = voice[j];\n\t\t\t\tswitch (element.el_type) {\n\t\t\t\t\tcase \"name\":\n\t\t\t\t\t\tcurrentTrackName = {cmd: 'text', type: \"name\", text: element.trackName };\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"note\":\n\t\t\t\t\t\twriteNote(element, voiceOff);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"key\":\n\t\t\t\t\t\taccidentals = setKeySignature(element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"meter\":\n\t\t\t\t\t\tif (!startingMeter)\n\t\t\t\t\t\t\tstartingMeter = element;\n\t\t\t\t\t\tmeter = element;\n\t\t\t\t\t\tchordTrack.setMeter(meter)\n\t\t\t\t\t\tbeatFraction = getBeatFraction(meter);\n\t\t\t\t\t\talignDrumToMeter();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"tempo\":\n\t\t\t\t\t\tif (!startingTempo)\n\t\t\t\t\t\t\tstartingTempo = element.qpm;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttempoChangeFactor = element.qpm ? startingTempo / element.qpm : 1;\n\t\t\t\t\t\tchordTrack.setTempoChangeFactor(tempoChangeFactor)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"transpose\":\n\t\t\t\t\t\ttranspose = element.transpose;\n\t\t\t\t\t\tchordTrack.setTranspose(transpose)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bar\":\n\t\t\t\t\t\tchordTrack.barEnd(element)\n\n\t\t\t\t\t\tbarAccidentals = [];\n\t\t\t\t\t\tif (i === 0) // Only write the drum part on the first voice so that it is not duplicated.\n\t\t\t\t\t\t\twriteDrum(voices.length+1);\n\t\t\t\t\t\t\tchordTrack.setRhythmHead(false) // decide whether there are rhythm heads each measure.\n\t\t\t\t\t\tlastBarTime = timeToRealTime(element.time);\n\t\t\t\t\t\tchordTrack.setLastBarTime(lastBarTime)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bagpipes\":\n\t\t\t\t\t\tbagpipes = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"instrument\":\n\t\t\t\t\t\tif (instrument === undefined)\n\t\t\t\t\t\t\tinstrument = element.program;\n\t\t\t\t\t\tcurrentInstrument = element.program;\n\t\t\t\t\t\tif (currentTrack.length > 0 && currentTrack[currentTrack.length-1].cmd === 'program')\n\t\t\t\t\t\t\tcurrentTrack[currentTrack.length-1].instrument = element.program;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar ii;\n\t\t\t\t\t\t\tfor (ii = currentTrack.length-1; ii >= 0 && currentTrack[ii].cmd !== 'program'; ii--)\n\t\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\tif (ii < 0 || currentTrack[ii].instrument !== element.program)\n\t\t\t\t\t\t\t\tcurrentTrack.push({cmd: 'program', channel: 0, instrument: element.program});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"channel\":\n\t\t\t\t\t\tsetChannel(element.channel);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"drum\":\n\t\t\t\t\t\tdrumDefinition = normalizeDrumDefinition(element.params);\n\t\t\t\t\t\talignDrumToMeter();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"gchordOn\":\n\t\t\t\t\t\tchordTrack.gChordOn(element)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"beat\":\n\t\t\t\t\t\tstressBeat1 = element.beats[0];\n\t\t\t\t\t\tstressBeatDown = element.beats[1];\n\t\t\t\t\t\tstressBeatUp = element.beats[2];\n\t\t\t\t\t\t// TODO-PER: also use the last parameter - which changes which beats are strong.\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vol\":\n\t\t\t\t\t\tnextVolume = element.volume;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"volinc\":\n\t\t\t\t\t\tnextVolumeDelta = element.volume;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"beataccents\":\n\t\t\t\t\t\tdoBeatAccents = element.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"gchord\":\n\t\t\t\t\tcase \"bassprog\":\n\t\t\t\t\tcase \"chordprog\":\n\t\t\t\t\tcase \"bassvol\":\n\t\t\t\t\tcase \"chordvol\":\n\t\t\t\t\tcase \"gchordbars\":\n\t\t\t\t\t\tchordTrack.paramChange(element)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// This should never happen\n\t\t\t\t\t\tconsole.log(\"MIDI creation. Unknown el_type: \" + element.el_type + \"\\n\");// jshint ignore:line\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentTrack[0].instrument === undefined)\n\t\t\t\tcurrentTrack[0].instrument = instrument ? instrument : 0;\n\t\t\tif (currentTrackName)\n\t\t\t\tcurrentTrack.unshift(currentTrackName);\n\t\t\ttracks.push(currentTrack);\n\t\t\tchordTrack.finish()\n\t\t\tif (drumTrack.length > 0) // Don't do drums on more than one track, so turn off drum after we create it.\n\t\t\t\tdrumTrackFinished = true;\n\t\t}\n\t\t// See if any notes are octaves played at the same time. If so, raise the pitch of the higher one.\n\t\tif (options.detuneOctave)\n\t\t\tfindOctaves(tracks, parseInt(options.detuneOctave, 10));\n\n\t\tchordTrack.addTrack(tracks)\n\t\tif (drumTrack.length > 0)\n\t\t\ttracks.push(drumTrack);\n\n\t\treturn { tempo: startingTempo, instrument: instrument, tracks: tracks, totalDuration: lastEventTime };\n\t};\n\n\tfunction setChannel(channel) {\n\t\tfor (var i = currentTrack.length-1; i>=0; i--) {\n\t\t\tif (currentTrack[i].cmd === \"program\") {\n\t\t\t\tcurrentTrack[i].channel = channel;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction timeToRealTime(time) {\n\t\treturn time/1000000;\n\t}\n\n\tfunction durationRounded(duration) {\n\t\treturn Math.round(duration*tempoChangeFactor*1000000)/1000000;\n\t}\n\n\tfunction preProcess(voices, options) {\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar ties = {};\n\t\t\tvar startingTempo = options.qpm;\n\t\t\tvar timeCounter = 0;\n\t\t\tvar tempoMultiplier = 1;\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar element = voice[j];\n\n\t\t\t\tif (element.el_type === 'tempo') {\n\t\t\t\t\tif (!startingTempo)\n\t\t\t\t\t\tstartingTempo = element.qpm;\n\t\t\t\t\telse\n\t\t\t\t\t\ttempoMultiplier = element.qpm ? startingTempo / element.qpm : 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// For convenience, put the current time in each event so that it doesn't have to be calculated in the complicated stuff that follows.\n\t\t\t\telement.time = timeCounter;\n\t\t\t\tvar thisDuration = element.duration ? element.duration : 0;\n\t\t\t\ttimeCounter += Math.round(thisDuration*tempoMultiplier*1000000); // To compensate for JS rounding problems, do all intermediate calcs on integers.\n\n\t\t\t\t// If there are pitches then put the duration in the pitch object and if there are ties then change the duration of the first note in the tie.\n\t\t\t\tif (element.pitches) {\n\t\t\t\t\tfor (var k = 0; k < element.pitches.length; k++) {\n\t\t\t\t\t\tvar pitch = element.pitches[k];\n\t\t\t\t\t\tif (pitch) {\n\t\t\t\t\t\t\tpitch.duration = element.duration;\n\t\t\t\t\t\t\tif (pitch.startTie) {\n\t\t\t\t\t\t\t\t//console.log(element)\n\t\t\t\t\t\t\t\tif (ties[pitch.pitch] === undefined) // We might have three notes tied together - if so just add this duration.\n\t\t\t\t\t\t\t\t\tties[pitch.pitch] = {el: j, pitch: k};\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvoice[ties[pitch.pitch].el].pitches[ties[pitch.pitch].pitch].duration += pitch.duration;\n\t\t\t\t\t\t\t\t\telement.pitches[k] = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//console.log(\">>> START\", JSON.stringify(ties));\n\t\t\t\t\t\t\t} else if (pitch.endTie) {\n\t\t\t\t\t\t\t\t//console.log(element)\n\t\t\t\t\t\t\t\tvar tie = ties[pitch.pitch];\n\t\t\t\t\t\t\t\t//console.log(\">>> END\", pitch.pitch, tie, JSON.stringify(ties));\n\t\t\t\t\t\t\t\tif (tie) {\n\t\t\t\t\t\t\t\t\tvar dur = pitch.duration;\n\t\t\t\t\t\t\t\t\tdelete voice[tie.el].pitches[tie.pitch].startTie;\n\t\t\t\t\t\t\t\t\tvoice[tie.el].pitches[tie.pitch].duration += dur;\n\t\t\t\t\t\t\t\t\telement.pitches[k] = null;\n\t\t\t\t\t\t\t\t\tdelete ties[pitch.pitch];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdelete pitch.endTie;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdelete element.duration;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in ties) {\n\t\t\t\tif (ties.hasOwnProperty(key)) {\n\t\t\t\t\tvar item = ties[key];\n\t\t\t\t\tdelete voice[item.el].pitches[item.pitch].startTie;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// voices[0].forEach(v => delete v.elem)\n\t\t\t// voices[1].forEach(v => delete v.elem)\n\t\t\t// console.log(JSON.stringify(voices))\n\t\t}\n\t}\n\n\tfunction getBeatFraction(meter) {\n\t\tswitch (parseInt(meter.den,10)) {\n\t\t\tcase 2: return 0.5;\n\t\t\tcase 4: return 0.25;\n\t\t\tcase 8:\n\t\t\t\tif (meter.num % 3 === 0)\n\t\t\t\t\treturn 0.375;\n\t\t\t\telse\n\t\t\t\t\treturn 0.125;\n\t\t\tcase 16: return 0.125;\n\t\t}\n\t\treturn 0.25;\n\t}\n\n\tfunction calcBeat(measureStart, beatLength, currTime) {\n\t\tvar distanceFromStart = currTime - measureStart;\n\t\treturn distanceFromStart / beatLength;\n\t}\n\n\tfunction processVolume(beat, voiceOff) {\n\t\tif (voiceOff)\n\t\t\treturn 0;\n\n\t\tvar volume;\n \t// MAE 21 Jun 2024 - This previously wasn't allowing zero volume to be applied\n\t\tif (nextVolume != undefined) {\n\t\t\tvolume = nextVolume;\n\t\t\tnextVolume = undefined;\n\t\t} else if (!doBeatAccents) {\n\t\t\tvolume = stressBeatDown;\n\t\t} else if (pickupLength > beat) {\n\t\t\tvolume = stressBeatUp;\n\t\t} else {\n\t\t\t//var barLength = meter.num / meter.den;\n\t\t\tvar barBeat = calcBeat(lastBarTime, getBeatFraction(meter), beat);\n\t\t\tif (barBeat === 0)\n\t\t\t\tvolume = stressBeat1;\n\t\t\telse if (parseInt(barBeat,10) === barBeat)\n\t\t\t\tvolume = stressBeatDown;\n\t\t\telse\n\t\t\t\tvolume = stressBeatUp;\n\t\t}\n\t\tif (nextVolumeDelta) {\n\t\t\tvolume += nextVolumeDelta;\n\t\t\tnextVolumeDelta = undefined;\n\t\t}\n\t\tif (volume < 0)\n\t\t\tvolume = 0;\n\t\tif (volume > 127)\n\t\t\tvolume = 127;\n\t\treturn voiceOff ? 0 : volume;\n\t}\n\n\n\tfunction findNoteModifications(elem, velocity) {\n\t\tvar ret = { };\n\t\tif (elem.decoration) {\n\t\t\tfor (var d = 0; d < elem.decoration.length; d++) {\n\t\t\t\tif (elem.decoration[d] === 'staccato')\n\t\t\t\t\tret.thisBreakBetweenNotes = 'staccato';\n\t\t\t\telse if (elem.decoration[d] === 'tenuto')\n\t\t\t\t\tret.thisBreakBetweenNotes = 'tenuto';\n\t\t\t\telse if (elem.decoration[d] === 'accent')\n\t\t\t\t\tret.velocity = Math.min(127, velocity * 1.5);\n\t\t\t\telse if (elem.decoration[d] === 'trill')\n\t\t\t\t\tret.noteModification = \"trill\";\n\t\t\t\telse if (elem.decoration[d] === 'lowermordent')\n\t\t\t\t\tret.noteModification = \"lowermordent\";\n\t\t\t\telse if (elem.decoration[d] === 'uppermordent')\n\t\t\t\t\tret.noteModification = \"mordent\";\n\t\t\t\telse if (elem.decoration[d] === 'mordent')\n\t\t\t\t\tret.noteModification = \"mordent\";\n\t\t\t\telse if (elem.decoration[d] === 'turn')\n\t\t\t\t\tret.noteModification = \"turn\";\n\t\t\t\telse if (elem.decoration[d] === 'roll')\n\t\t\t\t\tret.noteModification = \"roll\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction doModifiedNotes(noteModification, p) {\n\t\tvar noteTime;\n\t\tvar numNotes;\n\t\tvar start = p.start;\n\t\tvar pp;\n\t\tvar runningDuration = p.duration;\n\t\tvar shortestNote = durationRounded(1.0 / 32);\n\n\t\tswitch (noteModification) {\n\t\t\tcase \"trill\":\n\t\t\t\tvar note = 1;\n\t\t\t\twhile (runningDuration > 0) {\n\t\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+note, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\t\tnote = (note === 1) ? 0 : 1;\n\t\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\t\tstart += shortestNote;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"mordent\":\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+1, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: runningDuration, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"lowermordent\":\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch-1, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: runningDuration, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"turn\":\n\t\t\t\tshortestNote = p.duration / 5;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+1, volume: p.volume, start: start+shortestNote, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start+shortestNote*2, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+1, volume: p.volume, start: start+shortestNote*3, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start+shortestNote*4, duration: shortestNote, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"roll\":\n\t\t\t\twhile (runningDuration > 0) {\n\t\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\t\trunningDuration -= shortestNote*2;\n\t\t\t\t\tstart += shortestNote*2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tfunction writeNote(elem, voiceOff) {\n\t\t//\n\t\t// Create a series of note events to append to the current track.\n\t\t// The output event is one of: { pitchStart: pitch_in_abc_units, volume: from_1_to_64 }\n\t\t// { pitchStop: pitch_in_abc_units }\n\t\t// { moveTime: duration_in_abc_units }\n\t\t// If there are guitar chords, then they are put in a separate track, but they have the same format.\n\t\t//\n\n\t\t//var trackStartingIndex = currentTrack.length;\n\n\t\tvar velocity = processVolume(timeToRealTime(elem.time), voiceOff);\n\t\tchordTrack.processChord(elem)\n\n\t\t// if there are grace notes, then also play them.\n\t\t// I'm not sure there is an exact rule for the length of the notes. My rule, unless I find\n\t\t// a better one is: the grace notes cannot take more than 1/2 of the main note's value.\n\t\t// A grace note (of 1/8 note duration) takes 1/8 of the main note's value.\n\t\tvar graces;\n\t\tif (elem.gracenotes && elem.pitches && elem.pitches.length > 0 && elem.pitches[0]) {\n\t\t\tgraces = processGraceNotes(elem.gracenotes, elem.pitches[0].duration);\n\t\t\tif (elem.elem)\n\t\t\t\telem.elem.midiGraceNotePitches = writeGraceNotes(graces, timeToRealTime(elem.time), velocity*2/3, currentInstrument); // make the graces a little quieter.\n\t\t}\n\n\t\t// The beat fraction is the note that gets a beat (.25 is a quarter note)\n\t\t// The tempo is in minutes and we want to get to milliseconds.\n\t\t// If the element is inside a repeat, there may be more than one value. If there is one value,\n\t\t// then just store that as a number. If there are more than one value, then change that to\n\t\t// an array and return all of them.\n\t\tif (elem.elem) {\n\t\t\tvar rt = timeToRealTime(elem.time);\n\t\t\tvar ms = rt / beatFraction / startingTempo * 60 * 1000;\n\t\t\tif (elem.elem.currentTrackMilliseconds === undefined) {\n\t\t\t\telem.elem.currentTrackMilliseconds = ms;\n\t\t\t\telem.elem.currentTrackWholeNotes = rt;\n\t\t\t} else {\n\t\t\t\tif (elem.elem.currentTrackMilliseconds.length === undefined) {\n\t\t\t\t\tif (elem.elem.currentTrackMilliseconds !== ms) {\n\t\t\t\t\t\telem.elem.currentTrackMilliseconds = [elem.elem.currentTrackMilliseconds, ms];\n\t\t\t\t\t\telem.elem.currentTrackWholeNotes = [elem.elem.currentTrackWholeNotes, rt];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// There can be duplicates if there are multiple voices\n\t\t\t\t\tvar found = false;\n\t\t\t\t\tfor (var j = 0; j < elem.elem.currentTrackMilliseconds.length; j++) {\n\t\t\t\t\t\tif (elem.elem.currentTrackMilliseconds[j] === ms)\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (!found) {\n\t\t\t\t\t\telem.elem.currentTrackMilliseconds.push(ms);\n\t\t\t\t\t\telem.elem.currentTrackWholeNotes.push(rt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//var tieAdjustment = 0;\n\t\tif (elem.pitches) {\n\t\t\tvar thisBreakBetweenNotes = '';\n\t\t\tvar ret = findNoteModifications(elem, velocity);\n\t\t\tif (ret.thisBreakBetweenNotes)\n\t\t\t\tthisBreakBetweenNotes = ret.thisBreakBetweenNotes;\n\t\t\tif (ret.velocity)\n\t\t\t\tvelocity = ret.velocity;\n\n\t\t\t// TODO-PER: Can also make a different sound on style=x and style=harmonic\n\t\t\tvar ePitches = elem.pitches;\n\t\t\tif (elem.style === \"rhythm\") {\n\t\t\t\tePitches = chordTrack.setRhythmHead(true, elem)\n\t\t\t}\n\n\t\t\tif (elem.elem)\n\t\t\t\telem.elem.midiPitches = [];\n\t\t\tfor (var i=0; i 0)\n\t\t\t\t\t\tp.endType = 'tenuto';\n\t\t\t\t\telse if (thisBreakBetweenNotes)\n\t\t\t\t\t\tp.endType = thisBreakBetweenNotes;\n\n\t\t\t\t\tswitch (p.endType) {\n\t\t\t\t\t\tcase \"tenuto\":\n\t\t\t\t\t\t\tp.gap = slurredBreakBetweenNotes;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"staccato\":\n\t\t\t\t\t\t\tvar d = p.duration * staccatoBreakBetweenNotes;\n\t\t\t\t\t\t\tp.gap = startingTempo / 60 * d;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tp.gap = normalBreakBetweenNotes;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcurrentTrack.push(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlastNoteDurationPosition = currentTrack.length-1;\n\n\t\t}\n\t\tvar realDur = getRealDuration(elem);\n\t\tlastEventTime = Math.max(lastEventTime, timeToRealTime(elem.time)+durationRounded(realDur));\n\t}\n\tfunction getRealDuration(elem) {\n\t\tif (elem.pitches && elem.pitches.length > 0 && elem.pitches[0])\n\t\t\treturn elem.pitches[0].duration;\n\t\tif (elem.elem)\n\t\t\treturn elem.elem.duration;\n\t\treturn elem.duration;\n\t}\n\n\tvar scale = [0,2,4,5,7,9,11];\n\tfunction adjustPitch(note) {\n\t\tif (note.midipitch !== undefined)\n\t\t\treturn note.midipitch; // The pitch might already be known, for instance if there is a drummap.\n\t\tvar pitch = note.pitch;\n\t\tif (note.accidental) {\n\t\t\tswitch(note.accidental) { // change that pitch (not other octaves) for the rest of the bar\n\t\t\t\tcase \"sharp\":\n\t\t\t\t\tbarAccidentals[pitch]=1; break;\n\t\t\t\tcase \"flat\":\n\t\t\t\t\tbarAccidentals[pitch]=-1; break;\n\t\t\t\tcase \"natural\":\n\t\t\t\t\tbarAccidentals[pitch]=0; break;\n\t\t\t\tcase \"dblsharp\":\n\t\t\t\t\tbarAccidentals[pitch]=2; break;\n\t\t\t\tcase \"dblflat\":\n\t\t\t\t\tbarAccidentals[pitch]=-2; break;\n\t\t\t\tcase \"quartersharp\":\n\t\t\t\t\tbarAccidentals[pitch]=0.25; break;\n\t\t\t\tcase \"quarterflat\":\n\t\t\t\t\tbarAccidentals[pitch]=-0.25; break;\n\t\t\t}\n\t\t}\n\n\t\tvar actualPitch = extractOctave(pitch) *12 + scale[extractNote(pitch)] + 60;\n\n\t\tif ( barAccidentals[pitch]!==undefined) {\n\t\t\t// An accidental is always taken at face value and supersedes the key signature.\n\t\t\tactualPitch += barAccidentals[pitch];\n\t\t} else { // use normal accidentals\n\t\t\tactualPitch += accidentals[extractNote(pitch)];\n\t\t}\n\t\tactualPitch += transpose;\n\t\treturn actualPitch;\n\t}\n\n\tfunction setKeySignature(elem) {\n\t\tvar accidentals = [0,0,0,0,0,0,0];\n\t\tif (!elem.accidentals) return accidentals;\n\t\tfor (var i = 0; i < elem.accidentals.length; i++) {\n\t\t\tvar acc = elem.accidentals[i];\n\t\t\tvar d;\n\t\t\tswitch (acc.acc) {\n\t\t\t\tcase \"flat\": d = -1; break;\n\t\t\t\tcase \"quarterflat\": d = -0.25; break;\n\t\t\t\tcase \"sharp\": d = 1; break;\n\t\t\t\tcase \"quartersharp\": d = 0.25; break;\n\t\t\t\tdefault: d = 0; break;\n\t\t\t}\n\n\t\t\tvar lowercase = acc.note.toLowerCase();\n\t\t\tvar note = extractNote(lowercase.charCodeAt(0)-'c'.charCodeAt(0));\n\t\t\taccidentals[note]+=d;\n\t\t}\n\t\treturn accidentals;\n\t}\n\n\tfunction processGraceNotes(graces, companionDuration) {\n\t\t// Grace notes take up half of the note value. So if there are many of them they are all real short.\n\t\tvar graceDuration = 0;\n\t\tvar ret = [];\n\t\tvar grace;\n\t\tfor (var g = 0; g < graces.length; g++) {\n\t\t\tgrace = graces[g];\n\t\t\tgraceDuration += grace.duration;\n\t\t}\n\t\tvar multiplier = companionDuration/2 / graceDuration;\n\n\t\tfor (g = 0; g < graces.length; g++) {\n\t\t\tgrace = graces[g];\n\t\t\tvar actualPitch = adjustPitch(grace);\n\t\t\tif (currentInstrument === drumInstrument && percmap) {\n\t\t\t\tvar name = pitchesToPerc(grace)\n\t\t\t\tif (name && percmap[name])\n\t\t\t\t\tactualPitch = percmap[name].sound;\n\t\t\t}\n\t\t\tvar pitch = { pitch: actualPitch, duration: grace.duration*multiplier };\n\t\t\tpitch = adjustForMicroTone(pitch);\n\t\t\tret.push(pitch);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction writeGraceNotes(graces, start, velocity, currentInstrument) {\n\t\tvar midiGrace = [];\n\t\tvelocity = Math.round(velocity)\n\t\tfor (var g = 0; g < graces.length; g++) {\n\t\t\tvar gp = graces[g];\n\t\t\tcurrentTrack.push({cmd: 'note', pitch: gp.pitch, volume: velocity, start: start, duration: gp.duration, gap: 0, instrument:currentInstrument, style: 'grace'});\n\t\t\tmidiGrace.push({\n\t\t\t\tpitch: gp.pitch,\n\t\t\t\tdurationInMeasures: gp.duration,\n\t\t\t\tvolume: velocity,\n\t\t\t\tinstrument: currentInstrument\n\t\t\t});\n\t\t\tstart += gp.duration;\n\t\t}\n\t\treturn midiGrace;\n\t}\n\n\tvar quarterToneFactor = 0.02930223664349;\n\tfunction adjustForMicroTone(description) {\n\t\t// if the pitch is not a whole number then make it a whole number and add a tuning factor\n\t\tvar pitch = ''+description.pitch;\n\t\tif (pitch.indexOf(\".75\") >= 0) {\n\t\t\tdescription.pitch = Math.round(description.pitch);\n\t\t\tdescription.cents = -50;\n\t\t} else if (pitch.indexOf(\".25\") >= 0) {\n\t\t\tdescription.pitch = Math.round(description.pitch);\n\t\t\tdescription.cents = 50;\n\t\t}\n\n\t\treturn description;\n\t}\n\n\tfunction extractOctave(pitch) {\n\t\treturn Math.floor(pitch/7);\n\t}\n\n\tfunction extractNote(pitch) {\n\t\tpitch = pitch%7;\n\t\tif (pitch<0) pitch+=7;\n\t\treturn pitch;\n\t}\n\n\n\tfunction normalizeDrumDefinition(params) {\n\t\t// Be very strict with the drum definition. If anything is not perfect,\n\t\t// just turn the drums off.\n\t\t// Perhaps all of this logic belongs in the parser instead.\n\t\tif (params.pattern.length === 0 || params.on === false)\n\t\t\treturn { on: false };\n\n\t\tvar str = params.pattern[0];\n\t\tvar events = [];\n\t\tvar event = \"\";\n\t\tvar totalPlay = 0;\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (str[i] === 'd')\n\t\t\t\ttotalPlay++;\n\t\t\tif (str[i] === 'd' || str[i] === 'z') {\n\t\t\t\tif (event.length !== 0) {\n\t\t\t\t\tevents.push(event);\n\t\t\t\t\tevent = str[i];\n\t\t\t\t} else\n\t\t\t\t\tevent = event + str[i];\n\t\t\t} else {\n\t\t\t\tif (event.length === 0) {\n\t\t\t\t\t// there was an error: the string should have started with d or z\n\t\t\t\t\treturn {on: false};\n\t\t\t\t}\n\t\t\t\tevent = event + str[i];\n\t\t\t}\n\t\t}\n\n\t\tif (event.length !== 0)\n\t\t\tevents.push(event);\n\n\t\t// Now the events array should have one item per event.\n\t\t// There should be two more params for each event: the volume and the pitch.\n\t\tif (params.pattern.length !== totalPlay*2 + 1)\n\t\t\treturn { on: false };\n\n\t\tvar ret = { on: true, bars: params.bars, pattern: []};\n\t\tvar beatLength = getBeatFraction(meter);\n\t\tvar playCount = 0;\n\t\tfor (var j = 0; j < events.length; j++) {\n\t\t\tevent = events[j];\n\t\t\tvar len = 1;\n\t\t\tvar div = false;\n\t\t\tvar num = 0;\n\t\t\tfor (var k = 1; k < event.length; k++) {\n\t\t\t\tswitch(event[k]) {\n\t\t\t\t\tcase \"/\":\n\t\t\t\t\t\tif (num !== 0)\n\t\t\t\t\t\t\tlen *= num;\n\t\t\t\t\t\tnum = 0;\n\t\t\t\t\t\tdiv = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\tcase \"8\":\n\t\t\t\t\tcase \"9\":\n\t\t\t\t\t\tnum = num*10 +event[k];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn { on: false };\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (div) {\n\t\t\t\tif (num === 0) num = 2; // a slash by itself is interpreted as \"/2\"\n\t\t\t\tlen /= num;\n\t\t\t} else if (num)\n\t\t\t\tlen *= num;\n\t\t\tif (event[0] === 'd') {\n\t\t\t\tret.pattern.push({ len: len * beatLength, pitch: params.pattern[1 + playCount], velocity: params.pattern[1 + playCount + totalPlay]});\n\t\t\t\tplayCount++;\n\t\t\t} else\n\t\t\t\tret.pattern.push({ len: len * beatLength, pitch: null});\n\t\t}\n\t\tdrumBars = params.bars ? params.bars : 1;\n\t\treturn ret;\n\t}\n\n\tfunction alignDrumToMeter() {\n\t\tif (!drumDefinition ||!drumDefinition.pattern) {\n\t\t\treturn;\n\t\t}\n\t\tvar ret = drumDefinition;\n\t\t// Now normalize the pattern to cover the correct number of measures. The note lengths passed are relative to each other and need to be scaled to fit a measure.\n\t\tvar totalTime = 0;\n\t\tvar measuresPerBeat = meter.num/meter.den;\n\t\tfor (var ii = 0; ii < ret.pattern.length; ii++)\n\t\t\ttotalTime += ret.pattern[ii].len;\n\t\tvar factor = totalTime / drumBars / measuresPerBeat;\n\t\tfor (ii = 0; ii < ret.pattern.length; ii++)\n\t\t\tret.pattern[ii].len = ret.pattern[ii].len / factor;\n\t\tdrumDefinition = ret;\n\t}\n\n\tfunction writeDrum(channel) {\n\t\tif (drumTrack.length === 0 && !drumDefinition.on)\n\t\t\treturn;\n\n\t\tvar measureLen = meter.num/meter.den;\n\t\tif (drumTrack.length === 0) {\n\t\t\tif (lastEventTime < measureLen)\n\t\t\t\treturn; // This is true if there are pickup notes. The drum doesn't start until the first full measure.\n\t\t\tdrumTrack.push({cmd: 'program', channel: channel, instrument: drumInstrument});\n\t\t}\n\n\t\tif (!drumDefinition.on) {\n\t\t\t// this is the case where there has been a drum track, but it was specifically turned off.\n\t\t\treturn;\n\t\t}\n\t\tvar start = lastBarTime;\n\t\tfor (var i = 0; i < drumDefinition.pattern.length; i++) {\n\t\t\tvar len = durationRounded(drumDefinition.pattern[i].len);\n\t\t\tif (drumDefinition.pattern[i].pitch) {\n\t\t\t\tdrumTrack.push({\n\t\t\t\t\tcmd: 'note',\n\t\t\t\t\tpitch: drumDefinition.pattern[i].pitch,\n\t\t\t\t\tvolume: drumDefinition.pattern[i].velocity,\n\t\t\t\t\tstart: start,\n\t\t\t\t\tduration: len,\n\t\t\t\t\tgap: 0,\n\t\t\t\t\tinstrument: drumInstrument});\n\t\t\t}\n\t\t\tstart += len;\n\t\t}\n\t}\n\n\tfunction findOctaves(tracks, detuneCents) {\n\t\tvar timing = {};\n\t\tfor (var i = 0; i < tracks.length; i++) {\n\t\t\tfor (var j = 0; j < tracks[i].length; j++) {\n\t\t\t\tvar note = tracks[i][j];\n\t\t\t\tif (note.cmd === \"note\") {\n\t\t\t\t\tif (timing[note.start] === undefined)\n\t\t\t\t\t\ttiming[note.start] = [];\n\t\t\t\t\ttiming[note.start].push({track: i, event: j, pitch: note.pitch});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar keys = Object.keys(timing);\n\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\tvar arr = timing[keys[i]];\n\t\t\tif (arr.length > 1) {\n\t\t\t\tarr = arr.sort(function(a,b) {\n\t\t\t\t\treturn a.pitch - b.pitch;\n\t\t\t\t});\n\t\t\t\tvar topEvent = arr[arr.length-1];\n\t\t\t\tvar topNote = topEvent.pitch % 12;\n\t\t\t\tvar found = false;\n\t\t\t\tfor (j = 0; !found && j < arr.length-1; j++) {\n\t\t\t\t\tif (arr[j].pitch % 12 === topNote)\n\t\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tif (found) {\n\t\t\t\t\tvar event = tracks[topEvent.track][topEvent.event];\n\t\t\t\t\tif (!event.cents)\n\t\t\t\t\t\tevent.cents = 0;\n\t\t\t\t\tevent.cents += detuneCents;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n})();\n\nmodule.exports = flatten;\n","// abc_midi_renderer.js: Create the actual format for the midi.\n\nvar centsToFactor = require(\"./cents-to-factor\");\nvar rendererFactory;\n\n(function() {\n\t\"use strict\";\n\tfunction setAttributes(elm, attrs) {\n\t\tfor (var attr in attrs)\n\t\t\tif (attrs.hasOwnProperty(attr))\n\t\t\t\telm.setAttribute(attr, attrs[attr]);\n\t\treturn elm;\n\t}\n\n\tfunction Midi() {\n\t\tthis.trackstrings = \"\";\n\t\tthis.trackcount = 0;\n\t\tthis.noteOnAndChannel = \"%90\";\n\t\tthis.noteOffAndChannel = \"%80\";\n\t}\n\n\tMidi.prototype.setTempo = function(qpm) {\n\t\tif (this.trackcount === 0) {\n\t\t\tthis.startTrack();\n\t\t\tthis.track += \"%00%FF%51%03\" + toHex(Math.round(60000000 / qpm), 6);\n\t\t\tthis.endTrack();\n\t\t}\n\t};\n\n\tMidi.prototype.setGlobalInfo = function(qpm, name, key, time) {\n\t\tif (this.trackcount === 0) {\n\t\t\tthis.startTrack();\n\t\t\tvar divisions = Math.round(60000000 / qpm);\n\t\t\t// Add the tempo\n\t\t\tthis.track += \"%00%FF%51%03\" + toHex(divisions, 6);\n\n\t\t\tif (key)\n\t\t\t\tthis.track += keySignature(key);\n\t\t\tif (time)\n\t\t\t\tthis.track += timeSignature(time);\n\t\t\tif (name) {\n\t\t\t\tthis.track += encodeString(name, \"%01\");\n\t\t\t}\n\t\t\tthis.endTrack();\n\t\t}\n\t};\n\n\tMidi.prototype.startTrack = function() {\n\t\tthis.noteWarped = {};\n\t\tthis.track = \"\";\n\t\tthis.trackName = \"\";\n\t\tthis.trackInstrument = \"\";\n\t\tthis.silencelength = 0;\n\t\tthis.trackcount++;\n\t\tif (this.instrument) {\n\t\t\tthis.setInstrument(this.instrument);\n\t\t}\n\t};\n\n\tMidi.prototype.endTrack = function() {\n\t\tthis.track = this.trackName + this.trackInstrument + this.track;\n\t\tvar tracklength = toHex(this.track.length / 3 + 4, 8);\n\t\tthis.track = \"MTrk\" + tracklength + // track header\n\t\t\tthis.track +\n\t\t\t'%00%FF%2F%00'; // track end\n\t\tthis.trackstrings += this.track;\n\t};\n\n\tMidi.prototype.setText = function(type, text) {\n\t\t// MIDI defines the following types of events:\n\t\t//FF 01 len text Text Event\n\t\t//FF 02 len text Copyright Notice\n\t\t//FF 03 len text Sequence/Track Name\n\t\t//FF 04 len text Instrument Name\n\t\t//FF 05 len text Lyric\n\t\t//FF 06 len text Marker\n\t\t//FF 07 len text Cue Point\n\t\tswitch(type) {\n\t\t\tcase 'name':\n\t\t\t\tthis.trackName = encodeString(text, \"%03\");\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tMidi.prototype.setInstrument = function(number) {\n\t\tthis.trackInstrument = \"%00%C0\" + toHex(number, 2);\n\t\tthis.instrument = number;\n\t};\n\n\tMidi.prototype.setChannel = function(number, pan) {\n\t\tthis.channel = number;\n\t\tvar ccPrefix = \"%00%B\" + this.channel.toString(16);\n\t\t// Reset midi, in case it was set previously.\n\t\tthis.track += ccPrefix + \"%79%00\"; // Reset All Controllers\n\t\tthis.track += ccPrefix + \"%40%00\"; // Damper pedal\n\t\tthis.track += ccPrefix + \"%5B%30\"; // Effect 1 Depth (reverb)\n\t\t// Translate pan as -1 to 1 to 0 to 127\n\t\tif (!pan)\n\t\t\tpan = 0;\n\t\tpan = Math.round((pan + 1) * 64);\n\t\tthis.track += ccPrefix + \"%0A\" + toHex(pan, 2); // Pan\n\t\tthis.track += ccPrefix + \"%07%64\"; // Channel Volume\n\n\t\tthis.noteOnAndChannel = \"%9\" + this.channel.toString(16);\n\t\tthis.noteOffAndChannel = \"%8\" + this.channel.toString(16);\n\t};\n\n\tvar HALF_STEP = 4096; // For the pitch wheel - (i.e. the distance from C to C#)\n\tMidi.prototype.startNote = function(pitch, loudness, cents) {\n\t\tthis.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any)\n\t\tthis.silencelength = 0;\n\t\tif (cents) {\n\t\t\t// the pitch is altered so send a midi pitch wheel event\n\t\t\tthis.track += \"%e\" + this.channel.toString(16);\n\t\t\tvar bend = Math.round(centsToFactor(cents)*HALF_STEP);\n\t\t\tthis.track += to7BitHex(0x2000 + bend);\n\t\t\tthis.track += toDurationHex(0); // this all happens at once so there is a zero length here\n\t\t\tthis.noteWarped[pitch] = true;\n\t\t}\n\t\tthis.track += this.noteOnAndChannel;\n\t\tthis.track += \"%\" + pitch.toString(16) + toHex(loudness, 2); //note\n\t};\n\n\tMidi.prototype.endNote = function(pitch) {\n\t\tthis.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any)\n\t\tthis.silencelength = 0;\n\t\tif (this.noteWarped[pitch]) {\n\t\t\t// the pitch was altered so alter it back.\n\t\t\tthis.track += \"%e\" + this.channel.toString(16);\n\t\t\tthis.track += to7BitHex(0x2000);\n\t\t\tthis.track += toDurationHex(0); // this all happens at once so there is a zero length here\n\t\t\tthis.noteWarped[pitch] = false;\n\t\t}\n\t\tthis.track += this.noteOffAndChannel;\n\t\tthis.track += \"%\" + pitch.toString(16) + \"%00\";//end note\n\t};\n\n\tMidi.prototype.addRest = function(length) {\n\t\tthis.silencelength += length;\n\t\tif (this.silencelength < 0)\n\t\t\tthis.silencelength = 0;\n\t};\n\n\tMidi.prototype.getData = function() {\n\t\treturn \"data:audio/midi,\" +\n\t\t\t\"MThd%00%00%00%06%00%01\" + toHex(this.trackcount, 4) + \"%01%e0\" + // header\n\t\t\tthis.trackstrings;\n\t};\n\n\tMidi.prototype.embed = function(parent, noplayer) {\n\n\t\tvar data = this.getData();\n\n\t\tvar link = setAttributes(document.createElement('a'), {\n\t\t\thref: data\n\t\t});\n\t\tlink.innerHTML = \"download midi\";\n\t\tparent.insertBefore(link, parent.firstChild);\n\n\t\tif (noplayer) return;\n\n\t\tvar embed = setAttributes(document.createElement('embed'), {\n\t\t\tsrc: data,\n\t\t\ttype: 'video/quicktime',\n\t\t\tcontroller: 'true',\n\t\t\tautoplay: 'false',\n\t\t\tloop: 'false',\n\t\t\tenablejavascript: 'true',\n\t\t\tstyle: 'display:block; height: 20px;'\n\t\t});\n\t\tparent.insertBefore(embed, parent.firstChild);\n\t};\n\n\tfunction encodeString(str, cmdType) {\n\t\t// If there are multi-byte chars, we don't know how long the string will be until we create it.\n\t\tvar nameArray = \"\";\n\t\tfor (var i = 0; i < str.length; i++)\n\t\t\tnameArray += toHex(str.charCodeAt(i), 2);\n\t\treturn \"%00%FF\" + cmdType + toHex(nameArray.length/3, 2) + nameArray; // Each byte is represented by three chars \"%XX\", so divide by 3 to get the length.\n\t}\n\n\tfunction keySignature(key) {\n\t\t//00 FF 5902 03 00 - key signature\n\t\tif (!key || !key.accidentals)\n\t\t\treturn \"\";\n\t\tvar hex = \"%00%FF%59%02\";\n\t\tvar sharpCount = 0;\n\t\tvar flatCount = 256;\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tif (key.accidentals[i].acc === \"sharp\") sharpCount++;\n\t\t\telse if (key.accidentals[i].acc === \"flat\") flatCount--;\n\t\t}\n\t\tvar sig = flatCount !== 256 ? toHex(flatCount, 2) : toHex(sharpCount, 2);\n\t\tvar mode = (key.mode === \"m\") ? \"%01\" : \"%00\";\n\t\treturn hex + sig + mode;\n\t}\n\n\tfunction timeSignature(time) {\n\t\t//00 FF 58 04 04 02 30 08 - time signature\n\t\tvar hex = \"%00%FF%58%04\" + toHex(time.num,2);\n\t\tvar dens = { 1: 0, 2: 1, 4: 2, 8: 3, 16: 4, 32: 5 };\n\t\tvar den = dens[time.den];\n\t\tif (!den)\n\t\t\treturn \"\"; // the denominator is not supported, so just don't include this.\n\t\thex += toHex(den, 2);\n\n\t\tvar clocks;\n\t\tswitch (time.num+\"/\"+time.den) {\n\t\t\tcase \"2/4\":\n\t\t\tcase \"3/4\":\n\t\t\tcase \"4/4\":\n\t\t\tcase \"5/4\":\n\t\t\t\tclocks = 24;\n\t\t\t\tbreak;\n\t\t\tcase \"6/4\":\n\t\t\t\tclocks = 72;\n\t\t\t\tbreak;\n\t\t\tcase \"2/2\":\n\t\t\tcase \"3/2\":\n\t\t\tcase \"4/2\":\n\t\t\t\tclocks = 48;\n\t\t\t\tbreak;\n\t\t\tcase \"3/8\":\n\t\t\tcase \"6/8\":\n\t\t\tcase \"9/8\":\n\t\t\tcase \"12/8\":\n\t\t\t\tclocks = 36;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!clocks)\n\t\t\treturn \"\"; // time sig is not supported.\n\t\thex += toHex(clocks, 2);\n\t\treturn hex + \"%08\";\n\t}\n\n\t// s is assumed to be of even length\n\tfunction encodeHex(s) {\n\t\tvar ret = \"\";\n\t\tfor (var i = 0; i < s.length; i += 2) {\n\t\t\tret += \"%\";\n\t\t\tret += s.substr(i, 2);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction toHex(n, padding) {\n\t\tvar s = n.toString(16);\n\t\ts = s.split(\".\")[0];\n\t\twhile (s.length < padding) {\n\t\t\ts = \"0\" + s;\n\t\t}\n\t\tif (s.length > padding)\n\t\t\ts = s.substring(0,padding)\n\t\treturn encodeHex(s);\n\t}\n\n\tfunction to7BitHex(n) {\n\t\t// this takes a number and shifts all digits from the 7th one to the left.\n\t\tn = Math.round(n);\n\t\tvar lower = n % 128;\n\t\tvar higher = n - lower;\n\t\treturn toHex(higher*2+lower, 4);\n\t}\n\n\tfunction toDurationHex(n) {\n\t\tvar res = 0;\n\t\tvar a = [];\n\n\t\t// cut up into 7 bit chunks;\n\t\tn = Math.round(n);\n\t\twhile (n !== 0) {\n\t\t\ta.push(n & 0x7F);\n\t\t\tn = n >> 7;\n\t\t}\n\n\t\t// join the 7 bit chunks together, all but last chunk get leading 1\n\t\tfor (var i = a.length - 1; i >= 0; i--) {\n\t\t\tres = res << 8;\n\t\t\tvar bits = a[i];\n\t\t\tif (i !== 0) {\n\t\t\t\tbits = bits | 0x80;\n\t\t\t}\n\t\t\tres = res | bits;\n\t\t}\n\n\t\tvar padding = res.toString(16).length;\n\t\tpadding += padding % 2;\n\n\t\treturn toHex(res, padding);\n\t}\n\n\trendererFactory = function() {\n\t\treturn new Midi();\n\t};\n})();\n\nmodule.exports = rendererFactory;\n","// abc_midi_sequencer.js: Turn parsed abc into a linear series of events.\n\nvar sequence;\nvar parseCommon = require(\"../parse/abc_common\");\n\n(function() {\n\t\"use strict\";\n\n\tvar measureLength = 1; // This should be set by the meter, but just in case that is missing, we'll take a guess.\n\t// The abc is provided to us line by line. It might have repeats in it. We want to re arrange the elements to\n\t// be an array of voices with all the repeats embedded, and no lines. Then it is trivial to go through the events\n\t// one at a time and turn it into midi.\n\n\tvar PERCUSSION_PROGRAM = 128;\n\n\tsequence = function(abctune, options) {\n\t\t// Global options\n\t\toptions = options || {};\n\t\tvar qpm;\n\t\tvar program = options.program || 0;\t// The program if there isn't a program specified.\n\t\tvar transpose = options.midiTranspose || 0;\n\t\t// If the tune has a visual transpose then that needs to be subtracted out because we are getting the visual object.\n\t\tif (abctune.visualTranspose)\n\t\t\ttranspose -= abctune.visualTranspose;\n\t\tvar channel = options.channel || 0;\n\t\tvar channelExplicitlySet = false;\n\t\tvar drumPattern = options.drum || \"\";\n\t\tvar drumBars = options.drumBars || 1;\n\t\tvar drumIntro = options.drumIntro || 0;\n\t\tvar drumOn = drumPattern !== \"\";\n\t\tvar drumOffAfterIntro = !!options.drumOff\n\t\tvar style = []; // The note head style for each voice.\n\t\tvar rhythmHeadThisBar = false; // Rhythm notation was detected.\n\t\tvar crescendoSize = 50; // how much to increase or decrease volume when crescendo/diminuendo is encountered.\n\n\t\t// All of the above overrides need to be integers\n\t\tprogram = parseInt(program, 10);\n\t\ttranspose = parseInt(transpose, 10);\n\t\tchannel = parseInt(channel, 10);\n\t\tif (channel === 10)\n\t\t\tprogram = PERCUSSION_PROGRAM;\n\t\tdrumPattern = drumPattern.split(\" \");\n\t\tdrumBars = parseInt(drumBars, 10);\n\t\tdrumIntro = parseInt(drumIntro, 10);\n\n\t\tvar bagpipes = abctune.formatting.bagpipes; // If it is bagpipes, then the gracenotes are played on top of the main note.\n\t\tif (bagpipes)\n\t\t\tprogram = 71;\n\n\t\t// %%MIDI fermatafixed\n\t\t// %%MIDI fermataproportional\n\t\t// %%MIDI deltaloudness n\n\t\t// %%MIDI gracedivider b\n\t\t// %%MIDI ratio n m\n\t\t// %%MIDI beat a b c n\n\t\t// %%MIDI grace a/b\n\t\t// %%MIDI trim x/y\n\n\t\t// %MIDI gchordon\n\t\t// %MIDI gchordoff\n\t\t// %%MIDI bassprog 45\n\t\t// %%MIDI chordprog 24\n\t\t// %%MIDI chordname name n1 n2 n3 n4 n5 n6\n\n\t\t//%%MIDI beat ⟨int1⟩ ⟨int2⟩ ⟨int3⟩ ⟨int4⟩: controls the volumes of the notes in a measure. The first note in a bar has volume ⟨int1⟩; other ‘strong’ notes have volume ⟨int2⟩ and all the rest have volume ⟨int3⟩. These values must be in the range 0–127. The parameter ⟨int4⟩ determines which notes are ‘strong’. If the time signature is x/y, then each note is given a position number k = 0, 1, 2. . . x-1 within each bar. If k is a multiple of ⟨int4⟩, then the note is ‘strong’.\n\n\t\tvar startingMidi = [];\n\t\tif (abctune.formatting.midi) {\n\t\t\t//console.log(\"MIDI Formatting:\", abctune.formatting.midi);\n\t\t\tvar globals = abctune.formatting.midi;\n\t\t\tif (globals.program && globals.program.length > 0) {\n\t\t\t\tprogram = globals.program[0];\n\t\t\t\tif (globals.program.length > 1) {\n\t\t\t\t\tprogram = globals.program[1];\n\t\t\t\t\tchannel = globals.program[0];\n\t\t\t\t}\n\t\t\t\tchannelExplicitlySet = true;\n\t\t\t}\n\t\t\tif (globals.transpose)\n\t\t\t\ttranspose = globals.transpose[0];\n\t\t\tif (globals.channel) {\n\t\t\t\tchannel = globals.channel[0];\n\t\t\t\tchannelExplicitlySet = true;\n\t\t\t}\n\t\t\tif (globals.drum)\n\t\t\t\tdrumPattern = globals.drum;\n\t\t\tif (globals.drumbars)\n\t\t\t\tdrumBars = globals.drumbars[0];\n\t\t\tif (globals.drumon)\n\t\t\t\tdrumOn = true;\n\t\t\tif (channel === 10)\n\t\t\t\tprogram = PERCUSSION_PROGRAM;\n\t\t\tif (globals.beat)\n\t\t\t\tstartingMidi.push({ el_type: 'beat', beats: globals.beat })\n\t\t\tif (globals.nobeataccents)\n\t\t\t\tstartingMidi.push({ el_type: 'beataccents', value: false });\n\n\t\t}\n\n\t\t// Specified options in abc string.\n\n\t\t// If the tempo was passed in, use that.\n\t\t// If the tempo is specified, use that.\n\t\t// If there is a default, use that.\n\t\t// Otherwise, use the default.\n\t\tif (options.qpm)\n\t\t\tqpm = parseInt(options.qpm, 10);\n\t\telse if (abctune.metaText.tempo)\n\t\t\tqpm = interpretTempo(abctune.metaText.tempo, abctune.getBeatLength());\n\t\telse if (options.defaultQpm)\n\t\t\tqpm = options.defaultQpm;\n\t\telse\n\t\t\tqpm = 180; \t// The tempo if there isn't a tempo specified.\n\n\t\tvar startVoice = [];\n\t\tif (bagpipes)\n\t\t\tstartVoice.push({ el_type: 'bagpipes' });\n\t\tstartVoice.push({ el_type: 'instrument', program: program });\n\t\tif (channel)\n\t\t\tstartVoice.push({ el_type: 'channel', channel: channel });\n\t\tif (transpose)\n\t\t\tstartVoice.push({ el_type: 'transpose', transpose: transpose });\n\t\tstartVoice.push({ el_type: 'tempo', qpm: qpm });\n\t\tfor (var ss = 0; ss < startingMidi.length;ss++)\n\t\t\tstartVoice.push(startingMidi[ss]);\n\n\t\t// the relevant part of the input structure is:\n\t\t// abctune\n\t\t//\t\tarray lines\n\t\t//\t\t\tarray staff\n\t\t//\t\t\t\tobject key\n\t\t//\t\t\t\tobject meter\n\t\t//\t\t\t\tarray voices\n\t\t//\t\t\t\t\tarray abcelem\n\n\t\t// visit each voice completely in turn\n\t\tvar voices = [];\n\t\tvar inCrescendo = [];\n\t\tvar inDiminuendo = [];\n\t\tvar durationCounter = [0];\n\t\tvar tempoChanges = {};\n\t\ttempoChanges[\"0\"] = { el_type: 'tempo', qpm: qpm, timing: 0 };\n\t\tvar currentVolume;\n\t\tvar startRepeatPlaceholder = []; // There is a place holder for each voice.\n\t\tvar skipEndingPlaceholder = []; // This is the place where the first ending starts.\n\t\tvar startingDrumSet = false;\n\t\tvar lines = abctune.lines; //abctune.deline(); TODO-PER: can switch to this, then simplify the loops below.\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\t// For each group of staff lines in the tune.\n\t\t\tvar line = lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tvar staves = line.staff;\n\t\t\t\tvar voiceNumber = 0;\n\t\t\t\tfor (var j = 0; j < staves.length; j++) {\n\t\t\t\t\tvar staff = staves[j];\n\t\t\t\t\tif (staff.clef && staff.clef.type === \"TAB\")\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// For each staff line\n\t\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\t\t// For each voice in a staff line\n\t\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\t\tif (!voices[voiceNumber]) {\n\t\t\t\t\t\t\tvoices[voiceNumber] = [].concat(JSON.parse(JSON.stringify(startVoice)));\n\t\t\t\t\t\t\tvar voiceName = getTrackTitle(line.staff, voiceNumber);\n\t\t\t\t\t\t\tif (voiceName)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].unshift({el_type: \"name\", trackName: voiceName});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Negate any transposition for the percussion staff.\n\t\t\t\t\t\tif (transpose && staff.clef.type === \"perc\")\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 0 });\n\n\t\t\t\t\t\tif (staff.clef && staff.clef.type === 'perc' && !channelExplicitlySet) {\n\t\t\t\t\t\t\tfor (var cl = 0; cl < voices[voiceNumber].length; cl++) {\n\t\t\t\t\t\t\t\tif (voices[voiceNumber][cl].el_type === 'instrument')\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber][cl].program = PERCUSSION_PROGRAM;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (staff.key) {\n\t\t\t\t\t\t\taddKey(voices[voiceNumber], staff.key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.meter) {\n\t\t\t\t\t\t\taddMeter(voices[voiceNumber], staff.meter);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!startingDrumSet && drumOn) { // drum information is only needed once, so use the first line and track 0.\n\t\t\t\t\t\t\tvoices[voiceNumber].push({el_type: 'drum', params: {pattern: drumPattern, bars: drumBars, on: drumOn, intro: drumIntro}});\n\t\t\t\t\t\t\tstartingDrumSet = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.clef && staff.clef.type !== \"perc\" && staff.clef.transpose) {\n\t\t\t\t\t\t\tstaff.clef.el_type = 'clef';\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: staff.clef.transpose });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.clef && staff.clef.type) {\n\t\t\t\t\t\t\tif (staff.clef.type.indexOf(\"-8\") >= 0)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: -12 });\n\t\t\t\t\t\t\telse if (staff.clef.type.indexOf(\"+8\") >= 0)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 12 });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (abctune.formatting.midi && abctune.formatting.midi.drumoff) {\n\t\t\t\t\t\t\t// If there is a drum off command right at the beginning it is put in the metaText instead of the stream,\n\t\t\t\t\t\t\t// so we will just insert it here.\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'bar' });\n\t\t\t\t\t\t\tvoices[voiceNumber].push({el_type: 'drum', params: {pattern: \"\", on: false }});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar noteEventsInBar = 0;\n\t\t\t\t\t\tvar tripletMultiplier = 0;\n\t\t\t\t\t\tvar tripletDurationTotal = 0; // try to mitigate the js rounding problems.\n\t\t\t\t\t\tvar tripletDurationCount = 0;\n\t\t\t\t\t\tcurrentVolume = [105, 95, 85, 1];\n\n\t\t\t\t\t\tfor (var v = 0; v < voice.length; v++) {\n\t\t\t\t\t\t\t// For each element in a voice\n\t\t\t\t\t\t\tvar elem = voice[v];\n\t\t\t\t\t\t\tswitch (elem.el_type) {\n\t\t\t\t\t\t\t\tcase \"note\":\n\t\t\t\t\t\t\t\t\tif (inCrescendo[k]) {\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[0] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[1] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[2] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (inDiminuendo[k]) {\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[0] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[1] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[2] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsetDynamics(elem);\n\n\t\t\t\t\t\t\t\t\t// regular items are just pushed.\n\t\t\t\t\t\t\t\t\tif (!elem.rest || elem.rest.type !== 'spacer') {\n\t\t\t\t\t\t\t\t\t\tvar noteElem = { elem: elem, el_type: \"note\", timing: durationCounter[voiceNumber] }; // Make a copy so that modifications aren't kept except for adding the midiPitches\n\t\t\t\t\t\t\t\t\t\tif (elem.style)\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.style = elem.style;\n\t\t\t\t\t\t\t\t\t\telse if (style[voiceNumber])\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.style = style[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tnoteElem.duration = (elem.duration === 0) ? 0.25 : elem.duration;\n\t\t\t\t\t\t\t\t\t\tif (elem.startTriplet) {\n\t\t\t\t\t\t\t\t\t\t\ttripletMultiplier = elem.tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\ttripletDurationTotal = elem.startTriplet * tripletMultiplier * elem.duration;\n\t\t\t\t\t\t\t\t\t\t\tif (elem.startTriplet !== elem.tripletR) { // most commonly (3:2:2\n\t\t\t\t\t\t\t\t\t\t\t\tif (v + elem.tripletR <= voice.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar durationTotal = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (var w = v; w < v + elem.tripletR; w++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdurationTotal += voice[w].duration;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttripletDurationTotal = tripletMultiplier * durationTotal;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = noteElem.duration * tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round(noteElem.duration*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\ttripletDurationCount = noteElem.duration;\n\t\t\t\t\t\t\t\t\t\t} else if (tripletMultiplier) {\n\t\t\t\t\t\t\t\t\t\t\tif (elem.endTriplet) {\n\t\t\t\t\t\t\t\t\t\t\t\ttripletMultiplier = 0;\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round((tripletDurationTotal - tripletDurationCount)*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = noteElem.duration * tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round(noteElem.duration*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\t\ttripletDurationCount += noteElem.duration;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (elem.rest) noteElem.rest = elem.rest;\n\t\t\t\t\t\t\t\t\t\tif (elem.decoration) noteElem.decoration = elem.decoration.slice(0);\n\t\t\t\t\t\t\t\t\t\tif (elem.pitches) noteElem.pitches = parseCommon.cloneArray(elem.pitches);\n\t\t\t\t\t\t\t\t\t\tif (elem.gracenotes) noteElem.gracenotes = parseCommon.cloneArray(elem.gracenotes);\n\t\t\t\t\t\t\t\t\t\tif (elem.chord) noteElem.chord = parseCommon.cloneArray(elem.chord);\n\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(noteElem);\n\t\t\t\t\t\t\t\t\t\tif (elem.style === \"rhythm\") {\n\t\t\t\t\t\t\t\t\t\t\trhythmHeadThisBar = true;\n\t\t\t\t\t\t\t\t\t\t\tchordVoiceOffThisBar(voices)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tnoteEventsInBar++;\n\t\t\t\t\t\t\t\t\t\tdurationCounter[voiceNumber] += noteElem.duration;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"key\":\n\t\t\t\t\t\t\t\tcase \"keySignature\":\n\t\t\t\t\t\t\t\t\taddKey(voices[voiceNumber], elem);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"meter\":\n\t\t\t\t\t\t\t\t\taddMeter(voices[voiceNumber], elem);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"clef\": // need to keep this to catch the \"transpose\" element.\n\t\t\t\t\t\t\t\t\tif (elem.transpose)\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: elem.transpose });\n\t\t\t\t\t\t\t\t\tif (elem.type) {\n\t\t\t\t\t\t\t\t\t\tif (elem.type.indexOf(\"-8\") >= 0)\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: -12 });\n\t\t\t\t\t\t\t\t\t\telse if (elem.type.indexOf(\"+8\") >= 0)\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 12 });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"tempo\":\n\t\t\t\t\t\t\t\t\tqpm = interpretTempo(elem, abctune.getBeatLength());\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'tempo', qpm: qpm, timing: durationCounter[voiceNumber] });\n\t\t\t\t\t\t\t\t\ttempoChanges[''+durationCounter[voiceNumber]] = { el_type: 'tempo', qpm: qpm, timing: durationCounter[voiceNumber] };\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"bar\":\n\t\t\t\t\t\t\t\t\tif (noteEventsInBar > 0) // don't add two bars in a row.\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'bar' }); // We need the bar marking to reset the accidentals.\n\t\t\t\t\t\t\t\t\tsetDynamics(elem);\n\t\t\t\t\t\t\t\t\tnoteEventsInBar = 0;\n\t\t\t\t\t\t\t\t\t// figure out repeats and endings --\n\t\t\t\t\t\t\t\t\t// The important part is where there is a start repeat, and end repeat, or a first ending.\n\t\t\t\t\t\t\t\t\tvar endRepeat = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\");\n\t\t\t\t\t\t\t\t\tvar startEnding = (elem.startEnding === '1');\n\t\t\t\t\t\t\t\t\tvar startRepeat = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_dbl_repeat\" || elem.type === \"bar_right_repeat\");\n\t\t\t\t\t\t\t\t\tif (endRepeat) {\n\t\t\t\t\t\t\t\t\t\tvar s = startRepeatPlaceholder[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tif (!s) s = 0; // If there wasn't a left repeat, then we repeat from the beginning.\n\t\t\t\t\t\t\t\t\t\tvar e = skipEndingPlaceholder[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tif (!e) e = voices[voiceNumber].length; // If there wasn't a first ending marker, then we copy everything.\n\t\t\t\t\t\t\t\t\t\t// duplicate each of the elements - this has to be a deep copy.\n\t\t\t\t\t\t\t\t\t\tfor (var z = s; z < e; z++) {\n\t\t\t\t\t\t\t\t\t\t\tvar item = Object.assign({},voices[voiceNumber][z]);\n\t\t\t\t\t\t\t\t\t\t\tif (item.pitches)\n\t\t\t\t\t\t\t\t\t\t\t\titem.pitches = parseCommon.cloneArray(item.pitches);\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(item);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// reset these in case there is a second repeat later on.\n\t\t\t\t\t\t\t\t\t\tskipEndingPlaceholder[voiceNumber] = undefined;\n\t\t\t\t\t\t\t\t\t\tstartRepeatPlaceholder[voiceNumber] = undefined;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (startEnding)\n\t\t\t\t\t\t\t\t\t\tskipEndingPlaceholder[voiceNumber] = voices[voiceNumber].length;\n\t\t\t\t\t\t\t\t\tif (startRepeat)\n\t\t\t\t\t\t\t\t\t\tstartRepeatPlaceholder[voiceNumber] = voices[voiceNumber].length;\n\t\t\t\t\t\t\t\t\trhythmHeadThisBar = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'style':\n\t\t\t\t\t\t\t\t\tstyle[voiceNumber] = elem.head;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'timeSignature':\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(interpretMeter(elem));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'part':\n\t\t\t\t\t\t\t\t\t// TODO-PER: If there is a part section in the header, then this should probably affect the repeats.\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'stem':\n\t\t\t\t\t\t\t\tcase 'scale':\n\t\t\t\t\t\t\t\tcase 'break':\n\t\t\t\t\t\t\t\tcase 'font':\n\t\t\t\t\t\t\t\t\t// These elements don't affect sound\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'midi':\n\t\t\t\t\t\t\t\t\t//console.log(\"MIDI inline\", elem); // TODO-PER: for debugging. Remove this.\n\t\t\t\t\t\t\t\t\tvar drumChange = false;\n\t\t\t\t\t\t\t\t\tswitch (elem.cmd) {\n\t\t\t\t\t\t\t\t\t\tcase \"drumon\": drumOn = true; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drumoff\": drumOn = false; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drum\": drumPattern = elem.params; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drumbars\": drumBars = elem.params[0]; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drummap\":\n\t\t\t\t\t\t\t\t\t\t\t// This is handled before getting here so it can be ignored.\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"channel\":\n\t\t\t\t\t\t\t\t\t\t\t// There's not much needed for the channel except to look out for the percussion channel\n\t\t\t\t\t\t\t\t\t\t\tif (elem.params[0] === 10)\n\t\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'instrument', program: PERCUSSION_PROGRAM });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"program\":\n\t\t\t\t\t\t\t\t\t\t\taddIfDifferent(voices[voiceNumber], { el_type: 'instrument', program: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tchannelExplicitlySet = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"transpose\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"gchordoff\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'gchordOn', tacet: true });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"gchordon\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'gchordOn', tacet: false });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"beat\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: elem.params });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"nobeataccents\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beataccents', value: false });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"beataccents\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beataccents', value: true });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"vol\":\n\t\t\t\t\t\t\t\t\t\tcase \"volinc\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: elem.cmd, volume: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"swing\":\n\t\t\t\t\t\t\t\t\t\tcase \"gchord\":\n\t\t\t\t\t\t\t\t\t\tcase \"bassvol\":\n\t\t\t\t\t\t\t\t\t\tcase \"chordvol\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: elem.cmd, param: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase \"bassprog\": // MAE 22 May 2024\n\t\t\t\t\t\t\t\t\t\tcase \"chordprog\": // MAE 22 May 2024\n\t\t\t\t\t voices[voiceNumber].push({\n\t\t\t\t\t el_type: elem.cmd,\n\t\t\t\t\t value: elem.params[0],\n\t\t\t\t\t octaveShift: elem.params[1]\n\t\t\t\t\t });\n\t\t\t\t\t break;\n\n\t\t\t\t\t // MAE 23 Jun 2024\n\t\t\t\t\t case \"gchordbars\":\n\t\t\t\t\t voices[voiceNumber].push({\n\t\t\t\t\t el_type: elem.cmd,\n\t\t\t\t\t param: elem.params[0]\n\t\t\t\t\t });\n\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"MIDI seq: midi cmd not handled: \", elem.cmd, elem);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (drumChange) {\n\t\t\t\t\t\t\t\t\t\tvoices[0].push({el_type: 'drum', params: { pattern: drumPattern, bars: drumBars, intro: drumIntro, on: drumOn}});\n\t\t\t\t\t\t\t\t\t\tstartingDrumSet = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tconsole.log(\"MIDI: element type \" + elem.el_type + \" not handled.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvoiceNumber++;\n\t\t\t\t\t\tif (!durationCounter[voiceNumber])\n\t\t\t\t\t\t\tdurationCounter[voiceNumber] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction setDynamics(elem) {\n\t\t\t\t\tvar volumes = {\n\t\t\t\t\t\t'pppp': [15, 10, 5, 1],\n\t\t\t\t\t\t'ppp': [30, 20, 10, 1],\n\t\t\t\t\t\t'pp': [45, 35, 20, 1],\n\t\t\t\t\t\t'p': [60, 50, 35, 1],\n\t\t\t\t\t\t'mp': [75, 65, 50, 1],\n\t\t\t\t\t\t'mf': [90, 80, 65, 1],\n\t\t\t\t\t\t'f': [105, 95, 80, 1],\n\t\t\t\t\t\t'ff': [120, 110, 95, 1],\n\t\t\t\t\t\t'fff': [127, 125, 110, 1],\n\t\t\t\t\t\t'ffff': [127, 125, 110, 1]\n\t\t\t\t\t};\n\n\t\t\t\t\tvar dynamicType;\n\t\t\t\t\tif (elem.decoration) {\n\t\t\t\t\t\tif (elem.decoration.indexOf('pppp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'pppp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ppp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ppp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('pp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'pp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('p') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'p';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('mp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'mp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('mf') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'mf';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('f') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'f';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ff';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('fff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'fff';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ffff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ffff';\n\n\t\t\t\t\t\tif (dynamicType) {\n\t\t\t\t\t\t\tcurrentVolume = volumes[dynamicType].slice(0);\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (elem.decoration.indexOf(\"crescendo(\") >= 0) {\n\t\t\t\t\t\t\tvar n = numNotesToDecoration(voice, v, \"crescendo)\");\n\t\t\t\t\t\t\tvar top = Math.min(127, currentVolume[0] + crescendoSize);\n\t\t\t\t\t\t\tvar endDec = endingVolume(voice, v+n+1, Object.keys(volumes));\n\t\t\t\t\t\t\tif (endDec)\n\t\t\t\t\t\t\t\ttop = volumes[endDec][0];\n\t\t\t\t\t\t\tif (n > 0)\n\t\t\t\t\t\t\t\tinCrescendo[k] = Math.floor((top - currentVolume[0]) / n);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"crescendo)\") >= 0) {\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"diminuendo(\") >= 0) {\n\t\t\t\t\t\t\tvar n2 = numNotesToDecoration(voice, v, \"diminuendo)\");\n\t\t\t\t\t\t\tvar bottom = Math.max(15, currentVolume[0] - crescendoSize);\n\t\t\t\t\t\t\tvar endDec2 = endingVolume(voice, v+n2+1, Object.keys(volumes));\n\t\t\t\t\t\t\tif (endDec2)\n\t\t\t\t\t\t\t\tbottom = volumes[endDec2][0];\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tif (n2 > 0)\n\t\t\t\t\t\t\t\tinDiminuendo[k] = Math.floor((bottom - currentVolume[0]) / n2);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"diminuendo)\") >= 0) {\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// If there are tempo changes, make sure they are in all the voices. This must be done post process because all the elements in all the voices need to be created first.\n\t\tinsertTempoChanges(voices, tempoChanges);\n\n\t\tif (drumIntro) {\n\t\t\tvar pickups = abctune.getPickupLength();\n\t\t\t// add some measures of rests to the start of each track.\n\t\t\tfor (var vv = 0; vv < voices.length; vv++) {\n\t\t\t\tvar insertPoint = 0;\n\t\t\t\twhile (voices[vv][insertPoint].el_type !== \"note\" && voices[vv].length > insertPoint)\n\t\t\t\t\tinsertPoint++;\n\t\t\t\tif (voices[vv].length > insertPoint) {\n\t\t\t\t\tfor (var w = 0; w < drumIntro; w++) {\n\t\t\t\t\t\t// If it is the last measure of intro, subtract the pickups.\n\t\t\t\t\t\tif (pickups === 0 || w < drumIntro-1) {\n\t\t\t\t\t\t\tvoices[vv].splice(insertPoint, 0, \n\t\t\t\t\t\t\t\t{el_type: \"note\", rest: {type: \"rest\"}, duration: measureLength},\n\t\t\t\t\t\t\t\t{ el_type: \"bar\" }\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tinsertPoint += 2\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvoices[vv].splice(insertPoint++, 0, {el_type: \"note\", rest: {type: \"rest\"}, duration: measureLength-pickups});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (drumOffAfterIntro) {\n\t\t\t\t\t\tdrumOn = false\n\t\t\t\t\t\tvoices[vv].splice(insertPoint++, 0, {el_type: 'drum', params: { pattern: drumPattern, bars: drumBars, intro: drumIntro, on: drumOn}});\n\t\t\t\t\t\tdrumOffAfterIntro = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (voices.length > 0 && voices[0].length > 0) {\n\t\t\tvoices[0][0].pickupLength = abctune.getPickupLength();\n\t\t}\n\t\treturn voices;\n\t};\n\n\tfunction numNotesToDecoration(voice, start, decoration) {\n\t\tvar counter = 0;\n\t\tfor (var i = start+1; i < voice.length; i++) {\n\t\t\tif (voice[i].el_type === \"note\")\n\t\t\t\tcounter++;\n\t\t\tif (voice[i].decoration && voice[i].decoration.indexOf(decoration) >= 0)\n\t\t\t\treturn counter;\n\t\t}\n\t\treturn counter;\n\t}\n\tfunction endingVolume(voice, start, volumeDecorations) {\n\t\tvar end = Math.min(voice.length, start + 3); // If we have a volume within a couple notes of the end then assume that is the destination.\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tif (voice[i].el_type === \"note\") {\n\t\t\t\tif (voice[i].decoration) {\n\t\t\t\t\tfor (var j = 0; j < voice[i].decoration.length; j++) {\n\t\t\t\t\t\tif (volumeDecorations.indexOf(voice[i].decoration[j]) >= 0)\n\t\t\t\t\t\t\treturn voice[i].decoration[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction insertTempoChanges(voices, tempoChanges) {\n\t\tif (!tempoChanges || tempoChanges.length === 0)\n\t\t\treturn;\n\t\tvar changePositions = Object.keys(tempoChanges);\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar lastTempo = tempoChanges['0'] ? tempoChanges['0'].qpm : 0; // Don't insert redundant changes. This happens normally when repeating from the beginning, but could happen anywhere that there is a tempo marking that is the same as the last one.\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar el = voice[j];\n\t\t\t\tif (el.el_type === \"tempo\")\n\t\t\t\t\tlastTempo = el.qpm;\n\t\t\t\tif (changePositions.indexOf(''+el.timing) >= 0 && lastTempo !== tempoChanges[''+el.timing].qpm) {\n\t\t\t\t\tlastTempo = tempoChanges[''+el.timing].qpm;\n\t\t\t\t\tif (el.el_type === \"tempo\") {\n\t\t\t\t\t\tel.qpm = tempoChanges[''+el.timing].qpm;\n\t\t\t\t\t\tj++; // when there is a tempo element the next element has the same timing and we don't want it to match the second time.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//console.log(\"tempo position\", i, j, el);\n\t\t\t\t\t\tvoices[i].splice(j, 0, {el_type: \"tempo\", qpm: tempoChanges[''+el.timing].qpm, timing: el.timing});\n\t\t\t\t\t\tj +=2; // skip the element we just inserted.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction chordVoiceOffThisBar(voices) {\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar j = voice.length-1;\n\t\t\twhile (j >= 0 && voice[j].el_type !== 'bar') {\n\t\t\t\tvoice[j].noChordVoice = true;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getTrackTitle(staff, voiceNumber) {\n\t\tif (!staff || staff.length <= voiceNumber || !staff[voiceNumber].title)\n\t\t\treturn undefined;\n\t\treturn staff[voiceNumber].title.join(\" \");\n\t}\n\n\tfunction interpretTempo(element, beatLength) {\n\t\tvar duration = 1/4;\n\t\tif (element.duration) {\n\t\t\tduration = element.duration[0];\n\t\t}\n\t\tvar bpm = 60;\n\t\tif (element.bpm) {\n\t\t\tbpm = element.bpm;\n\t\t}\n\t\t// The tempo is defined with a beat length of \"duration\". If that isn't the natural beat length then there is a translation.\n\t\treturn duration * bpm / beatLength;\n\t}\n\n\tfunction interpretMeter(element) {\n\t\tvar meter;\n\t\tswitch (element.type) {\n\t\t\tcase \"common_time\":\n\t\t\t\tmeter = { el_type: 'meter', num: 4, den: 4 };\n\t\t\t\tbreak;\n\t\t\tcase \"cut_time\":\n\t\t\t\tmeter = { el_type: 'meter', num: 2, den: 2 };\n\t\t\t\tbreak;\n\t\t\tcase \"specified\":\n\t\t\t\t// TODO-PER: only taking the first meter, so the complex meters are not handled.\n\t\t\t\tmeter = { el_type: 'meter', num: element.value[0].num, den: element.value[0].den };\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// This should never happen.\n\t\t\t\tmeter = { el_type: 'meter' };\n\t\t}\n\t\tmeasureLength = meter.num/meter.den;\n\t\treturn meter;\n\t}\n\n\tfunction removeNaturals(accidentals) {\n\t\tvar acc = [];\n\t\tfor (var i = 0; i < accidentals.length; i++) {\n\t\t\tif (accidentals[i].acc !== \"natural\")\n\t\t\t\tacc.push(accidentals[i])\n\t\t}\n\t\treturn acc;\n\t}\n\tfunction addKey(arr, key) {\n\t\tvar newKey;\n\t\tif (key.root === 'HP')\n\t\t\tnewKey = {el_type: 'key', accidentals: [{acc: 'natural', note: 'g'}, {acc: 'sharp', note: 'f'}, {acc: 'sharp', note: 'c'}]};\n\t\telse\n\t\t\tnewKey = {el_type: 'key', accidentals: removeNaturals(key.accidentals) };\n\t\taddIfDifferent(arr, newKey);\n\t}\n\tfunction addMeter(arr, meter) {\n\t\tvar newMeter = interpretMeter(meter);\n\t\taddIfDifferent(arr, newMeter);\n\t}\n\tfunction addIfDifferent(arr, item) {\n\t\tfor (var i = arr.length-1; i >= 0; i--) {\n\t\t\tif (arr[i].el_type === item.el_type) {\n\t\t\t\tif (JSON.stringify(arr[i]) !== JSON.stringify(item))\n\t\t\t\t\tarr.push(item);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tarr.push(item);\n\t}\n\n})();\n\nmodule.exports = sequence;\n","var registerAudioContext = require('./register-audio-context.js');\n\nfunction activeAudioContext() {\n\tif (!window.abcjsAudioContext)\n\t\tregisterAudioContext();\n\treturn window.abcjsAudioContext;\n}\n\nmodule.exports = activeAudioContext;\n","// This turns the number of cents to detune into a value that is convenient to use in pitch calculations\n// A cent is 1/100 of a musical half step and is calculated exponentially over the course of an octave.\n// The equation is:\n// Two to the power of cents divided by 1200\n\nfunction centsToFactor(cents) {\n\treturn Math.pow(2, cents/1200);\n}\n\nmodule.exports = centsToFactor;\n","//\n// The algorithm for chords is:\n// - The chords are done in a separate track.\n// - If there are notes before the first chord, then put that much silence to start the track.\n// - The pattern of chord expression depends on the meter, and how many chords are in a measure.\n// - There is a possibility that a measure will have an incorrect number of beats, if that is the case, then\n// start the pattern anew on the next measure number.\n// - If a chord root is not A-G, then ignore it as if the chord wasn't there at all.\n// - If a chord modification isn't in our supported list, change it to a major triad.\n//\n// - There is a standard pattern of boom-chick for each time sig, or it can be overridden.\n// - For any unrecognized meter, play the full chord on each beat.\n//\n//\t- If there is a chord specified that is not on a beat, move it earlier to the previous beat, unless there is already a chord on that beat.\n//\t- Otherwise, move it later, unless there is already a chord on that beat.\n// \t- Otherwise, ignore it. (TODO-PER: expand this as more support is added.)\n//\n// If there is any note in the melody that has a rhythm head, then assume the melody controls the rhythm, so there is no chord added for that entire measure.\n\nvar ChordTrack = function ChordTrack(numVoices, chordsOff, midiOptions, meter) {\n\tthis.chordTrack = [];\n\tthis.chordTrackFinished = false;\n\tthis.chordChannel = numVoices; // first free channel for chords\n\tthis.currentChords = [];\n\tthis.lastChord;\n\tthis.chordLastBar;\n\tthis.chordsOff = !!chordsOff\n\tthis.gChordTacet = this.chordsOff;\n\tthis.hasRhythmHead = false;\n\tthis.transpose = 0;\n\tthis.lastBarTime = 0;\n\tthis.meter = meter;\n\tthis.tempoChangeFactor = 1;\n\n\t// MAE 17 Jun 2024 - To allow for bass and chord instrument octave shifts\n\tthis.bassInstrument = midiOptions.bassprog && midiOptions.bassprog.length >= 1 ? midiOptions.bassprog[0] : 0;\n\tthis.chordInstrument = midiOptions.chordprog && midiOptions.chordprog.length >= 1 ? midiOptions.chordprog[0] : 0;\n\n\t// MAE For octave shifted bass and chords\n\tthis.bassOctaveShift = midiOptions.bassprog && midiOptions.bassprog.length === 2 ? midiOptions.bassprog[1] : 0;\n\tthis.chordOctaveShift = midiOptions.chordprog && midiOptions.chordprog.length === 2 ? midiOptions.chordprog[1] : 0;\n\n\tthis.boomVolume = midiOptions.bassvol && midiOptions.bassvol.length === 1 ? midiOptions.bassvol[0] : 64;\n\tthis.chickVolume = midiOptions.chordvol && midiOptions.chordvol.length === 1 ? midiOptions.chordvol[0] : 48;\n\n\t// This allows for an initial %%MIDI gchord with no string\n\tif (midiOptions.gchord && (midiOptions.gchord.length > 0)) {\n\t\tthis.overridePattern = parseGChord(midiOptions.gchord[0])\n\t}\n\telse {\n\t\tthis.overridePattern = undefined;\n\t}\n};\n\nChordTrack.prototype.setMeter = function (meter) {\n\tthis.meter = meter\n};\n\nChordTrack.prototype.setTempoChangeFactor = function (tempoChangeFactor) {\n\tthis.tempoChangeFactor = tempoChangeFactor\n};\n\nChordTrack.prototype.setLastBarTime = function (lastBarTime) {\n\tthis.lastBarTime = lastBarTime\n};\n\nChordTrack.prototype.setTranspose = function (transpose) {\n\tthis.transpose = transpose\n};\n\nChordTrack.prototype.setRhythmHead = function (isRhythmHead, elem) {\n\tthis.hasRhythmHead = isRhythmHead\n\tvar ePitches = [];\n\tif (isRhythmHead) {\n\t\tif (this.lastChord && this.lastChord.chick) {\n\t\t\tfor (var i2 = 0; i2 < this.lastChord.chick.length; i2++) {\n\t\t\t\tvar note2 = Object.assign({},elem.pitches[0]);\n\t\t\t\tnote2.actualPitch = this.lastChord.chick[i2];\n\t\t\t\tePitches.push(note2);\n\t\t\t}\n\t\t}\n\t}\n\treturn ePitches\n};\n\nChordTrack.prototype.barEnd = function (element) {\n\tif (this.chordTrack.length > 0 && !this.chordTrackFinished) {\n\t\tthis.resolveChords(this.lastBarTime, timeToRealTime(element.time));\n\t\tthis.currentChords = [];\n\t}\n\tthis.chordLastBar = this.lastChord;\n};\n\nChordTrack.prototype.gChordOn = function (element) {\n\tif (!this.chordsOff)\n\t\tthis.gChordTacet = element.tacet;\n};\n\nChordTrack.prototype.paramChange = function (element) {\n\tswitch (element.el_type) {\n\t\tcase \"gchord\":\n\t\t\t// Skips gchord elements that don't have pattern strings\n\t\t\tif (element.param && element.param.length > 0) {\n\t\t\t\tthis.overridePattern = parseGChord(element.param);\n\n\t\t\t\t// Generate a default duration scale based on the pattern\n\t\t\t\t//this.gchordduration = generateDefaultDurationScale(element.param);\n\t\t\t} else\n\t\t\t\tthis.overridePattern = undefined;\n\t\t\tbreak;\n\t\tcase \"bassprog\":\n\t\t\tthis.bassInstrument = element.value;\n\t\t\tif ((element.octaveShift != undefined) && (element.octaveShift != null)) {\n\t\t\t\tthis.bassOctaveShift = element.octaveShift;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.bassOctaveShift = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"chordprog\":\n\t\t\tthis.chordInstrument = element.value;\n\t\t\tif ((element.octaveShift != undefined) && (element.octaveShift != null)) {\n\t\t\t\tthis.chordOctaveShift = element.octaveShift;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.chordOctaveShift = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"bassvol\":\n\t\t\tthis.boomVolume = element.param;\n\t\t\tbreak;\n\t\tcase \"chordvol\":\n\t\t\tthis.chickVolume = element.param;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconsole.log(\"unhandled midi param\", element)\t\n\t}\n};\n\nChordTrack.prototype.finish = function () {\n\tif (!this.chordTrackEmpty()) // Don't do chords on more than one track, so turn off chord detection after we create it.\n\t\tthis.chordTrackFinished = true;\n};\n\nChordTrack.prototype.addTrack = function (tracks) {\n\tif (!this.chordTrackEmpty())\n\t\ttracks.push(this.chordTrack);\n};\n\nChordTrack.prototype.findChord = function (elem) {\n\tif (this.gChordTacet)\n\t\treturn 'break';\n\n\t// TODO-PER: Just using the first chord if there are more than one.\n\tif (this.chordTrackFinished || !elem.chord || elem.chord.length === 0)\n\t\treturn null;\n\n\t// Return the first annotation that is a regular chord: that is, it is in the default place or is a recognized \"tacet\" phrase.\n\tfor (var i = 0; i < elem.chord.length; i++) {\n\t\tvar ch = elem.chord[i];\n\t\tif (ch.position === 'default')\n\t\t\treturn ch.name;\n\t\tif (this.breakSynonyms.indexOf(ch.name.toLowerCase()) >= 0)\n\t\t\treturn 'break';\n\t}\n\treturn null;\n}\n\nChordTrack.prototype.interpretChord = function (name) {\n\t// chords have the format:\n\t// [root][acc][modifier][/][bass][acc]\n\t// (The chord might be surrounded by parens. Just ignore them.)\n\t// root must be present and must be from A-G.\n\t// acc is optional and can be # or b\n\t// The modifier can be a wide variety of things, like \"maj7\". As they are discovered, more are supported here.\n\t// If there is a slash, then there is a bass note, which can be from A-G, with an optional acc.\n\t// If the root is unrecognized, then \"undefined\" is returned and there is no chord.\n\t// If the modifier is unrecognized, a major triad is returned.\n\t// If the bass notes is unrecognized, it is ignored.\n\tif (name.length === 0)\n\t\treturn undefined;\n\tif (name === 'break')\n\t\treturn { chick: [] };\n\tvar root = name.substring(0, 1);\n\tif (root === '(') {\n\t\tname = name.substring(1, name.length - 2);\n\t\tif (name.length === 0)\n\t\t\treturn undefined;\n\t\troot = name.substring(0, 1);\n\t}\n\tvar bass = this.basses[root];\n\tif (!bass)\t// If the bass note isn't listed, then this was an unknown root. Only A-G are accepted.\n\t\treturn undefined;\n\t// Don't transpose the chords more than an octave.\n\tvar chordTranspose = this.transpose;\n\twhile (chordTranspose < -8)\n\t\tchordTranspose += 12;\n\twhile (chordTranspose > 8)\n\t\tchordTranspose -= 12;\n\tbass += chordTranspose;\n\n\t// MAE 17 Jun 2024 - Supporting octave shifted bass and chords\n\tvar unshiftedBass = bass;\n\n\tbass += this.bassOctaveShift * 12;\n\n\tvar bass2 = bass - 5;\t// The alternating bass is a 4th below\n\tvar chick;\n\tif (name.length === 1)\n\t\tchick = this.chordNotes(bass, '');\n\tvar remaining = name.substring(1);\n\tvar acc = remaining.substring(0, 1);\n\tif (acc === 'b' || acc === '♭') {\n\t\tunshiftedBass--;\n\t\tbass--;\n\t\tbass2--;\n\t\tremaining = remaining.substring(1);\n\t} else if (acc === '#' || acc === '♯') {\n\t\tunshiftedBass++;\n\t\tbass++;\n\t\tbass2++;\n\t\tremaining = remaining.substring(1);\n\t}\n\tvar arr = remaining.split('/');\n\tchick = this.chordNotes(unshiftedBass, arr[0]);\n\t// If the 5th is altered then the bass is altered. Normally the bass is 7 from the root, so adjust if it isn't.\n\tif (chick.length >= 3) {\n\t\tvar fifth = chick[2] - chick[0];\n\t\tbass2 = bass2 + fifth - 7;\n\t}\n\n\tif (arr.length === 2) {\n\t\tvar explicitBass = this.basses[arr[1].substring(0, 1)];\n\t\tif (explicitBass) {\n\t\t\tvar bassAcc = arr[1].substring(1);\n\t\t\tvar bassShift = { '#': 1, '♯': 1, 'b': -1, '♭': -1 }[bassAcc] || 0;\n\t\t\tbass = this.basses[arr[1].substring(0, 1)] + bassShift + chordTranspose;\n\n\t\t\t// MAE 22 May 2024 - Supporting octave shifted bass and chords\n\t\t\tbass += this.bassOctaveShift * 12;\n\n\t\t\tbass2 = bass;\n\t\t}\n\t}\n\treturn { boom: bass, boom2: bass2, chick: chick };\n}\n\nChordTrack.prototype.chordNotes = function (bass, modifier) {\n\tvar intervals = this.chordIntervals[modifier];\n\tif (!intervals) {\n\t\tif (modifier.slice(0, 2).toLowerCase() === 'ma' || modifier[0] === 'M')\n\t\t\tintervals = this.chordIntervals.M;\n\t\telse if (modifier[0] === 'm' || modifier[0] === '-')\n\t\t\tintervals = this.chordIntervals.m;\n\t\telse\n\t\t\tintervals = this.chordIntervals.M;\n\t}\n\tbass += 12;\t// the chord is an octave above the bass note.\n\n\t// MAE 22 May 2024 - For chick octave shift\n\tbass += (this.chordOctaveShift * 12);\n\n\tvar notes = [];\n\tfor (var i = 0; i < intervals.length; i++) {\n\t\tnotes.push(bass + intervals[i]);\n\t}\n\treturn notes;\n}\n\nChordTrack.prototype.writeNote = function (note, beatLength, volume, beat, noteLength, instrument) {\n\t// undefined means there is a stop time.\n\tif (note !== undefined)\n\t\tthis.chordTrack.push({ cmd: 'note', pitch: note, volume: volume, start: this.lastBarTime + beat * durationRounded(beatLength, this.tempoChangeFactor), duration: durationRounded(noteLength, this.tempoChangeFactor), gap: 0, instrument: instrument });\n}\n\nChordTrack.prototype.chordTrackEmpty = function () {\n\tvar isEmpty = true;\n\tfor (var i = 0; i < this.chordTrack.length && isEmpty; i++) {\n\t\tif (this.chordTrack[i].cmd === 'note')\n\t\t\tisEmpty = false\n\t}\n\treturn isEmpty;\n}\n\nChordTrack.prototype.resolveChords = function (startTime, endTime) {\n\t// If there is a rhythm head anywhere in the measure then don't add a separate rhythm track\n\tif (this.hasRhythmHead)\n\t\treturn\n\n\tvar num = this.meter.num;\n\tvar den = this.meter.den;\n\tvar beatLength = 1 / den;\n\tvar noteLength = beatLength / 2;\n\tvar thisMeasureLength = parseInt(num, 10) / parseInt(den, 10);\n\tvar portionOfAMeasure = thisMeasureLength - (endTime - startTime) / this.tempoChangeFactor;\n\tif (Math.abs(portionOfAMeasure) < 0.00001)\n\t\tportionOfAMeasure = 0;\n\n\t // there wasn't a new chord this measure, so use the last chord declared.\n\t // also the case where there is a chord declared in the measure, but not on its first beat.\n\tif (this.currentChords.length === 0 || this.currentChords[0].beat !== 0) {\n\t\tthis.currentChords.unshift({ beat: 0, chord: this.chordLastBar });\n\t}\n\n\t//console.log(this.currentChords)\n\tvar currentChordsExpanded = expandCurrentChords(this.currentChords, 8*num/den, beatLength)\n\t//console.log(currentChordsExpanded)\n\tvar thisPattern = this.overridePattern ? this.overridePattern : this.rhythmPatterns[num + '/' + den]\n\tif (portionOfAMeasure) {\n\t\tthisPattern = [];\n\t\tvar beatsPresent = ((endTime - startTime) / this.tempoChangeFactor) * 8;\n\t\tfor (var p = 0; p < beatsPresent/2; p += 2) {\n\t\t\tthisPattern.push(\"chick\");\n\t\t\tthisPattern.push(\"\");\n\t\t}\n\t}\n\tif (!thisPattern) {\n\t\tthisPattern = []\n\t\tfor (var p = 0; p < (8*num/den)/2; p++) {\n\t\t\tthisPattern.push('chick')\n\t\t\tthisPattern.push(\"\");\n\t\t}\n\t}\n\tvar firstBoom = true\n\t// If the pattern is overridden, it might be longer than the length of a measure. If so, then ignore the rest of it\n\tvar minLength = Math.min(thisPattern.length, currentChordsExpanded.length)\n\tfor (var p = 0; p < minLength; p++) {\n\t\tif (p > 0 && currentChordsExpanded[p-1] && currentChordsExpanded[p] && currentChordsExpanded[p-1].boom !== currentChordsExpanded[p].boom)\n\t\t\tfirstBoom = true\n\t\tvar type = thisPattern[p]\n\t\tvar isBoom = type.indexOf('boom') >= 0\n\t\t// If we changed chords at a time when we're not expecting a bass note, then add an extra bass note in if the first thing in the pattern is a bass note.\n\t\tvar newBass = !isBoom &&\n\t\t\tp !== 0 &&\n\t\t\tthisPattern[0].indexOf('boom') >= 0 &&\n\t\t\t(!currentChordsExpanded[p-1] || currentChordsExpanded[p-1].boom !== currentChordsExpanded[p].boom)\n\t\tvar pitches = resolvePitch(currentChordsExpanded[p], type, firstBoom, newBass)\n\t\tif (isBoom)\n\t\t\tfirstBoom = false\n\t\tfor (var oo = 0; oo < pitches.length; oo++) {\n\t\t\tthis.writeNote(pitches[oo], \n\t\t\t\t0.125,\n\t\t\t\tisBoom || newBass ? this.boomVolume : this.chickVolume,\n\t\t\t\tp,\n\t\t\t\tnoteLength,\n\t\t\t\tisBoom || newBass ? this.bassInstrument : this.chordInstrument\n\t\t\t)\n\t\t\tif (newBass)\n\t\t\t\tnewBass = false\n\t\t\telse\n\t\t\t\tisBoom = false // only the first note in a chord is a bass note. This handles the case where bass and chord are played at the same time.\n\t\t}\n\t}\n\treturn\n}\n\nChordTrack.prototype.processChord = function (elem) {\n\tif (this.chordTrackFinished)\n\t\treturn\n\tvar chord = this.findChord(elem);\n\tif (chord) {\n\t\tvar c = this.interpretChord(chord);\n\t\t// If this isn't a recognized chord, just completely ignore it.\n\t\tif (c) {\n\t\t\t// If we ever have a chord in this voice, then we add the chord track.\n\t\t\t// However, if there are chords on more than one voice, then just use the first voice.\n\t\t\tif (this.chordTrack.length === 0) {\n\t\t\t\tthis.chordTrack.push({ cmd: 'program', channel: this.chordChannel, instrument: this.chordInstrument });\n\t\t\t}\n\n\t\t\tthis.lastChord = c;\n\t\t\tvar barBeat = calcBeat(this.lastBarTime, timeToRealTime(elem.time));\n\t\t\tthis.currentChords.push({ chord: this.lastChord, beat: barBeat, start: timeToRealTime(elem.time) });\n\t\t}\n\t}\n}\n\nfunction resolvePitch(currentChord, type, firstBoom, newBass) {\n\tvar ret = []\n\tif (!currentChord)\n\t\treturn ret\n\tif (type.indexOf('boom') >= 0)\n\t\tret.push(firstBoom ? currentChord.boom : currentChord.boom2)\n\telse if (newBass)\n\t\tret.push(currentChord.boom)\n\tvar numChordNotes = currentChord.chick.length\n\tif (type.indexOf('chick') >= 0) {\n\t\tfor (var i = 0; i < numChordNotes; i++)\n\t\t\tret.push(currentChord.chick[i])\n\t}\n\tswitch (type) {\n\t\tcase 'DO': ret.push(currentChord.chick[0]); break;\n\t\tcase 'MI': ret.push(currentChord.chick[1]); break;\n\t\tcase 'SOL': ret.push(extractNote(currentChord,2)); break;\n\t\tcase 'TI': ret.push(extractNote(currentChord,3)); break;\n\t\tcase 'TOP': ret.push(extractNote(currentChord,4)); break;\n\t\tcase 'do': ret.push(currentChord.chick[0]+12); break;\n\t\tcase 'mi': ret.push(currentChord.chick[1]+12); break;\n\t\tcase 'sol': ret.push(extractNote(currentChord,2)+12); break;\n\t\tcase 'ti': ret.push(extractNote(currentChord,3)+12); break;\n\t\tcase 'top': ret.push(extractNote(currentChord,4)+12); break;\n\t}\n\treturn ret\n}\n\nfunction extractNote(chord, index) {\n\t// This creates an arpeggio note no matter how many notes are in the chord - if it runs out of notes it continues in the next octave\n\tvar octave = Math.floor(index / chord.chick.length)\n\tvar note = chord.chick[index % chord.chick.length]\n\t//console.log(chord.chick, {index, octave, note}, index % chord.chick.length)\n\treturn note + octave * 12\n}\n\nfunction parseGChord(gchord) {\n\t// TODO-PER: The spec is more complicated than this but for now this will not try to do anything with error cases like the wrong number of beats.\n\tvar pattern = []\n\tfor (var i = 0; i < gchord.length; i++) {\n\t\tvar ch = gchord[i]\n\t\tswitch(ch) {\n\t\t\tcase 'z' : pattern.push(''); break;\n\t\t\tcase '2' : pattern.push(''); break; // TODO-PER: This should extend the last note, but that's a small effect\n\t\t\tcase 'c' : pattern.push('chick'); break;\n\t\t\tcase 'b' : pattern.push('boom&chick'); break;\n\t\t\tcase 'f' : pattern.push('boom'); break;\n\t\t\tcase 'G' : pattern.push('DO'); break;\n\t\t\tcase 'H' : pattern.push('MI'); break;\n\t\t\tcase 'I' : pattern.push('SOL'); break;\n\t\t\tcase 'J' : pattern.push('TI'); break;\n\t\t\tcase 'K' : pattern.push('TOP'); break;\n\t\t\tcase 'g' : pattern.push('do'); break;\n\t\t\tcase 'h' : pattern.push('mi'); break;\n\t\t\tcase 'i' : pattern.push('sol'); break;\n\t\t\tcase 'j' : pattern.push('ti'); break;\n\t\t\tcase 'k' : pattern.push('top'); break;\n\t\t}\n\t}\n\treturn pattern\n}\n\n// This returns an array that has a chord for each 1/8th note position in the current measure\nfunction expandCurrentChords(currentChords, num8thNotes, beatLength) {\n\tbeatLength = beatLength * 8 // this is expressed as a fraction, so that 0.25 is a quarter notes. We want it to be the number of 8th notes\n\tvar chords = []\n\tif (currentChords.length === 0)\n\t\treturn chords\n\n\tvar currentChord = currentChords[0].chord\n\tfor (var i = 1; i < currentChords.length; i++) {\n\t\tvar current = currentChords[i]\n\t\twhile (chords.length < current.beat) {\n\t\t\tchords.push(currentChord)\n\t\t}\n\t\tcurrentChord = current.chord\n\t}\n\twhile (chords.length < num8thNotes)\n\t\tchords.push(currentChord)\n\treturn chords\n}\n\nfunction calcBeat(measureStart, currTime) {\n\tvar distanceFromStart = currTime - measureStart;\n\treturn distanceFromStart * 8;\n}\n\nChordTrack.prototype.breakSynonyms = ['break', '(break)', 'no chord', 'n.c.', 'tacet'];\n\nChordTrack.prototype.basses = {\n\t'A': 33, 'B': 35, 'C': 36, 'D': 38, 'E': 40, 'F': 41, 'G': 43\n};\n\nChordTrack.prototype.chordIntervals = {\n\t// diminished (all flat 5 chords)\n\t'dim': [0, 3, 6],\n\t'°': [0, 3, 6],\n\t'˚': [0, 3, 6],\n\n\t'dim7': [0, 3, 6, 9],\n\t'°7': [0, 3, 6, 9],\n\t'˚7': [0, 3, 6, 9],\n\n\t'ø7': [0, 3, 6, 10],\n\t'm7(b5)': [0, 3, 6, 10],\n\t'm7b5': [0, 3, 6, 10],\n\t'm7♭5': [0, 3, 6, 10],\n\t'-7(b5)': [0, 3, 6, 10],\n\t'-7b5': [0, 3, 6, 10],\n\n\t'7b5': [0, 4, 6, 10],\n\t'7(b5)': [0, 4, 6, 10],\n\t'7♭5': [0, 4, 6, 10],\n\n\t'7(b9,b5)': [0, 4, 6, 10, 13],\n\t'7b9,b5': [0, 4, 6, 10, 13],\n\t'7(#9,b5)': [0, 4, 6, 10, 15],\n\t'7#9b5': [0, 4, 6, 10, 15],\n\t'maj7(b5)': [0, 4, 6, 11],\n\t'maj7b5': [0, 4, 6, 11],\n\t'13(b5)': [0, 4, 6, 10, 14, 21],\n\t'13b5': [0, 4, 6, 10, 14, 21],\n\n\t// minor (all normal 5, minor 3 chords)\n\t'm': [0, 3, 7],\n\t'-': [0, 3, 7],\n\t'm6': [0, 3, 7, 9],\n\t'-6': [0, 3, 7, 9],\n\t'm7': [0, 3, 7, 10],\n\t'-7': [0, 3, 7, 10],\n\n\t'-(b6)': [0, 3, 7, 8],\n\t'-b6': [0, 3, 7, 8],\n\t'-6/9': [0, 3, 7, 9, 14],\n\t'-7(b9)': [0, 3, 7, 10, 13],\n\t'-7b9': [0, 3, 7, 10, 13],\n\t'-maj7': [0, 3, 7, 11],\n\t'-9+7': [0, 3, 7, 11, 13],\n\t'-11': [0, 3, 7, 11, 14, 17],\n\t'm11': [0, 3, 7, 11, 14, 17],\n\t'-maj9': [0, 3, 7, 11, 14],\n\t'-∆9': [0, 3, 7, 11, 14],\n\t'mM9': [0, 3, 7, 11, 14],\n\n\t// major (all normal 5, major 3 chords)\n\t'M': [0, 4, 7],\n\t'6': [0, 4, 7, 9],\n\t'6/9': [0, 4, 7, 9, 14],\n\t'6add9': [0, 4, 7, 9, 14],\n\t'69': [0, 4, 7, 9, 14],\n\n\t'7': [0, 4, 7, 10],\n\t'9': [0, 4, 7, 10, 14],\n\t'11': [0, 7, 10, 14, 17],\n\t'13': [0, 4, 7, 10, 14, 21],\n\t'7b9': [0, 4, 7, 10, 13],\n\t'7♭9': [0, 4, 7, 10, 13],\n\t'7(b9)': [0, 4, 7, 10, 13],\n\t'7(#9)': [0, 4, 7, 10, 15],\n\t'7#9': [0, 4, 7, 10, 15],\n\t'(13)': [0, 4, 7, 10, 14, 21],\n\t'7(9,13)': [0, 4, 7, 10, 14, 21],\n\t'7(#9,b13)': [0, 4, 7, 10, 15, 20],\n\t'7(#11)': [0, 4, 7, 10, 14, 18],\n\t'7#11': [0, 4, 7, 10, 14, 18],\n\t'7(b13)': [0, 4, 7, 10, 20],\n\t'7b13': [0, 4, 7, 10, 20],\n\t'9(#11)': [0, 4, 7, 10, 14, 18],\n\t'9#11': [0, 4, 7, 10, 14, 18],\n\t'13(#11)': [0, 4, 7, 10, 18, 21],\n\t'13#11': [0, 4, 7, 10, 18, 21],\n\n\t'maj7': [0, 4, 7, 11],\n\t'∆7': [0, 4, 7, 11],\n\t'Δ7': [0, 4, 7, 11],\n\t'maj9': [0, 4, 7, 11, 14],\n\t'maj7(9)': [0, 4, 7, 11, 14],\n\t'maj7(11)': [0, 4, 7, 11, 17],\n\t'maj7(#11)': [0, 4, 7, 11, 18],\n\t'maj7(13)': [0, 4, 7, 14, 21],\n\t'maj7(9,13)': [0, 4, 7, 11, 14, 21],\n\n\t'7sus4': [0, 5, 7, 10],\n\t'm7sus4': [0, 3, 7, 10, 17],\n\t'sus4': [0, 5, 7],\n\t'sus2': [0, 2, 7],\n\t'7sus2': [0, 2, 7, 10],\n\t'9sus4': [0, 5, 7, 10, 14],\n\t'13sus4': [0, 5, 7, 10, 14, 21],\n\n\t// augmented (all sharp 5 chords)\n\t'aug7': [0, 4, 8, 10],\n\t'+7': [0, 4, 8, 10],\n\t'+': [0, 4, 8],\n\t'7#5': [0, 4, 8, 10],\n\t'7♯5': [0, 4, 8, 10],\n\t'7+5': [0, 4, 8, 10],\n\t'9#5': [0, 4, 8, 10, 14],\n\t'9♯5': [0, 4, 8, 10, 14],\n\t'9+5': [0, 4, 8, 10, 14],\n\t'-7(#5)': [0, 3, 8, 10],\n\t'-7#5': [0, 3, 8, 10],\n\t'7(#5)': [0, 4, 8, 10],\n\t'7(b9,#5)': [0, 4, 8, 10, 13],\n\t'7b9#5': [0, 4, 8, 10, 13],\n\t'maj7(#5)': [0, 4, 8, 11],\n\t'maj7#5': [0, 4, 8, 11],\n\t'maj7(#5,#11)': [0, 4, 8, 11, 18],\n\t'maj7#5#11': [0, 4, 8, 11, 18],\n\t'9(#5)': [0, 4, 8, 10, 14],\n\t'13(#5)': [0, 4, 8, 10, 14, 21],\n\t'13#5': [0, 4, 8, 10, 14, 21],\n\t// MAE Power chords added 10 April 2024\n\t'5': [0, 7],\n\t'5(8)': [0, 7, 12],\n\t'5add8': [0, 7, 12]\n\n};\n\nChordTrack.prototype.rhythmPatterns = {\n\t\"2/2\": ['boom', '', '', '', 'chick', '', '', ''],\n\t\"3/2\": ['boom', '', '', '', 'chick', '', '', '', 'chick', '', '', ''],\n\t\"4/2\": ['boom', '', '', '', 'chick', '', '', '', 'boom', '', '', '', 'chick', '', '', ''],\n\n\t\"2/4\": ['boom', '', 'chick', ''],\n\t\"3/4\": ['boom', '', 'chick', '', 'chick', ''],\n\t\"4/4\": ['boom', '', 'chick', '', 'boom', '', 'chick', ''],\n\t\"5/4\": ['boom', '', 'chick', '', 'chick', '', 'boom', '', 'chick', ''],\n\t\"6/4\": ['boom', '', 'chick', '', 'boom', '', 'chick', '', 'boom', '', 'chick', ''],\n\n\t\"3/8\": ['boom', '', 'chick'],\n\t\"5/8\": ['boom', 'chick', 'chick', 'boom', 'chick'],\n\t\"6/8\": ['boom', '', 'chick', 'boom', '', 'chick'],\n\t\"7/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick'],\n\t\"9/8\": ['boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick'],\n\t\"10/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick'],\n\t\"11/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick', 'chick'],\n\t\"12/8\": ['boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick'],\n};\n\n// TODO-PER: these are repeated in flattener. Can it be shared?\n\nfunction timeToRealTime(time) {\n\treturn time / 1000000;\n}\n\nfunction durationRounded(duration, tempoChangeFactor) {\n\treturn Math.round(duration * tempoChangeFactor * 1000000) / 1000000;\n}\n\nmodule.exports = ChordTrack;\n","// Convert the input structure to a more useful structure where each item has a length of its own.\n\nvar instrumentIndexToName = require('./instrument-index-to-name');\n\nvar createNoteMap = function(sequence) {\n\tvar map = [];\n\tfor (var i = 0; i < sequence.tracks.length; i++)\n\t\tmap.push([]);\n\n\t// TODO-PER: handle more than one note in a track\n\tvar nextNote = {};\n\tvar currentInstrument = instrumentIndexToName[0];\n\t// ev.start and ev.duration are in whole notes. Need to turn them into\n\tsequence.tracks.forEach(function(track, i) {\n\t\ttrack.forEach(function(ev) {\n\t\t\tswitch (ev.cmd) {\n\t\t\t\tcase \"note\":\n\t\t\t\t\t// ev contains:\n\t\t\t\t\t// {\"cmd\":\"note\",\"pitch\":72,\"volume\":95,\"start\":0.125,\"duration\":0.25,\"instrument\":0,\"gap\":0}\n\t\t\t\t\t// where start and duration are in whole notes, gap is in 1/1920 of a second (i.e. MIDI ticks)\n\t\t\t\t\tvar inst = ev.instrument !== undefined ? instrumentIndexToName[ev.instrument] : currentInstrument\n\t\t\t\t\tif (ev.duration > 0) {\n\t\t\t\t\t\tvar gap = ev.gap ? ev.gap : 0;\n\t\t\t\t\t\tvar len = ev.duration;\n\t\t\t\t\t\tgap = Math.min(gap, len * 2 / 3);\n\t\t\t\t\t\tvar obj = {\n\t\t\t\t\t\t\tpitch: ev.pitch,\n\t\t\t\t\t\t\tinstrument: inst,\n\t\t\t\t\t\t\tstart: Math.round((ev.start) * 1000000)/1000000,\n\t\t\t\t\t\t\tend: Math.round((ev.start + len - gap) * 1000000)/1000000,\n\t\t\t\t\t\t\tvolume: ev.volume\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (ev.startChar)\n\t\t\t\t\t\t\tobj.startChar = ev.startChar;\n\t\t\t\t\t\tif (ev.endChar)\n\t\t\t\t\t\t\tobj.endChar = ev.endChar;\n\t\t\t\t\t\tif (ev.style)\n\t\t\t\t\t\t\tobj.style = ev.style;\n\t\t\t\t\t\tif (ev.cents)\n\t\t\t\t\t\t\tobj.cents = ev.cents;\n\t\t\t\t\t\tmap[i].push(obj);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"program\":\n\t\t\t\t\tcurrentInstrument = instrumentIndexToName[ev.instrument];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"text\":\n\t\t\t\t\t// Ignore the track names - that is just for midi files.\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO-PER: handle other event types\n\t\t\t\t\tconsole.log(\"Unhandled midi event\", ev);\n\t\t\t}\n\t\t});\n\t});\n\treturn map;\n};\n\nmodule.exports = createNoteMap;\n","var supportsAudio = require('./supports-audio');\nvar registerAudioContext = require('./register-audio-context');\nvar activeAudioContext = require('./active-audio-context');\n\nvar loopImage = require('./images/loop.svg.js');\nvar playImage = require('./images/play.svg.js');\nvar pauseImage = require('./images/pause.svg.js');\nvar loadingImage = require('./images/loading.svg.js');\nvar resetImage = require('./images/reset.svg.js');\n\nfunction CreateSynthControl(parent, options) {\n\tvar self = this;\n\t// parent is either an element or a selector.\n\tif (typeof parent === \"string\") {\n\t\tvar selector = parent;\n\t\tparent = document.querySelector(selector);\n\t\tif (!parent)\n\t\t\tthrow new Error(\"Cannot find element \\\"\" + selector + \"\\\" in the DOM.\");\n\t} else if (!(parent instanceof HTMLElement))\n\t\tthrow new Error(\"The first parameter must be a valid element or selector in the DOM.\");\n\n\tself.parent = parent;\n\tself.options = {};\n\tif (options)\n\t\tself.options = Object.assign({},options);\n\n\t// This can be called in the following cases:\n\t// AC already registered and not suspended\n\t// AC already registered and suspended\n\t// AC not registered and not passed in\n\t// AC not registered but passed in (but suspended)\n\t// AC not registered but passed in (not suspended)\n\t// If the AC is already registered, then just use it - ignore what is passed in\n\t// Create the AC if necessary if there isn't one already.\n\t// We don't care right now if the AC is suspended - whenever a button is clicked then we check it.\n\tif (self.options.ac)\n\t\tregisterAudioContext(self.options.ac);\n\tbuildDom(self.parent, self.options);\n\tattachListeners(self);\n\n\tself.disable = function(isDisabled) {\n\t\tvar el = self.parent.querySelector(\".abcjs-inline-audio\");\n\t\tif (isDisabled)\n\t\t\tel.classList.add(\"abcjs-disabled\");\n\t\telse\n\t\t\tel.classList.remove(\"abcjs-disabled\");\n\t};\n\tself.setWarp = function(tempo, warp) {\n\t\tvar el = self.parent.querySelector(\".abcjs-midi-tempo\");\n\t\tel.value = Math.round(warp);\n\t\tself.setTempo(tempo)\n\t};\n\tself.setTempo = function(tempo) {\n\t\tvar el = self.parent.querySelector(\".abcjs-midi-current-tempo\");\n\t\tif (el)\n\t\t\tel.innerHTML = Math.round(tempo);\n\t};\n\tself.resetAll = function() {\n\t\tvar pushedButtons = self.parent.querySelectorAll(\".abcjs-pushed\");\n\t\tfor (var i = 0; i < pushedButtons.length; i++) {\n\t\t\tvar button = pushedButtons[i];\n\t\t\tbutton.classList.remove(\"abcjs-pushed\");\n\t\t}\n\t};\n\tself.pushPlay = function(push) {\n\t\tvar startButton = self.parent.querySelector(\".abcjs-midi-start\");\n\t\tif (!startButton)\n\t\t\treturn;\n\t\tif (push)\n\t\t\tstartButton.classList.add(\"abcjs-pushed\");\n\t\telse\n\t\t\tstartButton.classList.remove(\"abcjs-pushed\");\n\t};\n\tself.pushLoop = function(push) {\n\t\tvar loopButton = self.parent.querySelector(\".abcjs-midi-loop\");\n\t\tif (!loopButton)\n\t\t\treturn;\n\t\tif (push)\n\t\t\tloopButton.classList.add(\"abcjs-pushed\");\n\t\telse\n\t\t\tloopButton.classList.remove(\"abcjs-pushed\");\n\t};\n\n\tself.setProgress = function (percent, totalTime) {\n\t\tvar progressBackground = self.parent.querySelector(\".abcjs-midi-progress-background\");\n\t\tvar progressThumb = self.parent.querySelector(\".abcjs-midi-progress-indicator\");\n\t\tif (!progressBackground || !progressThumb)\n\t\t\treturn;\n\t\tvar width = progressBackground.clientWidth;\n\t\tvar left = width * percent;\n\t\tprogressThumb.style.left = left + \"px\";\n\n\t\tvar clock = self.parent.querySelector(\".abcjs-midi-clock\");\n\t\tif (clock) {\n\t\t\tvar totalSeconds = (totalTime * percent) / 1000;\n\t\t\tvar minutes = Math.floor(totalSeconds / 60);\n\t\t\tvar seconds = Math.floor(totalSeconds % 60);\n\t\t\tvar secondsFormatted = seconds < 10 ? \"0\" + seconds : seconds;\n\t\t\tclock.innerHTML = minutes + \":\" + secondsFormatted;\n\t\t}\n\t};\n\n\tif (self.options.afterResume) {\n\t\tvar isResumed = false;\n\t\tif (self.options.ac) {\n\t\t\tisResumed = self.options.ac.state !== \"suspended\";\n\t\t} else if (activeAudioContext()) {\n\t\t\tisResumed = activeAudioContext().state !== \"suspended\";\n\t\t}\n\t\tif (isResumed)\n\t\t\tself.options.afterResume();\n\t}\n}\n\nfunction buildDom(parent, options) {\n\tvar hasLoop = !!options.loopHandler;\n\tvar hasRestart = !!options.restartHandler;\n\tvar hasPlay = !!options.playHandler || !!options.playPromiseHandler;\n\tvar hasProgress = !!options.progressHandler;\n\tvar hasWarp = !!options.warpHandler;\n\tvar hasClock = options.hasClock !== false;\n\n\tvar html = '
\\n';\n\tif (hasLoop) {\n\t\tvar repeatTitle = options.repeatTitle ? options.repeatTitle : \"Click to toggle play once/repeat.\";\n\t\tvar repeatAria = options.repeatAria ? options.repeatAria : repeatTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasRestart) {\n\t\tvar restartTitle = options.restartTitle ? options.restartTitle : \"Click to go to beginning.\";\n\t\tvar restartAria = options.restartAria ? options.restartAria : restartTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasPlay) {\n\t\tvar playTitle = options.playTitle ? options.playTitle : \"Click to play/pause.\";\n\t\tvar playAria = options.playAria ? options.playAria : playTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasProgress) {\n\t\tvar randomTitle = options.randomTitle ? options.randomTitle : \"Click to change the playback position.\";\n\t\tvar randomAria = options.randomAria ? options.randomAria : randomTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasClock) {\n\t\thtml += '\\n';\n\t}\n\tif (hasWarp) {\n\t\tvar warpTitle = options.warpTitle ? options.warpTitle : \"Change the playback speed.\";\n\t\tvar warpAria = options.warpAria ? options.warpAria : warpTitle;\n\t\tvar bpm = options.bpm ? options.bpm : \"BPM\";\n\t\thtml += ' ( ' + bpm + ')\\n';\n\t}\n\thtml += '
CSS required: load abcjs-audio.css
';\n\thtml += '
\\n';\n\tparent.innerHTML = html;\n}\n\nfunction acResumerMiddleWare(next, ev, playBtn, afterResume, isPromise) {\n\tvar needsInit = true;\n\tif (!activeAudioContext()) {\n\t\tregisterAudioContext();\n\t} else {\n\t\tneedsInit = activeAudioContext().state === \"suspended\";\n\t}\n\tif (!supportsAudio()) {\n\t\tthrow { status: \"NotSupported\", message: \"This browser does not support audio.\"};\n\t}\n\n\tif ((needsInit || isPromise) && playBtn)\n\t\tplayBtn.classList.add(\"abcjs-loading\");\n\n\tif (needsInit) {\n\t\tactiveAudioContext().resume().then(function () {\n\t\t\tif (afterResume) {\n\t\t\t\tafterResume().then(function (response) {\n\t\t\t\t\tdoNext(next, ev, playBtn, isPromise);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdoNext(next, ev, playBtn, isPromise);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tdoNext(next, ev, playBtn, isPromise);\n\t}\n}\n\nfunction doNext(next, ev, playBtn, isPromise) {\n\tif (isPromise) {\n\t\tnext(ev).then(function() {\n\t\t\tif (playBtn)\n\t\t\t\tplayBtn.classList.remove(\"abcjs-loading\");\n\t\t});\n\t} else {\n\t\tnext(ev);\n\t\tif (playBtn)\n\t\t\tplayBtn.classList.remove(\"abcjs-loading\");\n\t}\n}\n\nfunction attachListeners(self) {\n\tvar hasLoop = !!self.options.loopHandler;\n\tvar hasRestart = !!self.options.restartHandler;\n\tvar hasPlay = !!self.options.playHandler || !!self.options.playPromiseHandler;\n\tvar hasProgress = !!self.options.progressHandler;\n\tvar hasWarp = !!self.options.warpHandler;\n\tvar playBtn = self.parent.querySelector(\".abcjs-midi-start\");\n\n\tif (hasLoop)\n\t\tself.parent.querySelector(\".abcjs-midi-loop\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.loopHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasRestart)\n\t\tself.parent.querySelector(\".abcjs-midi-reset\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.restartHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasPlay)\n\t\tplayBtn.addEventListener(\"click\", function(ev){\n\t\t\tacResumerMiddleWare(\n\t\t\t\tself.options.playPromiseHandler || self.options.playHandler,\n\t\t\t\tev,\n\t\t\t\tplayBtn,\n\t\t\t\tself.options.afterResume,\n\t\t\t\t!!self.options.playPromiseHandler)\n\t\t});\n\tif (hasProgress)\n\t\tself.parent.querySelector(\".abcjs-midi-progress-background\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.progressHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasWarp)\n\t\tself.parent.querySelector(\".abcjs-midi-tempo\").addEventListener(\"change\", function(ev){acResumerMiddleWare(self.options.warpHandler, ev, playBtn, self.options.afterResume)});\n}\nmodule.exports = CreateSynthControl;\n","var getNote = require('./load-note');\nvar createNoteMap = require('./create-note-map');\nvar registerAudioContext = require('./register-audio-context');\nvar activeAudioContext = require('./active-audio-context');\nvar supportsAudio = require('./supports-audio');\nvar pitchToNoteName = require('./pitch-to-note-name');\nvar instrumentIndexToName = require('./instrument-index-to-name');\nvar downloadBuffer = require('./download-buffer');\nvar placeNote = require('./place-note');\nvar soundsCache = require('./sounds-cache');\n\n// TODO-PER: remove the midi tests from here: I don't think the object can be constructed unless it passes.\nvar notSupportedMessage = \"MIDI is not supported in this browser.\";\n\nvar originalSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/abcjs/\";\n// These are the original soundfonts supplied. They will need a volume boost:\nvar defaultSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/\";\nvar alternateSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/\";\n\nfunction CreateSynth() {\n\tvar self = this;\n\tself.audioBufferPossible = undefined;\n\tself.directSource = []; // type: AudioBufferSourceNode\n\tself.startTimeSec = undefined; // the time (in seconds) that the audio started: used for pause to get the pausedTimeSec.\n\tself.pausedTimeSec = undefined; // the position (in seconds) that the audio was paused: used for resume.\n\tself.audioBuffers = []; // cache of the buffers so starting play can be fast.\n\tself.duration = undefined; // the duration of the tune in seconds.\n\tself.isRunning = false; // whether there is currently a sound buffer running.\n\tself.options = undefined\n\tself.pickupLength = 0\n\n\t// Load and cache all needed sounds\n\tself.init = function(options) {\n\t\tif (!options)\n\t\t\toptions = {};\n\t\tif (options.options)\n\t\t\tself.options = options.options\n\t\tregisterAudioContext(options.audioContext); // This works no matter what - if there is already an ac it is a nop; if the context is not passed in, then it creates one.\n\t\tvar startTime = activeAudioContext().currentTime;\n\t\tself.debugCallback = options.debugCallback;\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"init called\");\n\t\tself.audioBufferPossible = self._deviceCapable();\n\t\tif (!self.audioBufferPossible)\n\t\t\treturn Promise.reject({ status: \"NotSupported\", message: notSupportedMessage});\n\t\tvar params = options.options ? options.options : {};\n\t\tself.soundFontUrl = params.soundFontUrl ? params.soundFontUrl : defaultSoundFontUrl;\n\t\tif (self.soundFontUrl[self.soundFontUrl.length-1] !== '/')\n\t\t\tself.soundFontUrl += '/';\n\t\tif (params.soundFontVolumeMultiplier || params.soundFontVolumeMultiplier === 0)\n\t\t\tself.soundFontVolumeMultiplier = params.soundFontVolumeMultiplier;\n\t\telse if (self.soundFontUrl === defaultSoundFontUrl || self.soundFontUrl === alternateSoundFontUrl)\n\t\t\tself.soundFontVolumeMultiplier = 3.0;\n\t\telse if (self.soundFontUrl === originalSoundFontUrl)\n\t\t\tself.soundFontVolumeMultiplier = 0.4;\n\t\telse\n\t\t\tself.soundFontVolumeMultiplier = 1.0;\n\t\tif (params.programOffsets)\n\t\t\tself.programOffsets = params.programOffsets;\n\t\telse if (self.soundFontUrl === originalSoundFontUrl)\n\t\t\tself.programOffsets = {\n\t\t\t\t\"bright_acoustic_piano\": 20,\n\t\t\t\t\"honkytonk_piano\": 20,\n\t\t\t\t\"electric_piano_1\": 30,\n\t\t\t\t\"electric_piano_2\": 30,\n\t\t\t\t\"harpsichord\": 40,\n\t\t\t\t\"clavinet\": 20,\n\t\t\t\t\"celesta\": 20,\n\t\t\t\t\"glockenspiel\": 40,\n\t\t\t\t\"vibraphone\": 30,\n\t\t\t\t\"marimba\": 35,\n\t\t\t\t\"xylophone\": 30,\n\t\t\t\t\"tubular_bells\": 35,\n\t\t\t\t\"dulcimer\": 30,\n\t\t\t\t\"drawbar_organ\": 20,\n\t\t\t\t\"percussive_organ\": 25,\n\t\t\t\t\"rock_organ\": 20,\n\t\t\t\t\"church_organ\": 40,\n\t\t\t\t\"reed_organ\": 40,\n\t\t\t\t\"accordion\": 40,\n\t\t\t\t\"harmonica\": 40,\n\t\t\t\t\"acoustic_guitar_nylon\": 20,\n\t\t\t\t\"acoustic_guitar_steel\": 30,\n\t\t\t\t\"electric_guitar_jazz\": 25,\n\t\t\t\t\"electric_guitar_clean\": 15,\n\t\t\t\t\"electric_guitar_muted\": 35,\n\t\t\t\t\"overdriven_guitar\": 25,\n\t\t\t\t\"distortion_guitar\": 20,\n\t\t\t\t\"guitar_harmonics\": 30,\n\t\t\t\t\"electric_bass_finger\": 15,\n\t\t\t\t\"electric_bass_pick\": 30,\n\t\t\t\t\"fretless_bass\": 40,\n\t\t\t\t\"violin\": 105,\n\t\t\t\t\"viola\": 50,\n\t\t\t\t\"cello\": 40,\n\t\t\t\t\"contrabass\": 60,\n\t\t\t\t\"trumpet\": 10,\n\t\t\t\t\"trombone\": 90,\n\t\t\t\t\"alto_sax\": 20,\n\t\t\t\t\"tenor_sax\": 20,\n\t\t\t\t\"clarinet\": 20,\n\t\t\t\t\"flute\": 50,\n\t\t\t\t\"banjo\": 50,\n\t\t\t\t\"woodblock\": 20,\n\t\t\t};\n\t\telse\n\t\t\tself.programOffsets = {};\n\t\tvar p = params.fadeLength !== undefined ? parseInt(params.fadeLength,10) : NaN;\n\t\tself.fadeLength = isNaN(p) ? 200 : p;\n\t\tp = params.noteEnd !== undefined ? parseInt(params.noteEnd,10) : NaN;\n\t\tself.noteEnd = isNaN(p) ? 0 : p;\n\n\t\tself.pan = params.pan;\n\t\tself.meterSize = 1;\n\t\tif (options.visualObj) {\n\t\t\tself.flattened = options.visualObj.setUpAudio(params);\n\t\t\tvar meter = options.visualObj.getMeterFraction();\n\t\t\tif (meter.den)\n\t\t\t\tself.meterSize = options.visualObj.getMeterFraction().num / options.visualObj.getMeterFraction().den;\n\t\t\tself.pickupLength = options.visualObj.getPickupLength()\n\t\t} else if (options.sequence)\n\t\t\tself.flattened = options.sequence;\n\t\telse\n\t\t\treturn Promise.reject(new Error(\"Must pass in either a visualObj or a sequence\"));\n\t\tself.millisecondsPerMeasure = options.millisecondsPerMeasure ? options.millisecondsPerMeasure : (options.visualObj ? options.visualObj.millisecondsPerMeasure(self.flattened.tempo) : 1000);\n\t\tself.beatsPerMeasure = options.visualObj ? options.visualObj.getBeatsPerMeasure() : 4;\n\t\tself.sequenceCallback = params.sequenceCallback;\n\t\tself.callbackContext = params.callbackContext;\n\t\tself.onEnded = params.onEnded;\n\t\tself.meterFraction = options.visualObj ? options.visualObj.getMeterFraction() : {den: 1} // If we are given a sequence instead of a regular visual obj, then don't do the swing\n\n\t\tvar allNotes = {};\n\t\tvar cached = [];\n\t\tvar errorNotes = [];\n\t\tvar currentInstrument = instrumentIndexToName[0];\n\t\tself.flattened.tracks.forEach(function(track) {\n\t\t\ttrack.forEach(function(event) {\n\t\t\t\tif (event.cmd === \"program\" && instrumentIndexToName[event.instrument])\n\t\t\t\t\tcurrentInstrument = instrumentIndexToName[event.instrument];\n\t\t\t\tif (event.pitch !== undefined) {\n\t\t\t\t\tvar pitchNumber = event.pitch;\n\t\t\t\t\tvar noteName = pitchToNoteName[pitchNumber];\n\t\t\t\t\tvar inst = event.instrument !== undefined ? instrumentIndexToName[event.instrument] : currentInstrument\n\t\t\t\t\tif (noteName) {\n\t\t\t\t\t\tif (!allNotes[inst])\n\t\t\t\t\t\t\tallNotes[inst] = {};\n\t\t\t\t\t\tif (!soundsCache[inst] || !soundsCache[inst][noteName])\n\t\t\t\t\t\t\tallNotes[inst][noteName] = true;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar label2 = inst+\":\"+noteName\n\t\t\t\t\t\t\tif (cached.indexOf(label2) < 0)\n\t\t\t\t\t\t\t\tcached.push(label2);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar label = inst+\":\"+noteName\n\t\t\t\t\t\tconsole.log(\"Can't find note: \", pitchNumber, label);\n\t\t\t\t\t\tif (errorNotes.indexOf(label) < 0)\n\t\t\t\t\t\t\terrorNotes.push(label)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"note gathering time = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000)+\"ms\");\n\t\tstartTime = activeAudioContext().currentTime;\n\n\t\tvar notes = [];\n\t\tObject.keys(allNotes).forEach(function(instrument) {\n\t\t\tObject.keys(allNotes[instrument]).forEach(function(note) {\n\t\t\t\tnotes.push({ instrument: instrument, note: note });\n\t\t\t});\n\t\t});\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"notes \"+JSON.stringify(notes));\n\n\t\t// If there are lots of notes, load them in batches\n\t\tvar batches = [];\n\t\tvar CHUNK = 256;\n\t\tfor (var i=0; i < notes.length; i += CHUNK) {\n\t\t\tbatches.push(notes.slice(i, i + CHUNK));\n\t\t}\n\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tvar results = {\n\t\t\t\tcached: cached,\n\t\t\t\terror: errorNotes,\n\t\t\t\tloaded: []\n\t\t\t};\n\n\t\t\tvar index = 0;\n\t\t\tvar next = function() {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"loadBatch idx=\"+index+ \" len=\"+batches.length);\n\t\n\t\t\t\tif (index < batches.length) {\n\t\t\t\t\tself._loadBatch(batches[index], self.soundFontUrl, startTime).then(function(data) {\n\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\tself.debugCallback(\"loadBatch then\");\n\t\t\t\t\t\tstartTime = activeAudioContext().currentTime;\n\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\tif (data.error)\n\t\t\t\t\t\t\t\tresults.error = results.error.concat(data.error);\n\t\t\t\t\t\t\tif (data.loaded)\n\t\t\t\t\t\t\t\tresults.loaded = results.loaded.concat(data.loaded);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tnext();\n\t\t\t\t\t}, reject);\n\t\t\t\t} else {\n\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\tself.debugCallback(\"resolve init\");\n\t\t\n\t\t\t\t\tresolve(results);\n\t\t\t\t}\n\t\t\t};\n\t\t\tnext();\n\t\t});\n\t};\n\n\tself._loadBatch = (function(batch, soundFontUrl, startTime, delay) {\n\t\t// This is called recursively to see if the sounds have loaded. The \"delay\" parameter is how long it has been since the original call.\n\t\tvar promises = [];\n\t\tbatch.forEach(function(item) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"getNote \" + item.instrument+':'+item.note);\n\t\t\tpromises.push(getNote(soundFontUrl, item.instrument, item.note, activeAudioContext()));\n\t\t});\n\t\treturn Promise.all(promises).then(function(response) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"mp3 load time = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000)+\"ms\");\n\t\t\tvar loaded = [];\n\t\t\tvar cached = [];\n\t\t\tvar pending = [];\n\t\t\tvar error = [];\n\t\t\tfor (var i = 0; i < response.length; i++) {\n\t\t\t\tvar oneResponse = response[i];\n\t\t\t\tvar which = oneResponse.instrument + \":\" + oneResponse.name;\n\t\t\t\tif (oneResponse.status === \"loaded\")\n\t\t\t\t\tloaded.push(which);\n\t\t\t\telse if (oneResponse.status === \"pending\")\n\t\t\t\t\tpending.push(which);\n\t\t\t\telse if (oneResponse.status === \"cached\")\n\t\t\t\t\tcached.push(which);\n\t\t\t\telse\n\t\t\t\t\terror.push(which + ' ' + oneResponse.message);\n\t\t\t}\n\t\t\tif (pending.length > 0) {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"pending \" + JSON.stringify(pending));\n\t\t\t\t// There was probably a second call for notes before the first one finished, so just retry a few times to see if they stop being pending.\n\t\t\t\t// Retry quickly at first so that there isn't an unnecessary delay, but increase the delay each time.\n\t\t\t\tif (!delay)\n\t\t\t\t\tdelay = 50;\n\t\t\t\telse\n\t\t\t\t\tdelay = delay * 2;\n\t\t\t\tif (delay < 90000) {\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\tvar newBatch = [];\n\t\t\t\t\t\t\tfor (i = 0; i < pending.length; i++) {\n\t\t\t\t\t\t\t\twhich = pending[i].split(\":\");\n\t\t\t\t\t\t\t\tnewBatch.push({instrument: which[0], note: which[1]});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\t\tself.debugCallback(\"retry \" + JSON.stringify(newBatch));\n\t\t\t\t\t\t\t\t\tself._loadBatch(newBatch, soundFontUrl, startTime, delay).then(function (response) {\n\t\t\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, delay);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar list = [];\n\t\t\t\t\tfor (var j = 0; j < batch.length; j++)\n\t\t\t\t\t\tlist.push(batch[j].instrument+'/'+batch[j].note)\n\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\tself.debugCallback(\"loadBatch timeout\")\n\t\t\t\t\t\treturn Promise.reject(new Error(\"timeout attempting to load: \" + list.join(\", \")));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"loadBatch resolve\")\n\t\t\t\treturn Promise.resolve({loaded: loaded, cached: cached, error: error});\n\t\t\t}\n\t\t}).catch(function (error) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"loadBatch catch \"+error.message)\n\t\t});\n\t});\n\n\tself.prime = function() {\n\t\t// At this point all of the notes are loaded. This function writes them into the output buffer.\n\t\t// Most music has a lot of repeating notes. If a note is the same pitch, volume, length, etc. as another one,\n\t\t// It saves a lot of time to just create it once and place it repeatedly where ever it needs to be.\n\t\tvar fadeTimeSec = self.fadeLength/1000;\n\t\tself.isRunning = false;\n\t\tif (!self.audioBufferPossible)\n\t\t\treturn Promise.reject(new Error(notSupportedMessage));\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"prime called\");\n\t\treturn new Promise(function(resolve) {\n\t\t\tvar startTime = activeAudioContext().currentTime;\n\t\t\tvar tempoMultiplier = self.millisecondsPerMeasure / 1000 / self.meterSize;\n\t\t\tself.duration = self.flattened.totalDuration * tempoMultiplier;\n\t\t\tif(self.duration <= 0) {\n\t\t\t\tself.audioBuffers = [];\n\t\t\t\treturn resolve({ status: \"empty\", seconds: 0});\n\t\t\t}\n\t\t\tself.duration += fadeTimeSec;\n\t\t\tvar totalSamples = Math.floor(activeAudioContext().sampleRate * self.duration);\n\n\t\t\t// There might be a previous run that needs to be turned off.\n\t\t\tself.stop();\n\n\t\t\tvar noteMapTracks = createNoteMap(self.flattened);\n\n\t\t\tif (self.options.swing)\n\t\t\t\taddSwing(noteMapTracks, self.options.swing, self.meterFraction, self.pickupLength)\n\n\t\t\tif (self.sequenceCallback)\n\t\t\t\tself.sequenceCallback(noteMapTracks, self.callbackContext);\n\n\t\t\tvar panDistances = setPan(noteMapTracks.length, self.pan);\n\n\t\t\t// Create a simple list of all the unique sounds in this music and where they should be placed.\n\t\t\t// There appears to be a limit on how many audio buffers can be created at once so this technique limits the number needed.\n\t\t\tvar uniqueSounds = {};\n\t\t\tnoteMapTracks.forEach(function(noteMap, trackNumber) {\n\t\t\t\tvar panDistance = panDistances && panDistances.length > trackNumber ? panDistances[trackNumber] : 0;\n\t\t\t\tnoteMap.forEach(function(note) {\n\t\t\t\t\tvar key = note.instrument + ':' + note.pitch + ':' +note.volume + ':' + Math.round((note.end-note.start)*1000)/1000 + ':' + panDistance + ':' + tempoMultiplier + ':' + (note.cents ? note.cents : 0);\n\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\tself.debugCallback(\"noteMapTrack \"+key)\n\t\t\t\t\tif (!uniqueSounds[key])\n\t\t\t\t\t\tuniqueSounds[key] = [];\n\t\t\t\t\tuniqueSounds[key].push(note.start);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Now that we know what we are trying to create, construct the audio buffer by creating each sound and placing it.\n\t\t\tvar allPromises = [];\n\t\t\tvar audioBuffer = activeAudioContext().createBuffer(2, totalSamples, activeAudioContext().sampleRate);\n\t\t\tfor (var key2 = 0; key2 < Object.keys(uniqueSounds).length; key2++) {\n\t\t\t\tvar k = Object.keys(uniqueSounds)[key2];\n\t\t\t\tvar parts = k.split(\":\");\n\t\t\t\tvar cents = parts[6] !== undefined ? parseFloat(parts[6]) : 0;\n\t\t\t\tparts = {instrument: parts[0], pitch: parseInt(parts[1], 10), volume: parseInt(parts[2], 10), len: parseFloat(parts[3]), pan: parseFloat(parts[4]), tempoMultiplier: parseFloat(parts[5]), cents: cents};\n\t\t\t\tallPromises.push(placeNote(audioBuffer, activeAudioContext().sampleRate, parts, uniqueSounds[k], self.soundFontVolumeMultiplier, self.programOffsets[parts.instrument], fadeTimeSec, self.noteEnd/1000, self.debugCallback));\n\t\t\t}\n\t\t\tself.audioBuffers = [audioBuffer];\n\n\t\t\tif (self.debugCallback) {\n\t\t\t\tself.debugCallback(\"sampleRate = \" + activeAudioContext().sampleRate);\n\t\t\t\tself.debugCallback(\"totalSamples = \" + totalSamples);\n\t\t\t\tself.debugCallback(\"creationTime = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000) + \"ms\");\n\t\t\t}\n\t\t\tfunction resolveData(me) {\n\t\t\t\tvar duration = me && me.audioBuffers && me.audioBuffers.length > 0 ? me.audioBuffers[0].duration : 0;\n\t\t\t\treturn { status: activeAudioContext().state, duration: duration}\n\t\t\t}\n\t\t\tPromise.all(allPromises).then(function() {\n\t\t\t\t// Safari iOS can mess with the audioContext state, so resume if needed.\n\t\t\t\tif (activeAudioContext().state === \"suspended\") {\n\t\t\t\t\tactiveAudioContext().resume().then(function () {\n\t\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t\t})\n\t\t\t\t} else if (activeAudioContext().state === \"interrupted\") {\n\t\t\t\t\tactiveAudioContext().suspend().then(function () {\n\t\t\t\t\t\tactiveAudioContext().resume().then(function () {\n\t\t\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\tfunction setPan(numTracks, panParam) {\n\t\t// panParam, if it is set, can be either a number representing the separation between each track,\n\t\t// or an array, which is the absolute pan position for each track.\n\t\tif (panParam === null || panParam === undefined)\n\t\t\treturn null;\n\n\t\tvar panDistances = [];\n\t\tif (panParam.length) {\n\t\t\t// We received an array. If there are the same number of items in the pan array as the number of tracks,\n\t\t\t// it all lines up perfectly. If there are more items in the pan array than the tracks then the excess items are ignored.\n\t\t\t// If there are more tracks than items in the pan array then the remaining tracks are placed in the middle.\n\t\t\t// If any of the pan numbers are out of range then they are adjusted.\n\t\t\tfor (var pp = 0; pp < numTracks; pp++) {\n\t\t\t\tif (pp < panParam.length) {\n\t\t\t\t\tvar x = parseFloat(panParam[pp]);\n\t\t\t\t\tif (x < -1)\n\t\t\t\t\t\tx = -1;\n\t\t\t\t\telse if (x > 1)\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\tpanDistances.push(x);\n\t\t\t\t} else\n\t\t\t\t\tpanDistances.push(0)\n\t\t\t}\n\t\t\treturn panDistances;\n\t\t} else {\n\t\t\tvar panNumber = parseFloat(panParam);\n\t\t\t// the separation needs to be no further than 2 (i.e. -1 to 1) so test to see if there are too many tracks for the passed in distance\n\t\t\tif (panNumber*(numTracks-1) > 2)\n\t\t\t\treturn null;\n\n\t\t\t// If there are an even number of tracks, then offset so that the first two are centered around the middle\n\t\t\tvar even = numTracks % 2 === 0;\n\t\t\tvar currLow = even ? 0 - panNumber/2 : 0;\n\t\t\tvar currHigh = currLow+panNumber;\n\t\t\t// Now add the tracks to either side\n\t\t\tfor (var p = 0; p < numTracks; p++) {\n\t\t\t\teven = p % 2 === 0;\n\t\t\t\tif (even) {\n\t\t\t\t\tpanDistances.push(currLow);\n\t\t\t\t\tcurrLow -= panNumber;\n\t\t\t\t} else {\n\t\t\t\t\tpanDistances.push(currHigh);\n\t\t\t\t\tcurrHigh += panNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn panDistances;\n\t\t}\n\t\t// There was either no panning, or the parameters were illegal\n\t\treturn null;\n\t}\n\n\t// This is called after everything is set up, so it can quickly make sound\n\tself.start = function() {\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"start called\");\n\n\t\tvar resumePosition = self.pausedTimeSec ? self.pausedTimeSec : 0;\n\t\tself._kickOffSound(resumePosition);\n\t\tself.startTimeSec = activeAudioContext().currentTime - resumePosition;\n\t\tself.pausedTimeSec = undefined;\n\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"MIDI STARTED\", self.startTimeSec);\n\t};\n\n\tself.pause = function() {\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"pause called\");\n\n\t\tself.pausedTimeSec = self.stop();\n\t\treturn self.pausedTimeSec;\n\t};\n\n\tself.resume = function() {\n\t\tself.start();\n\t};\n\n\tself.seek = function(position, units) {\n\t\tvar offset;\n\t\tswitch (units) {\n\t\t\tcase \"seconds\":\n\t\t\t\toffset = position;\n\t\t\t\tbreak;\n\t\t\tcase \"beats\":\n\t\t\t\toffset = position * self.millisecondsPerMeasure / self.beatsPerMeasure / 1000;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// this is \"percent\" or any illegal value\n\t\t\t\toffset = (self.duration-self.fadeLength/1000) * position;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// TODO-PER: can seek when paused or when playing\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"seek called sec=\" + offset);\n\n\t\tif (self.isRunning) {\n\t\t\tself.stop();\n\t\t\tself._kickOffSound(offset);\n\t\t} else {\n\t\t\tself.pausedTimeSec = offset;\n\t\t}\n\t\tself.pausedTimeSec = offset;\n\t};\n\n\tself.stop = function() {\n\t\tself.isRunning = false;\n\t\tself.pausedTimeSec = undefined;\n\t\tself.directSource.forEach(function(source) {\n\t\t\ttry {\n\t\t\t\tsource.stop();\n\t\t\t} catch (error) {\n\t\t\t\t// We don't care if self succeeds: it might fail if something else turned off the sound or it ended for some reason.\n\t\t\t\tconsole.log(\"direct source didn't stop:\", error)\n\t\t\t}\n\t\t});\n\t\tself.directSource = [];\n\t\tvar elapsed = activeAudioContext().currentTime - self.startTimeSec;\n\t\treturn elapsed;\n\t};\n\tself.finished = function() {\n\t\tself.startTimeSec = undefined;\n\t\tself.pausedTimeSec = undefined;\n\t\tself.isRunning = false;\n\t};\n\n\tself.download = function() {\n\t\treturn downloadBuffer(self);\n\t};\n\n\tself.getAudioBuffer = function() {\n\t\treturn self.audioBuffers[0];\n\t};\n\n\tself.getIsRunning = function() {\n\t\treturn self.isRunning;\n\t}\n\n\t/////////////// Private functions //////////////\n\n\tself._deviceCapable = function() {\n\t\tif (!supportsAudio()) {\n\t\t\tconsole.warn(notSupportedMessage);\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(notSupportedMessage);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tself._kickOffSound = function(seconds) {\n\t\tself.isRunning = true;\n\t\tself.directSource = [];\n\t\tself.audioBuffers.forEach(function(audioBuffer, trackNum) {\n\t\t\tself.directSource[trackNum] = activeAudioContext().createBufferSource(); // creates a sound source\n\t\t\tself.directSource[trackNum].buffer = audioBuffer; // tell the source which sound to play\n\t\t\tself.directSource[trackNum].connect(activeAudioContext().destination); // connect the source to the context's destination (the speakers)\n\t\t});\n\t\tself.directSource.forEach(function(source) {\n\t\t\tsource.start(0, seconds);\n\t\t});\n\t\tif (self.onEnded) {\n\t\t\tself.directSource[0].onended = function () {\n\t\t\t\tself.onEnded(self.callbackContext);\n\t\t\t};\n\t\t}\n\t};\n\n\tfunction addSwing(noteMapTracks, swing, meterFraction, pickupLength) {\n\n\t\t// we can only swing in X/4 and X/8 meters.\n\t\tif (meterFraction.den != 4 && meterFraction.den != 8)\n\t\t\treturn;\n\n\t\tswing = parseFloat(swing);\n\n\t\t// 50 (or less) is no swing, \n\t\tif (isNaN(swing) || swing <= 50)\n\t\t\treturn;\n\n\t\t// 66 is triplet swing 2:1, and \n\t\t// 60 is swing with a ratio of 3:2. \n\t\t// 75 is the maximum swing where the first eight is played as a dotted eight and the second as a sixteenth. \n\t\tif (swing > 75)\n\t\t\tswing = 75;\n\n\t\t// convert the swing percentage to a percentage of increase for the first half of the beat\n\t\tswing = swing/50 - 1;\n\n\t\t// The volume of the swung notes is increased by this factor\n\t\t// could be also in the settings. Try out values such 0.1, 0.2\n\t\tvar volumeIncrease = 0.0;\n\n\t\t// the beatLength in X/8 meters\n\t\tvar beatLength = 0.25; \n\n\t\t// in X/8 meters the 16s swing so the beatLength is halved\n\t\tif (meterFraction.den === 8) \n\t\t\tbeatLength = beatLength/2; \n\n\t\t// duration of a half beat\n\t\tvar halfbeatLength = beatLength/2;\n\n\t\t// the extra duration of the first swung notes and the delay of the second notes\n\t\tvar swingDuration = halfbeatLength * swing;\n\n\t\tfor (var t = 0; t < noteMapTracks.length; t++) {\n\t\t\tvar track = noteMapTracks[t];\n\t\t\tfor (var i = 0; i < track.length; i++) {\n\t\t\t\tvar event = track[i];\n\t\t\t\tif (\n\t\t\t\t\t// is halfbeat\n\t\t\t\t\t(event.start-pickupLength) % halfbeatLength == 0 && (event.start-pickupLength) % beatLength != 0 \n\t\t\t\t\t&& (\n\t\t\t\t\t\t// the previous note is on the beat or before OR there is no previous note \n\t\t\t\t\t\ti == 0 \n\t\t\t\t\t\t|| track[i-1].start <= track[i].start - halfbeatLength\n\t\t\t\t\t)\n\t\t\t\t\t&& (\n\t\t\t\t\t\t// the next note is on the beat or after OR there is no next note\n\t\t\t\t\t\ti == track.length - 1 \n\t\t\t\t\t\t|| track[i+1].start >= track[i].start + halfbeatLength\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tvar oldEventStart = event.start;\n\n\t\t\t\t\tevent.start += swingDuration;\n\n\t\t\t\t\t// Increase volume of swung notes\n\t\t\t\t\tevent.volume *= 1 + volumeIncrease;\n\n\t\t\t\t\t// if there is a previous note ending at the start of this note, extend its end\n\t\t\t\t\t// and decrease its volume\n\t\t\t\t\tif (i > 0 && track[i-1].end == oldEventStart) {\n\t\t\t\t\t\ttrack[i-1].end = event.start;\n\t\t\t\t\t\ttrack[i-1].volume *= 1 - volumeIncrease;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n}\n\nmodule.exports = CreateSynth;\n","var downloadBuffer = function(buffer) {\n\treturn window.URL.createObjectURL(bufferToWave(buffer.audioBuffers));\n};\n\n// Convert an AudioBuffer to a Blob using WAVE representation\nfunction bufferToWave(audioBuffers) {\n\tvar audioBuffer = audioBuffers[0];\n\tvar numOfChan = audioBuffer.numberOfChannels;\n\tvar length = audioBuffer.length * numOfChan * 2 + 44;\n\tvar buffer = new ArrayBuffer(length);\n\tvar view = new DataView(buffer);\n\tvar channels = [];\n\tvar i;\n\tvar sample;\n\tvar offset = 0;\n\tvar pos = 0;\n\n\t// write WAVE header\n\tsetUint32(0x46464952); // \"RIFF\"\n\tsetUint32(length - 8); // file length - 8\n\tsetUint32(0x45564157); // \"WAVE\"\n\n\tsetUint32(0x20746d66); // \"fmt \" chunk\n\tsetUint32(16); // length = 16\n\tsetUint16(1); // PCM (uncompressed)\n\tsetUint16(numOfChan);\n\tsetUint32(audioBuffer.sampleRate);\n\tsetUint32(audioBuffer.sampleRate * 2 * numOfChan); // avg. bytes/sec\n\tsetUint16(numOfChan * 2); // block-align\n\tsetUint16(16); // 16-bit (hardcoded in this demo)\n\n\tsetUint32(0x61746164); // \"data\" - chunk\n\tsetUint32(length - pos - 4); // chunk length\n\n\t// write interleaved data\n\tfor(i = 0; i < numOfChan; i++)\n\t\tchannels.push(audioBuffer.getChannelData(i));\n\n\twhile(pos < length) {\n\t\tfor(i = 0; i < channels.length; i++) { // interleave channels\n\t\t\tsample = Math.max(-1, Math.min(1, channels[i][offset])); // clamp\n\t\t\tsample = (0.5 + sample < 0 ? sample * 32768 : sample * 32767)|0; // scale to 16-bit signed int\n\t\t\tview.setInt16(pos, sample, true); // write 16-bit sample\n\t\t\tpos += 2;\n\t\t}\n\t\toffset++; // next source sample\n\t}\n\n\t// create Blob\n\treturn new Blob([buffer], {type: \"audio/wav\"});\n\n\tfunction setUint16(data) {\n\t\tview.setUint16(pos, data, true);\n\t\tpos += 2;\n\t}\n\n\tfunction setUint32(data) {\n\t\tview.setUint32(pos, data, true);\n\t\tpos += 4;\n\t}\n}\n\nmodule.exports = downloadBuffer;\n","var tunebook = require('../api/abc_tunebook');\nvar midiCreate = require('../midi/abc_midi_create');\n\nvar getMidiFile = function(source, options) {\n\tvar params = {};\n\tif (options) {\n\t\tfor (var key in options) {\n\t\t\tif (options.hasOwnProperty(key)) {\n\t\t\t\tparams[key] = options[key];\n\t\t\t}\n\t\t}\n\t}\n\tparams.generateInline = false;\n\n\tfunction callback(div, tune, index) {\n\t\tvar downloadMidi = midiCreate(tune, params);\n\t\tswitch (params.midiOutputType) {\n\t\t\tcase \"encoded\":\n\t\t\t\treturn downloadMidi;\n\t\t\tcase \"binary\":\n\t\t\t\tvar decoded = downloadMidi.replace(\"data:audio/midi,\", \"\");\n\t\t\t\tdecoded = decoded.replace(/MThd/g,\"%4d%54%68%64\");\n\t\t\t\tdecoded = decoded.replace(/MTrk/g,\"%4d%54%72%6b\");\n\t\t\t\tvar buffer = new ArrayBuffer(decoded.length/3);\n\t\t\t\tvar output = new Uint8Array(buffer);\n\t\t\t\tfor (var i = 0; i < decoded.length/3; i++) {\n\t\t\t\t\tvar p = i*3+1;\n\t\t\t\t\tvar d = parseInt(decoded.substring(p, p+2), 16);\n\t\t\t\t\toutput[i] = d;\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\tcase \"link\":\n\t\t\tdefault:\n\t\t\t\treturn generateMidiDownloadLink(tune, params, downloadMidi, index);\n\t\t}\n\t}\n\n\tif (typeof source === \"string\")\n\t\treturn tunebook.renderEngine(callback, \"*\", source, params);\n\telse\n\t\treturn callback(null, source, 0);\n};\n\nfunction isFunction(functionToCheck) {\n\tvar getType = {};\n\treturn functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\nvar generateMidiDownloadLink = function(tune, midiParams, midi, index) {\n\tvar divClasses = ['abcjs-download-midi', 'abcjs-midi-' + index]\n\tif (midiParams.downloadClass)\n\t\tdivClasses.push(midiParams.downloadClass)\n\tvar html = '
';\n\tif (midiParams.preTextDownload)\n\t\thtml += midiParams.preTextDownload;\n\tvar title = tune.metaText && tune.metaText.title ? tune.metaText.title : 'Untitled';\n\tvar label;\n\tif (midiParams.downloadLabel && isFunction(midiParams.downloadLabel))\n\t\tlabel = midiParams.downloadLabel(tune, index);\n\telse if (midiParams.downloadLabel)\n\t\tlabel = midiParams.downloadLabel.replace(/%T/, title);\n\telse\n\t\tlabel = \"Download MIDI for \\\"\" + title + \"\\\"\";\n\ttitle = title.toLowerCase().replace(/'/g, '').replace(/\\W/g, '_').replace(/__/g, '_');\n\tvar filename = (midiParams.fileName) ? midiParams.fileName : title + '.midi';\n\thtml += '' + label + '';\n\tif (midiParams.postTextDownload)\n\t\thtml += midiParams.postTextDownload;\n\treturn html + \"
\";\n};\n\n\nmodule.exports = getMidiFile;\n","var svg = `\n\n \n\n`\n\nmodule.exports = svg\n","var svg = `\n\n\t\n\t\n\t\n\t\n\n`\n\nmodule.exports = svg\n","var svg = `\n\n \n \n \n \n\n`\n\nmodule.exports = svg\n","var svg = `\n\n \n \n \n\n`\n\nmodule.exports = svg\n","var svg = `\n\n \n \n \n \n\n`\n\nmodule.exports = svg\n","var instrumentIndexToName = [\n\t\"acoustic_grand_piano\",\n\t\"bright_acoustic_piano\",\n\t\"electric_grand_piano\",\n\t\"honkytonk_piano\",\n\t\"electric_piano_1\",\n\t\"electric_piano_2\",\n\t\"harpsichord\",\n\t\"clavinet\",\n\n\t\"celesta\",\n\t\"glockenspiel\",\n\t\"music_box\",\n\t\"vibraphone\",\n\t\"marimba\",\n\t\"xylophone\",\n\t\"tubular_bells\",\n\t\"dulcimer\",\n\n\t\"drawbar_organ\",\n\t\"percussive_organ\",\n\t\"rock_organ\",\n\t\"church_organ\",\n\t\"reed_organ\",\n\t\"accordion\",\n\t\"harmonica\",\n\t\"tango_accordion\",\n\n\t\"acoustic_guitar_nylon\",\n\t\"acoustic_guitar_steel\",\n\t\"electric_guitar_jazz\",\n\t\"electric_guitar_clean\",\n\t\"electric_guitar_muted\",\n\t\"overdriven_guitar\",\n\t\"distortion_guitar\",\n\t\"guitar_harmonics\",\n\n\t\"acoustic_bass\",\n\t\"electric_bass_finger\",\n\t\"electric_bass_pick\",\n\t\"fretless_bass\",\n\t\"slap_bass_1\",\n\t\"slap_bass_2\",\n\t\"synth_bass_1\",\n\t\"synth_bass_2\",\n\n\t\"violin\",\n\t\"viola\",\n\t\"cello\",\n\t\"contrabass\",\n\t\"tremolo_strings\",\n\t\"pizzicato_strings\",\n\t\"orchestral_harp\",\n\t\"timpani\",\n\n\t\"string_ensemble_1\",\n\t\"string_ensemble_2\",\n\t\"synth_strings_1\",\n\t\"synth_strings_2\",\n\t\"choir_aahs\",\n\t\"voice_oohs\",\n\t\"synth_choir\",\n\t\"orchestra_hit\",\n\n\t\"trumpet\",\n\t\"trombone\",\n\t\"tuba\",\n\t\"muted_trumpet\",\n\t\"french_horn\",\n\t\"brass_section\",\n\t\"synth_brass_1\",\n\t\"synth_brass_2\",\n\n\t\"soprano_sax\",\n\t\"alto_sax\",\n\t\"tenor_sax\",\n\t\"baritone_sax\",\n\t\"oboe\",\n\t\"english_horn\",\n\t\"bassoon\",\n\t\"clarinet\",\n\n\t\"piccolo\",\n\t\"flute\",\n\t\"recorder\",\n\t\"pan_flute\",\n\t\"blown_bottle\",\n\t\"shakuhachi\",\n\t\"whistle\",\n\t\"ocarina\",\n\n\t\"lead_1_square\",\n\t\"lead_2_sawtooth\",\n\t\"lead_3_calliope\",\n\t\"lead_4_chiff\",\n\t\"lead_5_charang\",\n\t\"lead_6_voice\",\n\t\"lead_7_fifths\",\n\t\"lead_8_bass_lead\",\n\n\t\"pad_1_new_age\",\n\t\"pad_2_warm\",\n\t\"pad_3_polysynth\",\n\t\"pad_4_choir\",\n\t\"pad_5_bowed\",\n\t\"pad_6_metallic\",\n\t\"pad_7_halo\",\n\t\"pad_8_sweep\",\n\n\t\"fx_1_rain\",\n\t\"fx_2_soundtrack\",\n\t\"fx_3_crystal\",\n\t\"fx_4_atmosphere\",\n\t\"fx_5_brightness\",\n\t\"fx_6_goblins\",\n\t\"fx_7_echoes\",\n\t\"fx_8_scifi\",\n\n\t\"sitar\",\n\t\"banjo\",\n\t\"shamisen\",\n\t\"koto\",\n\t\"kalimba\",\n\t\"bagpipe\",\n\t\"fiddle\",\n\t\"shanai\",\n\n\t\"tinkle_bell\",\n\t\"agogo\",\n\t\"steel_drums\",\n\t\"woodblock\",\n\t\"taiko_drum\",\n\t\"melodic_tom\",\n\t\"synth_drum\",\n\t\"reverse_cymbal\",\n\n\t\"guitar_fret_noise\",\n\t\"breath_noise\",\n\t\"seashore\",\n\t\"bird_tweet\",\n\t\"telephone_ring\",\n\t\"helicopter\",\n\t\"applause\",\n\t\"gunshot\",\n\n\t\"percussion\"\n];\n\nmodule.exports = instrumentIndexToName;\n","// Load one mp3 file for one note.\n// url = the base url for the soundfont\n// instrument = the instrument name (e.g. \"acoustic_grand_piano\")\n// name = the pitch name (e.g. \"A3\")\nvar soundsCache = require(\"./sounds-cache\");\n\nvar getNote = function (url, instrument, name, audioContext) {\n\tif (!soundsCache[instrument]) soundsCache[instrument] = {};\n\tvar instrumentCache = soundsCache[instrument];\n\n\tif (!instrumentCache[name])\n\t\tinstrumentCache[name] = new Promise(function (resolve, reject) {\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\tlet noteUrl = url + instrument + \"-mp3/\" + name + \".mp3\";\n\t\t\txhr.open(\"GET\", noteUrl, true);\n\t\t\txhr.responseType = \"arraybuffer\";\n\t\t\txhr.onload = function () {\n\t\t\t\tif (xhr.status !== 200) {\n\t\t\t\t\treject(Error(\"Can't load sound at \" + noteUrl + ' status=' + xhr.status));\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tvar noteDecoded = function(audioBuffer) {\n\t\t\t\t\tresolve({instrument: instrument, name: name, status: \"loaded\", audioBuffer: audioBuffer})\n\t\t\t\t}\n\t\t\t\tvar maybePromise = audioContext.decodeAudioData(xhr.response, noteDecoded, function () {\n\t\t\t\t\treject(Error(\"Can't decode sound at \" + noteUrl));\n\t\t\t\t});\n\t\t\t\t// In older browsers `BaseAudioContext.decodeAudio()` did not return a promise\n\t\t\t\tif (maybePromise && typeof maybePromise.catch === \"function\") maybePromise.catch(reject);\n\t\t\t};\n\t\t\txhr.onerror = function () {\n\t\t\t\treject(Error(\"Can't load sound at \" + noteUrl));\n\t\t\t};\n\t\t\txhr.send();\n\t\t})\n\t\t\t.catch(err => {\n\t\t\t\tconsole.error(\"Didn't load note\", instrument, name, \":\", err.message);\n\t\t\t\tthrow err;\n\t\t\t});\n\n\treturn instrumentCache[name];\n};\n\nmodule.exports = getNote;\n","var accidentals = {\n\t\"__\": -2,\n\t\"_\": -1,\n\t\"_/\": -0.5,\n\t\"=\": 0,\n\t\"\": 0,\n\t\"^/\": 0.5,\n\t\"^\": 1,\n\t\"^^\": 2\n}\n\nvar notesInOrder = ['C', '-', 'D', '-', 'E', 'F', '-', 'G', '-', 'A', '-', 'B', 'c', '-', 'd', '-', 'e', 'f', '-', 'g', '-', 'a', '-', 'b']\n\nfunction noteToMidi(note) {\n\tvar reg = note.match(/([_^\\/]*)([ABCDEFGabcdefg])(,*)('*)/)\n\tif (reg && reg.length === 5) {\n\t\tvar acc = accidentals[reg[1]]\n\t\tvar pitch = notesInOrder.indexOf(reg[2])\n\t\tvar octave = reg[4].length - reg[3].length\n\t\treturn 48 + pitch + acc + octave * 12;\n\t}\n\treturn 0;\n}\n\nfunction midiToNote(midi) {\n\tmidi = parseInt(midi, 10) // TODO-PER: not sure how to handle quarter sharps and flats, so strip them for now.\n\tvar octave = Math.floor(midi / 12)\n\tvar pitch = midi % 12\n\tvar name = notesInOrder[pitch]\n\tif (name === '-') {\n\t\tname = '^' + notesInOrder[pitch-1]\n\t}\n\t\n\tif (octave > 4) {\n\t\tname = name.toLowerCase()\n\t\toctave -= 5\n\t\twhile (octave > 0) {\n\t\t\tname += \"'\"\n\t\t\toctave--\n\t\t}\n\t} else {\n\t\twhile (octave < 4) {\n\t\t\tname += ','\n\t\t\toctave++\n\t\t}\n\t}\t\n\treturn name\n}\n\nmodule.exports = {noteToMidi: noteToMidi, midiToNote: midiToNote};\n","var pitchToNoteName = {\n\t21: 'A0',\n\t22: 'Bb0',\n\t23: 'B0',\n\t24: 'C1',\n\t25: 'Db1',\n\t26: 'D1',\n\t27: 'Eb1',\n\t28: 'E1',\n\t29: 'F1',\n\t30: 'Gb1',\n\t31: 'G1',\n\t32: 'Ab1',\n\t33: 'A1',\n\t34: 'Bb1',\n\t35: 'B1',\n\t36: 'C2',\n\t37: 'Db2',\n\t38: 'D2',\n\t39: 'Eb2',\n\t40: 'E2',\n\t41: 'F2',\n\t42: 'Gb2',\n\t43: 'G2',\n\t44: 'Ab2',\n\t45: 'A2',\n\t46: 'Bb2',\n\t47: 'B2',\n\t48: 'C3',\n\t49: 'Db3',\n\t50: 'D3',\n\t51: 'Eb3',\n\t52: 'E3',\n\t53: 'F3',\n\t54: 'Gb3',\n\t55: 'G3',\n\t56: 'Ab3',\n\t57: 'A3',\n\t58: 'Bb3',\n\t59: 'B3',\n\t60: 'C4',\n\t61: 'Db4',\n\t62: 'D4',\n\t63: 'Eb4',\n\t64: 'E4',\n\t65: 'F4',\n\t66: 'Gb4',\n\t67: 'G4',\n\t68: 'Ab4',\n\t69: 'A4',\n\t70: 'Bb4',\n\t71: 'B4',\n\t72: 'C5',\n\t73: 'Db5',\n\t74: 'D5',\n\t75: 'Eb5',\n\t76: 'E5',\n\t77: 'F5',\n\t78: 'Gb5',\n\t79: 'G5',\n\t80: 'Ab5',\n\t81: 'A5',\n\t82: 'Bb5',\n\t83: 'B5',\n\t84: 'C6',\n\t85: 'Db6',\n\t86: 'D6',\n\t87: 'Eb6',\n\t88: 'E6',\n\t89: 'F6',\n\t90: 'Gb6',\n\t91: 'G6',\n\t92: 'Ab6',\n\t93: 'A6',\n\t94: 'Bb6',\n\t95: 'B6',\n\t96: 'C7',\n\t97: 'Db7',\n\t98: 'D7',\n\t99: 'Eb7',\n\t100: 'E7',\n\t101: 'F7',\n\t102: 'Gb7',\n\t103: 'G7',\n\t104: 'Ab7',\n\t105: 'A7',\n\t106: 'Bb7',\n\t107: 'B7',\n\t108: 'C8',\n\t109: 'Db8',\n\t110: 'D8',\n\t111: 'Eb8',\n\t112: 'E8',\n\t113: 'F8',\n\t114: 'Gb8',\n\t115: 'G8',\n\t116: 'Ab8',\n\t117: 'A8',\n\t118: 'Bb8',\n\t119: 'B8',\n\t120: 'C9',\n\t121: 'Db9'\n};\n\nmodule.exports = pitchToNoteName;\n","var pitchMap = {\n\tf0: \"_C\",\n\tn0: \"=C\",\n\ts0: \"^C\",\n\tx0: \"C\",\n\tf1: \"_D\",\n\tn1: \"=D\",\n\ts1: \"^D\",\n\tx1: \"D\",\n\tf2: \"_E\",\n\tn2: \"=E\",\n\ts2: \"^E\",\n\tx2: \"E\",\n\tf3: \"_F\",\n\tn3: \"=F\",\n\ts3: \"^F\",\n\tx3: \"F\",\n\tf4: \"_G\",\n\tn4: \"=G\",\n\ts4: \"^G\",\n\tx4: \"G\",\n\tf5: \"_A\",\n\tn5: \"=A\",\n\ts5: \"^A\",\n\tx5: \"A\",\n\tf6: \"_B\",\n\tn6: \"=B\",\n\ts6: \"^B\",\n\tx6: \"B\",\n\tf7: \"_c\",\n\tn7: \"=c\",\n\ts7: \"^c\",\n\tx7: \"c\",\n\tf8: \"_d\",\n\tn8: \"=d\",\n\ts8: \"^d\",\n\tx8: \"d\",\n\tf9: \"_e\",\n\tn9: \"=e\",\n\ts9: \"^e\",\n\tx9: \"e\",\n\tf10: \"_f\",\n\tn10: \"=f\",\n\ts10: \"^f\",\n\tx10: \"f\",\n\tf11: \"_g\",\n\tn11: \"=g\",\n\ts11: \"^g\",\n\tx11: \"g\",\n\tf12: \"_a\",\n\tn12: \"=a\",\n\ts12: \"^a\",\n\tx12: \"a\",\n\tf13: \"_b\",\n\tn13: \"=b\",\n\ts13: \"^b\",\n\tx13: \"b\",\n\tf14: \"_c'\",\n\tn14: \"=c'\",\n\ts14: \"^c'\",\n\tx14: \"c'\",\n\tf15: \"_d'\",\n\tn15: \"=d'\",\n\ts15: \"^d'\",\n\tx15: \"d'\",\n\tf16: \"_e'\",\n\tn16: \"=e'\",\n\ts16: \"^e'\",\n\tx16: \"e'\",\n}\n\nfunction pitchesToPerc(pitchObj) {\n\tvar pitch = (pitchObj.accidental ? pitchObj.accidental[0] : 'x') + pitchObj.verticalPos;\n\treturn pitchMap[pitch];\n}\nmodule.exports = pitchesToPerc;\n","var soundsCache = require('./sounds-cache');\nvar pitchToNoteName = require('./pitch-to-note-name');\nvar centsToFactor = require(\"./cents-to-factor\");\n\nfunction placeNote(outputAudioBuffer, sampleRate, sound, startArray, volumeMultiplier, ofsMs, fadeTimeSec, noteEndSec, debugCallback) {\n\t// sound contains { instrument, pitch, volume, len, pan, tempoMultiplier\n\t// len is in whole notes. Multiply by tempoMultiplier to get seconds.\n\t// ofsMs is an offset to subtract from the note to line up programs that have different length onsets.\n\tvar OfflineAC = window.OfflineAudioContext ||\n\t\twindow.webkitOfflineAudioContext;\n\n\tvar len = sound.len * sound.tempoMultiplier;\n\tif (ofsMs)\n\t\tlen +=ofsMs/1000;\n\tlen -= noteEndSec;\n\tif (len < 0)\n\t\tlen = 0.005; // Have some small audible length no matter how short the note is.\n\tvar offlineCtx = new OfflineAC(2,Math.floor((len+fadeTimeSec)*sampleRate),sampleRate);\n\tvar noteName = pitchToNoteName[sound.pitch];\n\tif (!soundsCache[sound.instrument]) {\n\t\t// It shouldn't happen that the entire instrument cache wasn't created, but this has been seen in practice, so guard against it.\n\t\tif (debugCallback)\n\t\t\tdebugCallback('placeNote skipped (instrument empty): '+sound.instrument+':'+noteName)\n\t\treturn Promise.resolve();\n\t}\n\tvar noteBufferPromise = soundsCache[sound.instrument][noteName];\n\n\tif (!noteBufferPromise) {\n\t\t// if the note isn't present then just skip it - it will leave a blank spot in the audio.\n\t\tif (debugCallback)\n\t\t\tdebugCallback('placeNote skipped: '+sound.instrument+':'+noteName)\n\t\treturn Promise.resolve();\n\t}\n\n\treturn noteBufferPromise\n\t\t.then(function (response) {\n\t\t\t// create audio buffer\n\t\t\tvar source = offlineCtx.createBufferSource();\n\t\t\tsource.buffer = response.audioBuffer;\n\n\t\t\t// add gain\n\t\t\t// volume can be between 1 to 127. This translation to gain is just trial and error.\n\t\t\t// The smaller the first number, the more dynamic range between the quietest to loudest.\n\t\t\t// The larger the second number, the louder it will be in general.\n\t\t\tvar volume = (sound.volume / 96) * volumeMultiplier;\n\t\t\tsource.gainNode = offlineCtx.createGain();\n\n\t\t\t// add pan if supported and present\n\t\t\tif (sound.pan && offlineCtx.createStereoPanner) {\n\t\t\t\tsource.panNode = offlineCtx.createStereoPanner();\n\t\t\t\tsource.panNode.pan.setValueAtTime(sound.pan, 0);\n\t\t\t}\n\t\t\tsource.gainNode.gain.value = volume; // Math.min(2, Math.max(0, volume));\n\t\t\tsource.gainNode.gain.linearRampToValueAtTime(source.gainNode.gain.value, len);\n\t\t\tsource.gainNode.gain.linearRampToValueAtTime(0.0, len + fadeTimeSec);\n\n\t\t\tif (sound.cents) {\n\t\t\t\tsource.playbackRate.value = centsToFactor(sound.cents);\n\t\t\t}\n\n\t\t\t// connect all the nodes\n\t\t\tif (source.panNode) {\n\t\t\t\tsource.panNode.connect(offlineCtx.destination);\n\t\t\t\tsource.gainNode.connect(source.panNode);\n\t\t\t} else {\n\t\t\t\tsource.gainNode.connect(offlineCtx.destination);\n\t\t\t}\n\t\t\tsource.connect(source.gainNode);\n\n\t\t\t// Do the process of creating the sound and placing it in the buffer\n\t\t\tsource.start(0);\n\n\t\t\tif (source.noteOff) {\n\t\t\t\tsource.noteOff(len + fadeTimeSec);\n\t\t\t} else {\n\t\t\t\tsource.stop(len + fadeTimeSec);\n\t\t\t}\n\t\t\tvar fnResolve;\n\t\t\tofflineCtx.oncomplete = function(e) {\n\t\t\t\tif (e.renderedBuffer && e.renderedBuffer.getChannelData) { // If the system gets overloaded or there are network problems then this can start failing. Just drop the note if so.\n\t\t\t\t\tfor (var i = 0; i < startArray.length; i++) {\n\t\t\t\t\t\t//Math.floor(startArray[i] * sound.tempoMultiplier * sampleRate)\n\t\t\t\t\t\tvar start = startArray[i] * sound.tempoMultiplier;\n\t\t\t\t\t\tif (ofsMs)\n\t\t\t\t\t\t\tstart -=ofsMs/1000;\n\t\t\t\t\t\tif (start < 0)\n\t\t\t\t\t\t\tstart = 0; // If the item that is moved back is at the very beginning of the buffer then don't move it back. To do that would be to push everything else forward. TODO-PER: this should probably be done at some point but then it would change timing in existing apps.\n\t\t\t\t\t\tstart = Math.floor(start*sampleRate);\n\t\t\t\t\t\tcopyToChannel(outputAudioBuffer, e.renderedBuffer, start);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (debugCallback)\n\t\t\t\t\tdebugCallback('placeNote: '+sound.instrument+':'+noteName)\n\t\t\t\tfnResolve();\n\t\t\t};\n\t\t\tofflineCtx.startRendering();\n\t\t\treturn new Promise(function(resolve) {\n\t\t\t\tfnResolve = resolve;\n\t\t\t});\n\t\t})\n\t\t.catch(function (error) {\n\t\t\tif (debugCallback)\n\t\t\t\tdebugCallback('placeNote catch: '+error.message)\n\t\t\treturn Promise.resolve()\n\t\t});\n}\n\nvar copyToChannel = function(toBuffer, fromBuffer, start) {\n\tfor (var ch = 0; ch < 2; ch++) {\n\t\tvar fromData = fromBuffer.getChannelData(ch);\n\t\tvar toData = toBuffer.getChannelData(ch);\n\n\t\t// Mix the current note into the existing track\n\t\tfor (var n = 0; n < fromData.length; n++) {\n\t\t\ttoData[n + start] += fromData[n];\n\t\t}\n\t}\n};\n\nmodule.exports = placeNote;\n","var SynthSequence = require('./synth-sequence');\nvar CreateSynth = require('./create-synth');\nvar activeAudioContext = require(\"./active-audio-context\");\n\nfunction playEvent(midiPitches, midiGracePitches, millisecondsPerMeasure, soundFontUrl, debugCallback) {\n\tvar sequence = new SynthSequence();\n\n\tfor (var i = 0; i < midiPitches.length; i++) {\n\t\tvar note = midiPitches[i];\n\t\tvar trackNum = sequence.addTrack();\n\t\tsequence.setInstrument(trackNum, note.instrument);\n\t\tif (i === 0 && midiGracePitches) {\n\t\t\tfor (var j = 0; j < midiGracePitches.length; j++) {\n\t\t\t\tvar grace = midiGracePitches[j];\n\t\t\t\tsequence.appendNote(trackNum, grace.pitch, 1 / 64, grace.volume, grace.cents);\n\t\t\t}\n\t\t}\n\t\tsequence.appendNote(trackNum, note.pitch, note.duration, note.volume, note.cents);\n\t}\n\n\tvar ac = activeAudioContext();\n\tif (ac.state === \"suspended\") {\n\t\treturn ac.resume().then(function () {\n\t\t\treturn doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback);\n\t\t});\n\t} else {\n\t\treturn doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback);\n\t}\n}\n\nfunction doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback) {\n\tvar buffer = new CreateSynth();\n\treturn buffer.init({\n\t\tsequence: sequence,\n\t\tmillisecondsPerMeasure: millisecondsPerMeasure,\n\t\toptions: { soundFontUrl: soundFontUrl },\n\t\tdebugCallback: debugCallback,\n\t}).then(function () {\n\t\treturn buffer.prime();\n\t}).then(function () {\n\t\tbuffer.start();\n\t\treturn Promise.resolve();\n\t});\n}\n\nmodule.exports = playEvent;\n","// Call this when it is safe for the abcjs to produce sound. This is after the first user gesture on the page.\n// If you call it with no parameters, then an AudioContext is created and stored.\n// If you call it with a parameter, that is used as an already created AudioContext.\n\nfunction registerAudioContext(ac) {\n\t// If one is passed in, that is the one to use even if there was already one created.\n\tif (ac)\n\t\twindow.abcjsAudioContext = ac;\n\telse {\n\t\t// no audio context passed in, so create it unless there is already one from before.\n\t\tif (!window.abcjsAudioContext) {\n\t\t\tvar AudioContext = window.AudioContext || window.webkitAudioContext;\n\t\t\tif (AudioContext)\n\t\t\t\twindow.abcjsAudioContext = new AudioContext();\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn window.abcjsAudioContext.state !== \"suspended\";\n}\n\nmodule.exports = registerAudioContext;\n","var soundsCache = {\n};\n\nmodule.exports = soundsCache;\n","var activeAudioContext = require('./active-audio-context');\n\n//\n// Support for audio depends on three things: support for Promise, support for AudioContext, and support for AudioContext.resume.\n// Unfortunately, AudioContext.resume cannot be detected unless an AudioContext is created, and creating an AudioContext can't\n// be done until a user click, so there is no way to know for sure if audio is supported until the user tries.\n// We can get close, though - we can test for Promises and AudioContext - there are just a few evergreen browsers that supported\n// that before supporting resume, so we'll test what we can.\n\n// The best use of this routine is to call it before doing any audio related stuff to decide whether to bother.\n// But then, call it again after a user interaction to test for resume.\n\nfunction supportsAudio() {\n\tif (!window.Promise)\n\t\treturn false;\n\n\tif (!window.AudioContext &&\n\t\t!window.webkitAudioContext &&\n\t\t!navigator.mozAudioContext &&\n\t\t!navigator.msAudioContext)\n\t\treturn false;\n\n\tvar aac = activeAudioContext();\n\tif (aac)\n\t\treturn aac.resume !== undefined;\n}\n\nmodule.exports = supportsAudio;\n","var CreateSynthControl = require('./create-synth-control');\nvar CreateSynth = require('./create-synth');\nvar TimingCallbacks = require('../api/abc_timing_callbacks');\nvar activeAudioContext = require('./active-audio-context');\n\nfunction SynthController() {\n\tvar self = this;\n\tself.warp = 100;\n\tself.cursorControl = null;\n\tself.visualObj = null;\n\tself.timer = null;\n\tself.midiBuffer = null;\n\tself.options = null;\n\tself.currentTempo = null;\n\tself.control = null;\n\tself.isLooping = false;\n\tself.isStarted = false;\n\tself.isLoaded = false;\n\tself.isLoading = false;\n\n\tself.load = function (selector, cursorControl, visualOptions) {\n\t\tif (!visualOptions)\n\t\t\tvisualOptions = {};\n\t\tif (visualOptions.displayPlay === undefined)\n\t\t\tvisualOptions.displayPlay = true\n\t\tif (visualOptions.displayProgress === undefined)\n\t\t\tvisualOptions.displayProgress = true\n\t\tself.control = new CreateSynthControl(selector, {\n\t\t\tloopHandler: visualOptions.displayLoop ? self.toggleLoop : undefined,\n\t\t\trestartHandler: visualOptions.displayRestart ? self.restart : undefined,\n\t\t\tplayPromiseHandler: visualOptions.displayPlay ? self.play : undefined,\n\t\t\tprogressHandler: visualOptions.displayProgress ? self.randomAccess : undefined,\n\t\t\twarpHandler: visualOptions.displayWarp ? self.onWarp : undefined,\n\t\t\tafterResume: self.init\n\t\t});\n\t\tself.cursorControl = cursorControl;\n\t\tself.disable(true);\n\t};\n\n\tself.disable = function(isDisabled) {\n\t\tif (self.control)\n\t\t\tself.control.disable(isDisabled);\n\t};\n\n\tself.setTune = function(visualObj, userAction, audioParams) {\n\t\tself.visualObj = visualObj;\n\t\tself.disable(false);\n\t\tself.options = audioParams ? audioParams : {};\n\n\t\tif (self.control) {\n\t\t\tself.pause();\n\t\t\tself.setProgress(0, 1);\n\t\t\tself.control.resetAll();\n\t\t\tself.restart();\n\t\t\tself.isStarted = false;\n\t\t}\n\t\tself.isLooping = false;\n\n\t\tif (userAction)\n\t\t\treturn self.go();\n\t\telse {\n\t\t\treturn Promise.resolve({status: \"no-audio-context\"});\n\t\t}\n\t};\n\n\tself.go = function () {\n\t\tself.isLoading = true;\n\t\tvar millisecondsPerMeasure = self.visualObj.millisecondsPerMeasure() * 100 / self.warp;\n\t\tself.currentTempo = Math.round(self.visualObj.getBeatsPerMeasure() / millisecondsPerMeasure * 60000);\n\t\tif (self.control)\n\t\t\tself.control.setTempo(self.currentTempo);\n\t\tself.percent = 0;\n\t\tvar loadingResponse;\n\n\t\tif (!self.midiBuffer)\n\t\t\tself.midiBuffer = new CreateSynth();\n\t\treturn activeAudioContext().resume().then(function (response) {\n\t\t\treturn self.midiBuffer.init({\n\t\t\t\tvisualObj: self.visualObj,\n\t\t\t\toptions: self.options,\n\t\t\t\tmillisecondsPerMeasure: millisecondsPerMeasure\n\t\t\t});\n\t\t}).then(function (response) {\n\t\t\tloadingResponse = response;\n\t\t\treturn self.midiBuffer.prime();\n\t\t}).then(function () {\n\t\t\tvar subdivisions = 16;\n\t\t\tif (self.cursorControl &&\n\t\t\t\tself.cursorControl.beatSubdivisions !== undefined &&\n\t\t\t\tparseInt(self.cursorControl.beatSubdivisions, 10) >= 1 &&\n\t\t\t\tparseInt(self.cursorControl.beatSubdivisions, 10) <= 64)\n\t\t\t\tsubdivisions = parseInt(self.cursorControl.beatSubdivisions, 10);\n\n\t\t\t// Need to create the TimingCallbacks after priming the midi so that the midi data is available for the callbacks.\n\t\t\tself.timer = new TimingCallbacks(self.visualObj, {\n\t\t\t\tbeatCallback: self.beatCallback,\n\t\t\t\teventCallback: self.eventCallback,\n\t\t\t\tlineEndCallback: self.lineEndCallback,\n\t\t\t\tqpm: self.currentTempo,\n\n\t\t\t\textraMeasuresAtBeginning: self.cursorControl ? self.cursorControl.extraMeasuresAtBeginning : undefined,\n\t\t\t\tlineEndAnticipation: self.cursorControl ? self.cursorControl.lineEndAnticipation : 0,\n\t\t\t\tbeatSubdivisions: subdivisions,\n\t\t\t});\n\t\t\tif (self.cursorControl && self.cursorControl.onReady && typeof self.cursorControl.onReady === 'function')\n\t\t\t\tself.cursorControl.onReady(self);\n\t\t\tself.isLoaded = true;\n\t\t\tself.isLoading = false;\n\t\t\treturn Promise.resolve({ status: \"created\", notesStatus: loadingResponse });\n\t\t});\n\t};\n\n\tself.destroy = function () {\n\t\tif (self.timer) {\n\t\t\tself.timer.reset();\n\t\t\tself.timer.stop();\n\t\t\tself.timer = null;\n\t\t}\n\t\tif (self.midiBuffer) {\n\t\t\tself.midiBuffer.stop();\n\t\t\tself.midiBuffer = null;\n\t\t}\n\t\tself.setProgress(0, 1);\n\t\tif (self.control)\n\t\t\tself.control.resetAll();\n\t};\n\n\tself.play = function () {\n\t\treturn self.runWhenReady(self._play, undefined);\n\t};\n\n\tfunction sleep(ms) {\n\t\treturn new Promise(function (resolve) {\n\t\t\tsetTimeout(resolve, ms)\n\t\t});\n\t}\n\n\tself.runWhenReady = function(fn, arg1) {\n\t\tif (!self.visualObj)\n\t\t\treturn Promise.resolve({status: \"loading\"});\n\t\tif (self.isLoading) {\n\t\t\t// Some other promise is waiting for the tune to be loaded, so just wait.\n\t\t\treturn sleep(500).then(function() {\n\t\t\t\tif (self.isLoading)\n\t\t\t\t\treturn self.runWhenReady(fn, arg1);\n\t\t\t\treturn fn(arg1);\n\t\t\t})\n\t\t} else if (!self.isLoaded) {\n\t\t\treturn self.go().then(function () {\n\t\t\t\treturn fn(arg1);\n\t\t\t});\n\t\t} else {\n\t\t\treturn fn(arg1);\n\t\t}\n\t};\n\n\tself._play = function () {\n\t\treturn activeAudioContext().resume().then(function () {\n\t\t\tself.isStarted = !self.isStarted;\n\t\t\tif (self.isStarted) {\n\t\t\t\tif (self.cursorControl && self.cursorControl.onStart && typeof self.cursorControl.onStart === 'function')\n\t\t\t\t\tself.cursorControl.onStart();\n\t\t\t\tself.midiBuffer.start();\n\t\t\t\tself.timer.start(self.percent);\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.pushPlay(true);\n\t\t\t} else {\n\t\t\t\tself.pause();\n\t\t\t}\n\t\t\treturn Promise.resolve({status: \"ok\"});\n\t\t})\n\t};\n\n\tself.pause = function() {\n\t\tif (self.timer) {\n\t\t\tself.timer.pause();\n\t\t\tself.midiBuffer.pause();\n\t\t\tif (self.control)\n\t\t\t\tself.control.pushPlay(false);\n\t\t}\n\t};\n\n\tself.toggleLoop = function () {\n\t\tself.isLooping = !self.isLooping;\n\t\tif (self.control)\n\t\t\tself.control.pushLoop(self.isLooping);\n\t};\n\n\tself.restart = function () {\n\t\tif (self.timer) {\n\t\t\tself.timer.setProgress(0);\n\t\t\tself.midiBuffer.seek(0);\n\t\t}\n\t};\n\n\tself.randomAccess = function (ev) {\n\t\treturn self.runWhenReady(self._randomAccess, ev);\n\t};\n\n\tself._randomAccess = function (ev) {\n\t\tvar background = (ev.target.classList.contains('abcjs-midi-progress-indicator')) ? ev.target.parentNode : ev.target;\n\t\tvar percent = (ev.x - background.getBoundingClientRect().left) / background.offsetWidth;\n\t\tif (percent < 0)\n\t\t\tpercent = 0;\n\t\tif (percent > 1)\n\t\t\tpercent = 1;\n\t\tself.seek(percent);\n\t\treturn Promise.resolve({status: \"ok\"});\n\t};\n\n\tself.seek = function (percent, units) {\n\t\tif (self.timer && self.midiBuffer) {\n\t\t\tself.timer.setProgress(percent, units);\n\t\t\tself.midiBuffer.seek(percent, units);\n\t\t}\n\t};\n\n\tself.setWarp = function (newWarp) {\n\t\tif (parseInt(newWarp, 10) > 0) {\n\t\t\tself.warp = parseInt(newWarp, 10);\n\t\t\tvar wasPlaying = self.isStarted;\n\t\t\tvar startPercent = self.percent;\n\t\t\tself.destroy();\n\t\t\tself.isStarted = false;\n\t\t\treturn self.go().then(function () {\n\t\t\t\tself.setProgress(startPercent, self.midiBuffer.duration * 1000);\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.setWarp(self.currentTempo, self.warp);\n\t\t\t\tif (wasPlaying) {\n\t\t\t\t\treturn self.play().then(function () {\n\t\t\t\t\t\tself.seek(startPercent);\n\t\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tself.seek(startPercent);\n\t\t\t\treturn Promise.resolve();\n\t\t\t});\n\t\t}\n\t\treturn Promise.resolve();\n\t};\n\n\tself.onWarp = function (ev) {\n\t\tvar newWarp = ev.target.value;\n\t\treturn self.setWarp(newWarp);\n\t};\n\n\tself.setProgress = function (percent, totalTime) {\n\t\tself.percent = percent;\n\t\tif (self.control)\n\t\t\tself.control.setProgress(percent, totalTime);\n\t};\n\n\tself.finished = function () {\n\t\tself.timer.reset();\n\t\tif (self.isLooping) {\n\t\t\tself.timer.start(0);\n\t\t\tself.midiBuffer.finished();\n\t\t\tself.midiBuffer.start();\n\t\t\treturn \"continue\";\n\t\t} else {\n\t\t\tself.timer.stop();\n\t\t\tif (self.isStarted) {\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.pushPlay(false);\n\t\t\t\tself.isStarted = false;\n\t\t\t\tself.midiBuffer.finished();\n\t\t\t\tif (self.cursorControl && self.cursorControl.onFinished && typeof self.cursorControl.onFinished === 'function')\n\t\t\t\t\tself.cursorControl.onFinished();\n\t\t\t\tself.setProgress(0, 1);\n\t\t\t}\n\t\t}\n\t};\n\n\tself.beatCallback = function (beatNumber, totalBeats, totalTime, position) {\n\t\tvar percent = beatNumber / totalBeats;\n\t\tself.setProgress(percent, totalTime);\n\t\tif (self.cursorControl && self.cursorControl.onBeat && typeof self.cursorControl.onBeat === 'function')\n\t\t\tself.cursorControl.onBeat(beatNumber, totalBeats, totalTime, position);\n\t};\n\n\tself.eventCallback = function (event) {\n\t\tif (event) {\n\t\t\tif (self.cursorControl && self.cursorControl.onEvent && typeof self.cursorControl.onEvent === 'function')\n\t\t\t\tself.cursorControl.onEvent(event);\n\t\t} else {\n\t\t\treturn self.finished();\n\t\t}\n\t};\n\n\tself.lineEndCallback = function (lineEvent, leftEvent) {\n\t\tif (self.cursorControl && self.cursorControl.onLineEnd && typeof self.cursorControl.onLineEnd === 'function')\n\t\t\tself.cursorControl.onLineEnd(lineEvent, leftEvent);\n\t};\n\n\tself.getUrl = function () {\n\t\treturn self.midiBuffer.download();\n\t};\n\n\tself.download = function(fileName) {\n\t\tvar url = self.getUrl();\n\t\tvar link = document.createElement('a');\n\t\tdocument.body.appendChild(link);\n\t\tlink.setAttribute(\"style\",\"display: none;\");\n\t\tlink.href = url;\n\t\tlink.download = fileName ? fileName : 'output.wav';\n\t\tlink.click();\n\t\twindow.URL.revokeObjectURL(url);\n\t\tdocument.body.removeChild(link);\n\t};\n}\n\nmodule.exports = SynthController;\n","var SynthSequence = function() {\n\tvar self = this;\n\tself.tracks = [];\n\tself.totalDuration = 0;\n\tself.currentInstrument = [];\n\tself.starts = [];\n\n\tself.addTrack = function() {\n\t\tself.tracks.push([]);\n\t\tself.currentInstrument.push(0);\n\t\tself.starts.push(0);\n\t\treturn self.tracks.length - 1;\n\t};\n\n\tself.setInstrument = function(trackNumber, instrumentNumber) {\n\t\tself.tracks[trackNumber].push({\n\t\t\tchannel: 0,\n\t\t\tcmd: \"program\",\n\t\t\tinstrument: instrumentNumber\n\t\t});\n\t\tself.currentInstrument[trackNumber] = instrumentNumber;\n\t};\n\n\tself.appendNote = function(trackNumber, pitch, durationInMeasures, volume, cents) {\n\t\tvar note = {\n\t\t\tcmd: \"note\",\n\t\t\tduration: durationInMeasures,\n\t\t\tgap: 0,\n\t\t\tinstrument: self.currentInstrument[trackNumber],\n\t\t\tpitch: pitch,\n\t\t\tstart: self.starts[trackNumber],\n\t\t\tvolume: volume\n\t\t};\n\t\tif (cents)\n\t\t\tnote.cents = cents;\n\t\tself.tracks[trackNumber].push(note);\n\t\tself.starts[trackNumber] += durationInMeasures;\n\n\t\tself.totalDuration = Math.max(self.totalDuration, self.starts[trackNumber]);\n\t};\n};\n\nmodule.exports = SynthSequence;\n","/*\n * Tablature Plugins\n * tablature are defined dynamically and registered inside abcjs\n * by calling abcTablatures.register(plugin) \n * where plugin represents a plugin instance \n * \n */\n\n// This is the only entry point to the tablatures. It is called both after parsing a tune and just before engraving\n\nvar TabString = require('./instruments/tab-string');\n\n/* extend the table below when adding a new instrument plugin */\n\n// Existing tab classes \nvar pluginTab = {\n\t'violin': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'fiddle': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'mandolin': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'guitar': { name: 'StringTab', defaultTuning: ['E,', 'A,', 'D', 'G', 'B', 'e'], isTabBig: true, tabSymbolOffset: 0 },\n\t'fiveString': { name: 'StringTab', defaultTuning: ['C,', 'G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: -.95 },\n};\n\nvar abcTablatures = {\n\n\tinited: false,\n\tplugins: {},\n\n\n\t/**\n\t * to be called once per plugin for registration \n\t * @param {*} plugin \n\t */\n\tregister: function (plugin) {\n\t\tvar name = plugin.name;\n\t\tvar tablature = plugin.tablature;\n\t\tthis.plugins[name] = tablature;\n\t},\n\n\tsetError: function (tune, msg) {\n\t\tif (tune.warnings) {\n\t\t\ttune.warning.push(msg);\n\t\t} else {\n\t\t\ttune.warnings = [msg];\n\t\t}\n\t},\n\n\t/**\n\t * handle params for current processed score\n\t * @param {*} tune current tune \n\t * @param {*} tuneNumber number in tune list\n\t * @param {*} params params to be processed for tablature\n\t * @return prepared tablatures plugin instances for current tune\n\t */\n\tpreparePlugins: function (tune, tuneNumber, params) {\n\t\t// Called after parsing a tune and before engraving it\n\t\tif (!this.inited) {\n\t\t\t// TODO-PER: I don't think this is needed - the plugin array can be hard coded, right?\n\t\t\tthis.register(new TabString());\n\t\t\tthis.inited = true;\n\t\t}\n\t\tvar returned = null;\n\t\tvar nbPlugins = 0;\n\t\tif (params.tablature) {\n\t\t\t// validate requested plugins \n\t\t\tvar tabs = params.tablature;\n\t\t\treturned = [];\n\t\t\tfor (var ii = 0; ii < tabs.length; ii++) {\n\t\t\t\tvar args = tabs[ii];\n\t\t\t\tvar instrument = args['instrument'];\n\t\t\t\tif (instrument == null) {\n\t\t\t\t\tthis.setError(tune, \"tablature 'instrument' is missing\");\n\t\t\t\t\treturn returned;\n\t\t\t\t}\n\t\t\t\tvar tabName = pluginTab[instrument];\n\t\t\t\tvar plugin = null;\n\t\t\t\tif (tabName) {\n\t\t\t\t\tplugin = this.plugins[tabName.name];\n\t\t\t\t}\n\t\t\t\tif (plugin) {\n\t\t\t\t\tif (params.visualTranspose != 0) {\n\t\t\t\t\t\t// populate transposition request to tabs\n\t\t\t\t\t\targs.visualTranspose = params.visualTranspose;\n\t\t\t\t\t}\n\t\t\t\t\targs.abcSrc = params.tablature.abcSrc;\n\t\t\t\t\tvar pluginInstance = {\n\t\t\t\t\t\tclassz: plugin,\n\t\t\t\t\t\ttuneNumber: tuneNumber,\n\t\t\t\t\t\tparams: args,\n\t\t\t\t\t\tinstance: null,\n\t\t\t\t\t\ttabType: tabName,\n\t\t\t\t\t};\n\t\t\t\t\t// proceed with tab plugin init \n\t\t\t\t\t// plugin.init(tune, tuneNumber, args, ii);\n\t\t\t\t\treturned.push(pluginInstance);\n\t\t\t\t\tnbPlugins++;\n\t\t\t\t} else if (instrument === '') {\n\t\t\t\t\t// create a placeholder - there is no tab for this staff\n\t\t\t\t\treturned.push(null)\n\t\t\t\t} else {\n\t\t\t\t\t// unknown tab plugin \n\t\t\t\t\t//this.emit_error('Undefined tablature plugin: ' + tabName)\n\t\t\t\t\tthis.setError(tune, 'Undefined tablature plugin: ' + instrument);\n\t\t\t\t\treturn returned;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returned;\n\t},\n\n\t/**\n\t * Call requested plugin\n\t * @param {*} renderer \n\t * @param {*} abcTune \n\t */\n\tlayoutTablatures: function layoutTablatures(renderer, abcTune) {\n\t\tvar tabs = abcTune.tablatures;\n\n\t\t// chack tabs request for each staffs\n\t\tvar staffLineCount = 0;\n\n\t\t// Clear the suppression flag\n\t\tif (tabs && (tabs.length > 0)) {\n\t\t\tvar nTabs = tabs.length;\n\t\t\tfor (var kk = 0; kk < nTabs; ++kk) {\n\t\t\t\tif (tabs[kk] && tabs[kk].params.firstStaffOnly) {\n\t\t\t\t\ttabs[kk].params.suppress = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (var ii = 0; ii < abcTune.lines.length; ii++) {\n\t\t\tvar line = abcTune.lines[ii];\n\n\t\t\tif (line.staff) {\n\t\t\t\tstaffLineCount++;\n\t\t\t}\n\n\t\t\t// MAE 27Nov2023\n\t\t\t// If tab param \"firstStaffOnly\", remove the tab label after the first staff\n\t\t\tif (staffLineCount > 1) {\n\t\t\t\tif (tabs && (tabs.length > 0)) {\n\t\t\t\t\tvar nTabs = tabs.length;\n\t\t\t\t\tfor (var kk = 0; kk < nTabs; ++kk) {\n\t\t\t\t\t\tif (tabs[kk].params.firstStaffOnly) {\n\t\t\t\t\t\t\t// Set the staff draw suppression flag\n\t\t\t\t\t\t\ttabs[kk].params.suppress = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar curStaff = line.staff;\n\t\t\tif (curStaff) {\n\t\t\t\tvar maxStaves = curStaff.length\n\t\t\t\tfor (var jj = 0; jj < curStaff.length; jj++) {\n\n\t\t\t\t\tif (tabs[jj] && jj < maxStaves) {\n\t\t\t\t\t\t// tablature requested for staff\n\t\t\t\t\t\tvar tabPlugin = tabs[jj];\n\t\t\t\t\t\tif (tabPlugin.instance == null) {\n\t\t\t\t\t\t\t//console.log(\"★★★★ Tab Init line: \" + ii + \" staff: \" + jj)\n\t\t\t\t\t\t\ttabPlugin.instance = new tabPlugin.classz();\n\t\t\t\t\t\t\t// plugin.init(tune, tuneNumber, args, ii);\n\t\t\t\t\t\t\t// call initer first\n\t\t\t\t\t\t\ttabPlugin.instance.init(abcTune,\n\t\t\t\t\t\t\t\ttabPlugin.tuneNumber,\n\t\t\t\t\t\t\t\ttabPlugin.params,\n\t\t\t\t\t\t\t\ttabPlugin.tabType\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// render next\n\t\t\t\t\t\t//console.log(\"★★★★ Tab Render line: \" + ii + \" staff: \" + jj)\n\t\t\t\t\t\ttabPlugin.instance.render(renderer, line, jj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n};\n\n\nmodule.exports = abcTablatures;\n","const { noteToMidi } = require('../../synth/note-to-midi');\nvar TabNote = require('./tab-note');\nvar tabNotes = require('./tab-notes');\n\n\nfunction buildCapo(self) {\n\tvar capoTuning = null;\n\tvar tuning = self.tuning;\n\tif (self.capo > 0) {\n\t\tcapoTuning = [];\n\t\tfor (var iii = 0; iii < tuning.length; iii++) {\n\t\t\tvar curNote = new TabNote(tuning[iii]);\n\t\t\tfor (var jjj = 0; jjj < self.capo; jjj++) {\n\t\t\t\tcurNote = curNote.nextNote();\n\t\t\t}\n\t\t\tcapoTuning[iii] = curNote.emit();\n\t\t}\n\t}\n\treturn capoTuning;\n}\n\nfunction buildPatterns(self) {\n\tvar strings = [];\n\tvar tuning = self.tuning;\n\tif (self.capo > 0) {\n\t\ttuning = self.capoTuning;\n\t}\n\tvar pos = tuning.length - 1;\n\tfor (var iii = 0; iii < tuning.length; iii++) {\n\t\tvar nextNote = self.highestNote; // highest handled note\n\t\tif (iii != tuning.length - 1) {\n\t\t\tnextNote = tuning[iii + 1];\n\t\t}\n\t\tvar stringNotes = tabNotes(tuning[iii], nextNote);\n\t\tif (stringNotes.error) {\n\t\t\treturn stringNotes;\n\t\t}\n\t\tstrings[pos--] = stringNotes;\n\t}\n\treturn strings;\n}\n\n\nfunction buildSecond(first) {\n\tvar seconds = [];\n\tseconds[0] = [];\n\tvar strings = first.strings;\n\tfor (var iii = 1; iii < strings.length; iii++) {\n\t\tseconds[iii] = strings[iii - 1];\n\t}\n\treturn seconds;\n}\n\nfunction sameString(self, chord) {\n\tfor (var jjjj = 0; jjjj < chord.length - 1; jjjj++) {\n\t\tvar curPos = chord[jjjj];\n\t\tvar nextPos = chord[jjjj + 1];\n\t\tif (curPos.str == nextPos.str) {\n\t\t\t// same String\n\t\t\t// => change lower pos \n\t\t\tif (curPos.str == self.strings.length - 1) {\n\t\t\t\t// Invalid tab Chord position for instrument\n\t\t\t\tcurPos.num = \"?\";\n\t\t\t\tnextPos.num = \"?\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// change lower pitch on lowest string\n\t\t\tif (nextPos.num < curPos.num) {\n\t\t\t\tnextPos.str++;\n\t\t\t\tnextPos = noteToNumber(self,\n\t\t\t\t\tnextPos.note,\n\t\t\t\t\tnextPos.str,\n\t\t\t\t\tself.secondPos,\n\t\t\t\t\tself.strings[nextPos.str].length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcurPos.str++;\n\t\t\t\tcurPos = noteToNumber(self,\n\t\t\t\t\tcurPos.note,\n\t\t\t\t\tcurPos.str,\n\t\t\t\t\tself.secondPos,\n\t\t\t\t\tself.strings[curPos.str].length\n\t\t\t\t);\n\t\t\t}\n\t\t\t// update table\n\t\t\tchord[jjjj] = curPos;\n\t\t\tchord[jjjj + 1] = nextPos;\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction handleChordNotes(self, notes) {\n\tvar retNotes = [];\n\tfor (var iiii = 0; iiii < notes.length; iiii++) {\n\t\tif (notes[iiii].endTie)\n\t\t\tcontinue;\n\t\tvar note = new TabNote(notes[iiii].name, self.clefTranspose);\n\t\tnote.checkKeyAccidentals(self.accidentals, self.measureAccidentals)\n\t\tvar curPos = toNumber(self, note);\n\t\tretNotes.push(curPos);\n\t}\n\tsameString(self, retNotes);\n\treturn retNotes;\n}\n\nfunction noteToNumber(self, note, stringNumber, secondPosition, firstSize) {\n\tvar strings = self.strings;\n\tnote.checkKeyAccidentals(self.accidentals, self.measureAccidentals);\n\tif (secondPosition) {\n\t\tstrings = secondPosition;\n\t}\n\tvar noteName = note.emitNoAccidentals();\n\tvar num = strings[stringNumber].indexOf(noteName);\n\tvar acc = note.acc;\n\tif (num != -1) {\n\t\tif (secondPosition) {\n\t\t\tnum += firstSize;\n\t\t}\n\t\tif ((note.isFlat || note.acc == -1) && (num == 0)) {\n\t\t\t// flat on 0 pos => previous string 7th position\n\t\t\tvar noteEquiv = note.getAccidentalEquiv();\n\t\t\tstringNumber++;\n\t\t\tnum = strings[stringNumber].indexOf(noteEquiv.emit());\n\t\t\tacc = 0;\n\t\t}\n\t\treturn {\n\t\t\tnum: (num + acc),\n\t\t\tstr: stringNumber,\n\t\t\tnote: note\n\t\t};\n\t}\n\treturn null;\n}\n\nfunction toNumber(self, note) {\n\tif (note.isAltered || note.natural) {\n\t\tvar acc;\n\t\tif (note.isFlat) {\n\t\t\tif (note.isDouble)\n\t\t\t\tacc = \"__\"\n\t\t\telse\n\t\t\t\tacc = \"_\"\n\t\t} else if (note.isSharp) {\n\t\t\tif (note.isDouble)\n\t\t\t\tacc = \"^^\"\n\t\t\telse\n\t\t\t\tacc = \"^\"\n\t\t} else if (note.natural)\n\t\t\tacc = \"=\"\n\t\tself.measureAccidentals[note.name.toUpperCase()] = acc\n\t}\n\tfor (var i = self.stringPitches.length - 1; i >= 0; i--) {\n\t\tif (note.pitch + note.pitchAltered >= self.stringPitches[i]) {\n\t\t\tvar num = note.pitch + note.pitchAltered - self.stringPitches[i]\n\t\t\tif (note.quarter === '^') num -= 0.5\n\t\t\telse if (note.quarter === \"v\") num += 0.5\n\t\t\treturn {\n\t\t\t\tnum: Math.round(num),\n\t\t\t\tstr: self.stringPitches.length - 1 - i, // reverse the strings because string 0 is on the bottom\n\t\t\t\tnote: note\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tnum: \"?\",\n\t\tstr: self.stringPitches.length - 1,\n\t\tnote: note,\n\t};\n}\n\nStringPatterns.prototype.stringToPitch = function (stringNumber) {\n\tvar startingPitch = 5.3;\n\tvar bottom = this.strings.length - 1;\n\treturn startingPitch + ((bottom - stringNumber) * this.linePitch);\n};\n\nfunction invalidNumber(retNotes, note) {\n\tvar number = {\n\t\tnum: \"?\",\n\t\tstr: 0,\n\t\tnote: note\n\t};\n\tretNotes.push(number);\n\tretNotes.error = note.emit() + ': unexpected note for instrument';\n}\n\nStringPatterns.prototype.notesToNumber = function (notes, graces) {\n\tvar note;\n\tvar number;\n\tvar error = null;\n\tvar retNotes = null;\n\tif (notes) {\n\t\tretNotes = [];\n\t\tif (notes.length > 1) {\n\t\t\tretNotes = handleChordNotes(this, notes);\n\t\t\tif (retNotes.error) {\n\t\t\t\terror = retNotes.error;\n\t\t\t}\n\t\t} else {\n\t\t\tif (!notes[0].endTie) {\n\t\t\t\tnote = new TabNote(notes[0].name, this.clefTranspose);\n\t\t\t\tnote.checkKeyAccidentals(this.accidentals, this.measureAccidentals)\n\t\t\t\tnumber = toNumber(this, note);\n\t\t\t\tif (number) {\n\t\t\t\t\tretNotes.push(number);\n\t\t\t\t} else {\n\t\t\t\t\tinvalidNumber(retNotes, note);\n\t\t\t\t\terror = retNotes.error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (error) return retNotes;\n\tvar retGraces = null;\n\tif (graces) {\n\t\tretGraces = [];\n\t\tfor (var iiii = 0; iiii < graces.length; iiii++) {\n\t\t\tnote = new TabNote(graces[iiii].name, this.clefTranspose);\n\t\t\tnote.checkKeyAccidentals(this.accidentals, this.measureAccidentals)\n\t\t\tnumber = toNumber(this, note);\n\t\t\tif (number) {\n\t\t\t\tretGraces.push(number);\n\t\t\t} else {\n\t\t\t\tinvalidNumber(retGraces, note);\n\t\t\t\terror = retNotes.error;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tnotes: retNotes,\n\t\tgraces: retGraces,\n\t\terror: error\n\t};\n};\n\nStringPatterns.prototype.toString = function () {\n\tvar arr = []\n\tfor (var i = 0; i < this.tuning.length; i++) {\n\t\tvar str = this.tuning[i].replaceAll(',', '').replaceAll(\"'\", '').toUpperCase();\n\t\tif (str[0] === '_') str = str[1] + 'b '\n\t\telse if (str[0] === '^') str = str[1] + \"# \"\n\t\tarr.push(str)\n\t}\n\treturn arr.join('');\n};\n\nStringPatterns.prototype.tabInfos = function (plugin) {\n\tvar name = plugin.params.label;\n\tif (name) {\n\t\tvar tunePos = name.indexOf('%T');\n\t\tvar tuning = \"\";\n\t\tif (tunePos != -1) {\n\t\t\ttuning = this.toString();\n\t\t\tif (plugin.capo > 0) {\n\t\t\t\ttuning += ' capo:' + plugin.capo;\n\t\t\t}\n\t\t\tname = name.replace('%T', tuning);\n\t\t}\n\t\treturn name;\n\t}\n\treturn '';\n};\n\n// MAE 27 Nov 2023\nStringPatterns.prototype.suppress = function (plugin) {\n\tvar suppress = plugin.params.suppress;\n\tif (suppress) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n// MAE 27 Nov 2023 End\n\n/**\n * Common patterns for all string instruments\n * @param {} plugin\n * @param {} tuning\n * @param {*} capo\n * @param {*} highestNote \n */\nfunction StringPatterns(plugin) {\n\t//console.log(\"INIT StringPatterns constructor\")\n\tvar tuning = plugin.tuning;\n\tvar capo = plugin.capo;\n\tvar highestNote = plugin.params.highestNote;\n\tthis.linePitch = plugin.linePitch;\n\tthis.highestNote = \"a'\";\n\tif (highestNote) {\n\t\t// override default\n\t\tthis.highestNote = highestNote;\n\t}\n\tthis.measureAccidentals = {}\n\tthis.capo = 0;\n\tif (capo) {\n\t\tthis.capo = parseInt(capo, 10);\n\t}\n\tthis.transpose = plugin.transpose ? plugin.transpose : 0\n\tthis.tuning = tuning;\n\tthis.stringPitches = []\n\tfor (var i = 0; i < this.tuning.length; i++) {\n\t\tvar pitch = noteToMidi(this.tuning[i]) + this.capo\n\t\tthis.stringPitches.push(pitch)\n\t}\n\tif (this.capo > 0) {\n\t\tthis.capoTuning = buildCapo(this);\n\t}\n\tthis.strings = buildPatterns(this);\n\tif (this.strings.error) {\n\t\tplugin.setError(this.strings.error);\n\t\tplugin.inError = true;\n\t\treturn;\n\t}\n\t// second position pattern per string\n\tthis.secondPos = buildSecond(this);\n}\n\n\n\nmodule.exports = StringPatterns;","\n/**\n * Layout tablature informations for draw\n * @param {*} numLines \n * @param {*} lineSpace \n */\n\nfunction StringTablature(numLines, lineSpace) {\n\t//console.log(\"INIT StringTablature constructor\")\n\tthis.numLines = numLines;\n\tthis.lineSpace = lineSpace;\n\tthis.verticalSize = this.numLines * this.lineSpace;\n\tvar pitch = 3;\n\tthis.bar = {\n\t\tpitch: pitch,\n\t\tpitch2: lineSpace * numLines,\n\t\theight: 5,\n\t};\n}\n\n/**\n * return true if current line should not produce a tab\n * @param {} line \n */\nStringTablature.prototype.bypass = function (line) {\n\t//console.log(\"RENDER StringTablature bypass\")\n\tvar voices = line.staffGroup.voices;\n\tif (voices.length > 0) {\n\t\tif (voices[0].isPercussion) return true;\n\t}\n\treturn false;\n};\n\n\nStringTablature.prototype.setRelative = function (child, relative, first) {\n\t//console.log(\"RENDER StringTablature setRelative\")\n\tswitch (child.type) {\n\t\tcase 'bar':\n\t\t\trelative.pitch = this.bar.pitch;\n\t\t\trelative.pitch2 = this.bar.pitch2;\n\t\t\trelative.height = this.height;\n\t\t\tbreak;\n\t\tcase 'symbol':\n\t\t\tvar top = this.bar.pitch2 / 2;\n\t\t\tif (child.name == 'dots.dot') {\n\t\t\t\tif (first) {\n\t\t\t\t\trelative.pitch = top;\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\trelative.pitch = top + this.lineSpace;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn first;\n};\n\nmodule.exports = StringTablature;","var { noteToMidi, midiToNote } = require('../../synth/note-to-midi');\n\n/**\n * \n * Note structure for Tabs\n * \n */\n\n\nfunction TabNote(note, clefTranspose) {\n\t//console.log(\"INIT/RENDER TabNote constructor\")\n\tvar pitch = noteToMidi(note)\n\tif (clefTranspose)\n\t\tpitch += clefTranspose\n\tvar newNote = midiToNote(pitch);\n\tvar isFlat = false;\n\tvar isSharp = false;\n\tvar isAltered = false;\n\tvar natural = null;\n\tvar quarter = null;\n\tvar isDouble = false;\n\tvar acc = 0;\n\n\tif (note.startsWith('_')) {\n\t\tisFlat = true;\n\t\tacc = -1;\n\t\t// check quarter flat\n\t\tif (note[1] == '/') {\n\t\t\tisFlat = false;\n\t\t\tquarter = \"v\";\n\t\t\tacc = 0;\n\t\t} else if (note[1] == '_') {\n\t\t\t// double flat\n\t\t\tisDouble = true;\n\t\t\tacc -= 1;\n\t\t}\n\t} else if (note.startsWith('^')) {\n\t\tisSharp = true;\n\t\tacc = +1;\n\t\t// check quarter sharp\n\t\tif (note[1] == '/') {\n\t\t\tisSharp = false;\n\t\t\tquarter = \"^\";\n\t\t\tacc = 0;\n\t\t} else if (note[1] == '^') {\n\t\t\t// double sharp\n\t\t\tisDouble = true;\n\t\t\tacc += 1;\n\t\t}\n\t} else if (note.startsWith('=')) {\n\t\tnatural = true;\n\t\tacc = 0;\n\t}\n\tisAltered = isFlat || isSharp || (quarter != null);\n\tif (isAltered || natural) {\n\t\tif ((quarter != null) || (isDouble)) {\n\t\t\tnewNote = note.slice(2);\n\t\t} else {\n\t\t\tnewNote = note.slice(1);\n\t\t}\n\t}\n\tvar hasComma = (newNote.match(/,/g) || []).length;\n\tvar hasQuote = (newNote.match(/'/g) || []).length;\n\n\tthis.pitch = pitch\n\tthis.pitchAltered = 0\n\tthis.name = newNote;\n\tthis.acc = acc;\n\tthis.isSharp = isSharp;\n\tthis.isKeySharp = false;\n\tthis.isDouble = isDouble;\n\tthis.isAltered = isAltered;\n\tthis.isFlat = isFlat;\n\tthis.isKeyFlat = false;\n\tthis.natural = natural;\n\tthis.quarter = quarter;\n\tthis.isLower = (this.name == this.name.toLowerCase());\n\tthis.name = this.name[0].toUpperCase();\n\tthis.hasComma = hasComma;\n\tthis.isQuoted = hasQuote;\n}\n\nfunction cloneNote(self) {\n\tvar newNote = self.name;\n\tvar newTabNote = new TabNote(newNote);\n\tnewTabNote.pitch = self.pitch;\n\tnewTabNote.hasComma = self.hasComma;\n\tnewTabNote.isLower = self.isLower;\n\tnewTabNote.isQuoted = self.isQuoted;\n\tnewTabNote.isSharp = self.isSharp;\n\tnewTabNote.isKeySharp = self.isKeySharp;\n\tnewTabNote.isFlat = self.isFlat;\n\tnewTabNote.isKeyFlat = self.isKeyFlat;\n\treturn newTabNote;\n}\nTabNote.prototype.sameNoteAs = function (note) {\n\t//console.log(\"INIT TabNote sameNoteAs\")\n\treturn note.pitch === this.pitch\n};\n\nTabNote.prototype.isLowerThan = function (note) {\n\t//console.log(\"INIT TabNote isLowerThan\")\n\treturn note.pitch > this.pitch\n};\n\nTabNote.prototype.checkKeyAccidentals = function (accidentals, measureAccidentals) {\n\t//console.log(\"RENDER TabNote checkKeyAccidentals\")\n\tif (this.isAltered || this.natural)\n\t\treturn\n\tif (measureAccidentals[this.name.toUpperCase()]) {\n\t\tswitch (measureAccidentals[this.name.toUpperCase()]) {\n\t\t\tcase \"__\": this.acc = -2; this.pitchAltered = -2; return;\n\t\t\tcase \"_\": this.acc = -1; this.pitchAltered = -1; return;\n\t\t\tcase \"=\": this.acc = 0; this.pitchAltered = 0; return;\n\t\t\tcase \"^\": this.acc = 1; this.pitchAltered = 1; return;\n\t\t\tcase \"^^\": this.acc = 2; this.pitchAltered = 2; return;\n\t\t}\n\t} else if (accidentals) {\n\t\tvar curNote = this.name;\n\t\tfor (var iii = 0; iii < accidentals.length; iii++) {\n\t\t\tvar curAccidentals = accidentals[iii];\n\t\t\tif (curNote == curAccidentals.note.toUpperCase()) {\n\t\t\t\tif (curAccidentals.acc == 'flat') {\n\t\t\t\t\tthis.acc = -1;\n\t\t\t\t\tthis.isKeyFlat = true;\n\t\t\t\t\tthis.pitchAltered = -1\n\t\t\t\t}\n\t\t\t\tif (curAccidentals.acc == 'sharp') {\n\t\t\t\t\tthis.acc = +1;\n\t\t\t\t\tthis.isKeySharp = true;\n\t\t\t\t\tthis.pitchAltered = 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nTabNote.prototype.getAccidentalEquiv = function () {\n\t//console.log(\"TabNote getAccidentalEquiv\")\n\tvar cloned = cloneNote(this);\n\tif (cloned.isSharp || cloned.isKeySharp) {\n\t\tcloned = cloned.nextNote();\n\t\tcloned.isFlat = true;\n\t\tcloned.isSharp = false;\n\t\tcloned.isKeySharp = false;\n\t} else if (cloned.isFlat || cloned.isKeyFlat) {\n\t\tcloned = cloned.prevNote();\n\t\tcloned.isSharp = true;\n\t\tcloned.isFlat = false;\n\t\tcloned.isKeyFlat = false;\n\t}\n\treturn cloned;\n};\n\n\nTabNote.prototype.nextNote = function () {\n\t//console.log(\"INIT TabNote nextNote\")\n\tvar note = midiToNote(this.pitch + 1 + this.pitchAltered)\n\treturn new TabNote(note)\n};\n\nTabNote.prototype.prevNote = function () {\n\t//console.log(\"TabNote prevNote\")\n\tvar note = midiToNote(this.pitch - 1 + this.pitchAltered)\n\treturn new TabNote(note)\n};\n\nTabNote.prototype.emitNoAccidentals = function () {\n\t//console.log(\"TabNote emitNoAccidentals\")\n\tvar returned = this.name;\n\tif (this.isLower) {\n\t\treturned = returned.toLowerCase();\n\t}\n\tfor (var ii = 0; ii < this.isQuoted; ii++) {\n\t\treturned += \"'\";\n\t}\n\tfor (var jj = 0; jj < this.hasComma; jj++) {\n\t\treturned += \",\";\n\t}\n\treturn returned;\n};\n\nTabNote.prototype.emit = function () {\n\t//console.log(\"INIT/RENDER TabNote emit\")\n\tvar returned = this.name;\n\tif (this.isSharp || this.isKeySharp) {\n\t\treturned = '^' + returned;\n\t\tif (this.isDouble) {\n\t\t\treturned = '^' + returned;\n\t\t}\n\t}\n\tif (this.isFlat || this.isKeyFlat) {\n\t\treturned = '_' + returned;\n\t\tif (this.isDouble) {\n\t\t\treturned = '_' + returned;\n\t\t}\n\t}\n\tif (this.quarter) {\n\t\tif (this.quarter == \"^\") {\n\t\t\treturned = \"^/\" + returned;\n\t\t} else {\n\t\t\treturned = \"_/\" + returned;\n\t\t}\n\t}\n\tif (this.natural) {\n\t\treturned = '=' + returned;\n\t}\n\tfor (var ii = 1; ii <= this.hasComma; ii++) {\n\t\treturned += ',';\n\t}\n\n\tif (this.isLower) {\n\t\treturned = returned.toLowerCase();\n\t\tfor (var jj = 1; jj <= this.isQuoted; jj++) {\n\t\t\treturned += \"'\";\n\t\t}\n\t}\n\treturn returned;\n};\n\nmodule.exports = TabNote\n","\nvar TabNote = require('./tab-note');\n\nvar notes = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];\n\nfunction tabNotes(fromNote, toNote) {\n\t//console.log(\"INIT TabNotes\")\n\tvar fromN = new TabNote(fromNote);\n\tvar toN = new TabNote(toNote);\n\t// check that toN is not lower than fromN\n\tif (toN.isLowerThan(fromN)) {\n\t\tvar from = fromN.emit();\n\t\tvar tn = toN.emit();\n\t\treturn {\n\t\t\terror: 'Invalid string Instrument tuning : ' +\n\t\t\t\ttn + ' string lower than ' + from + ' string'\n\t\t};\n\t}\n\tvar buildReturned = [];\n\tvar startIndex = notes.indexOf(fromN.name);\n\tvar toIndex = notes.indexOf(toN.name);\n\tif ((startIndex == -1) || (toIndex == -1)) {\n\t\treturn buildReturned;\n\t}\n\tvar finished = false;\n\twhile (!finished) {\n\t\tbuildReturned.push(fromN.emit());\n\t\tfromN = fromN.nextNote();\n\t\tif (fromN.sameNoteAs(toN)) {\n\t\t\tfinished = true;\n\t\t}\n\t}\n\treturn buildReturned;\n}\n\nmodule.exports = tabNotes;\n","\nvar StringTablature = require('./string-tablature');\nvar tabRenderer = require('../render/tab-renderer');\nvar StringPatterns = require('./string-patterns');\n\n\n/**\n * upon init mainly store provided instances for later usage\n * @param {*} abcTune the parsed tune AST tree\n * @param {*} tuneNumber the parsed tune AST tree\n * @param {*} params complementary args provided to Tablature Plugin\n */\nPlugin.prototype.init = function (abcTune, tuneNumber, params, tabSettings) {\n\t//console.log(\"INIT AbcStringTab Plugin.init\")\n\tthis.tune = abcTune;\n\tthis.params = params;\n\tthis.tuneNumber = tuneNumber;\n\tthis.inError = false;\n\tthis.abcTune = abcTune;\n\tthis.linePitch = 3;\n\tthis.nbLines = tabSettings.defaultTuning.length;\n\tthis.isTabBig = tabSettings.isTabBig;\n\tthis.tabSymbolOffset = tabSettings.tabSymbolOffset;\n\tthis.capo = params.capo;\n\tthis.transpose = params.visualTranspose;\n\tthis.hideTabSymbol = params.hideTabSymbol;\n\tthis.tablature = new StringTablature(this.nbLines, this.linePitch);\n\tvar tuning = params.tuning;\n\tif (!tuning) {\n\t\ttuning = tabSettings.defaultTuning;\n\t}\n\tthis.tuning = tuning;\n\tthis.semantics = new StringPatterns(this);\n};\n\nPlugin.prototype.setError = function (error) {\n\t//console.log(\"Plugin setError\")\n\tif (error) {\n\t\tthis.error = error;\n\t\tthis.inError = true;\n\t\tif (this.tune.warnings) {\n\t\t\tthis.tune.warnings.push(error);\n\t\t} else {\n\t\t\tthis.tune.warnings = [error];\n\t\t}\n\t}\n};\n\nPlugin.prototype.render = function (renderer, line, staffIndex) {\n\t//console.log(\"RENDER AbcStringTab Plugin.render\")\n\tif (this.inError) return;\n\tif (this.tablature.bypass(line)) return;\n\ttabRenderer(this, renderer, line, staffIndex);\n};\n\nfunction Plugin() { }\n\n//\n// Tablature plugin definition\n//\nvar AbcStringTab = function () {\n\treturn { name: 'StringTab', tablature: Plugin };\n};\n\nmodule.exports = AbcStringTab;\n","/**\n * Tablature Absolute elements factory\n */\nvar AbsoluteElement = require('../../write/creation/elements/absolute-element');\nvar RelativeElement = require('../../write/creation/elements/relative-element');\n\nfunction isObject(a) { return a != null && a.constructor === Object; }\nfunction cloneObject(dest, src) {\n\tfor (var prop in src) {\n\t\tif (src.hasOwnProperty(prop)) {\n\t\t\tif (!(Array.isArray(src[prop]) || isObject(src[prop]))) {\n\t\t\t\tdest[prop] = src[prop];\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction cloneAbsolute(absSrc) {\n\tvar returned = new AbsoluteElement('', 0, 0, '', 0);\n\tcloneObject(returned, absSrc);\n\treturned.top = 0;\n\treturned.bottom = -1;\n\tif (absSrc.abcelem) {\n\t\treturned.abcelem = {};\n\t\tcloneObject(returned.abcelem, absSrc.abcelem);\n\t\tif (returned.abcelem.el_type === \"note\")\n\t\t\treturned.abcelem.el_type = 'tabNumber';\n\t}\n\t// TODO-PER: This fixes the classes because the element isn't created at the right time.\n\tabsSrc.cloned = returned\n\treturn returned;\n}\n\nfunction cloneAbsoluteAndRelatives(absSrc, plugin) {\n\tvar returned = cloneAbsolute(absSrc);\n\tif (plugin) {\n\t\tvar children = absSrc.children;\n\t\t// proceed with relative as well\n\t\tvar first = true;\n\t\tfor (var ii = 0; ii < children.length; ii++) {\n\t\t\tvar child = children[ii];\n\t\t\tvar relative = new RelativeElement('', 0, 0, 0, '');\n\t\t\tcloneObject(relative, child);\n\t\t\tfirst = plugin.tablature.setRelative(child, relative, first);\n\t\t\treturned.children.push(relative);\n\t\t}\n\t}\n\treturn returned;\n}\n\nfunction buildTabAbsolute(plugin, absX, relX) {\n\tvar tabIcon = 'tab.tiny';\n\tvar tabYPos = 7.5;\n\tif (plugin.isTabBig) {\n\t\ttabIcon = 'tab.big';\n\t\ttabYPos = 10;\n\t}\n\tvar element = {\n\t\tel_type: \"tab\",\n\t\ticon: tabIcon,\n\t\tYpos: tabYPos\n\t};\n\n\t// Offset the TAB symbol position if specified in the tab description\n\ttabYPos += plugin.tabSymbolOffset;\n\n\t// For tablature like whistle tab where you want the TAB symbol hidden\n\tif (!plugin.hideTabSymbol) {\n\n\t\tvar tabAbsolute = new AbsoluteElement(element, 0, 0, \"symbol\", 0);\n\t\ttabAbsolute.x = absX;\n\t\tvar tabRelative = new RelativeElement(tabIcon, 0, 0, 7.5, \"tab\");\n\t\ttabRelative.x = relX;\n\t\ttabAbsolute.children.push(tabRelative);\n\t\tif (tabAbsolute.abcelem.el_type == 'tab') {\n\t\t\ttabRelative.pitch = tabYPos;\n\t\t}\n\n\t}\n\treturn tabAbsolute;\n}\n\nfunction lyricsDim(abs) {\n\tif (abs.extra) {\n\t\tfor (var ii = 0; ii < abs.extra.length; ii++) {\n\t\t\tvar extra = abs.extra[ii];\n\t\t\tif (extra.type == 'lyric') {\n\t\t\t\treturn {\n\t\t\t\t\tbottom: extra.bottom,\n\t\t\t\t\theight: extra.height\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\nfunction TabAbsoluteElements() {\n\t//console.log(\"RENDER TabAbsoluteElements constructor\")\n\tthis.accidentals = null;\n}\n\nfunction getInitialStaffSize(staffGroup) {\n\tvar returned = 0;\n\tfor (var ii = 0; ii < staffGroup.length; ii++) {\n\t\tif (!staffGroup[ii].tabNameInfos) returned++;\n\t}\n\treturn returned;\n}\n\nfunction buildRelativeTabNote(plugin, relX, def, curNote, isGrace) {\n\tvar strNote = curNote.num;\n\tif (curNote.note.quarter != null) {\n\t\t// add tab quarter => needs to string conversion then \n\t\tstrNote = strNote.toString();\n\t\tstrNote += curNote.note.quarter;\n\t}\n\tvar pitch = plugin.semantics.stringToPitch(curNote.str);\n\tdef.notes.push({ num: strNote, str: curNote.str, pitch: curNote.note.emit() });\n\tvar opt = {\n\t\ttype: 'tabNumber'\n\t};\n\tvar tabNoteRelative = new RelativeElement(\n\t\tstrNote, 0, 0, pitch + 0.3, opt);\n\ttabNoteRelative.x = relX;\n\ttabNoteRelative.isGrace = isGrace;\n\ttabNoteRelative.isAltered = curNote.note.isAltered;\n\treturn tabNoteRelative;\n}\n\nfunction getXGrace(abs, index) {\n\tvar found = 0;\n\tif (abs.extra) {\n\t\tfor (var ii = 0; ii < abs.extra.length; ii++) {\n\t\t\tif (abs.extra[ii].c.indexOf('noteheads') >= 0) {\n\t\t\t\tif (found === index) {\n\t\t\t\t\treturn abs.extra[ii].x + abs.extra[ii].w / 2;\n\t\t\t\t} else {\n\t\t\t\t\tfound++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction graceInRest(absElem) {\n\tif (absElem.abcelem) {\n\t\tvar elem = absElem.abcelem;\n\t\tif (elem.rest) {\n\t\t\treturn elem.gracenotes;\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction convertToNumber(plugin, pitches, graceNotes) {\n\tvar tabPos = plugin.semantics.notesToNumber(pitches, graceNotes);\n\tif (tabPos.error) {\n\t\tplugin.setError(tabPos.error);\n\t\treturn tabPos; // give up on error here\n\t}\n\tif (tabPos.graces && tabPos.notes) {\n\t\t// add graces to last note in notes\n\t\tvar posNote = tabPos.notes.length - 1;\n\t\ttabPos.notes[posNote].graces = tabPos.graces;\n\t}\n\treturn tabPos;\n}\n\nfunction buildGraceRelativesForRest(plugin, abs, absChild, graceNotes, tabVoice) {\n\tfor (var mm = 0; mm < graceNotes.length; mm++) {\n\t\tvar defGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\tvar graceX = getXGrace(absChild, mm);\n\t\tvar curGrace = graceNotes[mm];\n\t\tvar tabGraceRelative = buildRelativeTabNote(plugin, graceX, defGrace, curGrace, true);\n\t\tabs.children.push(tabGraceRelative);\n\t\ttabVoice.push(defGrace);\n\t}\n}\n\n/**\n * Build tab absolutes by scanning current staff line absolute array\n * @param {*} staffAbsolute\n */\nTabAbsoluteElements.prototype.build = function (plugin,\n\tstaffAbsolute,\n\ttabVoice,\n\tvoiceIndex,\n\tstaffIndex,\n\tkeySig,\n\ttabVoiceIndex) {\n\t//console.log(\"RENDER TabAbsoluteElements build\")\n\tvar staffSize = getInitialStaffSize(staffAbsolute);\n\tvar source = staffAbsolute[staffIndex + voiceIndex];\n\tvar dest = staffAbsolute[tabVoiceIndex];\n\tvar tabPos = null;\n\tvar defNote = null;\n\tif (source.children[0].abcelem.el_type != 'clef') {\n\t\t// keysig missing => provide one for tabs\n\t\tif (keySig != 'none') {\n\t\t\tsource.children.splice(0, 0, keySig);\n\t\t}\n\t}\n\tfor (var ii = 0; ii < source.children.length; ii++) {\n\t\tvar absChild = source.children[ii];\n\t\tvar absX = absChild.x;\n\t\tvar relX = absX;\n\t\t// if (absChild.children.length > 0) {\n\t\t// relX = absChild.children[0].x;\n\t\t// }\n\t\tif ((absChild.isClef)) {\n\t\t\tdest.children.push(buildTabAbsolute(plugin, absX, relX));\n\t\t\tif (absChild.abcelem.type.indexOf('-8') >= 0) plugin.semantics.clefTranspose = -12\n\t\t\tif (absChild.abcelem.type.indexOf('+8') >= 0) plugin.semantics.clefTranspose = 12\n\t\t}\n\t\tswitch (absChild.type) {\n\t\t\tcase 'staff-extra key-signature':\n\t\t\t\t// refresh key accidentals\n\t\t\t\tthis.accidentals = absChild.abcelem.accidentals;\n\t\t\t\tplugin.semantics.accidentals = this.accidentals;\n\t\t\t\tbreak;\n\t\t\tcase 'bar':\n\t\t\t\tplugin.semantics.measureAccidentals = {}\n\t\t\t\tvar lastBar = false;\n\t\t\t\tif (ii === source.children.length - 1) {\n\t\t\t\t\t// used for final line bar drawing\n\t\t\t\t\t// for multi tabs / multi staves\n\t\t\t\t\tlastBar = true;\n\t\t\t\t}\n\t\t\t\tvar cloned = cloneAbsoluteAndRelatives(absChild, plugin);\n\t\t\t\tif (cloned.abcelem.barNumber) {\n\t\t\t\t\tdelete cloned.abcelem.barNumber;\n\t\t\t\t\tfor (var bn = 0; bn < cloned.children.length; bn++) {\n\t\t\t\t\t\tif (cloned.children[bn].type === \"barNumber\") {\n\t\t\t\t\t\t\tcloned.children.splice(bn, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcloned.abcelem.lastBar = lastBar;\n\t\t\t\tdest.children.push(cloned);\n\t\t\t\ttabVoice.push({\n\t\t\t\t\tel_type: absChild.abcelem.el_type,\n\t\t\t\t\ttype: absChild.abcelem.type,\n\t\t\t\t\tendChar: absChild.abcelem.endChar,\n\t\t\t\t\tstartChar: absChild.abcelem.startChar,\n\t\t\t\t\tabselem: cloned\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'rest':\n\t\t\t\tvar restGraces = graceInRest(absChild);\n\t\t\t\tif (restGraces) {\n\t\t\t\t\t// to number conversion \n\t\t\t\t\ttabPos = convertToNumber(plugin, null, restGraces);\n\t\t\t\t\tif (tabPos.error) return;\n\t\t\t\t\t// build relative for grace\n\t\t\t\t\tdefGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\t\t\t\tbuildGraceRelativesForRest(plugin, abs, absChild, tabPos.graces, tabVoice);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'note':\n\t\t\t\tvar abs = cloneAbsolute(absChild);\n\t\t\t\tabs.x = absChild.heads[0].x + absChild.heads[0].w / 2; // center the number\n\t\t\t\tabs.lyricDim = lyricsDim(absChild);\n\t\t\t\tvar pitches = absChild.abcelem.pitches;\n\t\t\t\tvar graceNotes = absChild.abcelem.gracenotes;\n\t\t\t\tabs.type = 'tabNumber';\n\t\t\t\t// to number conversion \n\t\t\t\ttabPos = convertToNumber(plugin, pitches, graceNotes);\n\t\t\t\tif (tabPos.error) return;\n\t\t\t\tif (tabPos.graces) {\n\t\t\t\t\t// add graces to last note in notes\n\t\t\t\t\tvar posNote = tabPos.notes.length - 1;\n\t\t\t\t\ttabPos.notes[posNote].graces = tabPos.graces;\n\t\t\t\t}\n\t\t\t\t// build relative\n\t\t\t\tdefNote = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [] };\n\t\t\t\tfor (var ll = 0; ll < tabPos.notes.length; ll++) {\n\t\t\t\t\tvar curNote = tabPos.notes[ll];\n\t\t\t\t\tif (curNote.graces) {\n\t\t\t\t\t\tfor (var mm = 0; mm < curNote.graces.length; mm++) {\n\t\t\t\t\t\t\tvar defGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\t\t\t\t\t\tvar graceX = getXGrace(absChild, mm);\n\t\t\t\t\t\t\tvar curGrace = curNote.graces[mm];\n\t\t\t\t\t\t\tvar tabGraceRelative = buildRelativeTabNote(plugin, graceX, defGrace, curGrace, true);\n\t\t\t\t\t\t\tabs.children.push(tabGraceRelative);\n\t\t\t\t\t\t\ttabVoice.push(defGrace);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar tabNoteRelative = buildRelativeTabNote(plugin, abs.x + absChild.heads[ll].dx, defNote, curNote, false);\n\t\t\t\t\tabs.children.push(tabNoteRelative);\n\t\t\t\t}\n\t\t\t\tif (defNote.notes.length > 0) {\n\t\t\t\t\tdefNote.abselem = abs;\n\t\t\t\t\ttabVoice.push(defNote);\n\t\t\t\t\tdest.children.push(abs);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n};\n\nmodule.exports = TabAbsoluteElements;\n","/* eslint-disable no-debugger */\nvar VoiceElement = require('../../write/creation/elements/voice-element');\nvar TabAbsoluteElements = require('./tab-absolute-elements');\nvar spacing = require('../../write/helpers/spacing');\n\nfunction initSpecialY() {\n\treturn {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n}\n\nfunction getLyricHeight(voice) {\n\tvar maxLyricHeight = 0;\n\tfor (var ii = 0; ii < voice.children.length; ii++) {\n\t\tvar curAbs = voice.children[ii];\n\t\tif (curAbs.specialY) {\n\t\t\tif (curAbs.specialY.lyricHeightBelow > maxLyricHeight) {\n\t\t\t\tmaxLyricHeight = curAbs.specialY.lyricHeightBelow;\n\t\t\t}\n\t\t}\n\t}\n\treturn maxLyricHeight; // add spacing\n}\n\nfunction buildTabName(plugin, renderer, dest) {\n\tvar stringSemantics = plugin.semantics;\n\tvar textSize = renderer.controller.getTextSize;\n\tvar tabName = stringSemantics.tabInfos(plugin);\n\tvar suppress = stringSemantics.suppress(plugin);\n\tvar doDraw = true;\n\n\tif (suppress) {\n\t\tdoDraw = false\n\t}\n\n\n\tif (doDraw) {\n\t\tvar size = textSize.calc(tabName, 'tablabelfont', 'text instrumentname');\n\t\tdest.tabNameInfos = {\n\t\t\ttextSize: { height: size.height, width: size.width },\n\t\t\tname: tabName\n\t\t};\n\t\treturn size.height;\n\t}\n\treturn 0\n\n}\n\nfunction islastTabInStaff(index, staffGroup) {\n\tif (staffGroup[index].isTabStaff) {\n\t\tif (index === staffGroup.length - 1) return true;\n\t\tif (staffGroup[index + 1].isTabStaff) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getStaffNumbers(staffs) {\n\tvar nbStaffs = 0;\n\tfor (var ii = 0; ii < staffs.length; ii++) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\tnbStaffs++;\n\t\t}\n\t}\n\treturn nbStaffs;\n}\n\nfunction getParentStaffIndex(staffs, index) {\n\tfor (var ii = index; ii >= 0; ii--) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\treturn ii;\n\t\t}\n\t}\n\treturn -1;\n}\n\n\nfunction linkStaffAndTabs(staffs) {\n\tfor (var ii = 0; ii < staffs.length; ii++) {\n\t\tif (staffs[ii].isTabStaff) {\n\t\t\t// link to parent staff\n\t\t\tvar parentIndex = getParentStaffIndex(staffs, ii);\n\t\t\tstaffs[ii].hasStaff = staffs[parentIndex];\n\t\t\tif (!staffs[parentIndex].hasTab) staffs[parentIndex].hasTab = [];\n\t\t\tstaffs[parentIndex].hasTab.push(staffs[ii]);\n\t\t}\n\t}\n}\n\nfunction isMultiVoiceSingleStaff(staffs, parent) {\n\tif (getStaffNumbers(staffs) === 1) {\n\t\tif (parent.voices.length > 1) return true;\n\t}\n\treturn false;\n}\n\n\nfunction getNextTabPos(tabIndex, staffGroup) {\n\tvar startIndex = 0;\n\tvar handledVoices = 0;\n\tvar inProgress = true;\n\tvar nbVoices = 0;\n\twhile (inProgress) {\n\t\t//for (var ii = 0; ii < staffGroup.length; ii++) {\n\t\tif (!staffGroup[startIndex])\n\t\t\treturn -1;\n\t\tif (!staffGroup[startIndex].isTabStaff) {\n\t\t\tnbVoices = staffGroup[startIndex].voices.length; // get number of staff voices\n\t\t}\n\t\tif (staffGroup[startIndex].isTabStaff) {\n\t\t\thandledVoices++;\n\t\t\tif (islastTabInStaff(startIndex, staffGroup)) {\n\t\t\t\tif (handledVoices < nbVoices) return startIndex + 1;\n\t\t\t}\n\t\t} else {\n\t\t\thandledVoices = 0;\n\t\t\tif (startIndex >= tabIndex) {\n\t\t\t\tif (startIndex + 1 == staffGroup.length) return startIndex + 1;\n\t\t\t\tif (!staffGroup[startIndex + 1].isTabStaff) return startIndex + 1;\n\t\t\t}\n\t\t}\n\t\tstartIndex++;\n\t\t// out of space case\n\t\tif (startIndex > staffGroup.length) return -1;\n\t}\n}\n\nfunction getLastStaff(staffs, lastTab) {\n\tfor (var ii = lastTab; ii >= 0; ii--) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\treturn staffs[ii];\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction checkVoiceKeySig(voices, ii) {\n\tvar curVoice = voices[ii];\n\t// on multivoice multistaff only the first voice has key signature\n\t// folling consecutive do not have one => we should provide the first voice key sig back then\n\tvar elem0 = curVoice.children[0].abcelem;\n\tif (elem0.el_type === 'clef') return null;\n\tif (ii == 0) {\n\t\t// not found => clef=none case\n\t\treturn 'none';\n\t}\n\treturn voices[ii - 1].children[0];\n}\n\nfunction tabRenderer(plugin, renderer, line, staffIndex) {\n\t//console.log(\"RENDER tabRenderer\")\n\tvar absolutes = new TabAbsoluteElements();\n\tvar tabStaff = {\n\t\tclef: {\n\t\t\ttype: 'TAB'\n\t\t}\n\t};\n\tvar tabSize = (plugin.linePitch * plugin.nbLines);\n\tvar staffs = line.staff;\n\tif (staffs) {\n\t\t// give up on staffline=0 in key \n\t\tvar firstStaff = staffs[0];\n\t\tif (firstStaff) {\n\t\t\tif (firstStaff.clef) {\n\t\t\t\tif (firstStaff.clef.stafflines == 0) {\n\t\t\t\t\tplugin.setError(\"No tablatures when stafflines=0\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstaffs.splice(\n\t\t\tstaffs.length, 0,\n\t\t\ttabStaff\n\t\t);\n\t}\n\tvar staffGroup = line.staffGroup;\n\n\tvar voices = staffGroup.voices;\n\tvar firstVoice = voices[0];\n\t// take lyrics into account if any\n\tvar lyricsHeight = getLyricHeight(firstVoice);\n\tvar padd = 3;\n\tvar prevIndex = staffIndex;\n\tvar previousStaff = staffGroup.staffs[prevIndex];\n\tvar tabTop = tabSize + padd - previousStaff.bottom - lyricsHeight;\n\tif (previousStaff.isTabStaff) {\n\t\ttabTop = previousStaff.top;\n\t}\n\tvar staffGroupInfos = {\n\t\tbottom: -1,\n\t\tisTabStaff: true,\n\t\tspecialY: initSpecialY(),\n\t\tlines: plugin.nbLines,\n\t\tlinePitch: plugin.linePitch,\n\t\tdy: 0.15,\n\t\ttop: tabTop,\n\t};\n\tvar nextTabPos = getNextTabPos(staffIndex, staffGroup.staffs);\n\tif (nextTabPos === -1)\n\t\treturn;\n\tstaffGroupInfos.parentIndex = nextTabPos - 1;\n\tstaffGroup.staffs.splice(nextTabPos, 0, staffGroupInfos);\n\t// staffGroup.staffs.push(staffGroupInfos);\n\tstaffGroup.height += tabSize + padd;\n\tvar parentStaff = getLastStaff(staffGroup.staffs, nextTabPos);\n\tvar nbVoices = 1;\n\tif (isMultiVoiceSingleStaff(staffGroup.staffs, parentStaff)) {\n\t\tnbVoices = parentStaff.voices.length;\n\t}\n\t// build from staff\n\ttabStaff.voices = [];\n\tfor (var ii = 0; ii < nbVoices; ii++) {\n\t\tvar tabVoice = new VoiceElement(0, 0);\n\t\tif (ii > 0) tabVoice.duplicate = true;\n\t\tvar nameHeight = buildTabName(plugin, renderer, tabVoice) / spacing.STEP;\n\t\tnameHeight = Math.max(nameHeight, 1) // If there is no label for the tab line, then there needs to be a little padding\n\t\t// This was pushing down the top staff by the tab label height\n\t\t//staffGroup.staffs[staffIndex].top += nameHeight;\n\t\tstaffGroup.staffs[staffIndex].top += 1;\n\t\tstaffGroup.height += nameHeight;\n\t\ttabVoice.staff = staffGroupInfos;\n\t\tvar tabVoiceIndex = voices.length\n\t\tvoices.splice(voices.length, 0, tabVoice);\n\t\tvar keySig = checkVoiceKeySig(voices, ii + staffIndex);\n\t\ttabStaff.voices[ii] = [];\n\t\tabsolutes.build(plugin, voices, tabStaff.voices[ii], ii, staffIndex, keySig, tabVoiceIndex);\n\t}\n\tlinkStaffAndTabs(staffGroup.staffs); // crossreference tabs and staff\n}\n\nmodule.exports = tabRenderer;\n","// abc_abstract_engraver.js: Creates a data structure suitable for printing a line of abc\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar BeamElem = require('./elements/beam-element');\nvar BraceElem = require('./elements/brace-element');\nvar createClef = require('./create-clef');\nvar createKeySignature = require('./create-key-signature');\nvar createNoteHead = require('./create-note-head');\nvar createTimeSignature = require('./create-time-signature');\nvar Decoration = require('./decoration');\nvar EndingElem = require('./elements/ending-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\nvar spacing = require('../helpers/spacing');\nvar StaffGroupElement = require('./elements/staff-group-element');\nvar TempoElement = require('./elements/tempo-element');\nvar TieElem = require('./elements/tie-element');\nvar TripletElem = require('./elements/triplet-element');\nvar VoiceElement = require('./elements/voice-element');\nvar addChord = require('./add-chord');\nvar pitchesToPerc = require('../../synth/pitches-to-perc')\n\nvar parseCommon = require('../../parse/abc_common');\n\nvar getDuration = function (elem) {\n\tvar d = 0;\n\tif (elem.duration) {\n\t\td = elem.duration;\n\t}\n\treturn d;\n};\n\nvar hint = false;\n\nvar chartable = {\n\trest: { 0: \"rests.whole\", 1: \"rests.half\", 2: \"rests.quarter\", 3: \"rests.8th\", 4: \"rests.16th\", 5: \"rests.32nd\", 6: \"rests.64th\", 7: \"rests.128th\", \"multi\": \"rests.multimeasure\" },\n\tnote: { \"-1\": \"noteheads.dbl\", 0: \"noteheads.whole\", 1: \"noteheads.half\", 2: \"noteheads.quarter\", 3: \"noteheads.quarter\", 4: \"noteheads.quarter\", 5: \"noteheads.quarter\", 6: \"noteheads.quarter\", 7: \"noteheads.quarter\", 'nostem': \"noteheads.quarter\" },\n\trhythm: { \"-1\": \"noteheads.slash.whole\", 0: \"noteheads.slash.whole\", 1: \"noteheads.slash.whole\", 2: \"noteheads.slash.quarter\", 3: \"noteheads.slash.quarter\", 4: \"noteheads.slash.quarter\", 5: \"noteheads.slash.quarter\", 6: \"noteheads.slash.quarter\", 7: \"noteheads.slash.quarter\", nostem: \"noteheads.slash.nostem\" },\n\tx: { \"-1\": \"noteheads.indeterminate\", 0: \"noteheads.indeterminate\", 1: \"noteheads.indeterminate\", 2: \"noteheads.indeterminate\", 3: \"noteheads.indeterminate\", 4: \"noteheads.indeterminate\", 5: \"noteheads.indeterminate\", 6: \"noteheads.indeterminate\", 7: \"noteheads.indeterminate\", nostem: \"noteheads.indeterminate\" },\n\tharmonic: { \"-1\": \"noteheads.harmonic.quarter\", 0: \"noteheads.harmonic.quarter\", 1: \"noteheads.harmonic.quarter\", 2: \"noteheads.harmonic.quarter\", 3: \"noteheads.harmonic.quarter\", 4: \"noteheads.harmonic.quarter\", 5: \"noteheads.harmonic.quarter\", 6: \"noteheads.harmonic.quarter\", 7: \"noteheads.harmonic.quarter\", nostem: \"noteheads.harmonic.quarter\" },\n\ttriangle: { \"-1\": \"noteheads.triangle.quarter\", 0: \"noteheads.triangle.quarter\", 1: \"noteheads.triangle.quarter\", 2: \"noteheads.triangle.quarter\", 3: \"noteheads.triangle.quarter\", 4: \"noteheads.triangle.quarter\", 5: \"noteheads.triangle.quarter\", 6: \"noteheads.triangle.quarter\", 7: \"noteheads.triangle.quarter\", nostem: \"noteheads.triangle.quarter\" },\n\tuflags: { 3: \"flags.u8th\", 4: \"flags.u16th\", 5: \"flags.u32nd\", 6: \"flags.u64th\" },\n\tdflags: { 3: \"flags.d8th\", 4: \"flags.d16th\", 5: \"flags.d32nd\", 6: \"flags.d64th\" }\n};\n\nvar AbstractEngraver = function (getTextSize, tuneNumber, options) {\n\tthis.decoration = new Decoration();\n\tthis.getTextSize = getTextSize;\n\tthis.tuneNumber = tuneNumber;\n\tthis.isBagpipes = options.bagpipes;\n\tthis.flatBeams = options.flatbeams;\n\tthis.graceSlurs = options.graceSlurs;\n\tthis.percmap = options.percmap;\n\tthis.initialClef = options.initialClef\n\tthis.jazzchords = !!options.jazzchords\n\tthis.accentAbove = !!options.accentAbove\n\tthis.germanAlphabet = !!options.germanAlphabet\n\tthis.reset();\n};\n\nAbstractEngraver.prototype.reset = function () {\n\tthis.slurs = {};\n\tthis.ties = [];\n\tthis.voiceScale = 1;\n\tthis.voiceColor = undefined;\n\tthis.slursbyvoice = {};\n\tthis.tiesbyvoice = {};\n\tthis.endingsbyvoice = {};\n\tthis.scaleByVoice = {};\n\tthis.colorByVoice = {};\n\tthis.tripletmultiplier = 1;\n\n\tthis.abcline = undefined;\n\tthis.accidentalSlot = undefined;\n\tthis.accidentalshiftx = undefined;\n\tthis.dotshiftx = undefined;\n\tthis.hasVocals = false;\n\tthis.minY = undefined;\n\tthis.partstartelem = undefined;\n\tthis.startlimitelem = undefined;\n\tthis.stemdir = undefined;\n};\n\nAbstractEngraver.prototype.setStemHeight = function (heightInPixels) {\n\tthis.stemHeight = Math.round(heightInPixels * 10 / spacing.STEP) / 10;\n};\n\nAbstractEngraver.prototype.getCurrentVoiceId = function (s, v) {\n\treturn \"s\" + s + \"v\" + v;\n};\n\nAbstractEngraver.prototype.pushCrossLineElems = function (s, v) {\n\tthis.slursbyvoice[this.getCurrentVoiceId(s, v)] = this.slurs;\n\tthis.tiesbyvoice[this.getCurrentVoiceId(s, v)] = this.ties;\n\tthis.endingsbyvoice[this.getCurrentVoiceId(s, v)] = this.partstartelem;\n\tthis.scaleByVoice[this.getCurrentVoiceId(s, v)] = this.voiceScale;\n\tif (this.voiceColor)\n\t\tthis.colorByVoice[this.getCurrentVoiceId(s, v)] = this.voiceColor;\n};\n\nAbstractEngraver.prototype.popCrossLineElems = function (s, v) {\n\tthis.slurs = this.slursbyvoice[this.getCurrentVoiceId(s, v)] || {};\n\tthis.ties = this.tiesbyvoice[this.getCurrentVoiceId(s, v)] || [];\n\tthis.partstartelem = this.endingsbyvoice[this.getCurrentVoiceId(s, v)];\n\tthis.voiceScale = this.scaleByVoice[this.getCurrentVoiceId(s, v)];\n\tif (this.voiceScale === undefined) this.voiceScale = 1;\n\tthis.voiceColor = this.colorByVoice[this.getCurrentVoiceId(s, v)];\n};\n\nAbstractEngraver.prototype.containsLyrics = function (staves) {\n\tfor (var i = 0; i < staves.length; i++) {\n\t\tfor (var j = 0; j < staves[i].voices.length; j++) {\n\t\t\tfor (var k = 0; k < staves[i].voices[j].length; k++) {\n\t\t\t\tvar el = staves[i].voices[j][k];\n\t\t\t\tif (el.lyric) {\n\t\t\t\t\t// We just want to see if there are vocals below the music to know where to put the dynamics.\n\t\t\t\t\tif (!el.positioning || el.positioning.vocalPosition === 'below')\n\t\t\t\t\t\tthis.hasVocals = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nAbstractEngraver.prototype.createABCLine = function (staffs, tempo, l) {\n\tthis.minY = 2; // PER: This will be the lowest that any note reaches. It will be used to set the dynamics row.\n\t// See if there are any lyrics on this line.\n\tthis.containsLyrics(staffs);\n\tvar staffgroup = new StaffGroupElement(this.getTextSize);\n\tthis.tempoSet = false;\n\tfor (var s = 0; s < staffs.length; s++) {\n\t\tif (hint)\n\t\t\tthis.restoreState();\n\t\thint = false;\n\t\tthis.createABCStaff(staffgroup, staffs[s], tempo, s, l);\n\t}\n\treturn staffgroup;\n};\n\nAbstractEngraver.prototype.createABCStaff = function (staffgroup, abcstaff, tempo, s, l) {\n\t// If the tempo is passed in, then the first element should get the tempo attached to it.\n\tstaffgroup.getTextSize.updateFonts(abcstaff);\n\tfor (var v = 0; v < abcstaff.voices.length; v++) {\n\t\tvar voice = new VoiceElement(v, abcstaff.voices.length);\n\t\tif (v === 0) {\n\t\t\tvoice.barfrom = (abcstaff.connectBarLines === \"start\" || abcstaff.connectBarLines === \"continue\");\n\t\t\tvoice.barto = (abcstaff.connectBarLines === \"continue\" || abcstaff.connectBarLines === \"end\");\n\t\t} else {\n\t\t\tvoice.duplicate = true; // bar lines and other duplicate info need not be created\n\t\t}\n\t\tif (abcstaff.title && abcstaff.title[v]) {\n\t\t\tvoice.header = abcstaff.title[v].replace(/\\\\n/g, \"\\n\");\n\t\t\tvoice.headerPosition = 6 + staffgroup.getTextSize.baselineToCenter(voice.header, \"voicefont\", 'staff-extra voice-name', v, abcstaff.voices.length) / spacing.STEP;\n\t\t}\n\t\tif (abcstaff.clef && abcstaff.clef.type === \"perc\")\n\t\t\tvoice.isPercussion = true;\n\t\tvar clef = (!this.initialClef || l === 0) && createClef(abcstaff.clef, this.tuneNumber);\n\t\tif (clef) {\n\t\t\tif (v === 0 && abcstaff.barNumber) {\n\t\t\t\tthis.addMeasureNumber(abcstaff.barNumber, clef);\n\t\t\t}\n\t\t\tvoice.addChild(clef);\n\t\t\tthis.startlimitelem = clef; // limit ties here\n\t\t}\n\t\tvar keySig = createKeySignature(abcstaff.key, this.tuneNumber);\n\t\tif (keySig) {\n\t\t\tvoice.addChild(keySig);\n\t\t\tthis.startlimitelem = keySig; // limit ties here\n\t\t}\n\t\tif (abcstaff.meter) {\n\t\t\tif (abcstaff.meter.type === 'specified') {\n\t\t\t\tthis.measureLength = abcstaff.meter.value[0].num / abcstaff.meter.value[0].den;\n\t\t\t} else\n\t\t\t\tthis.measureLength = 1;\n\t\t\tvar ts = createTimeSignature(abcstaff.meter, this.tuneNumber);\n\t\t\tvoice.addChild(ts);\n\t\t\tthis.startlimitelem = ts; // limit ties here\n\t\t}\n\t\tif (voice.duplicate)\n\t\t\tvoice.children = []; // we shouldn't reprint the above if we're reusing the same staff. We just created them to get the right spacing.\n\t\tvar staffLines = abcstaff.clef.stafflines || abcstaff.clef.stafflines === 0 ? abcstaff.clef.stafflines : 5;\n\t\tstaffgroup.addVoice(voice, s, staffLines);\n\t\tvar isSingleLineStaff = staffLines === 1;\n\t\tthis.createABCVoice(abcstaff.voices[v], tempo, s, v, isSingleLineStaff, voice);\n\t\tstaffgroup.setStaffLimits(voice);\n\t\tif (v === 0) {\n\t\t\t// only do brace and bracket processing on the first voice, otherwise it would be done twice.\n\t\t\tif (abcstaff.brace === \"start\" || (!staffgroup.brace && abcstaff.brace)) {\n\t\t\t\tif (!staffgroup.brace)\n\t\t\t\t\tstaffgroup.brace = [];\n\t\t\t\tstaffgroup.brace.push(new BraceElem(voice, \"brace\"));\n\t\t\t} else if (abcstaff.brace === \"end\" && staffgroup.brace) {\n\t\t\t\tstaffgroup.brace[staffgroup.brace.length - 1].setBottomStaff(voice);\n\t\t\t} else if (abcstaff.brace === \"continue\" && staffgroup.brace) {\n\t\t\t\tstaffgroup.brace[staffgroup.brace.length - 1].continuing(voice);\n\t\t\t}\n\t\t\tif (abcstaff.bracket === \"start\" || (!staffgroup.bracket && abcstaff.bracket)) {\n\t\t\t\tif (!staffgroup.bracket)\n\t\t\t\t\tstaffgroup.bracket = [];\n\t\t\t\tstaffgroup.bracket.push(new BraceElem(voice, \"bracket\"));\n\t\t\t} else if (abcstaff.bracket === \"end\" && staffgroup.bracket) {\n\t\t\t\tstaffgroup.bracket[staffgroup.bracket.length - 1].setBottomStaff(voice);\n\t\t\t} else if (abcstaff.bracket === \"continue\" && staffgroup.bracket) {\n\t\t\t\tstaffgroup.bracket[staffgroup.bracket.length - 1].continuing(voice);\n\t\t\t}\n\t\t}\n\t}\n};\n\nfunction getBeamGroup(abcline, pos) {\n\t// If there are notes beamed together, they are handled as a group, so find all of them here.\n\tvar elem = abcline[pos];\n\tif (elem.el_type !== 'note' || !elem.startBeam || elem.endBeam)\n\t\treturn { count: 1, elem: elem };\n\n\tvar group = [];\n\twhile (pos < abcline.length && abcline[pos].el_type === 'note') {\n\t\tgroup.push(abcline[pos]);\n\t\tif (abcline[pos].endBeam)\n\t\t\tbreak;\n\t\tpos++;\n\t}\n\treturn { count: group.length, elem: group };\n}\n\nAbstractEngraver.prototype.createABCVoice = function (abcline, tempo, s, v, isSingleLineStaff, voice) {\n\tthis.popCrossLineElems(s, v);\n\tthis.stemdir = (this.isBagpipes) ? \"down\" : null;\n\tthis.abcline = abcline;\n\tif (this.partstartelem) {\n\t\tthis.partstartelem = new EndingElem(\"\", null, null);\n\t\tvoice.addOther(this.partstartelem);\n\t}\n\tvar voiceNumber = voice.voicetotal < 2 ? -1 : voice.voicenumber;\n\tfor (var slur in this.slurs) {\n\t\tif (this.slurs.hasOwnProperty(slur)) {\n\t\t\t// this is already a slur element, but it was created for the last line, so recreate it.\n\t\t\tthis.slurs[slur] = new TieElem({ force: this.slurs[slur].force, voiceNumber: voiceNumber, stemDir: this.slurs[slur].stemDir, style: this.slurs[slur].dotted });\n\t\t\tif (hint) this.slurs[slur].setHint();\n\t\t\tvoice.addOther(this.slurs[slur]);\n\t\t}\n\t}\n\tfor (var i = 0; i < this.ties.length; i++) {\n\t\t// this is already a tie element, but it was created for the last line, so recreate it.\n\t\tthis.ties[i] = new TieElem({ force: this.ties[i].force, stemDir: this.ties[i].stemDir, voiceNumber: voiceNumber, style: this.ties[i].dotted });\n\t\tif (hint) this.ties[i].setHint();\n\t\tvoice.addOther(this.ties[i]);\n\t}\n\n\tfor (var j = 0; j < this.abcline.length; j++) {\n\t\tsetAveragePitch(this.abcline[j]);\n\t\tthis.minY = Math.min(this.abcline[j].minpitch, this.minY);\n\t}\n\n\tvar isFirstStaff = (s === 0);\n\tvar pos = 0;\n\twhile (pos < this.abcline.length) {\n\t\tvar ret = getBeamGroup(this.abcline, pos);\n\t\tvar abselems = this.createABCElement(isFirstStaff, isSingleLineStaff, voice, ret.elem);\n\t\tif (abselems) {\n\t\t\tfor (i = 0; i < abselems.length; i++) {\n\t\t\t\tif (!this.tempoSet && tempo && !tempo.suppress) {\n\t\t\t\t\tthis.tempoSet = true;\n\t\t\t\t\tvar tempoElement = new AbsoluteElement(tempo, 0, 0, \"tempo\", this.tuneNumber, {});\n\t\t\t\t\ttempoElement.addFixedX(new TempoElement(tempo, this.tuneNumber, createNoteHead));\n\t\t\t\t\tvoice.addChild(tempoElement);\n\t\t\t\t}\n\t\t\t\tvoice.addChild(abselems[i]);\n\t\t\t}\n\t\t}\n\t\tpos += ret.count;\n\t}\n\tthis.pushCrossLineElems(s, v);\n};\n\nAbstractEngraver.prototype.saveState = function () {\n\tthis.tiesSave = parseCommon.cloneArray(this.ties);\n\tthis.slursSave = parseCommon.cloneHashOfHash(this.slurs);\n\tthis.slursbyvoiceSave = parseCommon.cloneHashOfHash(this.slursbyvoice);\n\tthis.tiesbyvoiceSave = parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoice);\n};\n\nAbstractEngraver.prototype.restoreState = function () {\n\tthis.ties = parseCommon.cloneArray(this.tiesSave);\n\tthis.slurs = parseCommon.cloneHashOfHash(this.slursSave);\n\tthis.slursbyvoice = parseCommon.cloneHashOfHash(this.slursbyvoiceSave);\n\tthis.tiesbyvoice = parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoiceSave);\n};\n\n// function writeMeasureWidth(voice) {\n// \tvar width = 0;\n// \tfor (var i = voice.children.length-1; i >= 0; i--) {\n// \t\tvar elem = voice.children[i];\n// \t\tif (elem.abcelem.el_type === 'bar')\n// \t\t\tbreak;\n// \t\twidth += elem.w;\n// \t}\n// \treturn new RelativeElement(width.toFixed(2), -70, 0, undefined, {type:\"debug\"});\n// }\n\n// return an array of AbsoluteElement\nAbstractEngraver.prototype.createABCElement = function (isFirstStaff, isSingleLineStaff, voice, elem) {\n\tvar elemset = [];\n\tswitch (elem.el_type) {\n\t\tcase undefined:\n\t\t\t// it is undefined if we were passed an array in - an array means a set of notes that should be beamed together.\n\t\t\telemset = this.createBeam(isSingleLineStaff, voice, elem);\n\t\t\tbreak;\n\t\tcase \"note\":\n\t\t\telemset[0] = this.createNote(elem, false, isSingleLineStaff, voice);\n\t\t\tif (this.triplet && this.triplet.isClosed()) {\n\t\t\t\tvoice.addOther(this.triplet);\n\t\t\t\tthis.triplet = null;\n\t\t\t\tthis.tripletmultiplier = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"bar\":\n\t\t\telemset[0] = this.createBarLine(voice, elem, isFirstStaff);\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\t//\t elemset[0].addChild(writeMeasureWidth(voice));\n\t\t\tbreak;\n\t\tcase \"meter\":\n\t\t\telemset[0] = createTimeSignature(elem, this.tuneNumber);\n\t\t\tthis.startlimitelem = elemset[0]; // limit ties here\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"clef\":\n\t\t\telemset[0] = createClef(elem, this.tuneNumber);\n\t\t\tif (!elemset[0]) return null;\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"key\":\n\t\t\tvar absKey = createKeySignature(elem, this.tuneNumber);\n\t\t\tif (absKey) {\n\t\t\t\telemset[0] = absKey;\n\t\t\t\tthis.startlimitelem = elemset[0]; // limit ties here\n\t\t\t}\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"stem\":\n\t\t\tthis.stemdir = elem.direction === \"auto\" ? undefined : elem.direction;\n\t\t\tbreak;\n\t\tcase \"part\":\n\t\t\tvar abselem = new AbsoluteElement(elem, 0, 0, 'part', this.tuneNumber);\n\t\t\tvar dim = this.getTextSize.calc(elem.title, 'partsfont', \"part\");\n\t\t\tabselem.addFixedX(new RelativeElement(elem.title, 0, 0, undefined, { type: \"part\", height: dim.height / spacing.STEP }));\n\t\t\telemset[0] = abselem;\n\t\t\tbreak;\n\t\tcase \"tempo\":\n\t\t\tvar abselem3 = new AbsoluteElement(elem, 0, 0, 'tempo', this.tuneNumber);\n\t\t\tabselem3.addFixedX(new TempoElement(elem, this.tuneNumber, createNoteHead));\n\t\t\telemset[0] = abselem3;\n\t\t\tbreak;\n\t\tcase \"style\":\n\t\t\tif (elem.head === \"normal\")\n\t\t\t\tdelete this.style;\n\t\t\telse\n\t\t\t\tthis.style = elem.head;\n\t\t\tbreak;\n\t\tcase \"hint\":\n\t\t\thint = true;\n\t\t\tthis.saveState();\n\t\t\tbreak;\n\t\tcase \"midi\":\n\t\t\t// This has no effect on the visible music, so just skip it.\n\t\t\tbreak;\n\t\tcase \"scale\":\n\t\t\tthis.voiceScale = elem.size;\n\t\t\tbreak;\n\t\tcase \"color\":\n\t\t\tthis.voiceColor = elem.color;\n\t\t\tvoice.color = this.voiceColor;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tvar abselem2 = new AbsoluteElement(elem, 0, 0, 'unsupported', this.tuneNumber);\n\t\t\tabselem2.addFixed(new RelativeElement(\"element type \" + elem.el_type, 0, 0, undefined, { type: \"debug\" }));\n\t\t\telemset[0] = abselem2;\n\t}\n\n\treturn elemset;\n};\n\nfunction setAveragePitch(elem) {\n\tif (elem.pitches) {\n\t\tsortPitch(elem);\n\t\tvar sum = 0;\n\t\tfor (var p = 0; p < elem.pitches.length; p++) {\n\t\t\tsum += elem.pitches[p].verticalPos;\n\t\t}\n\t\telem.averagepitch = sum / elem.pitches.length;\n\t\telem.minpitch = elem.pitches[0].verticalPos;\n\t\telem.maxpitch = elem.pitches[elem.pitches.length - 1].verticalPos;\n\t}\n}\n\nAbstractEngraver.prototype.createBeam = function (isSingleLineStaff, voice, elems) {\n\tvar abselemset = [];\n\n\tvar beamelem = new BeamElem(this.stemHeight * this.voiceScale, this.stemdir, this.flatBeams, elems[0]);\n\tif (hint) beamelem.setHint();\n\tfor (var i = 0; i < elems.length; i++) {\n\t\t// Do a first pass to figure out the stem direction before creating the notes, so that staccatos and other decorations can be placed correctly.\n\t\tbeamelem.runningDirection(elems[i])\n\t}\n\tbeamelem.setStemDirection()\n\tvar tempStemDir = this.stemdir\n\tthis.stemdir = beamelem.stemsUp ? 'up' : 'down'\n\tfor (i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tvar abselem = this.createNote(elem, true, isSingleLineStaff, voice);\n\t\tabselemset.push(abselem);\n\t\tbeamelem.add(abselem);\n\t\tif (this.triplet && this.triplet.isClosed()) {\n\t\t\tvoice.addOther(this.triplet);\n\t\t\tthis.triplet = null;\n\t\t\tthis.tripletmultiplier = 1;\n\t\t}\n\t}\n\tbeamelem.calcDir();\n\tvoice.addBeam(beamelem);\n\tthis.stemdir = tempStemDir\n\treturn abselemset;\n};\n\nvar sortPitch = function (elem) {\n\tvar sorted;\n\tdo {\n\t\tsorted = true;\n\t\tfor (var p = 0; p < elem.pitches.length - 1; p++) {\n\t\t\tif (elem.pitches[p].pitch > elem.pitches[p + 1].pitch) {\n\t\t\t\tsorted = false;\n\t\t\t\tvar tmp = elem.pitches[p];\n\t\t\t\telem.pitches[p] = elem.pitches[p + 1];\n\t\t\t\telem.pitches[p + 1] = tmp;\n\t\t\t}\n\t\t}\n\t} while (!sorted);\n};\n\nvar ledgerLines = function (abselem, minPitch, maxPitch, isRest, symbolWidth, additionalLedgers, dir, dx, scale) {\n\tfor (var i = maxPitch; i > 11; i--) {\n\t\tif (i % 2 === 0 && !isRest) {\n\t\t\tabselem.addFixed(new RelativeElement(null, dx, (symbolWidth + 4) * scale, i, { type: \"ledger\" }));\n\t\t}\n\t}\n\n\tfor (i = minPitch; i < 1; i++) {\n\t\tif (i % 2 === 0 && !isRest) {\n\t\t\tabselem.addFixed(new RelativeElement(null, dx, (symbolWidth + 4) * scale, i, { type: \"ledger\" }));\n\t\t}\n\t}\n\n\tfor (i = 0; i < additionalLedgers.length; i++) { // PER: draw additional ledgers\n\t\tvar ofs = symbolWidth;\n\t\tif (dir === 'down') ofs = -ofs;\n\t\tabselem.addFixed(new RelativeElement(null, ofs + dx, (symbolWidth + 4) * scale, additionalLedgers[i], { type: \"ledger\" }));\n\t}\n};\n\nAbstractEngraver.prototype.addGraceNotes = function (elem, voice, abselem, notehead, stemHeight, isBagpipes, roomtaken) {\n\tvar gracescale = 3 / 5;\n\tvar graceScaleStem = 3.5 / 5; // TODO-PER: empirically found constant.\n\tstemHeight = Math.round(stemHeight * graceScaleStem);\n\tvar gracebeam = null;\n\tvar flag;\n\n\tif (elem.gracenotes.length > 1) {\n\t\tgracebeam = new BeamElem(stemHeight, \"grace\", isBagpipes);\n\t\tif (hint) gracebeam.setHint();\n\t\tgracebeam.mainNote = abselem;\t// this gives us a reference back to the note this is attached to so that the stems can be attached somewhere.\n\t}\n\n\tvar i;\n\tvar graceoffsets = [];\n\tfor (i = elem.gracenotes.length - 1; i >= 0; i--) { // figure out where to place each gracenote\n\t\troomtaken += 10;\n\t\tgraceoffsets[i] = roomtaken;\n\t\tif (elem.gracenotes[i].accidental) {\n\t\t\troomtaken += 7;\n\t\t}\n\t}\n\n\tfor (i = 0; i < elem.gracenotes.length; i++) {\n\t\tvar gracepitch = elem.gracenotes[i].verticalPos;\n\n\t\tflag = (gracebeam) ? null : chartable.uflags[(isBagpipes) ? 5 : 3];\n\t\tvar accidentalSlot = [];\n\t\tvar ret = createNoteHead(abselem, \"noteheads.quarter\", elem.gracenotes[i],\n\t\t\t{ dir: \"up\", headx: -graceoffsets[i], extrax: -graceoffsets[i], flag: flag, scale: gracescale * this.voiceScale, accidentalSlot: accidentalSlot });\n\t\tret.notehead.highestVert = ret.notehead.pitch + stemHeight;\n\t\tvar grace = ret.notehead;\n\t\tthis.addSlursAndTies(abselem, elem.gracenotes[i], grace, voice, \"up\", true);\n\n\t\tabselem.addExtra(grace);\n\t\t// PER: added acciaccatura slash\n\t\tif (elem.gracenotes[i].acciaccatura) {\n\t\t\tvar pos = elem.gracenotes[i].verticalPos + 7 * gracescale; // the same formula that determines the flag position.\n\t\t\tvar dAcciaccatura = gracebeam ? 5 : 6; // just an offset to make it line up correctly.\n\t\t\tabselem.addRight(new RelativeElement(\"flags.ugrace\", -graceoffsets[i] + dAcciaccatura, 0, pos, { scalex: gracescale, scaley: gracescale }));\n\t\t}\n\t\tif (gracebeam) { // give the beam the necessary info\n\t\t\tvar graceDuration = elem.gracenotes[i].duration / 2;\n\t\t\tif (isBagpipes) graceDuration /= 2;\n\t\t\tvar pseudoabselem = {\n\t\t\t\theads: [grace],\n\t\t\t\tabcelem: { averagepitch: gracepitch, minpitch: gracepitch, maxpitch: gracepitch, duration: graceDuration }\n\t\t\t};\n\t\t\tgracebeam.add(pseudoabselem);\n\t\t} else { // draw the stem\n\t\t\tvar p1 = gracepitch + 1 / 3 * gracescale;\n\t\t\tvar p2 = gracepitch + 7 * gracescale;\n\t\t\tvar dx = grace.dx + grace.w;\n\t\t\tvar width = -0.6;\n\t\t\tabselem.addExtra(new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width }));\n\t\t}\n\t\tledgerLines(abselem, gracepitch, gracepitch, false, glyphs.getSymbolWidth(\"noteheads.quarter\"), [], true, grace.dx - 1, 0.6);\n\n\t\t// if this is the first grace note, we might want to start a slur.\n\t\t// there is a slur if graceSlurs is specifically set.\n\t\t// there is no slur if it is bagpipes.\n\t\t// there is not a slur if the element is a spacer or invisible rest.\n\t\tvar isInvisibleRest = elem.rest && (elem.rest.type === \"spacer\" || elem.rest.type === \"invisible\");\n\t\tif (i === 0 && !isBagpipes && this.graceSlurs && !isInvisibleRest) {\n\t\t\t// This is the overall slur that is under the grace notes.\n\t\t\tvoice.addOther(new TieElem({ anchor1: grace, anchor2: notehead, isGrace: true }));\n\t\t}\n\t}\n\n\tif (gracebeam) {\n\t\tgracebeam.calcDir();\n\t\tvoice.addBeam(gracebeam);\n\t}\n\treturn roomtaken;\n};\n\nfunction addRestToAbsElement(abselem, elem, duration, dot, isMultiVoice, stemdir, isSingleLineStaff, durlog, voiceScale) {\n\tvar c;\n\tvar restpitch = 7;\n\tvar noteHead;\n\tvar roomTaken;\n\tvar roomTakenRight;\n\n\tif (isMultiVoice) {\n\t\tif (stemdir === \"down\") restpitch = 3;\n\t\tif (stemdir === \"up\") restpitch = 11;\n\t}\n\t// There is special placement for the percussion staff. If there is one staff line, then move the rest position.\n\tif (isSingleLineStaff) {\n\t\t// The half and whole rests are attached to different lines normally, so we need to tweak their position to get them to both be attached to the same one.\n\t\tif (duration < 0.5)\n\t\t\trestpitch = 7;\n\t\telse if (duration < 1)\n\t\t\trestpitch = 7;\t// half rest\n\t\telse\n\t\t\trestpitch = 5; // whole rest\n\t}\n\tswitch (elem.rest.type) {\n\t\tcase \"whole\":\n\t\t\tc = chartable.rest[0];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tdot = 0;\n\t\t\tbreak;\n\t\tcase \"rest\":\n\t\t\tif (elem.style === \"rhythm\") // special case for rhythm: rests are a handy way to express the rhythm.\n\t\t\t\tc = chartable.rhythm[-durlog];\n\t\t\telse\n\t\t\t\tc = chartable.rest[-durlog];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tbreak;\n\t\tcase \"invisible\":\n\t\tcase \"invisible-multimeasure\":\n\t\tcase \"spacer\":\n\t\t\tc = \"\";\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tbreak;\n\t\tcase \"multimeasure\":\n\t\t\tc = chartable.rest['multi'];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tdot = 0;\n\t\t\tvar mmWidth = glyphs.getSymbolWidth(c);\n\t\t\tabselem.addHead(new RelativeElement(c, mmWidth, mmWidth * 2, 7));\n\t\t\tvar numMeasures = new RelativeElement(\"\" + elem.rest.text, mmWidth, mmWidth, 16, { type: \"multimeasure-text\" });\n\t\t\tabselem.addExtra(numMeasures);\n\t}\n\tif (elem.rest.type.indexOf(\"multimeasure\") < 0 && elem.rest.type !== \"invisible\") {\n\t\tvar ret = createNoteHead(abselem, c, { verticalPos: restpitch },\n\t\t\t{ dot: dot, scale: voiceScale });\n\t\tnoteHead = ret.notehead;\n\t\tif (noteHead) {\n\t\t\tabselem.addHead(noteHead);\n\t\t\troomTaken = ret.accidentalshiftx;\n\t\t\troomTakenRight = ret.dotshiftx;\n\t\t}\n\t}\n\treturn { noteHead: noteHead, roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n}\n\nfunction addIfNotExist(arr, item) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (JSON.stringify(arr[i]) === JSON.stringify(item))\n\t\t\treturn;\n\t}\n\tarr.push(item);\n}\n\nAbstractEngraver.prototype.addNoteToAbcElement = function (abselem, elem, dot, stemdir, style, zeroDuration, durlog, nostem, voice) {\n\tvar dotshiftx = 0; // room taken by chords with displaced noteheads which cause dots to shift\n\tvar noteHead;\n\tvar roomTaken = 0;\n\tvar roomTakenRight = 0;\n\tvar min;\n\tvar i;\n\tvar additionalLedgers = [];\n\t// The accidentalSlot will hold a list of all the accidentals on this chord. Each element is a vertical place,\n\t// and contains a pitch, which is the last pitch that contains an accidental in that slot. The slots are numbered\n\t// from closest to the note to farther left. We only need to know the last accidental we placed because\n\t// we know that the pitches are sorted by now.\n\tvar accidentalSlot = [];\n\tvar symbolWidth = 0;\n\n\tvar dir = (elem.averagepitch >= 6) ? \"down\" : \"up\";\n\tif (stemdir) dir = stemdir;\n\n\tstyle = elem.style ? elem.style : style; // get the style of note head.\n\tif (!style || style === \"normal\") style = \"note\";\n\tvar noteSymbol;\n\tif (zeroDuration)\n\t\tnoteSymbol = chartable[style].nostem;\n\telse\n\t\tnoteSymbol = chartable[style][-durlog];\n\tif (!noteSymbol)\n\t\tconsole.log(\"noteSymbol:\", style, durlog, zeroDuration);\n\n\t// determine elements of chords which should be shifted\n\tvar p;\n\tfor (p = (dir === \"down\") ? elem.pitches.length - 2 : 1; (dir === \"down\") ? p >= 0 : p < elem.pitches.length; p = (dir === \"down\") ? p - 1 : p + 1) {\n\t\tvar prev = elem.pitches[(dir === \"down\") ? p + 1 : p - 1];\n\t\tvar curr = elem.pitches[p];\n\t\tvar delta = (dir === \"down\") ? prev.pitch - curr.pitch : curr.pitch - prev.pitch;\n\t\tif (delta <= 1 && !prev.printer_shift) {\n\t\t\tcurr.printer_shift = (delta) ? \"different\" : \"same\";\n\t\t\tif (curr.verticalPos > 11 || curr.verticalPos < 1) { // PER: add extra ledger line\n\t\t\t\tadditionalLedgers.push(curr.verticalPos - (curr.verticalPos % 2));\n\t\t\t}\n\t\t\tif (dir === \"down\") {\n\t\t\t\troomTaken = glyphs.getSymbolWidth(noteSymbol) + 2;\n\t\t\t} else {\n\t\t\t\tdotshiftx = glyphs.getSymbolWidth(noteSymbol) + 2;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar pp = elem.pitches.length;\n\tfor (p = 0; p < elem.pitches.length; p++) {\n\n\t\tif (!nostem) {\n\t\t\tvar flag;\n\t\t\tif ((dir === \"down\" && p !== 0) || (dir === \"up\" && p !== pp - 1)) { // not the stemmed elem of the chord\n\t\t\t\tflag = null;\n\t\t\t} else {\n\t\t\t\tflag = chartable[(dir === \"down\") ? \"dflags\" : \"uflags\"][-durlog];\n\t\t\t}\n\t\t}\n\t\tvar c;\n\t\tif (elem.pitches[p].style) { // There is a style for the whole group of pitches, but there could also be an override for a particular pitch.\n\t\t\tc = chartable[elem.pitches[p].style][-durlog];\n\t\t} else if (voice.isPercussion && this.percmap) {\n\t\t\tc = noteSymbol;\n\t\t\tvar percHead = this.percmap[pitchesToPerc(elem.pitches[p])];\n\t\t\tif (percHead && percHead.noteHead) {\n\t\t\t\tif (chartable[percHead.noteHead])\n\t\t\t\t\tc = chartable[percHead.noteHead][-durlog];\n\t\t\t}\n\t\t} else\n\t\t\tc = noteSymbol;\n\t\t// The highest position for the sake of placing slurs is itself if the slur is internal. It is the highest position possible if the slur is for the whole chord.\n\t\t// If the note is the only one in the chord, then any slur it has counts as if it were on the whole chord.\n\t\telem.pitches[p].highestVert = elem.pitches[p].verticalPos;\n\t\tvar isTopWhenStemIsDown = (stemdir === \"up\" || dir === \"up\") && p === 0;\n\t\tvar isBottomWhenStemIsUp = (stemdir === \"down\" || dir === \"down\") && p === pp - 1;\n\t\tif (isTopWhenStemIsDown || isBottomWhenStemIsUp) { // place to put slurs if not already on pitches\n\n\t\t\tif (elem.startSlur || pp === 1) {\n\t\t\t\telem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos;\n\t\t\t\tif (getDuration(elem) < 1 && (stemdir === \"up\" || dir === \"up\"))\n\t\t\t\t\telem.pitches[p].highestVert += 6; // If the stem is up, then compensate for the length of the stem\n\t\t\t}\n\t\t\tif (elem.startSlur) {\n\t\t\t\tif (!elem.pitches[p].startSlur) elem.pitches[p].startSlur = []; //TODO possibly redundant, provided array is not optional\n\t\t\t\tfor (i = 0; i < elem.startSlur.length; i++) {\n\t\t\t\t\taddIfNotExist(elem.pitches[p].startSlur, elem.startSlur[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (elem.endSlur) {\n\t\t\t\telem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos;\n\t\t\t\tif (getDuration(elem) < 1 && (stemdir === \"up\" || dir === \"up\"))\n\t\t\t\t\telem.pitches[p].highestVert += 6; // If the stem is up, then compensate for the length of the stem\n\t\t\t\tif (!elem.pitches[p].endSlur) elem.pitches[p].endSlur = []; //TODO possibly redundant, provided array is not optional\n\t\t\t\tfor (i = 0; i < elem.endSlur.length; i++) {\n\t\t\t\t\taddIfNotExist(elem.pitches[p].endSlur, elem.endSlur[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar hasStem = !nostem && durlog <= -1;\n\t\tvar ret = createNoteHead(abselem, c, elem.pitches[p],\n\t\t\t{ dir: dir, extrax: -roomTaken, flag: flag, dot: dot, dotshiftx: dotshiftx, scale: this.voiceScale, accidentalSlot: accidentalSlot, shouldExtendStem: !stemdir, printAccidentals: !voice.isPercussion });\n\t\tsymbolWidth = Math.max(glyphs.getSymbolWidth(c), symbolWidth);\n\t\tabselem.extraw -= ret.extraLeft;\n\t\tnoteHead = ret.notehead;\n\t\tif (noteHead) {\n\t\t\tthis.addSlursAndTies(abselem, elem.pitches[p], noteHead, voice, hasStem ? dir : null, false);\n\n\t\t\tif (elem.gracenotes && elem.gracenotes.length > 0)\n\t\t\t\tnoteHead.bottom = noteHead.bottom - 1;\t // If there is a tie to the grace notes, leave a little more room for the note to avoid collisions.\n\t\t\tabselem.addHead(noteHead);\n\t\t}\n\t\troomTaken += ret.accidentalshiftx;\n\t\troomTakenRight = Math.max(roomTakenRight, ret.dotshiftx);\n\t}\n\n\t// draw stem from the furthest note to a pitch above/below the stemmed note\n\tif (hasStem) {\n\t\tvar stemHeight = Math.round(70 * this.voiceScale) / 10;\n\t\tvar p1 = (dir === \"down\") ? elem.minpitch - stemHeight : elem.minpitch + 1 / 3;\n\t\t// PER added stemdir test to make the line meet the note.\n\t\tif (p1 > 6 && !stemdir) p1 = 6;\n\t\tvar p2 = (dir === \"down\") ? elem.maxpitch - 1 / 3 : elem.maxpitch + stemHeight;\n\t\t// PER added stemdir test to make the line meet the note.\n\t\tif (p2 < 6 && !stemdir) p2 = 6;\n\t\tvar dx = (dir === \"down\" || abselem.heads.length === 0) ? 0 : abselem.heads[0].w;\n\t\tvar width = (dir === \"down\") ? 1 : -1;\n\t\t// TODO-PER-HACK: One type of note head has a different placement of the stem. This should be more generically calculated:\n\t\tif (noteHead && noteHead.c === 'noteheads.slash.quarter') {\n\t\t\tif (dir === 'down')\n\t\t\t\tp2 -= 1;\n\t\t\telse\n\t\t\t\tp1 += 1;\n\t\t}\n\t\tif (noteHead && noteHead.c === 'noteheads.triangle.quarter') {\n\t\t\tif (dir === 'down')\n\t\t\t\tp2 -= 0.7;\n\t\t\telse\n\t\t\t\tp1 -= 1.2;\n\t\t}\n\t\tabselem.addRight(new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width, bottom: p1 - 1 }));\n\t\t//var RelativeElement = function RelativeElement(c, dx, w, pitch, opt) {\n\t\tmin = Math.min(p1, p2);\n\t}\n\treturn { noteHead: noteHead, roomTaken: roomTaken, roomTakenRight: roomTakenRight, min: min, additionalLedgers: additionalLedgers, dir: dir, symbolWidth: symbolWidth };\n};\n\nAbstractEngraver.prototype.addLyric = function (abselem, elem) {\n\tvar lyricStr = \"\";\n\telem.lyric.forEach(function (ly) {\n\t\tvar div = ly.divider === ' ' ? \"\" : ly.divider;\n\t\tlyricStr += ly.syllable + div + \"\\n\";\n\t});\n\tvar lyricDim = this.getTextSize.calc(lyricStr, 'vocalfont', \"lyric\");\n\tvar position = elem.positioning ? elem.positioning.vocalPosition : 'below';\n\tabselem.addCentered(new RelativeElement(lyricStr, 0, lyricDim.width, undefined, { type: \"lyric\", position: position, height: lyricDim.height / spacing.STEP, dim: this.getTextSize.attr('vocalfont', \"lyric\") }));\n};\n\nAbstractEngraver.prototype.createNote = function (elem, nostem, isSingleLineStaff, voice) { //stem presence: true for drawing stemless notehead\n\tvar notehead = null;\n\tvar roomtaken = 0; // room needed to the left of the note\n\tvar roomtakenright = 0; // room needed to the right of the note\n\tvar symbolWidth = 0;\n\tvar additionalLedgers = []; // PER: handle the case of [bc'], where the b doesn't have a ledger line\n\n\tvar dir;\n\n\tvar duration = getDuration(elem);\n\tvar zeroDuration = false;\n\tif (duration === 0) { zeroDuration = true; duration = 0.25; nostem = true; } //PER: zero duration will draw a quarter note head.\n\tvar durlog = Math.floor(Math.log(duration) / Math.log(2)); //TODO use getDurlog\n\tvar dot = 0;\n\n\tfor (var tot = Math.pow(2, durlog), inc = tot / 2; tot < duration; dot++, tot += inc, inc /= 2);\n\n\n\tif (elem.startTriplet) {\n\t\tthis.tripletmultiplier = elem.tripletMultiplier;\n\t}\n\n\tvar durationForSpacing = duration * this.tripletmultiplier;\n\tif (elem.rest && elem.rest.type === 'multimeasure')\n\t\tdurationForSpacing = 1;\n\tif (elem.rest && elem.rest.type === 'invisible-multimeasure')\n\t\tdurationForSpacing = this.measureLength * elem.rest.text;\n\tvar absType = elem.rest ? \"rest\" : \"note\";\n\tvar abselem = new AbsoluteElement(elem, durationForSpacing, 1, absType, this.tuneNumber, { durationClassOveride: elem.duration * this.tripletmultiplier });\n\tif (hint) abselem.setHint();\n\n\tif (elem.rest) {\n\t\tif (this.measureLength === duration && elem.rest.type !== 'invisible' && elem.rest.type !== 'spacer' && elem.rest.type.indexOf('multimeasure') < 0)\n\t\t\telem.rest.type = 'whole'; // If the rest is exactly a measure, always use a whole rest\n\t\tvar ret1 = addRestToAbsElement(abselem, elem, duration, dot, voice.voicetotal > 1, this.stemdir, isSingleLineStaff, durlog, this.voiceScale);\n\t\tnotehead = ret1.noteHead;\n\t\troomtaken = ret1.roomTaken;\n\t\troomtakenright = ret1.roomTakenRight;\n\t} else {\n\t\tvar ret2 = this.addNoteToAbcElement(abselem, elem, dot, this.stemdir, this.style, zeroDuration, durlog, nostem, voice);\n\t\tif (ret2.min !== undefined)\n\t\t\tthis.minY = Math.min(ret2.min, this.minY);\n\t\tnotehead = ret2.noteHead;\n\t\troomtaken = ret2.roomTaken;\n\t\troomtakenright = ret2.roomTakenRight;\n\t\tadditionalLedgers = ret2.additionalLedgers;\n\t\tdir = ret2.dir;\n\t\tsymbolWidth = ret2.symbolWidth;\n\t}\n\n\tif (elem.lyric !== undefined) {\n\t\tthis.addLyric(abselem, elem);\n\t}\n\n\tif (elem.gracenotes !== undefined) {\n\t\troomtaken += this.addGraceNotes(elem, voice, abselem, notehead, this.stemHeight * this.voiceScale, this.isBagpipes, roomtaken);\n\t}\n\n\tif (elem.decoration) {\n\t\t// TODO-PER: nostem is true if this is beamed. In that case we don't know where to place the decoration yet so just make a guess. This should be refactored to not place decorations until after the beams are determined.\n\t\t// This should probably be combined with moveDecorations()\n\t\tvar bottom = nostem && dir !== 'up' ? Math.min(-3, abselem.bottom - 6) : abselem.bottom\n\t\tthis.decoration.createDecoration(voice, elem.decoration, abselem.top, (notehead) ? notehead.w : 0, abselem, roomtaken, dir, bottom, elem.positioning, this.hasVocals, this.accentAbove);\n\t}\n\n\tif (elem.barNumber) {\n\t\tabselem.addFixed(new RelativeElement(elem.barNumber, -10, 0, 0, { type: \"barNumber\" }));\n\t}\n\n\t// ledger lines\n\tledgerLines(abselem, elem.minpitch, elem.maxpitch, elem.rest, symbolWidth, additionalLedgers, dir, -2, 1);\n\n\tif (elem.chord !== undefined) {\n\t\tvar ret3 = addChord(this.getTextSize, abselem, elem, roomtaken, roomtakenright, symbolWidth, this.jazzchords, this.germanAlphabet);\n\t\troomtaken = ret3.roomTaken;\n\t\troomtakenright = ret3.roomTakenRight;\n\t}\n\n\tif (elem.startTriplet) {\n\t\tthis.triplet = new TripletElem(elem.startTriplet, notehead, { flatBeams: this.flatBeams }); // above is opposite from case of slurs\n\t}\n\n\tif (elem.endTriplet && this.triplet) {\n\t\tthis.triplet.setCloseAnchor(notehead);\n\t}\n\n\tif (this.triplet && !elem.startTriplet && !elem.endTriplet && !(elem.rest && elem.rest.type === \"spacer\")) {\n\t\tthis.triplet.middleNote(notehead);\n\t}\n\n\treturn abselem;\n};\n\nAbstractEngraver.prototype.addSlursAndTies = function (abselem, pitchelem, notehead, voice, dir, isGrace) {\n\tif (pitchelem.endTie) {\n\t\tif (this.ties.length > 0) {\n\t\t\t// If there are multiple open ties, find the one that applies by matching the pitch, if possible.\n\t\t\tvar found = false;\n\t\t\tfor (var j = 0; j < this.ties.length; j++) {\n\t\t\t\tif (this.ties[j].anchor1 && this.ties[j].anchor1.pitch === notehead.pitch) {\n\t\t\t\t\tthis.ties[j].setEndAnchor(notehead);\n\t\t\t\t\tvoice.setRange(this.ties[j])\n\t\t\t\t\tthis.ties.splice(j, 1);\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tthis.ties[0].setEndAnchor(notehead);\n\t\t\t\tvoice.setRange(this.ties[0])\n\t\t\t\tthis.ties.splice(0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar voiceNumber = voice.voicetotal < 2 ? -1 : voice.voicenumber;\n\tif (pitchelem.startTie) {\n\t\tvar tie = new TieElem({ anchor1: notehead, force: (this.stemdir === \"down\" || this.stemdir === \"up\"), stemDir: this.stemdir, isGrace: isGrace, voiceNumber: voiceNumber, style: pitchelem.startTie.style });\n\t\tif (hint) tie.setHint();\n\n\t\tthis.ties[this.ties.length] = tie;\n\t\tvoice.addOther(tie);\n\t\t// HACK-PER: For the animation, we need to know if a note is tied to the next one, so here's a flag.\n\t\t// Unfortunately, only some of the notes in the current event might be tied, but this will consider it\n\t\t// tied if any one of them is. That will work for most cases.\n\t\tabselem.startTie = true;\n\t}\n\n\tvar slur;\n\tvar slurid;\n\tif (pitchelem.endSlur) {\n\t\tfor (var i = 0; i < pitchelem.endSlur.length; i++) {\n\t\t\tslurid = pitchelem.endSlur[i];\n\t\t\tif (this.slurs[slurid]) {\n\t\t\t\tslur = this.slurs[slurid];\n\t\t\t\tslur.setEndAnchor(notehead);\n\t\t\t\tvoice.setRange(slur)\n\t\t\t\tdelete this.slurs[slurid];\n\t\t\t} else {\n\t\t\t\tslur = new TieElem({ anchor2: notehead, stemDir: this.stemdir, voiceNumber: voiceNumber });\n\t\t\t\tif (hint) slur.setHint();\n\t\t\t\tvoice.addOther(slur);\n\t\t\t}\n\t\t\tif (this.startlimitelem) {\n\t\t\t\tslur.setStartX(this.startlimitelem);\n\t\t\t}\n\t\t}\n\t} else if (!isGrace) {\n\t\tfor (var s in this.slurs) {\n\t\t\tif (this.slurs.hasOwnProperty(s)) {\n\t\t\t\tthis.slurs[s].addInternalNote(notehead);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pitchelem.startSlur) {\n\t\tfor (i = 0; i < pitchelem.startSlur.length; i++) {\n\t\t\tslurid = pitchelem.startSlur[i].label;\n\t\t\tslur = new TieElem({ anchor1: notehead, stemDir: this.stemdir, voiceNumber: voiceNumber, style: pitchelem.startSlur[i].style });\n\t\t\tif (hint) slur.setHint();\n\t\t\tthis.slurs[slurid] = slur;\n\t\t\tvoice.addOther(slur);\n\t\t}\n\t}\n};\n\nAbstractEngraver.prototype.addMeasureNumber = function (number, abselem) {\n\tvar measureNumDim = this.getTextSize.calc(number, \"measurefont\", 'bar-number');\n\tvar dx = 0;\n\tif (abselem.isClef) // If this is a clef rather than bar line, then the number shouldn't be centered because it could overlap the left side. This is an easy way to let it be centered but move it over, too.\n\t\tdx += measureNumDim.width / 2\n\tvar vert = measureNumDim.width > 10 && abselem.abcelem.type === \"treble\" ? 13 : 11\n\tabselem.addFixed(new RelativeElement(number, dx, measureNumDim.width, vert + measureNumDim.height / spacing.STEP, { type: \"barNumber\", dim: this.getTextSize.attr(\"measurefont\", 'bar-number') }));\n};\n\nAbstractEngraver.prototype.createBarLine = function (voice, elem, isFirstStaff) {\n\t// bar_thin, bar_thin_thick, bar_thin_thin, bar_thick_thin, bar_right_repeat, bar_left_repeat, bar_double_repeat\n\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'bar', this.tuneNumber);\n\tvar anchor = null; // place to attach part lines\n\tvar dx = 0;\n\n\tif (elem.barNumber) {\n\t\tthis.addMeasureNumber(elem.barNumber, abselem);\n\t}\n\n\n\tvar firstdots = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\");\n\tvar firstthin = (elem.type !== \"bar_left_repeat\" && elem.type !== \"bar_thick_thin\" && elem.type !== \"bar_invisible\");\n\tvar thick = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\" || elem.type === \"bar_left_repeat\" ||\n\t\telem.type === \"bar_thin_thick\" || elem.type === \"bar_thick_thin\");\n\tvar secondthin = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_thick_thin\" || elem.type === \"bar_thin_thin\" || elem.type === \"bar_dbl_repeat\");\n\tvar seconddots = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_dbl_repeat\");\n\n\t// limit positioning of slurs\n\tif (firstdots || seconddots) {\n\t\tfor (var slur in this.slurs) {\n\t\t\tif (this.slurs.hasOwnProperty(slur)) {\n\t\t\t\tthis.slurs[slur].setEndX(abselem);\n\t\t\t}\n\t\t}\n\t\tthis.startlimitelem = abselem;\n\t}\n\n\tif (firstdots) {\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 7));\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 5));\n\t\tdx += 6; //2 hardcoded, twice;\n\t}\n\n\tif (firstthin) {\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor);\n\t}\n\n\tif (elem.type === \"bar_invisible\") {\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"none\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor);\n\t}\n\n\tif (elem.decoration) {\n\t\tthis.decoration.createDecoration(voice, elem.decoration, 12, (thick) ? 3 : 1, abselem, 0, \"down\", 2, elem.positioning, this.hasVocals, this.accentAbove);\n\t}\n\n\tif (thick) {\n\t\tdx += 4; //3 hardcoded;\n\t\tanchor = new RelativeElement(null, dx, 4, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 4 });\n\t\tabselem.addRight(anchor);\n\t\tdx += 5;\n\t}\n\n\t// if (this.partstartelem && (thick || (firstthin && secondthin))) { // means end of nth part\n\t// this.partstartelem.anchor2=anchor;\n\t// this.partstartelem = null;\n\t// }\n\n\tif (this.partstartelem && elem.endEnding) {\n\t\tthis.partstartelem.anchor2 = anchor;\n\t\tthis.partstartelem = null;\n\t}\n\n\tif (secondthin) {\n\t\tdx += 3; //3 hardcoded;\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor); // 3 is hardcoded\n\t}\n\n\tif (seconddots) {\n\t\tdx += 3; //3 hardcoded;\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 7));\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 5));\n\t} // 2 is hardcoded\n\n\tif (elem.startEnding && isFirstStaff) { // only put the first & second ending marks on the first staff\n\t\tvar textWidth = this.getTextSize.calc(elem.startEnding, \"repeatfont\", '').width;\n\t\tabselem.minspacing += textWidth + 10; // Give plenty of room for the ending number.\n\t\tthis.partstartelem = new EndingElem(elem.startEnding, anchor, null);\n\t\tvoice.addOther(this.partstartelem);\n\t}\n\n\t// Add a little space to the left of the bar line so that nothing can crowd it.\n\tabselem.extraw -= 5;\n\n\tif (elem.chord !== undefined) {\n\t\tvar ret3 = addChord(this.getTextSize, abselem, elem, 0, 0, 0, false, this.germanAlphabet);\n\t}\n\n\treturn abselem;\n\n};\n\nmodule.exports = AbstractEngraver;\n","var RelativeElement = require('./elements/relative-element');\nvar spacing = require('../helpers/spacing');\nconst translateChord = require(\"./translate-chord\");\n\nvar addChord = function (getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet) {\n\tfor (var i = 0; i < elem.chord.length; i++) {\n\t\tvar pos = elem.chord[i].position;\n\t\tvar rel_position = elem.chord[i].rel_position;\n\t\tvar isAnnotation = pos === \"left\" || pos === \"right\" || pos === \"below\" || pos === \"above\" || !!rel_position\n\t\tvar font;\n\t\tvar klass;\n\t\tif (isAnnotation) {\n\t\t\tfont = 'annotationfont';\n\t\t\tklass = \"abcjs-annotation\";\n\t\t} else {\n\t\t\tfont = 'gchordfont';\n\t\t\tklass = \"abcjs-chord\";\n\t\t}\n\t\tvar attr = getTextSize.attr(font, klass);\n\n\t\tvar name = elem.chord[i].name\n\t\tvar ret;\n\t\t//console.log(\"chord\",name)\n\t\tif (typeof name === \"string\") {\n\t\t\tret = chordString(name, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet)\n\t\t\troomTaken = ret.roomTaken\n\t\t\troomTakenRight = ret.roomTakenRight\n\t\t} else {\n\t\t\tfor (var j = 0; j < name.length; j++) {\n\t\t\t\tret = chordString(name[j].text, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet)\n\t\t\t\troomTaken = ret.roomTaken\n\t\t\t\troomTakenRight = ret.roomTakenRight\n\t\t\t}\n\t\t}\n\t}\n\treturn { roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n};\n\nfunction chordString(chordString, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet) {\n\tvar chords = chordString.split(\"\\n\");\n\tfor (var j = chords.length - 1; j >= 0; j--) { // parse these in opposite order because we place them from bottom to top.\n\t\tvar chord = chords[j];\n\t\tvar x = 0;\n\t\tvar y;\n\t\tif (!isAnnotation)\n\t\t\tchord = translateChord(chord, jazzchords, germanAlphabet);\n\t\tvar dim = getTextSize.calc(chord, font, klass);\n\t\tvar chordWidth = dim.width;\n\t\tvar chordHeight = dim.height / spacing.STEP;\n\t\tswitch (pos) {\n\t\t\tcase \"left\":\n\t\t\t\troomTaken += chordWidth + 7;\n\t\t\t\tx = -roomTaken; // TODO-PER: This is just a guess from trial and error\n\t\t\t\ty = elem.averagepitch;\n\t\t\t\tabselem.addExtra(new RelativeElement(chord, x, chordWidth + 4, y, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\tposition: \"left\"\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"right\":\n\t\t\t\troomTakenRight += 4;\n\t\t\t\tx = roomTakenRight;// TODO-PER: This is just a guess from trial and error\n\t\t\t\ty = elem.averagepitch;\n\t\t\t\tabselem.addRight(new RelativeElement(chord, x, chordWidth + 4, y, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\tposition: \"right\"\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"below\":\n\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\tabselem.addRight(new RelativeElement(chord, 0, 0, undefined, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tposition: \"below\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\tabselem.addRight(new RelativeElement(chord, 0, 0, undefined, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tposition: \"above\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (rel_position) {\n\t\t\t\t\tvar relPositionY = rel_position.y + 3 * spacing.STEP; // TODO-PER: this is a fudge factor to make it line up with abcm2ps\n\t\t\t\t\tabselem.addRight(new RelativeElement(chord, x + rel_position.x, 0, elem.minpitch + relPositionY / spacing.STEP, {\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\theight: chordHeight,\n\t\t\t\t\t\tdim: attr\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\t\tvar pos2 = 'above';\n\t\t\t\t\tif (elem.positioning && elem.positioning.chordPosition)\n\t\t\t\t\t\tpos2 = elem.positioning.chordPosition;\n\n\t\t\t\t\tif (pos2 !== 'hidden') {\n\t\t\t\t\t\tabselem.addCentered(new RelativeElement(chord, noteheadWidth / 2, chordWidth, undefined, {\n\t\t\t\t\t\t\ttype: \"chord\",\n\t\t\t\t\t\t\tposition: pos2,\n\t\t\t\t\t\t\theight: chordHeight,\n\t\t\t\t\t\t\tdim: attr,\n\t\t\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\treturn { roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n}\nmodule.exports = addChord;\n","function addTextIf(rows, params, getTextSize) {\n\tif (!params.text)\n\t\treturn;\n\tif (!params.marginLeft) params.marginLeft = 0;\n\tif (!params.klass) params.klass = '';\n\tif (!params.anchor) params.anchor = 'start';\n\tif (!params.info) params.info = { startChar: -2, endChar: -2 }\n\n\tif (params.marginTop)\n\t\trows.push({ move: params.marginTop });\n\tvar attr = { left: params.marginLeft, text: params.text, font: params.font, anchor: params.anchor, startChar: params.info.startChar, endChar: params.info.endChar, 'dominant-baseline': params['dominant-baseline'] };\n\tif (params.absElemType)\n\t\tattr.absElemType = params.absElemType;\n\tif (!params.inGroup && params.klass)\n\t\tattr.klass = params.klass;\n\tif (params.name)\n\t\tattr.name = params.name;\n\n\trows.push(attr);\n\t// If there are blank lines they won't be counted by getTextSize, so just get the height of one line and multiply\n\tvar size = getTextSize.calc(\"A\", params.font, params.klass);\n\tvar numLines = params.text.split(\"\\n\").length;\n\tif (params.text[params.text.length - 1] === '\\n')\n\t\tnumLines--; // If there is a new line at the end of the string, then an extra line will be counted.\n\tif (!params.noMove) {\n\t\tvar h = (size.height * 1.1) * numLines;\n\t\trows.push({ move: Math.round(h) });\n\t\tif (params.marginBottom)\n\t\t\trows.push({ move: params.marginBottom });\n\t}\n}\n\nmodule.exports = addTextIf;\n","var calcHeight = function (staffGroup) {\n\t// the height is calculated here in a parallel way to the drawing below in hopes that both of these functions will be modified together.\n\t// TODO-PER: also add the space between staves. (That's systemStaffSeparation, which is the minimum distance between the staff LINES.)\n\tvar height = 0;\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar staff = staffGroup.voices[i].staff;\n\t\tif (!staffGroup.voices[i].duplicate) {\n\t\t\theight += staff.top;\n\t\t\t//if (staff.bottom < 0)\n\t\t\theight += -staff.bottom;\n\t\t}\n\t}\n\treturn height;\n};\n\nmodule.exports = calcHeight;\n\n","// abc_create_clef.js\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createClef = function (elem, tuneNumber) {\n\tvar clef;\n\tvar octave = 0;\n\telem.el_type = \"clef\";\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra clef', tuneNumber);\n\tabselem.isClef = true;\n\tswitch (elem.type) {\n\t\tcase \"treble\": clef = \"clefs.G\"; break;\n\t\tcase \"tenor\": clef = \"clefs.C\"; break;\n\t\tcase \"alto\": clef = \"clefs.C\"; break;\n\t\tcase \"bass\": clef = \"clefs.F\"; break;\n\t\tcase 'treble+8': clef = \"clefs.G\"; octave = 1; break;\n\t\tcase 'tenor+8': clef = \"clefs.C\"; octave = 1; break;\n\t\tcase 'bass+8': clef = \"clefs.F\"; octave = 1; break;\n\t\tcase 'alto+8': clef = \"clefs.C\"; octave = 1; break;\n\t\tcase 'treble-8': clef = \"clefs.G\"; octave = -1; break;\n\t\tcase 'tenor-8': clef = \"clefs.C\"; octave = -1; break;\n\t\tcase 'bass-8': clef = \"clefs.F\"; octave = -1; break;\n\t\tcase 'alto-8': clef = \"clefs.C\"; octave = -1; break;\n\t\tcase 'none': return null;\n\t\tcase 'perc': clef = \"clefs.perc\"; break;\n\t\tdefault: abselem.addFixed(new RelativeElement(\"clef=\" + elem.type, 0, 0, undefined, { type: \"debug\" }));\n\t}\n\t// if (elem.verticalPos) {\n\t// pitch = elem.verticalPos;\n\t// }\n\tvar dx = 5;\n\tif (clef) {\n\t\tvar height = glyphs.symbolHeightInPitches(clef);\n\t\tvar ofs = clefOffsets(clef);\n\t\tabselem.addRight(new RelativeElement(clef, dx, glyphs.getSymbolWidth(clef), elem.clefPos, { top: height + elem.clefPos + ofs, bottom: elem.clefPos + ofs }));\n\n\t\tif (octave !== 0) {\n\t\t\tvar scale = 2 / 3;\n\t\t\tvar adjustspacing = (glyphs.getSymbolWidth(clef) - glyphs.getSymbolWidth(\"8\") * scale) / 2;\n\t\t\tvar pitch = (octave > 0) ? abselem.top + 3 : abselem.bottom - 1;\n\t\t\tvar top = (octave > 0) ? abselem.top + 3 : abselem.bottom - 3;\n\t\t\tvar bottom = top - 2;\n\t\t\tif (elem.type === \"bass-8\") {\n\t\t\t\t// The placement for bass octave is a little different. It should hug the clef.\n\t\t\t\tpitch = 3;\n\t\t\t\tadjustspacing = 0;\n\t\t\t}\n\t\t\tabselem.addRight(new RelativeElement(\"8\", dx + adjustspacing, glyphs.getSymbolWidth(\"8\") * scale, pitch, {\n\t\t\t\tscalex: scale,\n\t\t\t\tscaley: scale,\n\t\t\t\ttop: top,\n\t\t\t\tbottom: bottom\n\t\t\t}));\n\t\t\t//abselem.top += 2;\n\t\t}\n\t}\n\treturn abselem;\n};\n\nfunction clefOffsets(clef) {\n\tswitch (clef) {\n\t\tcase \"clefs.G\": return -5;\n\t\tcase \"clefs.C\": return -4;\n\t\tcase \"clefs.F\": return -4;\n\t\tcase \"clefs.perc\": return -2;\n\t\tdefault: return 0;\n\t}\n}\n\nmodule.exports = createClef;\n","// abc_create_key_signature.js\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createKeySignature = function (elem, tuneNumber) {\n\telem.el_type = \"keySignature\";\n\tif (!elem.accidentals || elem.accidentals.length === 0)\n\t\treturn null;\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra key-signature', tuneNumber);\n\tabselem.isKeySig = true;\n\tvar dx = 0;\n\telem.accidentals.forEach(function (acc) {\n\t\tvar symbol;\n\t\tvar fudge = 0;\n\t\tswitch (acc.acc) {\n\t\t\tcase \"sharp\": symbol = \"accidentals.sharp\"; fudge = -3; break;\n\t\t\tcase \"natural\": symbol = \"accidentals.nat\"; break;\n\t\t\tcase \"flat\": symbol = \"accidentals.flat\"; fudge = -1.2; break;\n\t\t\tcase \"quartersharp\": symbol = \"accidentals.halfsharp\"; fudge = -2.5; break;\n\t\t\tcase \"quarterflat\": symbol = \"accidentals.halfflat\"; fudge = -1.2; break;\n\t\t\tdefault: symbol = \"accidentals.flat\";\n\t\t}\n\t\tabselem.addRight(new RelativeElement(symbol, dx, glyphs.getSymbolWidth(symbol), acc.verticalPos, { thickness: glyphs.symbolHeightInPitches(symbol), top: acc.verticalPos + glyphs.symbolHeightInPitches(symbol) + fudge, bottom: acc.verticalPos + fudge }));\n\t\tdx += glyphs.getSymbolWidth(symbol) + 2;\n\t}, this);\n\treturn abselem;\n};\n\nmodule.exports = createKeySignature;\n","var glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createNoteHead = function (abselem, c, pitchelem, options) {\n\tif (!options) options = {};\n\tvar dir = (options.dir !== undefined) ? options.dir : null;\n\tvar headx = (options.headx !== undefined) ? options.headx : 0;\n\tvar extrax = (options.extrax !== undefined) ? options.extrax : 0;\n\tvar flag = (options.flag !== undefined) ? options.flag : null;\n\tvar dot = (options.dot !== undefined) ? options.dot : 0;\n\tvar dotshiftx = (options.dotshiftx !== undefined) ? options.dotshiftx : 0;\n\tvar scale = (options.scale !== undefined) ? options.scale : 1;\n\tvar accidentalSlot = (options.accidentalSlot !== undefined) ? options.accidentalSlot : [];\n\tvar shouldExtendStem = (options.shouldExtendStem !== undefined) ? options.shouldExtendStem : false;\n\tvar printAccidentals = (options.printAccidentals !== undefined) ? options.printAccidentals : true;\n\n\t// TODO scale the dot as well\n\tvar pitch = pitchelem.verticalPos;\n\tvar notehead;\n\tvar accidentalshiftx = 0;\n\tvar newDotShiftX = 0;\n\tvar extraLeft = 0;\n\tif (c === undefined)\n\t\tabselem.addFixed(new RelativeElement(\"pitch is undefined\", 0, 0, 0, { type: \"debug\" }));\n\telse if (c === \"\") {\n\t\tnotehead = new RelativeElement(null, 0, 0, pitch);\n\t} else {\n\t\tvar shiftheadx = headx;\n\t\tif (pitchelem.printer_shift) {\n\t\t\tvar adjust = (pitchelem.printer_shift === \"same\") ? 1 : 0;\n\t\t\tshiftheadx = (dir === \"down\") ? -glyphs.getSymbolWidth(c) * scale + adjust : glyphs.getSymbolWidth(c) * scale - adjust;\n\t\t}\n\t\tvar opts = { scalex: scale, scaley: scale, thickness: glyphs.symbolHeightInPitches(c) * scale, name: pitchelem.name };\n\t\tnotehead = new RelativeElement(c, shiftheadx, glyphs.getSymbolWidth(c) * scale, pitch, opts);\n\t\tnotehead.stemDir = dir;\n\t\tif (flag) {\n\t\t\tvar pos = pitch + ((dir === \"down\") ? -7 : 7) * scale;\n\t\t\t// if this is a regular note, (not grace or tempo indicator) then the stem will have been stretched to the middle line if it is far from the center.\n\t\t\tif (shouldExtendStem) {\n\t\t\t\tif (dir === \"down\" && pos > 6)\n\t\t\t\t\tpos = 6;\n\t\t\t\tif (dir === \"up\" && pos < 6)\n\t\t\t\t\tpos = 6;\n\t\t\t}\n\t\t\t//if (scale===1 && (dir===\"down\")?(pos>6):(pos<6)) pos=6;\n\t\t\tvar xdelta = (dir === \"down\") ? headx : headx + notehead.w - 0.6;\n\t\t\tabselem.addRight(new RelativeElement(flag, xdelta, glyphs.getSymbolWidth(flag) * scale, pos, { scalex: scale, scaley: scale }));\n\t\t}\n\t\tnewDotShiftX = notehead.w + dotshiftx - 2 + 5 * dot;\n\t\tfor (; dot > 0; dot--) {\n\t\t\tvar dotadjusty = (1 - Math.abs(pitch) % 2); //PER: take abs value of the pitch. And the shift still happens on ledger lines.\n\t\t\tabselem.addRight(new RelativeElement(\"dots.dot\", notehead.w + dotshiftx - 2 + 5 * dot, glyphs.getSymbolWidth(\"dots.dot\"), pitch + dotadjusty));\n\t\t}\n\t}\n\tif (notehead)\n\t\tnotehead.highestVert = pitchelem.highestVert;\n\n\tif (printAccidentals && pitchelem.accidental) {\n\t\tvar symb;\n\t\tswitch (pitchelem.accidental) {\n\t\t\tcase \"quartersharp\":\n\t\t\t\tsymb = \"accidentals.halfsharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"dblsharp\":\n\t\t\t\tsymb = \"accidentals.dblsharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"sharp\":\n\t\t\t\tsymb = \"accidentals.sharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"quarterflat\":\n\t\t\t\tsymb = \"accidentals.halfflat\";\n\t\t\t\tbreak;\n\t\t\tcase \"flat\":\n\t\t\t\tsymb = \"accidentals.flat\";\n\t\t\t\tbreak;\n\t\t\tcase \"dblflat\":\n\t\t\t\tsymb = \"accidentals.dblflat\";\n\t\t\t\tbreak;\n\t\t\tcase \"natural\":\n\t\t\t\tsymb = \"accidentals.nat\";\n\t\t}\n\t\t// if a note is at least a sixth away, it can share a slot with another accidental\n\t\tvar accSlotFound = false;\n\t\tvar accPlace = extrax;\n\t\tfor (var j = 0; j < accidentalSlot.length; j++) {\n\t\t\tif (pitch - accidentalSlot[j][0] >= 6) {\n\t\t\t\taccidentalSlot[j][0] = pitch;\n\t\t\t\taccPlace = accidentalSlot[j][1];\n\t\t\t\taccSlotFound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (accSlotFound === false) {\n\t\t\taccPlace -= (glyphs.getSymbolWidth(symb) * scale + 2);\n\t\t\taccidentalSlot.push([pitch, accPlace]);\n\t\t\taccidentalshiftx = (glyphs.getSymbolWidth(symb) * scale + 2);\n\t\t}\n\t\tvar h = glyphs.symbolHeightInPitches(symb);\n\t\tabselem.addExtra(new RelativeElement(symb, accPlace, glyphs.getSymbolWidth(symb), pitch, { scalex: scale, scaley: scale, top: pitch + h / 2, bottom: pitch - h / 2 }));\n\t\textraLeft = glyphs.getSymbolWidth(symb) / 2; // TODO-PER: We need a little extra width if there is an accidental, but I'm not sure why it isn't the full width of the accidental.\n\t}\n\n\treturn { notehead: notehead, accidentalshiftx: accidentalshiftx, dotshiftx: newDotShiftX, extraLeft: extraLeft };\n\n};\n\nmodule.exports = createNoteHead;\n","// abc_create_time_signature.js\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createTimeSignature = function (elem, tuneNumber) {\n\telem.el_type = \"timeSignature\";\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra time-signature', tuneNumber);\n\tif (elem.type === \"specified\") {\n\t\tvar x = 0;\n\t\tfor (var i = 0; i < elem.value.length; i++) {\n\t\t\tif (i !== 0) {\n\t\t\t\tabselem.addRight(new RelativeElement('+', x + 1, glyphs.getSymbolWidth(\"+\"), 6, { thickness: glyphs.symbolHeightInPitches(\"+\") }));\n\t\t\t\tx += glyphs.getSymbolWidth(\"+\") + 2;\n\t\t\t}\n\t\t\tif (elem.value[i].den) {\n\t\t\t\tvar numWidth = 0;\n\t\t\t\tfor (var i2 = 0; i2 < elem.value[i].num.length; i2++)\n\t\t\t\t\tnumWidth += glyphs.getSymbolWidth(elem.value[i].num[i2]);\n\t\t\t\tvar denWidth = 0;\n\t\t\t\tfor (i2 = 0; i2 < elem.value[i].num.length; i2++)\n\t\t\t\t\tdenWidth += glyphs.getSymbolWidth(elem.value[i].den[i2]);\n\t\t\t\tvar maxWidth = Math.max(numWidth, denWidth);\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].num, x + (maxWidth - numWidth) / 2, numWidth, 8, { thickness: glyphs.symbolHeightInPitches(elem.value[i].num[0]) }));\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].den, x + (maxWidth - denWidth) / 2, denWidth, 4, { thickness: glyphs.symbolHeightInPitches(elem.value[i].den[0]) }));\n\t\t\t\tx += maxWidth\n\t\t\t} else {\n\t\t\t\tvar thisWidth = 0;\n\t\t\t\tfor (var i3 = 0; i3 < elem.value[i].num.length; i3++)\n\t\t\t\t\tthisWidth += glyphs.getSymbolWidth(elem.value[i].num[i3]);\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].num, x, thisWidth, 6, { thickness: glyphs.symbolHeightInPitches(elem.value[i].num[0]) }));\n\t\t\t\tx += thisWidth;\n\t\t\t}\n\t\t}\n\t} else if (elem.type === \"common_time\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.common\", 0, glyphs.getSymbolWidth(\"timesig.common\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.common\") }));\n\n\t} else if (elem.type === \"cut_time\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.cut\", 0, glyphs.getSymbolWidth(\"timesig.cut\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.cut\") }));\n\t} else if (elem.type === \"tempus_imperfectum\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.imperfectum\", 0, glyphs.getSymbolWidth(\"timesig.imperfectum\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.imperfectum\") }));\n\t} else if (elem.type === \"tempus_imperfectum_prolatio\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.imperfectum2\", 0, glyphs.getSymbolWidth(\"timesig.imperfectum2\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.imperfectum2\") }));\n\t} else if (elem.type === \"tempus_perfectum\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.perfectum\", 0, glyphs.getSymbolWidth(\"timesig.perfectum\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.perfectum\") }));\n\t} else if (elem.type === \"tempus_perfectum_prolatio\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.perfectum2\", 0, glyphs.getSymbolWidth(\"timesig.perfectum2\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.perfectum2\") }));\n\t} else {\n\t\tconsole.log(\"time signature:\", elem);\n\t}\n\treturn abselem;\n};\n\nmodule.exports = createTimeSignature;\n","// abc_decoration.js: Creates a data structure suitable for printing a line of abc\n\nvar DynamicDecoration = require('./elements/dynamic-decoration');\nvar CrescendoElem = require('./elements/crescendo-element');\nvar GlissandoElem = require('./elements/glissando-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\nvar TieElem = require('./elements/tie-element');\n\nvar Decoration = function Decoration() {\n\tthis.startDiminuendoX = undefined;\n\tthis.startCrescendoX = undefined;\n\tthis.minTop = 12;\t// TODO-PER: this is assuming a 5-line staff. Pass that info in.\n\tthis.minBottom = 0;\n};\n\nvar closeDecoration = function (voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, accentAbove) {\n\tvar yPos;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tif (decoration[i] === \"staccato\" || decoration[i] === \"tenuto\" || (decoration[i] === \"accent\" && !accentAbove)) {\n\t\t\tvar symbol = \"scripts.\" + decoration[i];\n\t\t\tif (decoration[i] === \"accent\") symbol = \"scripts.sforzato\";\n\t\t\tif (yPos === undefined)\n\t\t\t\tyPos = (dir === \"down\") ? pitch + 2 : minPitch - 2;\n\t\t\telse\n\t\t\t\tyPos = (dir === \"down\") ? yPos + 2 : yPos - 2;\n\t\t\tif (decoration[i] === \"accent\") {\n\t\t\t\t// Always place the accent three pitches away, no matter whether that is a line or space.\n\t\t\t\tif (dir === \"up\") yPos--;\n\t\t\t\telse yPos++;\n\t\t\t} else {\n\t\t\t\t// don't place on a stave line. The stave lines are 2,4,6,8,10\n\t\t\t\tswitch (yPos) {\n\t\t\t\t\tcase 2:\n\t\t\t\t\tcase 4:\n\t\t\t\t\tcase 6:\n\t\t\t\t\tcase 8:\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tif (dir === \"up\") yPos--;\n\t\t\t\t\t\telse yPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pitch > 9) yPos++; // take up some room of those that are above\n\t\t\tvar deltaX = width / 2;\n\t\t\tif (glyphs.getSymbolAlign(symbol) !== \"center\") {\n\t\t\t\tdeltaX -= (glyphs.getSymbolWidth(symbol) / 2);\n\t\t\t}\n\t\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), yPos));\n\t\t}\n\t\tif (decoration[i] === \"slide\" && abselem.heads[0]) {\n\t\t\tvar yPos2 = abselem.heads[0].pitch;\n\t\t\tyPos2 -= 2; // TODO-PER: not sure what this fudge factor is.\n\t\t\tvar blank1 = new RelativeElement(\"\", -roomtaken - 15, 0, yPos2 - 1);\n\t\t\tvar blank2 = new RelativeElement(\"\", -roomtaken - 5, 0, yPos2 + 1);\n\t\t\tabselem.addFixedX(blank1);\n\t\t\tabselem.addFixedX(blank2);\n\t\t\tvoice.addOther(new TieElem({ anchor1: blank1, anchor2: blank2, fixedY: true }));\n\t\t}\n\t}\n\tif (yPos === undefined)\n\t\tyPos = pitch;\n\n\treturn { above: yPos, below: abselem.bottom };\n};\n\nvar volumeDecoration = function (voice, decoration, abselem, positioning) {\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"p\":\n\t\t\tcase \"mp\":\n\t\t\tcase \"pp\":\n\t\t\tcase \"ppp\":\n\t\t\tcase \"pppp\":\n\t\t\tcase \"f\":\n\t\t\tcase \"ff\":\n\t\t\tcase \"fff\":\n\t\t\tcase \"ffff\":\n\t\t\tcase \"sfz\":\n\t\t\tcase \"mf\":\n\t\t\t\tvar elem = new DynamicDecoration(abselem, decoration[i], positioning);\n\t\t\t\tvoice.addOther(elem);\n\t\t}\n\t}\n};\n\nvar compoundDecoration = function (decoration, pitch, width, abselem, dir) {\n\tfunction highestPitch() {\n\t\tif (abselem.heads.length === 0)\n\t\t\treturn 10;\t// TODO-PER: I don't know if this can happen, but we'll return the top of the staff if so.\n\t\tvar pitch = abselem.heads[0].pitch;\n\t\tfor (var i = 1; i < abselem.heads.length; i++)\n\t\t\tpitch = Math.max(pitch, abselem.heads[i].pitch);\n\t\treturn pitch;\n\t}\n\tfunction lowestPitch() {\n\t\tif (abselem.heads.length === 0)\n\t\t\treturn 2;\t// TODO-PER: I don't know if this can happen, but we'll return the bottom of the staff if so.\n\t\tvar pitch = abselem.heads[0].pitch;\n\t\tfor (var i = 1; i < abselem.heads.length; i++)\n\t\t\tpitch = Math.min(pitch, abselem.heads[i].pitch);\n\t\treturn pitch;\n\t}\n\tfunction compoundDecoration(symbol, count) {\n\t\tvar placement = (dir === 'down') ? lowestPitch() + 1 : highestPitch() + 9;\n\t\tif (dir !== 'down' && count === 1)\n\t\t\tplacement--;\n\t\tvar deltaX = width / 2;\n\t\tdeltaX += (dir === 'down') ? -5 : 3;\n\t\tfor (var i = 0; i < count; i++) {\n\t\t\tplacement -= 1;\n\t\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), placement));\n\t\t}\n\t}\n\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"/\": compoundDecoration(\"flags.ugrace\", 1); break;\n\t\t\tcase \"//\": compoundDecoration(\"flags.ugrace\", 2); break;\n\t\t\tcase \"///\": compoundDecoration(\"flags.ugrace\", 3); break;\n\t\t\tcase \"////\": compoundDecoration(\"flags.ugrace\", 4); break;\n\t\t}\n\t}\n};\n\nvar stackedDecoration = function (decoration, width, abselem, yPos, positioning, minTop, minBottom, accentAbove) {\n\tfunction incrementPlacement(placement, height) {\n\t\tif (placement === 'above')\n\t\t\tyPos.above += height;\n\t\telse\n\t\t\tyPos.below -= height;\n\t}\n\tfunction getPlacement(placement) {\n\t\tvar y;\n\t\tif (placement === 'above') {\n\t\t\ty = yPos.above;\n\t\t\tif (y < minTop)\n\t\t\t\ty = minTop;\n\t\t} else {\n\t\t\ty = yPos.below;\n\t\t\tif (y > minBottom)\n\t\t\t\ty = minBottom;\n\t\t}\n\t\treturn y;\n\t}\n\tfunction textDecoration(text, placement, anchor) {\n\t\tvar y = getPlacement(placement);\n\t\tvar textFudge = 2;\n\t\tvar textHeight = 5;\n\t\t// TODO-PER: Get the height of the current font and use that for the thickness.\n\t\tabselem.addFixedX(new RelativeElement(text, width / 2, 0, y + textFudge, { type: \"decoration\", klass: 'ornament', thickness: 3, anchor: anchor }));\n\n\t\tincrementPlacement(placement, textHeight);\n\t}\n\tfunction symbolDecoration(symbol, placement) {\n\t\tvar deltaX = width / 2;\n\t\tif (glyphs.getSymbolAlign(symbol) !== \"center\") {\n\t\t\tdeltaX -= (glyphs.getSymbolWidth(symbol) / 2);\n\t\t}\n\t\tvar height = glyphs.symbolHeightInPitches(symbol) + 1; // adding a little padding so nothing touches.\n\t\tvar y = getPlacement(placement);\n\t\ty = (placement === 'above') ? y + height / 2 : y - height / 2;// Center the element vertically.\n\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), y, { klass: 'ornament', thickness: glyphs.symbolHeightInPitches(symbol), position: placement }));\n\n\t\tincrementPlacement(placement, height);\n\t}\n\n\tvar symbolList = {\n\t\t\"+\": \"scripts.stopped\",\n\t\t\"open\": \"scripts.open\",\n\t\t\"snap\": \"scripts.snap\",\n\t\t\"wedge\": \"scripts.wedge\",\n\t\t\"thumb\": \"scripts.thumb\",\n\t\t\"shortphrase\": \"scripts.shortphrase\",\n\t\t\"mediumphrase\": \"scripts.mediumphrase\",\n\t\t\"longphrase\": \"scripts.longphrase\",\n\t\t\"trill\": \"scripts.trill\",\n\t\t\"roll\": \"scripts.roll\",\n\t\t\"irishroll\": \"scripts.roll\",\n\t\t\"marcato\": \"scripts.umarcato\",\n\t\t\"dmarcato\": \"scripts.dmarcato\",\n\t\t\"umarcato\": \"scripts.umarcato\",\n\t\t\"turn\": \"scripts.turn\",\n\t\t\"uppermordent\": \"scripts.prall\",\n\t\t\"pralltriller\": \"scripts.prall\",\n\t\t\"mordent\": \"scripts.mordent\",\n\t\t\"lowermordent\": \"scripts.mordent\",\n\t\t\"downbow\": \"scripts.downbow\",\n\t\t\"upbow\": \"scripts.upbow\",\n\t\t\"fermata\": \"scripts.ufermata\",\n\t\t\"invertedfermata\": \"scripts.dfermata\",\n\t\t\"breath\": \",\",\n\t\t\"coda\": \"scripts.coda\",\n\t\t\"segno\": \"scripts.segno\"\n\t};\n\n\tvar hasOne = false;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"D.C.\":\n\t\t\tcase \"D.S.\":\n\t\t\t\ttextDecoration(decoration[i], positioning, 'middle');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.C.alcoda\":\n\t\t\t\ttextDecoration(\"D.C. al coda\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.C.alfine\":\n\t\t\t\ttextDecoration(\"D.C. al fine\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.S.alcoda\":\n\t\t\t\ttextDecoration(\"D.S. al coda\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.S.alfine\":\n\t\t\t\ttextDecoration(\"D.S. al fine\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"fine\":\n\t\t\t\ttextDecoration(\"FINE\", positioning, 'middle');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"+\":\n\t\t\tcase \"open\":\n\t\t\tcase \"snap\":\n\t\t\tcase \"wedge\":\n\t\t\tcase \"thumb\":\n\t\t\tcase \"shortphrase\":\n\t\t\tcase \"mediumphrase\":\n\t\t\tcase \"longphrase\":\n\t\t\tcase \"trill\":\n\t\t\tcase \"roll\":\n\t\t\tcase \"irishroll\":\n\t\t\tcase \"marcato\":\n\t\t\tcase \"dmarcato\":\n\t\t\tcase \"turn\":\n\t\t\tcase \"uppermordent\":\n\t\t\tcase \"pralltriller\":\n\t\t\tcase \"mordent\":\n\t\t\tcase \"lowermordent\":\n\t\t\tcase \"downbow\":\n\t\t\tcase \"upbow\":\n\t\t\tcase \"fermata\":\n\t\t\tcase \"breath\":\n\t\t\tcase \"umarcato\":\n\t\t\tcase \"coda\":\n\t\t\tcase \"segno\":\n\t\t\t\tsymbolDecoration(symbolList[decoration[i]], positioning);\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"invertedfermata\":\n\t\t\t\tsymbolDecoration(symbolList[decoration[i]], 'below');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"mark\":\n\t\t\t\tabselem.klass = \"mark\";\n\t\t\t\tbreak;\n\t\t\tcase \"accent\":\n\t\t\t\tif (accentAbove) {\n\t\t\t\t\tsymbolDecoration(\"scripts.sforzato\", positioning);\n\t\t\t\t\thasOne = true;\n\t\t\t\t}\n\t\t\t\tbreak;\t\n\t\t}\n\t}\n\treturn hasOne;\n};\n\nfunction leftDecoration(decoration, abselem, roomtaken) {\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"arpeggio\":\n\t\t\t\t// The arpeggio symbol is the height of a note (that is, two Y units). This stacks as many as we need to go from the\n\t\t\t\t// top note to the bottom note. The arpeggio should also be a little taller than the stacked notes, so there is an extra\n\t\t\t\t// one drawn and it is offset by half of a note height (that is, one Y unit).\n\t\t\t\tfor (var j = abselem.abcelem.minpitch - 1; j <= abselem.abcelem.maxpitch; j += 2) {\n\t\t\t\t\tabselem.addExtra(\n\t\t\t\t\t\tnew RelativeElement(\n\t\t\t\t\t\t\t\"scripts.arpeggio\",\n\t\t\t\t\t\t\t-glyphs.getSymbolWidth(\"scripts.arpeggio\") * 2 - roomtaken,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\tj + 2,\n\t\t\t\t\t\t\t{ klass: 'ornament', thickness: glyphs.symbolHeightInPitches(\"scripts.arpeggio\") }\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nDecoration.prototype.dynamicDecoration = function (voice, decoration, abselem, positioning) {\n\tvar diminuendo;\n\tvar crescendo;\n\tvar glissando;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"diminuendo(\":\n\t\t\t\tthis.startDiminuendoX = abselem;\n\t\t\t\tdiminuendo = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"diminuendo)\":\n\t\t\t\tdiminuendo = { start: this.startDiminuendoX, stop: abselem };\n\t\t\t\tthis.startDiminuendoX = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"crescendo(\":\n\t\t\t\tthis.startCrescendoX = abselem;\n\t\t\t\tcrescendo = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"crescendo)\":\n\t\t\t\tcrescendo = { start: this.startCrescendoX, stop: abselem };\n\t\t\t\tthis.startCrescendoX = undefined;\n\t\t\t\tbreak;\n\t\t\tcase '~(':\n\t\t\tcase \"glissando(\":\n\t\t\t\tthis.startGlissandoX = abselem;\n\t\t\t\tglissando = undefined;\n\t\t\t\tbreak;\n\t\t\tcase '~)':\n\t\t\tcase \"glissando)\":\n\t\t\t\tglissando = { start: this.startGlissandoX, stop: abselem };\n\t\t\t\tthis.startGlissandoX = undefined;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (diminuendo) {\n\t\tvoice.addOther(new CrescendoElem(diminuendo.start, diminuendo.stop, \">\", positioning));\n\t}\n\tif (crescendo) {\n\t\tvoice.addOther(new CrescendoElem(crescendo.start, crescendo.stop, \"<\", positioning));\n\t}\n\tif (glissando) {\n\t\tvoice.addOther(new GlissandoElem(glissando.start, glissando.stop));\n\t}\n};\n\nDecoration.prototype.createDecoration = function (voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, positioning, hasVocals, accentAbove) {\n\tif (!positioning)\n\t\tpositioning = { ornamentPosition: 'above', volumePosition: hasVocals ? 'above' : 'below', dynamicPosition: hasVocals ? 'above' : 'below' };\n\t// These decorations don't affect the placement of other decorations\n\tvolumeDecoration(voice, decoration, abselem, positioning.volumePosition);\n\tthis.dynamicDecoration(voice, decoration, abselem, positioning.dynamicPosition);\n\tcompoundDecoration(decoration, pitch, width, abselem, dir);\n\n\t// treat staccato, accent, and tenuto first (may need to shift other markers)\n\tvar yPos = closeDecoration(voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, accentAbove);\n\t// yPos is an object containing 'above' and 'below'. That is the placement of the next symbol on either side.\n\n\tyPos.above = Math.max(yPos.above, this.minTop);\n\tyPos.below = Math.min(yPos.below, minPitch);\n\tvar hasOne = stackedDecoration(decoration, width, abselem, yPos, positioning.ornamentPosition, this.minTop, minPitch, accentAbove);\n\t//if (hasOne) {\n\t\t//\t\t\tabselem.top = Math.max(yPos.above + 3, abselem.top); // TODO-PER: Not sure why we need this fudge factor.\n\t//}\n\tleftDecoration(decoration, abselem, roomtaken);\n};\n\nmodule.exports = Decoration;\n","// abc_absolute_element.js: Definition of the AbsoluteElement class.\n\nvar highlight = require(\"../../interactive/highlight\");\nvar unhighlight = require(\"../../interactive/unhighlight\");\n\n// Everything that is placed in the SVG is first created as an absolute element. This is one unit of graphic information.\n// That is, it embodies a concept: a clef, a time signature, a bar line,etc. or most complexly:\n// a note with its accidental, grace note, chord symbol, trill, stem, eighth flags, etc.\n// In the largest sense, these are placed on the page at a particular place that is determined during the layout phase.\n// This object doesn't contain any of the drawing information, though. That information is contained in an array of\n// RelativeElements as the \"children\" of this class.\n// During the layout phase, the width of all the children is calculated and the X coordinate of the absolute element is set.\n//\n// So, after the AbsoluteElement is placed, then its children can be placed relative to that. There are different types of\n// relative elements that are placed with different rules:\n// 1) Fixed - these elements don't move relative to the absolute element's coordinates. These are things like the notehead,\n// any ledger lines, accidentals, etc.\n// 2) Slotted - these elements can move vertically and don't get Y coordinates until after the absolute element is placed.\n// These are things like the chord symbol, many decorations, the lyrics, etc.\n//\n// Relative elements are also classified by how they are related. This could be:\n// 1) Increases the absolute element's width to the left. This doesn't change the center point of\n// the absolute element, so adding a sharp to the note won't move it to the right. However, if the elements\n// are close together then this enforces a minimum distance.\n// 2) Has no effect on the width. Annotations and the tempo act like this. No matter how long they are the width doesn't change.\n// 3) Increases the absolute element's width to the right. This doesn't change the center point,\n// but it will increase the minimum distance.\n// 4) Sets the width on both sides. This is the note heads. They are centered on both sides of the absolute element's X coordinate.\n\n// duration - actual musical duration - different from notehead duration in triplets. refer to abcelem to get the notehead duration\n// minspacing - spacing which must be taken on top of the width defined by the duration\n// type is a meta-type for the element. It is not necessary for drawing, but it is useful to make semantic sense of the element. For instance, it can be used in the element's class name.\nvar AbsoluteElement = function AbsoluteElement(abcelem, duration, minspacing, type, tuneNumber, options) {\n\t//\tconsole.log(\"Absolute:\",abcelem, duration, minspacing, type, tuneNumber, options);\n\tif (!options)\n\t\toptions = {};\n\tthis.tuneNumber = tuneNumber;\n\tthis.abcelem = abcelem;\n\tthis.duration = duration;\n\tthis.durationClass = options.durationClassOveride ? options.durationClassOveride : this.duration;\n\tthis.minspacing = minspacing || 0;\n\tthis.x = 0;\n\tthis.children = [];\n\tthis.heads = [];\n\tthis.extra = [];\n\tthis.extraw = 0;\n\tthis.w = 0;\n\tthis.right = [];\n\tthis.invisible = false;\n\tthis.bottom = undefined;\n\tthis.top = undefined;\n\tthis.type = type;\n\n\t// The following are the dimensions of the fixed part of the element.\n\t// That is, the chord text will be a different height depending on lot of factors, but the 8th flag will always be in the same place.\n\tthis.fixed = { w: 0, t: undefined, b: undefined }; // there is no x-coord here, because that is set later.\n\n\t// these are the heights of all of the vertical elements that can't be placed until the end of the line.\n\t// the vertical order of elements that are above is: tempo, part, volume/dynamic, ending/chord, lyric\n\t// the vertical order of elements that are below is: lyric, chord, volume/dynamic\n\tthis.specialY = {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n};\n\nAbsoluteElement.prototype.getFixedCoords = function () {\n\treturn { x: this.x, w: this.fixed.w, t: this.fixed.t, b: this.fixed.b };\n};\n\nAbsoluteElement.prototype.addExtra = function (extra) {\n\t// used for accidentals, multi-measure rest text,\n\t// left-side decorations, gracenote heads,\n\t// left annotations, gracenote stems.\n\t// if (!(extra.c && extra.c.indexOf(\"accidentals\") >= 0) &&\n\t// \t!(extra.c && extra.c.indexOf(\"arpeggio\") >= 0) &&\n\t// \textra.type !== \"multimeasure-text\" &&\n\t// \t!(extra.c === \"noteheads.quarter\" && (extra.scalex === 0.6 || extra.scalex === 0.36)) &&\n\t// \t!(extra.type === \"stem\" && extra.linewidth === -0.6) &&\n\t// \textra.position !== \"left\"\n\t// )\n\t// \tconsole.log(\"extra\", extra);\n\n\tthis.fixed.w = Math.max(this.fixed.w, extra.dx + extra.w);\n\tif (this.fixed.t === undefined) this.fixed.t = extra.top; else this.fixed.t = Math.max(this.fixed.t, extra.top);\n\tif (this.fixed.b === undefined) this.fixed.b = extra.bottom; else this.fixed.b = Math.min(this.fixed.b, extra.bottom);\n\tif (extra.dx < this.extraw) this.extraw = extra.dx;\n\tthis.extra[this.extra.length] = extra;\n\tthis._addChild(extra);\n};\n\nAbsoluteElement.prototype.addHead = function (head) {\n\tif (head.dx < this.extraw) this.extraw = head.dx;\n\tthis.heads[this.heads.length] = head;\n\tthis.addRight(head);\n};\n\nAbsoluteElement.prototype.addRight = function (right) {\n\t// // used for clefs, note heads, bar lines, stems, key-signature accidentals, non-beamed flags, dots\n\t// if (!(right.c && right.c.indexOf(\"clefs\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"noteheads\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"flags\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"rests\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"dots.dot\") >= 0) &&\n\t// \tright.type !== \"stem\" &&\n\t// \tright.type !== \"bar\" &&\n\t// \tright.type !== \"none\" && // used when an invisible anchor is needed.\n\t// \t!(this.type.indexOf(\"clef\") >= -1 && right.c === \"8\") &&\n\t// \tthis.type.indexOf(\"key-signature\") === -1 &&\n\t// \tthis.type.indexOf(\"time-signature\") === -1 &&\n\t// \t!(this.abcelem && this.abcelem.rest && this.abcelem.rest.type === \"spacer\") &&\n\t// \t!(this.abcelem && this.abcelem.rest && this.abcelem.rest.type === \"invisible\") &&\n\t// \t!(right.type === \"text\" && right.position === \"relative\") &&\n\t// \t!(right.type === \"text\" && right.position === \"right\") &&\n\t// \t!(right.type === \"text\" && right.position === \"above\") &&\n\t// \t!(right.type === \"text\" && right.position === \"below\")\n\t// )\n\t// \tconsole.log(\"right\", right);\n\t// These are the elements that are the fixed part.\n\tthis.fixed.w = Math.max(this.fixed.w, right.dx + right.w);\n\tif (right.top !== undefined) {\n\t\tif (this.fixed.t === undefined) this.fixed.t = right.top; else this.fixed.t = Math.max(this.fixed.t, right.top);\n\t}\n\tif (right.bottom !== undefined) {\n\t\tif (this.fixed.b === undefined) this.fixed.b = right.bottom; else this.fixed.b = Math.min(this.fixed.b, right.bottom);\n\t}\n\t// if (isNaN(this.fixed.t) || isNaN(this.fixed.b))\n\t// \tdebugger;\n\tif (right.dx + right.w > this.w) this.w = right.dx + right.w;\n\tthis.right[this.right.length] = right;\n\tthis._addChild(right);\n};\n\nAbsoluteElement.prototype.addFixed = function (elem) {\n\t// used for elements that can't move relative to other elements after they have been placed.\n\t// used for ledger lines, bar numbers, debug msgs, clef, key sigs, time sigs\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.addFixedX = function (elem) {\n\t// used for elements that can't move horizontally relative to other elements after they have been placed.\n\t// used for parts, tempo, decorations\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.addCentered = function (elem) {\n\t// // used for chord labels, lyrics\n\t// if (!(elem.type === \"chord\" && elem.position === \"above\") &&\n\t// \t!(elem.type === \"chord\" && elem.position === \"below\") &&\n\t// \telem.type !== 'lyric'\n\t// )\n\t// \tconsole.log(\"centered\", elem);\n\tvar half = elem.w / 2;\n\tif (-half < this.extraw) this.extraw = -half;\n\tthis.extra[this.extra.length] = elem;\n\tif (elem.dx + half > this.w) this.w = elem.dx + half;\n\tthis.right[this.right.length] = elem;\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.setLimit = function (member, child) {\n\tif (!child[member]) return;\n\tif (!this.specialY[member])\n\t\tthis.specialY[member] = child[member];\n\telse\n\t\tthis.specialY[member] = Math.max(this.specialY[member], child[member]);\n};\n\nAbsoluteElement.prototype._addChild = function (child) {\n\t//\tconsole.log(\"Relative:\",child);\n\tchild.parent = this;\n\tthis.children[this.children.length] = child;\n\tthis.pushTop(child.top);\n\tthis.pushBottom(child.bottom);\n\tthis.setLimit('tempoHeightAbove', child);\n\tthis.setLimit('partHeightAbove', child);\n\tthis.setLimit('volumeHeightAbove', child);\n\tthis.setLimit('dynamicHeightAbove', child);\n\tthis.setLimit('endingHeightAbove', child);\n\tthis.setLimit('chordHeightAbove', child);\n\tthis.setLimit('lyricHeightAbove', child);\n\tthis.setLimit('lyricHeightBelow', child);\n\tthis.setLimit('chordHeightBelow', child);\n\tthis.setLimit('volumeHeightBelow', child);\n\tthis.setLimit('dynamicHeightBelow', child);\n};\n\nAbsoluteElement.prototype.pushTop = function (top) {\n\tif (top !== undefined) {\n\t\tif (this.top === undefined)\n\t\t\tthis.top = top;\n\t\telse\n\t\t\tthis.top = Math.max(top, this.top);\n\t}\n};\n\nAbsoluteElement.prototype.pushBottom = function (bottom) {\n\tif (bottom !== undefined) {\n\t\tif (this.bottom === undefined)\n\t\t\tthis.bottom = bottom;\n\t\telse\n\t\t\tthis.bottom = Math.min(bottom, this.bottom);\n\t}\n};\n\nAbsoluteElement.prototype.setX = function (x) {\n\tthis.x = x;\n\tfor (var i = 0; i < this.children.length; i++)\n\t\tthis.children[i].setX(x);\n};\n\nAbsoluteElement.prototype.center = function (before, after) {\n\t// Used to center whole rests\n\tvar midpoint = (after.x - before.x) / 2 + before.x;\n\tthis.x = midpoint - this.w / 2;\n\tfor (var k = 0; k < this.children.length; k++)\n\t\tthis.children[k].setX(this.x);\n};\n\nAbsoluteElement.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nAbsoluteElement.prototype.highlight = function (klass, color) {\n\thighlight.bind(this)(klass, color);\n};\n\nAbsoluteElement.prototype.unhighlight = function (klass, color) {\n\tunhighlight.bind(this)(klass, color);\n};\n\nmodule.exports = AbsoluteElement;\n","// abc_beam_element.js: Definition of the BeamElem class.\n\n// Most elements on the page are related to a particular absolute element -- notes, rests, bars, etc. Beams, however, span multiple elements.\n// This means that beams can't be laid out until the absolute elements are placed. There is the further complication that the stems for beamed\n// notes can't be laid out until the beams are because we don't know how long they will be until we know the slope of the beam and the horizontal\n// spacing of the absolute elements.\n//\n// So, when a beam is detected, a BeamElem is created, then all notes belonging to that beam are added to it. These notes are not given stems at that time.\n// Then, after the horizontal layout is complete, all of the BeamElem are iterated to set the beam position, then all of the notes that are beamed are given\n// stems. After that, we are ready for the drawing step.\n\n// There are three phases: the setup phase, when new elements are being discovered, the layout phase, when everything is calculated, and the drawing phase,\n// when the object is not changed, but is used to put the elements on the page.\n\n//\n// Setup phase\n//\nvar BeamElem = function BeamElem(stemHeight, type, flat, firstElement) {\n\t// type is \"grace\", \"up\", \"down\", or undefined. flat is used to force flat beams, as it commonly found in the grace notes of bagpipe music.\n\tthis.type = \"BeamElem\";\n\tthis.isflat = !!flat;\n\tthis.isgrace = !!(type && type === \"grace\");\n\tthis.forceup = !!(this.isgrace || (type && type === \"up\"));\n\tthis.forcedown = !!(type && type === \"down\");\n\tthis.elems = []; // all the AbsoluteElements that this beam touches. It may include embedded rests.\n\tthis.total = 0;\n\tthis.average = 6; // use middle line as start for average.\n\tthis.allrests = true;\n\tthis.stemHeight = stemHeight;\n\tthis.beams = []; // During the layout phase, this will become a list of the beams that need to be drawn.\n\tif (firstElement && firstElement.duration) {\n\t\tthis.duration = firstElement.duration;\n\t\tif (firstElement.startTriplet) {\n\t\t\tthis.duration *= firstElement.tripletMultiplier;\n\t\t}\n\t\tthis.duration = Math.round(this.duration * 1000) / 1000;\n\t} else\n\t\tthis.duration = 0;\n};\n\nBeamElem.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nBeamElem.prototype.runningDirection = function (abcelem) {\n\tvar pitch = abcelem.averagepitch;\n\tif (pitch === undefined) return; // don't include elements like spacers in beams\n\tthis.total = Math.round(this.total + pitch);\n\tif (!this.count)\n\t\tthis.count = 0;\n\tthis.count++\n};\n\nBeamElem.prototype.add = function (abselem) {\n\tvar pitch = abselem.abcelem.averagepitch;\n\tif (pitch === undefined) return; // don't include elements like spacers in beams\n\tif (!abselem.abcelem.rest)\n\t\tthis.allrests = false;\n\tabselem.beam = this;\n\tthis.elems.push(abselem);\n\tthis.total = Math.round(this.total + pitch);\n\tif (this.min === undefined || abselem.abcelem.minpitch < this.min) {\n\t\tthis.min = abselem.abcelem.minpitch;\n\t}\n\tif (this.max === undefined || abselem.abcelem.maxpitch > this.max) {\n\t\tthis.max = abselem.abcelem.maxpitch;\n\t}\n};\n\nBeamElem.prototype.addBeam = function (beam) {\n\tthis.beams.push(beam);\n};\n\nBeamElem.prototype.setStemDirection = function () {\n\t// Have to figure this out before the notes are placed because placing the notes also places the decorations.\n\tthis.average = calcAverage(this.total, this.count);\n\tif (this.forceup) {\n\t\tthis.stemsUp = true;\n\t} else if (this.forcedown) {\n\t\tthis.stemsUp = false;\n\t} else {\n\t\tvar middleLine = 6;\t// hardcoded 6 is B\n\t\tthis.stemsUp = this.average < middleLine; // true is up, false is down;\n\t}\n\tdelete this.count;\n\tthis.total = 0;\n};\n\nBeamElem.prototype.calcDir = function () {\n\tthis.average = calcAverage(this.total, this.elems.length);\n\tif (this.forceup) {\n\t\tthis.stemsUp = true;\n\t} else if (this.forcedown) {\n\t\tthis.stemsUp = false;\n\t} else {\n\t\tvar middleLine = 6;\t// hardcoded 6 is B\n\t\tthis.stemsUp = this.average < middleLine; // true is up, false is down;\n\t}\n\tvar dir = this.stemsUp ? 'up' : 'down';\n\tfor (var i = 0; i < this.elems.length; i++) {\n\t\tfor (var j = 0; j < this.elems[i].heads.length; j++) {\n\t\t\tthis.elems[i].heads[j].stemDir = dir;\n\t\t}\n\t}\n};\n\nfunction calcAverage(total, numElements) {\n\tif (!numElements)\n\t\treturn 0;\n\treturn total / numElements;\n}\n\nmodule.exports = BeamElem;\n","const addTextIf = require(\"../add-text-if\");\nconst richText = require(\"./rich-text\");\n\nfunction BottomText(metaText, width, isPrint, paddingLeft, spacing, shouldAddClasses, getTextSize) {\n\tthis.rows = [];\n\tif (metaText.unalignedWords && metaText.unalignedWords.length > 0)\n\t\tthis.unalignedWords(metaText.unalignedWords, paddingLeft, spacing, shouldAddClasses, getTextSize);\n\tthis.extraText(metaText, paddingLeft, spacing, shouldAddClasses, getTextSize);\n\tif (metaText.footer && isPrint)\n\t\tthis.footer(metaText.footer, width, paddingLeft, getTextSize);\n}\n\nBottomText.prototype.unalignedWords = function (unalignedWords, marginLeft, spacing, shouldAddClasses, getTextSize) {\n\tvar klass = shouldAddClasses ? 'abcjs-unaligned-words' : ''\n\tvar defFont = 'wordsfont';\n\tvar space = getTextSize.calc(\"i\", defFont, klass);\n\t\n\tthis.rows.push({ move: spacing.words });\n\t\n\taddMultiLine(this.rows, '', unalignedWords, marginLeft, defFont, \"unalignedWords\", \"unalignedWords\", klass, \"unalignedWords\", spacing, shouldAddClasses, getTextSize)\n\tthis.rows.push({ move: space.height });\n}\n\nfunction addSingleLine(rows, preface, text, marginLeft, klass, shouldAddClasses, getTextSize) {\n\tif (text) {\n\t\tif (preface) {\n\t\t\tif (typeof text === 'string')\n\t\t\t\ttext = preface + text\n\t\t\telse\n\t\t\t\ttext = [{text: preface}].concat(text)\n\t\t}\n\t\tklass = shouldAddClasses ? 'abcjs-extra-text '+klass : ''\n\t\trichText(rows, text, 'historyfont', klass, \"description\", marginLeft, {absElemType: \"extraText\", anchor: 'start'}, getTextSize)\n\t}\n\n}\n\nfunction addMultiLine(rows, preface, content, marginLeft, defFont, absElemType, groupName, klass, name, spacing, shouldAddClasses, getTextSize) {\n\tif (content) {\n\t\tklass = shouldAddClasses ? 'abcjs-extra-text '+klass : ''\n\t\tvar size = getTextSize.calc(\"A\", defFont, klass);\n\t\tif (typeof content === 'string') {\n\t\t\tif (preface)\n\t\t\t\tcontent = preface + \"\\n\" + content\n\t\t\taddTextIf(rows, { marginLeft: marginLeft, text: content, font: defFont, absElemType: \"extraText\", name: name, 'dominant-baseline': 'middle', klass: klass }, getTextSize);\n\t\t\t//rows.push({move: size.height*3/4})\n\t\t} else {\n\t\t\trows.push({ startGroup: groupName, klass: klass, name: name });\n\t\t\trows.push({move: spacing.info})\n\t\t\tif (preface) {\n\t\t\t\taddTextIf(rows, { marginLeft: marginLeft, text: preface, font: defFont, absElemType: \"extraText\", name: name, 'dominant-baseline': 'middle' }, getTextSize);\n\t\t\t\trows.push({move: size.height*3/4})\n\t\t\t}\n\n\t\t\tfor (var j = 0; j < content.length; j++) {\n\t\t\t\trichText(rows, content[j], defFont, '', name, marginLeft, {anchor: 'start'}, getTextSize)\n\t\t\t\t// TODO-PER: Hack! the string and rich lines should have used up the same amount of space without this.\n\t\t\t\tif (j < content.length-1 && typeof content[j] === 'string' && typeof content[j+1] !== 'string')\n\t\t\t\t\trows.push({move: size.height*3/4})\n\t\t\t}\n\t\t\trows.push({ endGroup: groupName, absElemType: absElemType, startChar: -1, endChar: -1, name: name });\n\t\t\trows.push({move: size.height})\n\t\t}\n\t}\n}\nBottomText.prototype.extraText = function (metaText, marginLeft, spacing, shouldAddClasses, getTextSize) {\n\taddSingleLine(this.rows, \"Book: \", metaText.book, marginLeft, 'abcjs-book', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Source: \", metaText.source, marginLeft, 'abcjs-source', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Discography: \", metaText.discography, marginLeft, 'abcjs-discography', shouldAddClasses, getTextSize)\n\n\taddMultiLine(this.rows, 'Notes:', metaText.notes, marginLeft, 'historyfont', \"extraText\", \"notes\", 'abcjs-notes', \"description\", spacing, shouldAddClasses, getTextSize)\n\n\taddSingleLine(this.rows, \"Transcription: \", metaText.transcription, marginLeft, 'abcjs-transcription', shouldAddClasses, getTextSize)\n\n\taddMultiLine(this.rows, \"History:\", metaText.history, marginLeft, 'historyfont', \"extraText\", \"history\", 'abcjs-history', \"description\", spacing, shouldAddClasses, getTextSize)\n\n\taddSingleLine(this.rows, \"Copyright: \", metaText['abc-copyright'], marginLeft, 'abcjs-copyright', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Creator: \", metaText['abc-creator'], marginLeft, 'abcjs-creator', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Edited By: \", metaText['abc-edited-by'], marginLeft, 'abcjs-edited-by', shouldAddClasses, getTextSize)\n\n}\n\nBottomText.prototype.footer = function (footer, width, paddingLeft, getTextSize) {\n\tvar klass = 'header meta-bottom';\n\tvar font = \"footerfont\";\n\tthis.rows.push({ startGroup: \"footer\", klass: klass });\n\t// Note: whether there is a footer or not doesn't change any other positioning, so this doesn't change the Y-coordinate.\n\taddTextIf(this.rows, { marginLeft: paddingLeft, text: footer.left, font: font, klass: klass, name: \"footer\" }, getTextSize);\n\taddTextIf(this.rows, { marginLeft: paddingLeft + width / 2, text: footer.center, font: font, klass: klass, anchor: 'middle', name: \"footer\" }, getTextSize);\n\taddTextIf(this.rows, { marginLeft: paddingLeft + width, text: footer.right, font: font, klass: klass, anchor: 'end', name: \"footer\" }, getTextSize);\n}\n\nmodule.exports = BottomText;\n","// abc_brace_element.js: Definition of the BraceElement class.\n\nvar BraceElem = function BraceElem(voice, type) {\n\tthis.startVoice = voice;\n\tthis.type = type;\n};\n\nBraceElem.prototype.setBottomStaff = function (voice) {\n\tthis.endVoice = voice;\n\t// If only the start brace has a name then the name belongs to the brace instead of the staff.\n\tif (this.startVoice.header && !this.endVoice.header) {\n\t\tthis.header = this.startVoice.header;\n\t\tdelete this.startVoice.header;\n\t}\n};\n\nBraceElem.prototype.continuing = function (voice) {\n\t// If the final staff isn't present, then use the last one we saw.\n\tthis.lastContinuedVoice = voice;\n};\n\nBraceElem.prototype.getWidth = function () {\n\treturn 10; // TODO-PER: right now the drawing function doesn't vary the width at all. If it does in the future then this will change.\n};\n\nBraceElem.prototype.isStartVoice = function (voice) {\n\tif (this.startVoice && this.startVoice.staff && this.startVoice.staff.voices.length > 0 && this.startVoice.staff.voices[0] === voice)\n\t\treturn true;\n\treturn false;\n};\n\nmodule.exports = BraceElem;\n","// abc_crescendo_element.js: Definition of the CrescendoElem class.\n\nvar CrescendoElem = function CrescendoElem(anchor1, anchor2, dir, positioning) {\n\tthis.type = \"CrescendoElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n\tthis.dir = dir; // either \"<\" or \">\"\n\tif (positioning === 'above')\n\t\tthis.dynamicHeightAbove = 6;\n\telse\n\t\tthis.dynamicHeightBelow = 6;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = CrescendoElem;\n","// abc_dynamic_decoration.js: Definition of the DynamicDecoration class.\n\nvar DynamicDecoration = function DynamicDecoration(anchor, dec, position) {\n\tthis.type = \"DynamicDecoration\";\n\tthis.anchor = anchor;\n\tthis.dec = dec;\n\tif (position === 'below')\n\t\tthis.volumeHeightBelow = 6;\n\telse\n\t\tthis.volumeHeightAbove = 6;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = DynamicDecoration;\n","// abc_ending_element.js: Definition of the EndingElement class.\n\nvar EndingElem = function EndingElem(text, anchor1, anchor2) {\n\tthis.type = \"EndingElem\";\n\tthis.text = text; // text to be displayed top left\n\tthis.anchor1 = anchor1; // must have a .x property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n\tthis.endingHeightAbove = 5;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = EndingElem;\n","function FreeText(info, vskip, getFontAndAttr, paddingLeft, width, getTextSize) {\n\tvar text = info.text;\n\tthis.rows = [];\n\tvar size;\n\tif (vskip)\n\t\tthis.rows.push({ move: vskip });\n\tvar hash = getFontAndAttr.calc('textfont', 'defined-text');\n\tif (text === \"\") {\t// we do want to print out blank lines if they have been specified.\n\t\tthis.rows.push({ move: hash.attr['font-size'] * 2 }); // move the distance of the line, plus the distance of the margin, which is also one line.\n\t} else if (typeof text === 'string') {\n\t\tthis.rows.push({ move: hash.attr['font-size'] / 2 }); // TODO-PER: move down some - the y location should be the top of the text, but we output text specifying the center line.\n\t\tthis.rows.push({ left: paddingLeft, text: text, font: 'textfont', klass: 'defined-text', anchor: \"start\", startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\tsize = getTextSize.calc(text, 'textfont', 'defined-text');\n\t\tthis.rows.push({ move: size.height });\n\t} else if (text) {\n\t\tvar maxHeight = 0;\n\t\tvar leftSide = paddingLeft;\n\t\tvar currentFont = 'textfont';\n\t\tfor (var i = 0; i < text.length; i++) {\n\t\t\tif (text[i].font) {\n\t\t\t\tcurrentFont = text[i].font;\n\t\t\t} else\n\t\t\t\tcurrentFont = 'textfont';\n\t\t\tthis.rows.push({ left: leftSide, text: text[i].text, font: currentFont, klass: 'defined-text', anchor: 'start', startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\t\tsize = getTextSize.calc(text[i].text, getFontAndAttr.calc(currentFont, 'defined-text').font, 'defined-text');\n\t\t\tleftSide += size.width + size.height / 2; // add a little padding to the right side. The height of the font is probably a close enough approximation.\n\t\t\tmaxHeight = Math.max(maxHeight, size.height)\n\t\t}\n\t\tthis.rows.push({ move: maxHeight });\n\t} else {\n\t\t// The structure is wrong here: it requires an array to do centering, but it shouldn't have.\n\t\tif (info.length === 1) {\n\t\t\tvar x = width / 2;\n\t\t\tthis.rows.push({ left: x, text: info[0].text, font: 'textfont', klass: 'defined-text', anchor: 'middle', startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\t\tsize = getTextSize.calc(info[0].text, 'textfont', 'defined-text');\n\t\t\tthis.rows.push({ move: size.height });\n\t\t}\n\t}\n}\n\nmodule.exports = FreeText;\n","var GlissandoElem = function GlissandoElem(anchor1, anchor2) {\n\tthis.type = \"GlissandoElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n};\n\nmodule.exports = GlissandoElem;\n","// abc_relative_element.js: Definition of the RelativeElement class.\n\nvar RelativeElement = function RelativeElement(c, dx, w, pitch, opt) {\n\topt = opt || {};\n\tthis.x = 0;\n\tthis.c = c; // character or path or string\n\tthis.dx = dx; // relative x position\n\tthis.w = w; // minimum width taken up by this element (can include gratuitous space)\n\tthis.pitch = pitch; // relative y position by pitch\n\tthis.scalex = opt.scalex || 1; // should the character/path be scaled?\n\tthis.scaley = opt.scaley || 1; // should the character/path be scaled?\n\tthis.type = opt.type || \"symbol\"; // cheap types.\n\tthis.pitch2 = opt.pitch2;\n\tthis.linewidth = opt.linewidth;\n\tthis.klass = opt.klass;\n\tthis.anchor = opt.anchor ? opt.anchor : 'middle'\n\tthis.top = pitch;\n\tif (this.pitch2 !== undefined && this.pitch2 > this.top) this.top = this.pitch2;\n\tthis.bottom = pitch;\n\tif (this.pitch2 !== undefined && this.pitch2 < this.bottom) this.bottom = this.pitch2;\n\tif (opt.thickness) {\n\t\tthis.top += opt.thickness / 2;\n\t\tthis.bottom -= opt.thickness / 2;\n\t}\n\tif (opt.stemHeight) {\n\t\tif (opt.stemHeight > 0)\n\t\t\tthis.top += opt.stemHeight;\n\t\telse\n\t\t\tthis.bottom += opt.stemHeight;\n\t}\n\tif (opt.dim)\n\t\tthis.dim = opt.dim;\n\tif (opt.position)\n\t\tthis.position = opt.position;\n\tthis.height = opt.height ? opt.height : 4; // The +1 is to give a little bit of padding.\n\tif (opt.top)\n\t\tthis.top = opt.top;\n\tif (opt.bottom)\n\t\tthis.bottom = opt.bottom;\n\tif (opt.name)\n\t\tthis.name = opt.name;\n\telse if (this.c)\n\t\tthis.name = this.c;\n\telse\n\t\tthis.name = this.type;\n\tif (opt.realWidth)\n\t\tthis.realWidth = opt.realWidth;\n\telse\n\t\tthis.realWidth = this.w;\n\tthis.centerVertically = false;\n\tswitch (this.type) {\n\t\tcase \"debug\":\n\t\t\tthis.chordHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\tthis.lyricHeightBelow = this.height;\n\t\t\telse\n\t\t\t\tthis.lyricHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"chord\":\n\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\tthis.chordHeightBelow = this.height;\n\t\t\telse\n\t\t\t\tthis.chordHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\t\tif (this.pitch === undefined) {\n\t\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\t\tthis.chordHeightBelow = this.height;\n\t\t\t\telse\n\t\t\t\t\tthis.chordHeightAbove = this.height;\n\t\t\t} else\n\t\t\t\tthis.centerVertically = true;\n\t\t\tbreak;\n\t\tcase \"part\": this.partHeightAbove = this.height; break;\n\t}\n};\n\nRelativeElement.prototype.getChordDim = function () {\n\tif (this.type === \"debug\")\n\t\treturn null;\n\tif (!this.chordHeightAbove && !this.chordHeightBelow)\n\t\treturn null;\n\t// Chords are centered, annotations are left justified.\n\t// NOTE: the font reports extra space to the left and right anyway, so there is a built in margin.\n\t// We add a little margin so that items can't touch - we use half the font size as the margin, so that is 1/4 on each side.\n\t// if there is only one character that we're printing, use half of that margin.\n\t// var margin = this.dim.font.size/4;\n\t// if (this.c.length === 1)\n\t// \tmargin = margin / 2;\n\tvar margin = 0;\n\n\tvar offset = this.type === \"chord\" ? this.realWidth / 2 : 0;\n\tvar left = this.x - offset - margin;\n\tvar right = left + this.realWidth + margin;\n\treturn { left: left, right: right };\n};\n\nRelativeElement.prototype.invertLane = function (total) {\n\tif (this.lane === undefined)\n\t\tthis.lane = 0;\n\tthis.lane = total - this.lane - 1;\n};\n\nRelativeElement.prototype.putChordInLane = function (i) {\n\tthis.lane = i;\n\t// Add some extra space to account for the character's descenders.\n\tif (this.chordHeightAbove)\n\t\tthis.chordHeightAbove = (this.height * 1.25) * this.lane;\n\telse\n\t\tthis.chordHeightBelow = (this.height * 1.25) * this.lane;\n};\n\nRelativeElement.prototype.getLane = function () {\n\tif (this.lane === undefined)\n\t\treturn 0;\n\treturn this.lane;\n};\n\nRelativeElement.prototype.setX = function (x) {\n\tthis.x = x + this.dx;\n};\n\nmodule.exports = RelativeElement;\n","const addTextIf = require(\"../add-text-if\");\n\nfunction richText(rows, str, defFont, klass, name, paddingLeft, attr, getTextSize) {\n\tvar space = getTextSize.calc(\"i\", defFont, klass);\n\tif (str === '') {\n\t\trows.push({ move: space.height });\n\t} else {\n\t\tif (typeof str === 'string') {\n\t\t\taddTextIf(rows, { marginLeft: paddingLeft, text: str, font: defFont, klass: klass, marginTop: attr.marginTop, anchor: attr.anchor, absElemType: attr.absElemType, info: attr.info, name: name }, getTextSize);\n\t\t\treturn\n\t\t}\n\t\tif (attr.marginTop)\n\t\t\trows.push({move: attr.marginTop})\n\n\t\tvar largestY = 0;\n\t\tvar gap = 0;\n\t\tvar row = {\n\t\t\tleft: paddingLeft,\n\t\t\tanchor: attr.anchor,\n\t\t\tphrases: []\n\t\t}\n\t\tif (klass)\n\t\t\trow.klass = klass\n\t\trows.push(row)\n\t\tfor (var k = 0; k < str.length; k++) {\n\t\t\tvar thisWord = str[k];\n\t\t\tvar font = (thisWord.font) ? thisWord.font : getTextSize.attr(defFont, klass).font;\n\t\t\tvar phrase = {\n\t\t\t\tcontent: thisWord.text,\n\t\t\t}\n\t\t\tif (font)\n\t\t\t\tphrase.attrs = {\n\t\t\t\t\t\"font-family\": getTextSize.getFamily(font.face),\n\t\t\t\t\t\"font-size\": font.size,\n\t\t\t\t\t\"font-weight\": font.weight,\n\t\t\t\t\t\"font-style\": font.style,\n\t\t\t\t\t\"font-decoration\": font.decoration,\n\t\t\t}\n\t\t\t//if (thisWord.text) {\n\t\t\t\trow.phrases.push(phrase);\n\t\t\t\tvar size = getTextSize.calc(thisWord.text, font, klass);\n\t\t\t\tlargestY = Math.max(largestY, size.height);\n\t\t\t\tif (thisWord.text[thisWord.text.length - 1] === ' ') {\n\t\t\t\t\tgap = space.width\n\t\t\t\t}\n\t\t}\n\t\trows.push({ move: largestY });\n\t}\n}\n\nmodule.exports = richText;\n","function Separator(spaceAbove, lineLength, spaceBelow) {\n\tthis.rows = [];\n\tif (spaceAbove)\n\t\tthis.rows.push({ move: spaceAbove });\n\tthis.rows.push({ separator: lineLength, absElemType: \"separator\" });\n\tif (spaceBelow)\n\t\tthis.rows.push({ move: spaceBelow });\n}\n\nmodule.exports = Separator;\n","// abc_staff_group_element.js: Definition of the StaffGroupElement class.\n\n// StaffGroupElement contains all the elements that go together to make one line of music.\n// That might be multiple staves that are tied together, and it might be multiple voices on one staff.\n//\n// Methods:\n// constructor: some basic initialization\n// addVoice(): Called once for each voice. May add a new staff if needed.\n// finished(): Called only internally by layout()\n// layout(): This does all the layout. It sets the following: spacingunits, startx, minspace, w, and the x-coordinate of each element in each voice.\n// draw(): Calls the underlying methods on the voice objects to do the drawing. Sets y and height.\n//\n// Members:\n// staffs: an array of all the staves in this group. Each staff contains the following elements:\n// { top, bottom, highest, lowest, y }\n// voices: array of VoiceElement objects. This is mostly passed in, but the VoiceElement objects are modified here.\n//\n// spacingunits: number of relative x-units in the line. Used by the calling function to pass back in as the \"spacing\" input parameter.\n// TODO-PER: This should actually be passed back as a return value.\n// minspace: smallest space between two notes. Used by the calling function to pass back in as the \"spacing\" input parameter.\n// TODO-PER: This should actually be passed back as a return value.\n// startx: The left edge, taking the margin and the optional voice name. Used by the draw() method.\n// w: The width of the line. Used by calling function to pass back in as the \"spacing\" input parameter, and the draw() method.\n// TODO-PER: This should actually be passed back as a return value. (TODO-PER: in pixels or spacing units?)\n// y: The top of the staff group, in pixels. This is set in the draw method.\n// TODO-PER: Where is that used? It looks like it might not be needed.\n// height: Set in the draw() method to the height actually used. Used by the calling function to know where to start the next staff group.\n// TODO-PER: This should actually be set in the layout method and passed back as a return value.\nvar calcHeight = require('../calc-height');\n\nvar StaffGroupElement = function (getTextSize) {\n\tthis.getTextSize = getTextSize;\n\tthis.voices = [];\n\tthis.staffs = [];\n\tthis.brace = undefined; //tony\n\tthis.bracket = undefined;\n};\n\nStaffGroupElement.prototype.setLimit = function (member, voice) {\n\tif (!voice.specialY[member]) return;\n\tif (!voice.staff.specialY[member])\n\t\tvoice.staff.specialY[member] = voice.specialY[member];\n\telse\n\t\tvoice.staff.specialY[member] = Math.max(voice.staff.specialY[member], voice.specialY[member]);\n};\n\nStaffGroupElement.prototype.addVoice = function (voice, staffnumber, stafflines) {\n\tvar voiceNum = this.voices.length;\n\tthis.voices[voiceNum] = voice;\n\tif (this.staffs[staffnumber])\n\t\tthis.staffs[staffnumber].voices.push(voiceNum);\n\telse {\n\t\t// TODO-PER: how does the min/max change when stafflines is not 5?\n\t\tthis.staffs[this.staffs.length] = {\n\t\t\ttop: 10,\n\t\t\tbottom: 2,\n\t\t\tlines: stafflines,\n\t\t\tvoices: [voiceNum],\n\t\t\tspecialY: {\n\t\t\t\ttempoHeightAbove: 0,\n\t\t\t\tpartHeightAbove: 0,\n\t\t\t\tvolumeHeightAbove: 0,\n\t\t\t\tdynamicHeightAbove: 0,\n\t\t\t\tendingHeightAbove: 0,\n\t\t\t\tchordHeightAbove: 0,\n\t\t\t\tlyricHeightAbove: 0,\n\n\t\t\t\tlyricHeightBelow: 0,\n\t\t\t\tchordHeightBelow: 0,\n\t\t\t\tvolumeHeightBelow: 0,\n\t\t\t\tdynamicHeightBelow: 0\n\t\t\t}\n\t\t};\n\t}\n\tvoice.staff = this.staffs[staffnumber];\n};\n\nStaffGroupElement.prototype.setHeight = function () {\n\tthis.height = calcHeight(this);\n};\n\nStaffGroupElement.prototype.setWidth = function (width) {\n\tthis.w = width;\n\tfor (var i = 0; i < this.voices.length; i++) {\n\t\tthis.voices[i].setWidth(width);\n\t}\n};\n\nStaffGroupElement.prototype.setStaffLimits = function (voice) {\n\tvoice.staff.top = Math.max(voice.staff.top, voice.top);\n\tvoice.staff.bottom = Math.min(voice.staff.bottom, voice.bottom);\n\tthis.setLimit('tempoHeightAbove', voice);\n\tthis.setLimit('partHeightAbove', voice);\n\tthis.setLimit('volumeHeightAbove', voice);\n\tthis.setLimit('dynamicHeightAbove', voice);\n\tthis.setLimit('endingHeightAbove', voice);\n\tthis.setLimit('chordHeightAbove', voice);\n\tthis.setLimit('lyricHeightAbove', voice);\n\tthis.setLimit('lyricHeightBelow', voice);\n\tthis.setLimit('chordHeightBelow', voice);\n\tthis.setLimit('volumeHeightBelow', voice);\n\tthis.setLimit('dynamicHeightBelow', voice);\n};\n\nmodule.exports = StaffGroupElement;\n","function Subtitle(spaceAbove, formatting, info, center, paddingLeft, getTextSize) {\n\tthis.rows = [];\n\tif (spaceAbove)\n\t\tthis.rows.push({ move: spaceAbove });\n\tvar tAnchor = formatting.titleleft ? 'start' : 'middle';\n\tvar tLeft = formatting.titleleft ? paddingLeft : center;\n\tthis.rows.push({ left: tLeft, text: info.text, font: 'subtitlefont', klass: 'text subtitle', anchor: tAnchor, startChar: info.startChar, endChar: info.endChar, absElemType: \"subtitle\", name: \"subtitle\" });\n\tvar size = getTextSize.calc(info.text, 'subtitlefont', 'text subtitle');\n\tthis.rows.push({ move: size.height });\n}\n\nmodule.exports = Subtitle;\n","// abc_tempo_element.js: Definition of the TempoElement class.\n\nvar AbsoluteElement = require('./absolute-element');\nvar RelativeElement = require('./relative-element');\n\nvar TempoElement = function TempoElement(tempo, tuneNumber, createNoteHead) {\n\tthis.type = \"TempoElement\";\n\tthis.tempo = tempo;\n\tthis.tempo.type = \"tempo\"; /// TODO-PER: this should be set earlier, in the parser, probably.\n\tthis.tuneNumber = tuneNumber;\n\t// TODO: can these two properties be merged?\n\tthis.totalHeightInPitches = 6;\n\tthis.tempoHeightAbove = this.totalHeightInPitches;\n\tthis.pitch = undefined; // This will be set later\n\tif (this.tempo.duration && !this.tempo.suppressBpm) {\n\t\tthis.note = this.createNote(createNoteHead, tempo, tuneNumber);\n\t}\n};\n\nTempoElement.prototype.setX = function (x) {\n\tthis.x = x;\n};\n\nTempoElement.prototype.createNote = function (createNoteHead, tempo, tuneNumber) {\n\tvar temposcale = 0.75;\n\tvar duration = tempo.duration[0]; // TODO when multiple durations\n\tvar absElem = new AbsoluteElement(tempo, duration, 1, 'tempo', tuneNumber);\n\t// There aren't an infinite number of note values, but we are passed a float, so just in case something is off upstream,\n\t// merge all of the in between points.\n\tvar dot;\n\tvar flag;\n\tvar note;\n\tif (duration <= 1 / 32) { note = \"noteheads.quarter\"; flag = \"flags.u32nd\"; dot = 0; }\n\telse if (duration <= 1 / 16) { note = \"noteheads.quarter\"; flag = \"flags.u16th\"; dot = 0; }\n\telse if (duration <= 3 / 32) { note = \"noteheads.quarter\"; flag = \"flags.u16nd\"; dot = 1; }\n\telse if (duration <= 1 / 8) { note = \"noteheads.quarter\"; flag = \"flags.u8th\"; dot = 0; }\n\telse if (duration <= 3 / 16) { note = \"noteheads.quarter\"; flag = \"flags.u8th\"; dot = 1; }\n\telse if (duration <= 1 / 4) { note = \"noteheads.quarter\"; dot = 0; }\n\telse if (duration <= 3 / 8) { note = \"noteheads.quarter\"; dot = 1; }\n\telse if (duration <= 1 / 2) { note = \"noteheads.half\"; dot = 0; }\n\telse if (duration <= 3 / 4) { note = \"noteheads.half\"; dot = 1; }\n\telse if (duration <= 1) { note = \"noteheads.whole\"; dot = 0; }\n\telse if (duration <= 1.5) { note = \"noteheads.whole\"; dot = 1; }\n\telse if (duration <= 2) { note = \"noteheads.dbl\"; dot = 0; }\n\telse { note = \"noteheads.dbl\"; dot = 1; }\n\n\tvar ret = createNoteHead(absElem, note, { verticalPos: 0 }, // This is just temporary: we'll offset the vertical positioning when we get the actual vertical spot.\n\t\t{ dir: \"up\", flag: flag, dot: dot, scale: temposcale });\n\tvar tempoNote = ret.notehead;\n\tabsElem.addHead(tempoNote);\n\tvar stem;\n\tif (note !== \"noteheads.whole\" && note !== \"noteheads.dbl\") {\n\t\tvar p1 = 1 / 3 * temposcale;\n\t\tvar p2 = 5 * temposcale;\n\t\tvar dx = tempoNote.dx + tempoNote.w;\n\t\tvar width = -0.6;\n\t\tstem = new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width });\n\t\tabsElem.addRight(stem);\n\t}\n\treturn absElem;\n};\n\nmodule.exports = TempoElement;\n","// abc_tie_element.js: Definition of the TieElement class.\n\nvar TieElem = function TieElem(options) {\n\tthis.type = \"TieElem\";\n\t//\tconsole.log(\"constructor\", options.anchor1 ? options.anchor1.pitch : \"N/A\", options.anchor2 ? options.anchor2.pitch : \"N/A\", options.isTie, options.isGrace);\n\tthis.anchor1 = options.anchor1; // must have a .x and a .pitch, and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = options.anchor2; // must have a .x and a .pitch property or be null (means ends at the end of the line)\n\tif (options.isGrace)\n\t\tthis.isGrace = true;\n\tif (options.fixedY)\n\t\tthis.fixedY = true;\n\tif (options.stemDir)\n\t\tthis.stemDir = options.stemDir;\n\tif (options.voiceNumber !== undefined)\n\t\tthis.voiceNumber = options.voiceNumber;\n\tif (options.style !== undefined)\n\t\tthis.dotted = true;\n\tthis.internalNotes = [];\n};\n\nTieElem.prototype.addInternalNote = function (note) {\n\tthis.internalNotes.push(note);\n};\n\nTieElem.prototype.setEndAnchor = function (anchor2) {\n\t//\tconsole.log(\"end\", this.anchor1 ? this.anchor1.pitch : \"N/A\", anchor2 ? anchor2.pitch : \"N/A\", this.isTie, this.isGrace);\n\tthis.anchor2 = anchor2; // must have a .x and a .pitch property or be null (means ends at the end of the line)\n\n\t// we don't really have enough info to know what the vertical extent is yet and we won't until drawing. This will just give it enough\n\t// room on either side (we don't even know if the slur will be above yet). We need to set this so that we can make sure the voice has\n\t// at least enough room that the line doesn't get cut off if the tie or slur is the lowest thing.\n\tif (this.anchor1) {\n\t\tthis.top = Math.max(this.anchor1.pitch, this.anchor2.pitch) + 4\n\t\tthis.bottom = Math.min(this.anchor1.pitch, this.anchor2.pitch) - 4\n\t} else {\n\t\tthis.top = this.anchor2.pitch + 4\n\t\tthis.bottom = this.anchor2.pitch - 4\n\t}\n};\n\n// If we encounter a repeat sign, then we don't want to extend either a tie or a slur past it, so these are called to be a limit.\nTieElem.prototype.setStartX = function (startLimitElem) {\n\tthis.startLimitX = startLimitElem;\n};\n\nTieElem.prototype.setEndX = function (endLimitElem) {\n\tthis.endLimitX = endLimitElem;\n};\n\nTieElem.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nTieElem.prototype.calcTieDirection = function () {\n\t// The rules:\n\t// 1) If it is in a grace note group, then the direction is always BELOW.\n\t// 2) If it is in a single voice, then the direction is always OPPOSITE of the stem (or where the stem would have been in the case of whole notes.)\n\t// 3) If the stem direction is forced (probably because there are two voices on the same line), then the direction is the SAME as the stem direction.\n\n\tif (this.isGrace)\n\t\tthis.above = false;\n\telse if (this.voiceNumber === 0)\n\t\tthis.above = true;\n\telse if (this.voiceNumber > 0)\n\t\tthis.above = false;\n\telse {\n\t\tvar referencePitch;\n\t\tif (this.anchor1)\n\t\t\treferencePitch = this.anchor1.pitch;\n\t\telse if (this.anchor2)\n\t\t\treferencePitch = this.anchor2.pitch;\n\t\telse\n\t\t\treferencePitch = 14; // TODO-PER: this can't really happen normally. This would imply that a tie crossed over three lines, something like \"C-\\nz\\nC\"\n\t\t// Put the arc in the opposite direction of the stem. That isn't always the pitch if one or both of the notes are beamed with something that affects its stem.\n\t\tif ((this.anchor1 && this.anchor1.stemDir === 'down') && (this.anchor2 && this.anchor2.stemDir === \"down\"))\n\t\t\tthis.above = true;\n\t\telse if ((this.anchor1 && this.anchor1.stemDir === 'up') && (this.anchor2 && this.anchor2.stemDir === \"up\"))\n\t\t\tthis.above = false;\n\t\telse if (this.anchor1 && this.anchor2)\n\t\t\tthis.above = referencePitch >= 6;\n\t\telse if (this.anchor1)\n\t\t\tthis.above = this.anchor1.stemDir === \"down\";\n\t\telse if (this.anchor2)\n\t\t\tthis.above = this.anchor2.stemDir === \"down\";\n\t\telse\n\t\t\tthis.above = referencePitch >= 6;\n\t}\n};\n\n// From \"standard music notation practice\" by Music Publishers’ Association:\n// 1) Slurs are placed under the note heads if all stems go up.\n// 2) Slurs are placed over the note heads if all stems go down.\n// 3) If there are both up stems and down stems, prefer placing the slur over.\n// 4) When the staff has opposite stemmed voices, all slurs should be on the stemmed side.\n\nTieElem.prototype.calcSlurDirection = function () {\n\tif (this.isGrace)\n\t\tthis.above = false;\n\telse if (this.voiceNumber === 0)\n\t\tthis.above = true;\n\telse if (this.voiceNumber > 0)\n\t\tthis.above = false;\n\telse {\n\t\tvar hasDownStem = false;\n\t\tif (this.anchor1 && this.anchor1.stemDir === \"down\")\n\t\t\thasDownStem = true;\n\t\tif (this.anchor2 && this.anchor2.stemDir === \"down\")\n\t\t\thasDownStem = true;\n\t\tfor (var i = 0; i < this.internalNotes.length; i++) {\n\t\t\tvar n = this.internalNotes[i];\n\t\t\tif (n.stemDir === \"down\")\n\t\t\t\thasDownStem = true;\n\t\t}\n\t\tthis.above = hasDownStem;\n\t}\n};\n\nTieElem.prototype.calcX = function (lineStartX, lineEndX) {\n\tif (this.anchor1) {\n\t\tthis.startX = this.anchor1.x; // The normal case where there is a starting element to attach to.\n\t\tif (this.anchor1.scalex < 1) // this is a grace note - don't offset the tie as much.\n\t\t\tthis.startX -= 3;\n\t} else if (this.startLimitX)\n\t\tthis.startX = this.startLimitX.x + this.startLimitX.w; // if there is no start element, but there is a repeat mark before the start of the line.\n\telse {\n\t\tif (this.anchor2)\n\t\t\tthis.startX = this.anchor2.x - 20; // There is no element and no repeat mark: make a small arc\n\t\telse\n\t\t\tthis.startX = lineStartX; // Don't have any guidance, so extend to beginning of line\n\t}\n\tif (!this.anchor1 && this.dotted)\n\t\tthis.startX -= 3; // The arc needs to be long enough to tell that it is dotted.\n\n\tif (this.anchor2)\n\t\tthis.endX = this.anchor2.x; // The normal case where there is a starting element to attach to.\n\telse if (this.endLimitX)\n\t\tthis.endX = this.endLimitX.x; // if there is no start element, but there is a repeat mark before the start of the line.\n\telse\n\t\tthis.endX = lineEndX; // There is no element and no repeat mark: extend to the beginning of the line.\n};\n\nTieElem.prototype.calcTieY = function () {\n\t// If the tie comes from another line, then one or both anchors will be missing.\n\tif (this.anchor1)\n\t\tthis.startY = this.anchor1.pitch;\n\telse if (this.anchor2)\n\t\tthis.startY = this.anchor2.pitch;\n\telse\n\t\tthis.startY = this.above ? 14 : 0;\n\n\tif (this.anchor2)\n\t\tthis.endY = this.anchor2.pitch;\n\telse if (this.anchor1)\n\t\tthis.endY = this.anchor1.pitch;\n\telse\n\t\tthis.endY = this.above ? 14 : 0;\n};\n\n// From \"standard music notation practice\" by Music Publishers’ Association:\n// 1) If the anchor note is down stem, the slur points to the note head.\n// 2) If the anchor note is up stem, and the slur is over, then point to middle of stem.\n\nTieElem.prototype.calcSlurY = function () {\n\tif (this.anchor1 && this.anchor2) {\n\t\tif (this.above && this.anchor1.stemDir === \"up\" && !this.fixedY) {\n\t\t\tthis.startY = (this.anchor1.highestVert + this.anchor1.pitch) / 2;\n\t\t\tthis.startX += this.anchor1.w / 2; // When going to the middle of the stem, bump the line to the right a little bit to make it look right.\n\t\t} else\n\t\t\tthis.startY = this.anchor1.pitch;\n\n\t\t// If the closing note has an up stem, and it is beamed, and it isn't the first note in the beam, then the beam will get in the way.\n\t\tvar beamInterferes = this.anchor2.parent.beam && this.anchor2.parent.beam.stemsUp && this.anchor2.parent.beam.elems[0] !== this.anchor2.parent;\n\t\tvar midPoint = (this.anchor2.highestVert + this.anchor2.pitch) / 2;\n\t\tif (this.above && this.anchor2.stemDir === \"up\" && !this.fixedY && !beamInterferes && (midPoint < this.startY)) {\n\t\t\tthis.endY = midPoint;\n\t\t\tthis.endX += Math.round(this.anchor2.w / 2); // When going to the middle of the stem, bump the line to the right a little bit to make it look right.\n\t\t} else\n\t\t\tthis.endY = this.above && beamInterferes ? this.anchor2.highestVert : this.anchor2.pitch;\n\n\t\tif (this.anchor1.scalex === 1) { // Need a way to tell if this is a grace note - if so then keep the slur as close as possible. TODO-PER-HACK: this should be more declaratively determined.\n\t\t\tvar hasBeam1 = !!this.anchor1.parent.beam\n\t\t\tvar hasBeam2 = !!this.anchor2.parent.beam\n\t\t\tif (hasBeam1) {\n\t\t\t\tvar isLastInBeam = this.anchor1.parent === this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1]\n\t\t\t\tif (!isLastInBeam) {\n\t\t\t\t\t\tif (this.above)\n\t\t\t\t\t\tthis.startY = this.anchor1.parent.fixed.t\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.startY = this.anchor1.parent.fixed.b\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (hasBeam2) {\n\t\t\t\tvar isFirstInBeam = this.anchor2.parent === this.anchor2.parent.beam.elems[0]\n\t\t\t\tif (!isFirstInBeam) {\n\t\t\t\t\tif (this.above)\n\t\t\t\t\t\tthis.endY = this.anchor2.parent.fixed.t\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.endY = this.anchor2.parent.fixed.b\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (this.anchor1) {\n\t\tthis.startY = this.endY = this.anchor1.pitch;\n\t} else if (this.anchor2) {\n\t\tthis.startY = this.endY = this.anchor2.pitch;\n\t} else {\n\t\t// This is the case where the slur covers the entire line.\n\t\t// TODO-PER: figure out where the real top and bottom of the line are.\n\t\tthis.startY = this.above ? 14 : 0;\n\t\tthis.endY = this.above ? 14 : 0;\n\t}\n};\n\nTieElem.prototype.avoidCollisionAbove = function () {\n\t// Double check that an interior note in the slur isn't so high that it interferes.\n\tif (this.above) {\n\t\tvar maxInnerHeight = -50;\n\t\tfor (var i = 0; i < this.internalNotes.length; i++) {\n\t\t\tif (this.internalNotes[i].highestVert > maxInnerHeight)\n\t\t\t\tmaxInnerHeight = this.internalNotes[i].highestVert;\n\t\t}\n\t\tif (maxInnerHeight > this.startY && maxInnerHeight > this.endY)\n\t\t\tthis.startY = this.endY = maxInnerHeight - 1;\n\t}\n};\n\nmodule.exports = TieElem;\n","const addTextIf = require(\"../add-text-if\");\nconst richText = require(\"./rich-text\");\n\nfunction TopText(metaText, metaTextInfo, formatting, lines, width, isPrint, paddingLeft, spacing, shouldAddClasses, getTextSize) {\n\tthis.rows = [];\n\n\tif (metaText.header && isPrint) {\n\t\t// Note: whether there is a header or not doesn't change any other positioning, so this doesn't change the Y-coordinate.\n\t\t// This text goes above the margin, so we'll temporarily move up.\n\t\tvar headerTextHeight = getTextSize.calc(\"X\", \"headerfont\", 'abcjs-header abcjs-meta-top').height;\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft, text: metaText.header.left, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft + width / 2, text: metaText.header.center, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, anchor: 'middle', info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft + width, text: metaText.header.right, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, anchor: 'end', info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\n\t\t//\t\tTopText.prototype.addTextIf = function (marginLeft, text, font, klass, marginTop, marginBottom, anchor, getTextSize, absElemType, noMove) {\n\t}\n\tif (isPrint)\n\t\tthis.rows.push({ move: spacing.top });\n\tvar tAnchor = formatting.titleleft ? 'start' : 'middle';\n\tvar tLeft = formatting.titleleft ? paddingLeft : paddingLeft + width / 2;\n\tif (metaText.title) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-title' : ''\n\t\trichText(this.rows, metaText.title, \"titlefont\", klass, 'title', tLeft, {marginTop: spacing.title, anchor: tAnchor, absElemType: \"title\", info: metaTextInfo.title}, getTextSize)\n\t}\n\tif (lines.length) {\n\t\tvar index = 0;\n\t\twhile (index < lines.length && lines[index].subtitle) {\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-text abcjs-subtitle' : ''\n\t\t\trichText(this.rows, lines[index].subtitle.text, \"subtitlefont\", klass, 'subtitle', tLeft, {marginTop: spacing.subtitle, anchor: tAnchor, absElemType: \"subtitle\", info: lines[index].subtitle}, getTextSize)\n\t\t\tindex++;\n\t\t}\n\t}\n\n\tif (metaText.rhythm || metaText.origin || metaText.composer) {\n\t\tthis.rows.push({ move: spacing.composer });\n\t\tif (metaText.rhythm && metaText.rhythm.length > 0) {\n\t\t\tvar noMove = !!(metaText.composer || metaText.origin);\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-rhythm' : ''\n\t\t\taddTextIf(this.rows, { marginLeft: paddingLeft, text: metaText.rhythm, font: 'infofont', klass: klass, absElemType: \"rhythm\", noMove: noMove, info: metaTextInfo.rhythm, name: \"rhythm\" }, getTextSize);\n\t\t}\n\t\tvar hasSimpleComposerLine = true\n\t\tif (metaText.composer && typeof metaText.composer !== 'string')\n\t\t\thasSimpleComposerLine = false\n\t\tif (metaText.origin && typeof metaText.origin !== 'string')\n\t\t\thasSimpleComposerLine = false\n\t\t\t\n\t\tvar composerLine = metaText.composer ? metaText.composer : '';\n\t\tif (metaText.origin) {\n\t\t\tif (typeof composerLine === 'string' && typeof metaText.origin === 'string')\n\t\t\t\tcomposerLine += ' (' + metaText.origin + ')';\n\t\t\telse if (typeof composerLine === 'string' && typeof metaText.origin !== 'string') {\n\t\t\t\tcomposerLine = [{text:composerLine}]\n\t\t\t\tcomposerLine.push({text:\" (\"})\n\t\t\t\tcomposerLine = composerLine.concat(metaText.origin)\n\t\t\t\tcomposerLine.push({text:\")\"})\n\t\t\t} else {\n\t\t\t\tcomposerLine.push({text:\" (\"})\n\t\t\t\tcomposerLine = composerLine.concat(metaText.origin)\n\t\t\t\tcomposerLine.push({text:\")\"})\n\t\t\t}\n\t\t}\n\t\tif (composerLine) {\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-composer' : ''\n\t\t\trichText(this.rows, composerLine, 'composerfont', klass, \"composer\", paddingLeft+width, {anchor: \"end\", absElemType: \"composer\", info: metaTextInfo.composer, ingroup: true}, getTextSize)\n\t\t}\n\t}\n\n\tif (metaText.author && metaText.author.length > 0) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-author' : ''\n\t\trichText(this.rows, metaText.author, 'composerfont', klass, \"author\", paddingLeft+width, {anchor: \"end\", absElemType: \"author\", info: metaTextInfo.author}, getTextSize)\n\t}\n\n\tif (metaText.partOrder && metaText.partOrder.length > 0) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-part-order' : ''\n\t\trichText(this.rows, metaText.partOrder, 'partsfont', klass, \"part-order\", paddingLeft, {absElemType: \"partOrder\", info: metaTextInfo.partOrder, anchor: 'start'}, getTextSize)\n\n\t}\n}\n\nmodule.exports = TopText;\n","// abc_triplet_element.js: Definition of the TripletElem class.\n\nvar TripletElem = function TripletElem(number, anchor1, options) {\n\tthis.type = \"TripletElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after key signature)\n\tthis.number = number;\n\tthis.durationClass = ('d' + (Math.round(anchor1.parent.durationClass * 1000) / 1000)).replace(/\\./, '-');\n\tthis.middleElems = []; // This is to calculate the highest interior pitch. It is used to make sure that the drawn bracket never crosses a really high middle note.\n\tthis.flatBeams = options.flatBeams;\n};\n\nTripletElem.prototype.isClosed = function () {\n\treturn !!this.anchor2;\n};\n\nTripletElem.prototype.middleNote = function (elem) {\n\tthis.middleElems.push(elem);\n};\n\nTripletElem.prototype.setCloseAnchor = function (anchor2) {\n\tthis.anchor2 = anchor2;\n\t// TODO-PER: This used to be just for beamed triplets but it looks like bracketed triplets need extra room, too. The only one that doesn't is stem down and beamed\n\t//if (this.anchor1.parent.beam)\n\tif (!this.anchor1.parent.beam || this.anchor1.stemDir === 'up')\n\t\tthis.endingHeightAbove = 4;\n};\n\nmodule.exports = TripletElem;\n","// abc_voice_element.js: Definition of the VoiceElement class.\n\nvar VoiceElement = function VoiceElement(voicenumber, voicetotal) {\n\tthis.children = [];\n\tthis.beams = [];\n\tthis.otherchildren = []; // ties, slurs, triplets\n\tthis.w = 0;\n\tthis.duplicate = false;\n\tthis.voicenumber = voicenumber; //number of the voice on a given stave (not staffgroup)\n\tthis.voicetotal = voicetotal;\n\tthis.bottom = 7;\n\tthis.top = 7;\n\tthis.specialY = {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n};\n\nVoiceElement.prototype.addChild = function (absElem) {\n\t// This is always passed an AbsoluteElement\n\tif (absElem.type === 'bar') {\n\t\tvar firstItem = true;\n\t\tfor (var i = 0; firstItem && i < this.children.length; i++) {\n\t\t\tif (this.children[i].type.indexOf(\"staff-extra\") < 0 && this.children[i].type !== \"tempo\")\n\t\t\t\tfirstItem = false;\n\t\t}\n\t\tif (!firstItem) {\n\t\t\tthis.beams.push(\"bar\");\n\t\t\tthis.otherchildren.push(\"bar\");\n\t\t}\n\t}\n\tthis.children[this.children.length] = absElem;\n\tthis.setRange(absElem);\n};\n\nVoiceElement.prototype.setLimit = function (member, child) {\n\t// Sometimes we get an absolute element in here and sometimes we get some type of relative element.\n\t// If there is a \"specialY\" element, then assume it is an absolute element. If that doesn't exist, look for the\n\t// same members at the top level, because that's where they are in relative elements.\n\tvar specialY = child.specialY;\n\tif (!specialY) specialY = child;\n\tif (!specialY[member]) return;\n\tif (!this.specialY[member])\n\t\tthis.specialY[member] = specialY[member];\n\telse\n\t\tthis.specialY[member] = Math.max(this.specialY[member], specialY[member]);\n};\n\nVoiceElement.prototype.adjustRange = function (child) {\n\tif (child.bottom !== undefined)\n\t\tthis.bottom = Math.min(this.bottom, child.bottom);\n\tif (child.top !== undefined)\n\t\tthis.top = Math.max(this.top, child.top);\n};\n\nVoiceElement.prototype.setRange = function (child) {\n\tthis.adjustRange(child);\n\tthis.setLimit('tempoHeightAbove', child);\n\tthis.setLimit('partHeightAbove', child);\n\tthis.setLimit('volumeHeightAbove', child);\n\tthis.setLimit('dynamicHeightAbove', child);\n\tthis.setLimit('endingHeightAbove', child);\n\tthis.setLimit('chordHeightAbove', child);\n\tthis.setLimit('lyricHeightAbove', child);\n\tthis.setLimit('lyricHeightBelow', child);\n\tthis.setLimit('chordHeightBelow', child);\n\tthis.setLimit('volumeHeightBelow', child);\n\tthis.setLimit('dynamicHeightBelow', child);\n};\n\nVoiceElement.prototype.addOther = function (child) {\n\tthis.otherchildren.push(child);\n\tthis.setRange(child);\n};\n\nVoiceElement.prototype.addBeam = function (child) {\n\tthis.beams.push(child);\n};\n\nVoiceElement.prototype.setWidth = function (width) {\n\tthis.w = width;\n};\n\nmodule.exports = VoiceElement;\n","var spacing = require('../helpers/spacing');\n\n/**\n * Glyphs and some methods to adjust for their x and y baseline\n */\nvar glyphs =\n{\n\t'0': { d: [['M', 4.83, -14.97], ['c', 0.33, -0.03, 1.11, 0.00, 1.47, 0.06], ['c', 1.68, 0.36, 2.97, 1.59, 3.78, 3.60], ['c', 1.20, 2.97, 0.81, 6.96, -0.90, 9.27], ['c', -0.78, 1.08, -1.71, 1.71, -2.91, 1.95], ['c', -0.45, 0.09, -1.32, 0.09, -1.77, 0.00], ['c', -0.81, -0.18, -1.47, -0.51, -2.07, -1.02], ['c', -2.34, -2.07, -3.15, -6.72, -1.74, -10.20], ['c', 0.87, -2.16, 2.28, -3.42, 4.14, -3.66], ['z'], ['m', 1.11, 0.87], ['c', -0.21, -0.06, -0.69, -0.09, -0.87, -0.06], ['c', -0.54, 0.12, -0.87, 0.42, -1.17, 0.99], ['c', -0.36, 0.66, -0.51, 1.56, -0.60, 3.00], ['c', -0.03, 0.75, -0.03, 4.59, 0.00, 5.31], ['c', 0.09, 1.50, 0.27, 2.40, 0.60, 3.06], ['c', 0.24, 0.48, 0.57, 0.78, 0.96, 0.90], ['c', 0.27, 0.09, 0.78, 0.09, 1.05, 0.00], ['c', 0.39, -0.12, 0.72, -0.42, 0.96, -0.90], ['c', 0.33, -0.66, 0.51, -1.56, 0.60, -3.06], ['c', 0.03, -0.72, 0.03, -4.56, 0.00, -5.31], ['c', -0.09, -1.47, -0.27, -2.37, -0.60, -3.03], ['c', -0.24, -0.48, -0.54, -0.78, -0.93, -0.90], ['z']], w: 10.78, h: 14.959 },\n\t'1': { d: [['M', 3.30, -15.06], ['c', 0.06, -0.06, 0.21, -0.03, 0.66, 0.15], ['c', 0.81, 0.39, 1.08, 0.39, 1.83, 0.03], ['c', 0.21, -0.09, 0.39, -0.15, 0.42, -0.15], ['c', 0.12, 0.00, 0.21, 0.09, 0.27, 0.21], ['c', 0.06, 0.12, 0.06, 0.33, 0.06, 5.94], ['c', 0.00, 3.93, 0.00, 5.85, 0.03, 6.03], ['c', 0.06, 0.36, 0.15, 0.69, 0.27, 0.96], ['c', 0.36, 0.75, 0.93, 1.17, 1.68, 1.26], ['c', 0.30, 0.03, 0.39, 0.09, 0.39, 0.30], ['c', 0.00, 0.15, -0.03, 0.18, -0.09, 0.24], ['c', -0.06, 0.06, -0.09, 0.06, -0.48, 0.06], ['c', -0.42, 0.00, -0.69, -0.03, -2.10, -0.24], ['c', -0.90, -0.15, -1.77, -0.15, -2.67, 0.00], ['c', -1.41, 0.21, -1.68, 0.24, -2.10, 0.24], ['c', -0.39, 0.00, -0.42, 0.00, -0.48, -0.06], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.24], ['c', 0.00, -0.21, 0.06, -0.27, 0.36, -0.30], ['c', 0.75, -0.09, 1.32, -0.51, 1.68, -1.26], ['c', 0.12, -0.27, 0.21, -0.60, 0.27, -0.96], ['c', 0.03, -0.18, 0.03, -1.59, 0.03, -4.29], ['c', 0.00, -3.87, 0.00, -4.05, -0.06, -4.14], ['c', -0.09, -0.15, -0.18, -0.24, -0.39, -0.24], ['c', -0.12, 0.00, -0.15, 0.03, -0.21, 0.06], ['c', -0.03, 0.06, -0.45, 0.99, -0.96, 2.13], ['c', -0.48, 1.14, -0.90, 2.10, -0.93, 2.16], ['c', -0.06, 0.15, -0.21, 0.24, -0.33, 0.24], ['c', -0.24, 0.00, -0.42, -0.18, -0.42, -0.39], ['c', 0.00, -0.06, 3.27, -7.62, 3.33, -7.74], ['z']], w: 8.94, h: 15.058 },\n\t'2': { d: [['M', 4.23, -14.97], ['c', 0.57, -0.06, 1.68, 0.00, 2.34, 0.18], ['c', 0.69, 0.18, 1.50, 0.54, 2.01, 0.90], ['c', 1.35, 0.96, 1.95, 2.25, 1.77, 3.81], ['c', -0.15, 1.35, -0.66, 2.34, -1.68, 3.15], ['c', -0.60, 0.48, -1.44, 0.93, -3.12, 1.65], ['c', -1.32, 0.57, -1.80, 0.81, -2.37, 1.14], ['c', -0.57, 0.33, -0.57, 0.33, -0.24, 0.27], ['c', 0.39, -0.09, 1.26, -0.09, 1.68, 0.00], ['c', 0.72, 0.15, 1.41, 0.45, 2.10, 0.90], ['c', 0.99, 0.63, 1.86, 0.87, 2.55, 0.75], ['c', 0.24, -0.06, 0.42, -0.15, 0.57, -0.30], ['c', 0.12, -0.09, 0.30, -0.42, 0.30, -0.51], ['c', 0.00, -0.09, 0.12, -0.21, 0.24, -0.24], ['c', 0.18, -0.03, 0.39, 0.12, 0.39, 0.30], ['c', 0.00, 0.12, -0.15, 0.57, -0.30, 0.87], ['c', -0.54, 1.02, -1.56, 1.74, -2.79, 2.01], ['c', -0.42, 0.09, -1.23, 0.09, -1.62, 0.03], ['c', -0.81, -0.18, -1.32, -0.45, -2.01, -1.11], ['c', -0.45, -0.45, -0.63, -0.57, -0.96, -0.69], ['c', -0.84, -0.27, -1.89, 0.12, -2.25, 0.90], ['c', -0.12, 0.21, -0.21, 0.54, -0.21, 0.72], ['c', 0.00, 0.12, -0.12, 0.21, -0.27, 0.24], ['c', -0.15, 0.00, -0.27, -0.03, -0.33, -0.15], ['c', -0.09, -0.21, 0.09, -1.08, 0.33, -1.71], ['c', 0.24, -0.66, 0.66, -1.26, 1.29, -1.89], ['c', 0.45, -0.45, 0.90, -0.81, 1.92, -1.56], ['c', 1.29, -0.93, 1.89, -1.44, 2.34, -1.98], ['c', 0.87, -1.05, 1.26, -2.19, 1.20, -3.63], ['c', -0.06, -1.29, -0.39, -2.31, -0.96, -2.91], ['c', -0.36, -0.33, -0.72, -0.51, -1.17, -0.54], ['c', -0.84, -0.03, -1.53, 0.42, -1.59, 1.05], ['c', -0.03, 0.33, 0.12, 0.60, 0.57, 1.14], ['c', 0.45, 0.54, 0.54, 0.87, 0.42, 1.41], ['c', -0.15, 0.63, -0.54, 1.11, -1.08, 1.38], ['c', -0.63, 0.33, -1.20, 0.33, -1.83, 0.00], ['c', -0.24, -0.12, -0.33, -0.18, -0.54, -0.39], ['c', -0.18, -0.18, -0.27, -0.30, -0.36, -0.51], ['c', -0.24, -0.45, -0.27, -0.84, -0.21, -1.38], ['c', 0.12, -0.75, 0.45, -1.41, 1.02, -1.98], ['c', 0.72, -0.72, 1.74, -1.17, 2.85, -1.32], ['z']], w: 10.764, h: 14.97 },\n\t'3': { d: [['M', 3.78, -14.97], ['c', 0.30, -0.03, 1.41, 0.00, 1.83, 0.06], ['c', 2.22, 0.30, 3.51, 1.32, 3.72, 2.91], ['c', 0.03, 0.33, 0.03, 1.26, -0.03, 1.65], ['c', -0.12, 0.84, -0.48, 1.47, -1.05, 1.77], ['c', -0.27, 0.15, -0.36, 0.24, -0.45, 0.39], ['c', -0.09, 0.21, -0.09, 0.36, 0.00, 0.57], ['c', 0.09, 0.15, 0.18, 0.24, 0.51, 0.39], ['c', 0.75, 0.42, 1.23, 1.14, 1.41, 2.13], ['c', 0.06, 0.42, 0.06, 1.35, 0.00, 1.71], ['c', -0.18, 0.81, -0.48, 1.38, -1.02, 1.95], ['c', -0.75, 0.72, -1.80, 1.20, -3.18, 1.38], ['c', -0.42, 0.06, -1.56, 0.06, -1.95, 0.00], ['c', -1.89, -0.33, -3.18, -1.29, -3.51, -2.64], ['c', -0.03, -0.12, -0.03, -0.33, -0.03, -0.60], ['c', 0.00, -0.36, 0.00, -0.42, 0.06, -0.63], ['c', 0.12, -0.30, 0.27, -0.51, 0.51, -0.75], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.36, 0.33, 0.57, 0.75, 0.60, 1.20], ['c', 0.00, 0.21, 0.00, 0.27, -0.06, 0.42], ['c', -0.09, 0.18, -0.12, 0.24, -0.54, 0.54], ['c', -0.51, 0.36, -0.63, 0.54, -0.60, 0.87], ['c', 0.06, 0.54, 0.54, 0.90, 1.38, 0.99], ['c', 0.36, 0.06, 0.72, 0.03, 0.96, -0.06], ['c', 0.81, -0.27, 1.29, -1.23, 1.44, -2.79], ['c', 0.03, -0.45, 0.03, -1.95, -0.03, -2.37], ['c', -0.09, -0.75, -0.33, -1.23, -0.75, -1.44], ['c', -0.33, -0.18, -0.45, -0.18, -1.98, -0.18], ['c', -1.35, 0.00, -1.41, 0.00, -1.50, -0.06], ['c', -0.18, -0.12, -0.24, -0.39, -0.12, -0.60], ['c', 0.12, -0.15, 0.15, -0.15, 1.68, -0.15], ['c', 1.50, 0.00, 1.62, 0.00, 1.89, -0.15], ['c', 0.18, -0.09, 0.42, -0.36, 0.54, -0.57], ['c', 0.18, -0.42, 0.27, -0.90, 0.30, -1.95], ['c', 0.03, -1.20, -0.06, -1.80, -0.36, -2.37], ['c', -0.24, -0.48, -0.63, -0.81, -1.14, -0.96], ['c', -0.30, -0.06, -1.08, -0.06, -1.38, 0.03], ['c', -0.60, 0.15, -0.90, 0.42, -0.96, 0.84], ['c', -0.03, 0.30, 0.06, 0.45, 0.63, 0.84], ['c', 0.33, 0.24, 0.42, 0.39, 0.45, 0.63], ['c', 0.03, 0.72, -0.57, 1.50, -1.32, 1.65], ['c', -1.05, 0.27, -2.10, -0.57, -2.10, -1.65], ['c', 0.00, -0.45, 0.15, -0.96, 0.39, -1.38], ['c', 0.12, -0.21, 0.54, -0.63, 0.81, -0.81], ['c', 0.57, -0.42, 1.38, -0.69, 2.25, -0.81], ['z']], w: 9.735, h: 14.967 },\n\t'4': { d: [['M', 8.64, -14.94], ['c', 0.27, -0.09, 0.42, -0.12, 0.54, -0.03], ['c', 0.09, 0.06, 0.15, 0.21, 0.15, 0.30], ['c', -0.03, 0.06, -1.92, 2.31, -4.23, 5.04], ['c', -2.31, 2.73, -4.23, 4.98, -4.26, 5.01], ['c', -0.03, 0.06, 0.12, 0.06, 2.55, 0.06], ['l', 2.61, 0.00], ['l', 0.00, -2.37], ['c', 0.00, -2.19, 0.03, -2.37, 0.06, -2.46], ['c', 0.03, -0.06, 0.21, -0.18, 0.57, -0.42], ['c', 1.08, -0.72, 1.38, -1.08, 1.86, -2.16], ['c', 0.12, -0.30, 0.24, -0.54, 0.27, -0.57], ['c', 0.12, -0.12, 0.39, -0.06, 0.45, 0.12], ['c', 0.06, 0.09, 0.06, 0.57, 0.06, 3.96], ['l', 0.00, 3.90], ['l', 1.08, 0.00], ['c', 1.05, 0.00, 1.11, 0.00, 1.20, 0.06], ['c', 0.24, 0.15, 0.24, 0.54, 0.00, 0.69], ['c', -0.09, 0.06, -0.15, 0.06, -1.20, 0.06], ['l', -1.08, 0.00], ['l', 0.00, 0.33], ['c', 0.00, 0.57, 0.09, 1.11, 0.30, 1.53], ['c', 0.36, 0.75, 0.93, 1.17, 1.68, 1.26], ['c', 0.30, 0.03, 0.39, 0.09, 0.39, 0.30], ['c', 0.00, 0.15, -0.03, 0.18, -0.09, 0.24], ['c', -0.06, 0.06, -0.09, 0.06, -0.48, 0.06], ['c', -0.42, 0.00, -0.69, -0.03, -2.10, -0.24], ['c', -0.90, -0.15, -1.77, -0.15, -2.67, 0.00], ['c', -1.41, 0.21, -1.68, 0.24, -2.10, 0.24], ['c', -0.39, 0.00, -0.42, 0.00, -0.48, -0.06], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.24], ['c', 0.00, -0.21, 0.06, -0.27, 0.36, -0.30], ['c', 0.75, -0.09, 1.32, -0.51, 1.68, -1.26], ['c', 0.21, -0.42, 0.30, -0.96, 0.30, -1.53], ['l', 0.00, -0.33], ['l', -2.70, 0.00], ['c', -2.91, 0.00, -2.85, 0.00, -3.09, -0.15], ['c', -0.18, -0.12, -0.30, -0.39, -0.27, -0.54], ['c', 0.03, -0.06, 0.18, -0.24, 0.33, -0.45], ['c', 0.75, -0.90, 1.59, -2.07, 2.13, -3.03], ['c', 0.33, -0.54, 0.84, -1.62, 1.05, -2.16], ['c', 0.57, -1.41, 0.84, -2.64, 0.90, -4.05], ['c', 0.03, -0.63, 0.06, -0.72, 0.24, -0.81], ['l', 0.12, -0.06], ['l', 0.45, 0.12], ['c', 0.66, 0.18, 1.02, 0.24, 1.47, 0.27], ['c', 0.60, 0.03, 1.23, -0.09, 2.01, -0.33], ['z']], w: 11.795, h: 14.994 },\n\t'5': { d: [['M', 1.02, -14.94], ['c', 0.12, -0.09, 0.03, -0.09, 1.08, 0.06], ['c', 2.49, 0.36, 4.35, 0.36, 6.96, -0.06], ['c', 0.57, -0.09, 0.66, -0.06, 0.81, 0.06], ['c', 0.15, 0.18, 0.12, 0.24, -0.15, 0.51], ['c', -1.29, 1.26, -3.24, 2.04, -5.58, 2.31], ['c', -0.60, 0.09, -1.20, 0.12, -1.71, 0.12], ['c', -0.39, 0.00, -0.45, 0.00, -0.57, 0.06], ['c', -0.09, 0.06, -0.15, 0.12, -0.21, 0.21], ['l', -0.06, 0.12], ['l', 0.00, 1.65], ['l', 0.00, 1.65], ['l', 0.21, -0.21], ['c', 0.66, -0.57, 1.41, -0.96, 2.19, -1.14], ['c', 0.33, -0.06, 1.41, -0.06, 1.95, 0.00], ['c', 2.61, 0.36, 4.02, 1.74, 4.26, 4.14], ['c', 0.03, 0.45, 0.03, 1.08, -0.03, 1.44], ['c', -0.18, 1.02, -0.78, 2.01, -1.59, 2.70], ['c', -0.72, 0.57, -1.62, 1.02, -2.49, 1.20], ['c', -1.38, 0.27, -3.03, 0.06, -4.20, -0.54], ['c', -1.08, -0.54, -1.71, -1.32, -1.86, -2.28], ['c', -0.09, -0.69, 0.09, -1.29, 0.57, -1.74], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.36, 0.33, 0.57, 0.75, 0.60, 1.20], ['c', 0.00, 0.21, 0.00, 0.27, -0.06, 0.42], ['c', -0.09, 0.18, -0.12, 0.24, -0.54, 0.54], ['c', -0.18, 0.12, -0.36, 0.30, -0.42, 0.33], ['c', -0.36, 0.42, -0.18, 0.99, 0.36, 1.26], ['c', 0.51, 0.27, 1.47, 0.36, 2.01, 0.27], ['c', 0.93, -0.21, 1.47, -1.17, 1.65, -2.91], ['c', 0.06, -0.45, 0.06, -1.89, 0.00, -2.31], ['c', -0.15, -1.20, -0.51, -2.10, -1.05, -2.55], ['c', -0.21, -0.18, -0.54, -0.36, -0.81, -0.39], ['c', -0.30, -0.06, -0.84, -0.03, -1.26, 0.06], ['c', -0.93, 0.18, -1.65, 0.60, -2.16, 1.20], ['c', -0.15, 0.21, -0.27, 0.30, -0.39, 0.30], ['c', -0.15, 0.00, -0.30, -0.09, -0.36, -0.18], ['c', -0.06, -0.09, -0.06, -0.15, -0.06, -3.66], ['c', 0.00, -3.39, 0.00, -3.57, 0.06, -3.66], ['c', 0.03, -0.06, 0.09, -0.15, 0.15, -0.18], ['z']], w: 10.212, h: 14.997 },\n\t'6': { d: [['M', 4.98, -14.97], ['c', 0.36, -0.03, 1.20, 0.00, 1.59, 0.06], ['c', 0.90, 0.15, 1.68, 0.51, 2.25, 1.05], ['c', 0.57, 0.51, 0.87, 1.23, 0.84, 1.98], ['c', -0.03, 0.51, -0.21, 0.90, -0.60, 1.26], ['c', -0.24, 0.24, -0.45, 0.39, -0.75, 0.51], ['c', -0.21, 0.06, -0.27, 0.06, -0.60, 0.06], ['c', -0.33, 0.00, -0.39, 0.00, -0.60, -0.06], ['c', -0.30, -0.12, -0.51, -0.27, -0.75, -0.51], ['c', -0.39, -0.36, -0.57, -0.78, -0.57, -1.26], ['c', 0.00, -0.27, 0.00, -0.30, 0.09, -0.42], ['c', 0.03, -0.09, 0.18, -0.21, 0.30, -0.30], ['c', 0.12, -0.09, 0.30, -0.21, 0.39, -0.27], ['c', 0.09, -0.06, 0.21, -0.18, 0.27, -0.24], ['c', 0.06, -0.12, 0.09, -0.15, 0.09, -0.33], ['c', 0.00, -0.18, -0.03, -0.24, -0.09, -0.36], ['c', -0.24, -0.39, -0.75, -0.60, -1.38, -0.57], ['c', -0.54, 0.03, -0.90, 0.18, -1.23, 0.48], ['c', -0.81, 0.72, -1.08, 2.16, -0.96, 5.37], ['l', 0.00, 0.63], ['l', 0.30, -0.12], ['c', 0.78, -0.27, 1.29, -0.33, 2.10, -0.27], ['c', 1.47, 0.12, 2.49, 0.54, 3.27, 1.29], ['c', 0.48, 0.51, 0.81, 1.11, 0.96, 1.89], ['c', 0.06, 0.27, 0.06, 0.42, 0.06, 0.93], ['c', 0.00, 0.54, 0.00, 0.69, -0.06, 0.96], ['c', -0.15, 0.78, -0.48, 1.38, -0.96, 1.89], ['c', -0.54, 0.51, -1.17, 0.87, -1.98, 1.08], ['c', -1.14, 0.30, -2.40, 0.33, -3.24, 0.03], ['c', -1.50, -0.48, -2.64, -1.89, -3.27, -4.02], ['c', -0.36, -1.23, -0.51, -2.82, -0.42, -4.08], ['c', 0.30, -3.66, 2.28, -6.30, 4.95, -6.66], ['z'], ['m', 0.66, 7.41], ['c', -0.27, -0.09, -0.81, -0.12, -1.08, -0.06], ['c', -0.72, 0.18, -1.08, 0.69, -1.23, 1.71], ['c', -0.06, 0.54, -0.06, 3.00, 0.00, 3.54], ['c', 0.18, 1.26, 0.72, 1.77, 1.80, 1.74], ['c', 0.39, -0.03, 0.63, -0.09, 0.90, -0.27], ['c', 0.66, -0.42, 0.90, -1.32, 0.90, -3.24], ['c', 0.00, -2.22, -0.36, -3.12, -1.29, -3.42], ['z']], w: 9.956, h: 14.982 },\n\t'7': { d: [['M', 0.21, -14.97], ['c', 0.21, -0.06, 0.45, 0.00, 0.54, 0.15], ['c', 0.06, 0.09, 0.06, 0.15, 0.06, 0.39], ['c', 0.00, 0.24, 0.00, 0.33, 0.06, 0.42], ['c', 0.06, 0.12, 0.21, 0.24, 0.27, 0.24], ['c', 0.03, 0.00, 0.12, -0.12, 0.24, -0.21], ['c', 0.96, -1.20, 2.58, -1.35, 3.99, -0.42], ['c', 0.15, 0.12, 0.42, 0.30, 0.54, 0.45], ['c', 0.48, 0.39, 0.81, 0.57, 1.29, 0.60], ['c', 0.69, 0.03, 1.50, -0.30, 2.13, -0.87], ['c', 0.09, -0.09, 0.27, -0.30, 0.39, -0.45], ['c', 0.12, -0.15, 0.24, -0.27, 0.30, -0.30], ['c', 0.18, -0.06, 0.39, 0.03, 0.51, 0.21], ['c', 0.06, 0.18, 0.06, 0.24, -0.27, 0.72], ['c', -0.18, 0.24, -0.54, 0.78, -0.78, 1.17], ['c', -2.37, 3.54, -3.54, 6.27, -3.87, 9.00], ['c', -0.03, 0.33, -0.03, 0.66, -0.03, 1.26], ['c', 0.00, 0.90, 0.00, 1.08, 0.15, 1.89], ['c', 0.06, 0.45, 0.06, 0.48, 0.03, 0.60], ['c', -0.06, 0.09, -0.21, 0.21, -0.30, 0.21], ['c', -0.03, 0.00, -0.27, -0.06, -0.54, -0.15], ['c', -0.84, -0.27, -1.11, -0.30, -1.65, -0.30], ['c', -0.57, 0.00, -0.84, 0.03, -1.56, 0.27], ['c', -0.60, 0.18, -0.69, 0.21, -0.81, 0.15], ['c', -0.12, -0.06, -0.21, -0.18, -0.21, -0.30], ['c', 0.00, -0.15, 0.60, -1.44, 1.20, -2.61], ['c', 1.14, -2.22, 2.73, -4.68, 5.10, -8.01], ['c', 0.21, -0.27, 0.36, -0.48, 0.33, -0.48], ['c', 0.00, 0.00, -0.12, 0.06, -0.27, 0.12], ['c', -0.54, 0.30, -0.99, 0.39, -1.56, 0.39], ['c', -0.75, 0.03, -1.20, -0.18, -1.83, -0.75], ['c', -0.99, -0.90, -1.83, -1.17, -2.31, -0.72], ['c', -0.18, 0.15, -0.36, 0.51, -0.45, 0.84], ['c', -0.06, 0.24, -0.06, 0.33, -0.09, 1.98], ['c', 0.00, 1.62, -0.03, 1.74, -0.06, 1.80], ['c', -0.15, 0.24, -0.54, 0.24, -0.69, 0.00], ['c', -0.06, -0.09, -0.06, -0.15, -0.06, -3.57], ['c', 0.00, -3.42, 0.00, -3.48, 0.06, -3.57], ['c', 0.03, -0.06, 0.09, -0.12, 0.15, -0.15], ['z']], w: 10.561, h: 15.093 },\n\t'8': { d: [['M', 4.98, -14.97], ['c', 0.33, -0.03, 1.02, -0.03, 1.32, 0.00], ['c', 1.32, 0.12, 2.49, 0.60, 3.21, 1.32], ['c', 0.39, 0.39, 0.66, 0.81, 0.78, 1.29], ['c', 0.09, 0.36, 0.09, 1.08, 0.00, 1.44], ['c', -0.21, 0.84, -0.66, 1.59, -1.59, 2.55], ['l', -0.30, 0.30], ['l', 0.27, 0.18], ['c', 1.47, 0.93, 2.31, 2.31, 2.25, 3.75], ['c', -0.03, 0.75, -0.24, 1.35, -0.63, 1.95], ['c', -0.45, 0.66, -1.02, 1.14, -1.83, 1.53], ['c', -1.80, 0.87, -4.20, 0.87, -6.00, 0.03], ['c', -1.62, -0.78, -2.52, -2.16, -2.46, -3.66], ['c', 0.06, -0.99, 0.54, -1.77, 1.80, -2.97], ['c', 0.54, -0.51, 0.54, -0.54, 0.48, -0.57], ['c', -0.39, -0.27, -0.96, -0.78, -1.20, -1.14], ['c', -0.75, -1.11, -0.87, -2.40, -0.30, -3.60], ['c', 0.69, -1.35, 2.25, -2.25, 4.20, -2.40], ['z'], ['m', 1.53, 0.69], ['c', -0.42, -0.09, -1.11, -0.12, -1.38, -0.06], ['c', -0.30, 0.06, -0.60, 0.18, -0.81, 0.30], ['c', -0.21, 0.12, -0.60, 0.51, -0.72, 0.72], ['c', -0.51, 0.87, -0.42, 1.89, 0.21, 2.52], ['c', 0.21, 0.21, 0.36, 0.30, 1.95, 1.23], ['c', 0.96, 0.54, 1.74, 0.99, 1.77, 1.02], ['c', 0.09, 0.00, 0.63, -0.60, 0.99, -1.11], ['c', 0.21, -0.36, 0.48, -0.87, 0.57, -1.23], ['c', 0.06, -0.24, 0.06, -0.36, 0.06, -0.72], ['c', 0.00, -0.45, -0.03, -0.66, -0.15, -0.99], ['c', -0.39, -0.81, -1.29, -1.44, -2.49, -1.68], ['z'], ['m', -1.44, 8.07], ['l', -1.89, -1.08], ['c', -0.03, 0.00, -0.18, 0.15, -0.39, 0.33], ['c', -1.20, 1.08, -1.65, 1.95, -1.59, 3.00], ['c', 0.09, 1.59, 1.35, 2.85, 3.21, 3.24], ['c', 0.33, 0.06, 0.45, 0.06, 0.93, 0.06], ['c', 0.63, 0.00, 0.81, -0.03, 1.29, -0.27], ['c', 0.90, -0.42, 1.47, -1.41, 1.41, -2.40], ['c', -0.06, -0.66, -0.39, -1.29, -0.90, -1.65], ['c', -0.12, -0.09, -1.05, -0.63, -2.07, -1.23], ['z']], w: 10.926, h: 14.989 },\n\t'9': { d: [['M', 4.23, -14.97], ['c', 0.42, -0.03, 1.29, 0.00, 1.62, 0.06], ['c', 0.51, 0.12, 0.93, 0.30, 1.38, 0.57], ['c', 1.53, 1.02, 2.52, 3.24, 2.73, 5.94], ['c', 0.18, 2.55, -0.48, 4.98, -1.83, 6.57], ['c', -1.05, 1.26, -2.40, 1.89, -3.93, 1.83], ['c', -1.23, -0.06, -2.31, -0.45, -3.03, -1.14], ['c', -0.57, -0.51, -0.87, -1.23, -0.84, -1.98], ['c', 0.03, -0.51, 0.21, -0.90, 0.60, -1.26], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.39, 0.36, 0.57, 0.78, 0.57, 1.26], ['c', 0.00, 0.27, 0.00, 0.30, -0.09, 0.42], ['c', -0.03, 0.09, -0.18, 0.21, -0.30, 0.30], ['c', -0.12, 0.09, -0.30, 0.21, -0.39, 0.27], ['c', -0.09, 0.06, -0.21, 0.18, -0.27, 0.24], ['c', -0.06, 0.12, -0.06, 0.15, -0.06, 0.33], ['c', 0.00, 0.18, 0.00, 0.24, 0.06, 0.36], ['c', 0.24, 0.39, 0.75, 0.60, 1.38, 0.57], ['c', 0.54, -0.03, 0.90, -0.18, 1.23, -0.48], ['c', 0.81, -0.72, 1.08, -2.16, 0.96, -5.37], ['l', 0.00, -0.63], ['l', -0.30, 0.12], ['c', -0.78, 0.27, -1.29, 0.33, -2.10, 0.27], ['c', -1.47, -0.12, -2.49, -0.54, -3.27, -1.29], ['c', -0.48, -0.51, -0.81, -1.11, -0.96, -1.89], ['c', -0.06, -0.27, -0.06, -0.42, -0.06, -0.96], ['c', 0.00, -0.51, 0.00, -0.66, 0.06, -0.93], ['c', 0.15, -0.78, 0.48, -1.38, 0.96, -1.89], ['c', 0.15, -0.12, 0.33, -0.27, 0.42, -0.36], ['c', 0.69, -0.51, 1.62, -0.81, 2.76, -0.93], ['z'], ['m', 1.17, 0.66], ['c', -0.21, -0.06, -0.57, -0.06, -0.81, -0.03], ['c', -0.78, 0.12, -1.26, 0.69, -1.41, 1.74], ['c', -0.12, 0.63, -0.15, 1.95, -0.09, 2.79], ['c', 0.12, 1.71, 0.63, 2.40, 1.77, 2.46], ['c', 1.08, 0.03, 1.62, -0.48, 1.80, -1.74], ['c', 0.06, -0.54, 0.06, -3.00, 0.00, -3.54], ['c', -0.15, -1.05, -0.51, -1.53, -1.26, -1.68], ['z']], w: 9.959, h: 14.986 },\n\t'rests.multimeasure': { d: [['M', 0, -4], ['l', 0, 16], ['l', 1, 0], ['l', 0, -5], ['l', 40, 0], ['l', 0, 5], ['l', 1, 0], ['l', 0, -16], ['l', -1, 0], ['l', 0, 5], ['l', -40, 0], ['l', 0, -5], ['z']], w: 42, h: 18 },\n\t'rests.whole': { d: [['M', 0.06, 0.03], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.49, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 2.19], ['l', 0.00, 2.19], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -5.49, 0.00], ['l', -5.46, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -2.19], ['l', 0.00, -2.19], ['z']], w: 11.25, h: 4.68 },\n\t'rests.half': { d: [['M', 0.06, -4.62], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.49, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 2.19], ['l', 0.00, 2.19], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -5.49, 0.00], ['l', -5.46, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -2.19], ['l', 0.00, -2.19], ['z']], w: 11.25, h: 4.68 },\n\t'rests.quarter': { d: [['M', 1.89, -11.82], ['c', 0.12, -0.06, 0.24, -0.06, 0.36, -0.03], ['c', 0.09, 0.06, 4.74, 5.58, 4.86, 5.82], ['c', 0.21, 0.39, 0.15, 0.78, -0.15, 1.26], ['c', -0.24, 0.33, -0.72, 0.81, -1.62, 1.56], ['c', -0.45, 0.36, -0.87, 0.75, -0.96, 0.84], ['c', -0.93, 0.99, -1.14, 2.49, -0.60, 3.63], ['c', 0.18, 0.39, 0.27, 0.48, 1.32, 1.68], ['c', 1.92, 2.25, 1.83, 2.16, 1.83, 2.34], ['c', 0.00, 0.18, -0.18, 0.36, -0.36, 0.39], ['c', -0.15, 0.00, -0.27, -0.06, -0.48, -0.27], ['c', -0.75, -0.75, -2.46, -1.29, -3.39, -1.08], ['c', -0.45, 0.09, -0.69, 0.27, -0.90, 0.69], ['c', -0.12, 0.30, -0.21, 0.66, -0.24, 1.14], ['c', -0.03, 0.66, 0.09, 1.35, 0.30, 2.01], ['c', 0.15, 0.42, 0.24, 0.66, 0.45, 0.96], ['c', 0.18, 0.24, 0.18, 0.33, 0.03, 0.42], ['c', -0.12, 0.06, -0.18, 0.03, -0.45, -0.30], ['c', -1.08, -1.38, -2.07, -3.36, -2.40, -4.83], ['c', -0.27, -1.05, -0.15, -1.77, 0.27, -2.07], ['c', 0.21, -0.12, 0.42, -0.15, 0.87, -0.15], ['c', 0.87, 0.06, 2.10, 0.39, 3.30, 0.90], ['l', 0.39, 0.18], ['l', -1.65, -1.95], ['c', -2.52, -2.97, -2.61, -3.09, -2.70, -3.27], ['c', -0.09, -0.24, -0.12, -0.48, -0.03, -0.75], ['c', 0.15, -0.48, 0.57, -0.96, 1.83, -2.01], ['c', 0.45, -0.36, 0.84, -0.72, 0.93, -0.78], ['c', 0.69, -0.75, 1.02, -1.80, 0.90, -2.79], ['c', -0.06, -0.33, -0.21, -0.84, -0.39, -1.11], ['c', -0.09, -0.15, -0.45, -0.60, -0.81, -1.05], ['c', -0.36, -0.42, -0.69, -0.81, -0.72, -0.87], ['c', -0.09, -0.18, 0.00, -0.42, 0.21, -0.51], ['z']], w: 7.888, h: 21.435 },\n\t'rests.8th': { d: [['M', 1.68, -6.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.33, -0.09], ['c', 0.39, -0.18, 1.32, -1.29, 1.68, -1.98], ['c', 0.09, -0.21, 0.24, -0.30, 0.39, -0.30], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.27, 1.11, -1.86, 6.42], ['c', -1.02, 3.48, -1.89, 6.39, -1.92, 6.42], ['c', 0.00, 0.03, -0.12, 0.12, -0.24, 0.15], ['c', -0.18, 0.09, -0.21, 0.09, -0.45, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.15, -0.57, 1.68, -4.92], ['c', 0.96, -2.67, 1.74, -4.89, 1.71, -4.89], ['l', -0.51, 0.15], ['c', -1.08, 0.36, -1.74, 0.48, -2.55, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 7.534, h: 13.883 },\n\t'rests.16th': { d: [['M', 3.33, -6.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.15, 0.39, 0.57, 0.57, 0.87, 0.42], ['c', 0.39, -0.18, 1.20, -1.23, 1.62, -2.07], ['c', 0.06, -0.15, 0.24, -0.24, 0.36, -0.24], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.45, 1.86, -2.67, 10.17], ['c', -1.50, 5.55, -2.73, 10.14, -2.76, 10.17], ['c', -0.03, 0.03, -0.12, 0.12, -0.24, 0.15], ['c', -0.18, 0.09, -0.21, 0.09, -0.45, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.12, -0.57, 1.44, -4.92], ['c', 0.81, -2.67, 1.47, -4.86, 1.47, -4.89], ['c', -0.03, 0.00, -0.27, 0.06, -0.54, 0.15], ['c', -1.08, 0.36, -1.77, 0.48, -2.58, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.09, 0.09, 0.27, 0.18, 0.45, 0.21], ['c', 0.12, 0.00, 0.18, 0.00, 0.33, -0.09], ['c', 0.33, -0.15, 1.02, -0.93, 1.41, -1.59], ['c', 0.12, -0.21, 0.18, -0.39, 0.39, -1.08], ['c', 0.66, -2.10, 1.17, -3.84, 1.17, -3.87], ['c', 0.00, 0.00, -0.21, 0.06, -0.42, 0.15], ['c', -0.51, 0.15, -1.20, 0.33, -1.68, 0.42], ['c', -0.33, 0.06, -0.51, 0.06, -0.96, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 9.724, h: 21.383 },\n\t'rests.32nd': { d: [['M', 4.23, -13.62], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.27, -0.06], ['c', 0.33, -0.21, 0.99, -1.11, 1.44, -1.98], ['c', 0.09, -0.24, 0.21, -0.33, 0.39, -0.33], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.57, 2.67, -3.21, 13.89], ['c', -1.80, 7.62, -3.30, 13.89, -3.30, 13.92], ['c', -0.03, 0.06, -0.12, 0.12, -0.24, 0.18], ['c', -0.21, 0.09, -0.24, 0.09, -0.48, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.09, -0.57, 1.23, -4.92], ['c', 0.69, -2.67, 1.26, -4.86, 1.29, -4.89], ['c', 0.00, -0.03, -0.12, -0.03, -0.48, 0.12], ['c', -1.17, 0.39, -2.22, 0.57, -3.00, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.12, 0.09, 0.30, 0.18, 0.48, 0.21], ['c', 0.12, 0.00, 0.18, 0.00, 0.30, -0.09], ['c', 0.42, -0.21, 1.29, -1.29, 1.56, -1.89], ['c', 0.03, -0.12, 1.23, -4.59, 1.23, -4.65], ['c', 0.00, -0.03, -0.18, 0.03, -0.39, 0.12], ['c', -0.63, 0.18, -1.20, 0.36, -1.74, 0.45], ['c', -0.39, 0.06, -0.54, 0.06, -1.02, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.18, 0.18, 0.51, 0.27, 0.72, 0.15], ['c', 0.30, -0.12, 0.69, -0.57, 1.08, -1.17], ['c', 0.42, -0.60, 0.39, -0.51, 1.05, -3.03], ['c', 0.33, -1.26, 0.60, -2.31, 0.60, -2.34], ['c', 0.00, 0.00, -0.21, 0.03, -0.45, 0.12], ['c', -0.57, 0.18, -1.14, 0.33, -1.62, 0.42], ['c', -0.33, 0.06, -0.51, 0.06, -0.96, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 11.373, h: 28.883 },\n\t'rests.64th': { d: [['M', 5.13, -13.62], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.21, 0.54, 0.30, 0.75, 0.18], ['c', 0.24, -0.12, 0.63, -0.66, 1.08, -1.56], ['c', 0.33, -0.66, 0.39, -0.72, 0.60, -0.72], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.69, 3.66, -3.54, 17.64], ['c', -1.95, 9.66, -3.57, 17.61, -3.57, 17.64], ['c', -0.03, 0.06, -0.12, 0.12, -0.24, 0.18], ['c', -0.21, 0.09, -0.24, 0.09, -0.48, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.06, -0.57, 1.05, -4.95], ['c', 0.60, -2.70, 1.08, -4.89, 1.08, -4.92], ['c', 0.00, 0.00, -0.24, 0.06, -0.51, 0.15], ['c', -0.66, 0.24, -1.20, 0.36, -1.77, 0.48], ['c', -0.42, 0.06, -0.57, 0.06, -1.05, 0.06], ['c', -0.69, 0.00, -0.87, -0.03, -1.35, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.09, 0.09, 0.27, 0.18, 0.45, 0.21], ['c', 0.21, 0.03, 0.39, -0.09, 0.72, -0.42], ['c', 0.45, -0.45, 1.02, -1.26, 1.17, -1.65], ['c', 0.03, -0.09, 0.27, -1.14, 0.54, -2.34], ['c', 0.27, -1.20, 0.48, -2.19, 0.51, -2.22], ['c', 0.00, -0.03, -0.09, -0.03, -0.48, 0.12], ['c', -1.17, 0.39, -2.22, 0.57, -3.00, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.15, 0.39, 0.57, 0.57, 0.90, 0.42], ['c', 0.36, -0.18, 1.20, -1.26, 1.47, -1.89], ['c', 0.03, -0.09, 0.30, -1.20, 0.57, -2.43], ['l', 0.51, -2.28], ['l', -0.54, 0.18], ['c', -1.11, 0.36, -1.80, 0.48, -2.61, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.21, 0.21, 0.54, 0.30, 0.75, 0.18], ['c', 0.36, -0.18, 0.93, -0.93, 1.29, -1.68], ['c', 0.12, -0.24, 0.18, -0.48, 0.63, -2.55], ['l', 0.51, -2.31], ['c', 0.00, -0.03, -0.18, 0.03, -0.39, 0.12], ['c', -1.14, 0.36, -2.10, 0.54, -2.82, 0.51], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 12.453, h: 36.383 },\n\t'rests.128th': { d: [['M', 6.03, -21.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.21, 0.00, 0.33, -0.06, 0.54, -0.36], ['c', 0.15, -0.21, 0.54, -0.93, 0.78, -1.47], ['c', 0.15, -0.33, 0.18, -0.39, 0.30, -0.48], ['c', 0.18, -0.09, 0.45, 0.00, 0.51, 0.15], ['c', 0.03, 0.09, -7.11, 42.75, -7.17, 42.84], ['c', -0.03, 0.03, -0.15, 0.09, -0.24, 0.15], ['c', -0.18, 0.06, -0.24, 0.06, -0.45, 0.06], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.03, -0.57, 0.84, -4.98], ['c', 0.51, -2.70, 0.93, -4.92, 0.90, -4.92], ['c', 0.00, 0.00, -0.15, 0.06, -0.36, 0.12], ['c', -0.78, 0.27, -1.62, 0.48, -2.31, 0.57], ['c', -0.15, 0.03, -0.54, 0.03, -0.81, 0.03], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.63, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.30, -0.09], ['c', 0.42, -0.21, 1.14, -1.11, 1.50, -1.83], ['c', 0.12, -0.27, 0.12, -0.27, 0.54, -2.52], ['c', 0.24, -1.23, 0.42, -2.25, 0.39, -2.25], ['c', 0.00, 0.00, -0.24, 0.06, -0.51, 0.18], ['c', -1.26, 0.39, -2.25, 0.57, -3.06, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.21, 0.51, 0.30, 0.75, 0.18], ['c', 0.36, -0.15, 1.05, -0.99, 1.41, -1.77], ['l', 0.15, -0.30], ['l', 0.42, -2.25], ['c', 0.21, -1.26, 0.42, -2.28, 0.39, -2.28], ['l', -0.51, 0.15], ['c', -1.11, 0.39, -1.89, 0.51, -2.70, 0.51], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.18, 0.48, 0.27, 0.72, 0.21], ['c', 0.33, -0.12, 1.14, -1.26, 1.41, -1.95], ['c', 0.00, -0.09, 0.21, -1.11, 0.45, -2.34], ['c', 0.21, -1.20, 0.39, -2.22, 0.39, -2.28], ['c', 0.03, -0.03, 0.00, -0.03, -0.45, 0.12], ['c', -0.57, 0.18, -1.20, 0.33, -1.71, 0.42], ['c', -0.30, 0.06, -0.51, 0.06, -0.93, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.18, 0.00, 0.36, -0.09, 0.57, -0.33], ['c', 0.33, -0.36, 0.78, -1.14, 0.93, -1.56], ['c', 0.03, -0.12, 0.24, -1.20, 0.45, -2.40], ['c', 0.24, -1.20, 0.42, -2.22, 0.42, -2.28], ['c', 0.03, -0.03, 0.00, -0.03, -0.39, 0.09], ['c', -1.05, 0.36, -1.80, 0.48, -2.58, 0.48], ['c', -0.63, 0.00, -0.84, -0.03, -1.29, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 12.992, h: 43.883 },\n\t'accidentals.sharp': { d: [['M', 5.73, -11.19], ['c', 0.21, -0.12, 0.54, -0.03, 0.66, 0.24], ['c', 0.06, 0.12, 0.06, 0.21, 0.06, 2.31], ['c', 0.00, 1.23, 0.00, 2.22, 0.03, 2.22], ['c', 0.00, 0.00, 0.27, -0.12, 0.60, -0.24], ['c', 0.69, -0.27, 0.78, -0.30, 0.96, -0.15], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.38], ['c', 0.00, 1.02, 0.00, 1.11, -0.06, 1.20], ['c', -0.03, 0.06, -0.09, 0.12, -0.12, 0.15], ['c', -0.06, 0.03, -0.42, 0.21, -0.84, 0.36], ['l', -0.75, 0.33], ['l', -0.03, 2.43], ['c', 0.00, 1.32, 0.00, 2.43, 0.03, 2.43], ['c', 0.00, 0.00, 0.27, -0.12, 0.60, -0.24], ['c', 0.69, -0.27, 0.78, -0.30, 0.96, -0.15], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.38], ['c', 0.00, 1.02, 0.00, 1.11, -0.06, 1.20], ['c', -0.03, 0.06, -0.09, 0.12, -0.12, 0.15], ['c', -0.06, 0.03, -0.42, 0.21, -0.84, 0.36], ['l', -0.75, 0.33], ['l', -0.03, 2.52], ['c', 0.00, 2.28, -0.03, 2.55, -0.06, 2.64], ['c', -0.21, 0.36, -0.72, 0.36, -0.93, 0.00], ['c', -0.03, -0.09, -0.06, -0.33, -0.06, -2.43], ['l', 0.00, -2.31], ['l', -1.29, 0.51], ['l', -1.26, 0.51], ['l', 0.00, 2.43], ['c', 0.00, 2.58, 0.00, 2.52, -0.15, 2.67], ['c', -0.06, 0.09, -0.27, 0.18, -0.36, 0.18], ['c', -0.12, 0.00, -0.33, -0.09, -0.39, -0.18], ['c', -0.15, -0.15, -0.15, -0.09, -0.15, -2.43], ['c', 0.00, -1.23, 0.00, -2.22, -0.03, -2.22], ['c', 0.00, 0.00, -0.27, 0.12, -0.60, 0.24], ['c', -0.69, 0.27, -0.78, 0.30, -0.96, 0.15], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.38], ['c', 0.00, -1.02, 0.00, -1.11, 0.06, -1.20], ['c', 0.03, -0.06, 0.09, -0.12, 0.12, -0.15], ['c', 0.06, -0.03, 0.42, -0.21, 0.84, -0.36], ['l', 0.78, -0.33], ['l', 0.00, -2.43], ['c', 0.00, -1.32, 0.00, -2.43, -0.03, -2.43], ['c', 0.00, 0.00, -0.27, 0.12, -0.60, 0.24], ['c', -0.69, 0.27, -0.78, 0.30, -0.96, 0.15], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.38], ['c', 0.00, -1.02, 0.00, -1.11, 0.06, -1.20], ['c', 0.03, -0.06, 0.09, -0.12, 0.12, -0.15], ['c', 0.06, -0.03, 0.42, -0.21, 0.84, -0.36], ['l', 0.78, -0.33], ['l', 0.00, -2.52], ['c', 0.00, -2.28, 0.03, -2.55, 0.06, -2.64], ['c', 0.21, -0.36, 0.72, -0.36, 0.93, 0.00], ['c', 0.03, 0.09, 0.06, 0.33, 0.06, 2.43], ['l', 0.03, 2.31], ['l', 1.26, -0.51], ['l', 1.26, -0.51], ['l', 0.00, -2.43], ['c', 0.00, -2.28, 0.00, -2.43, 0.06, -2.55], ['c', 0.06, -0.12, 0.12, -0.18, 0.27, -0.24], ['z'], ['m', -0.33, 10.65], ['l', 0.00, -2.43], ['l', -1.29, 0.51], ['l', -1.26, 0.51], ['l', 0.00, 2.46], ['l', 0.00, 2.43], ['l', 0.09, -0.03], ['c', 0.06, -0.03, 0.63, -0.27, 1.29, -0.51], ['l', 1.17, -0.48], ['l', 0.00, -2.46], ['z']], w: 8.25, h: 22.462 },\n\t'accidentals.halfsharp': { d: [['M', 2.43, -10.05], ['c', 0.21, -0.12, 0.54, -0.03, 0.66, 0.24], ['c', 0.06, 0.12, 0.06, 0.21, 0.06, 2.01], ['c', 0.00, 1.05, 0.00, 1.89, 0.03, 1.89], ['l', 0.72, -0.48], ['c', 0.69, -0.48, 0.69, -0.51, 0.87, -0.51], ['c', 0.15, 0.00, 0.18, 0.03, 0.27, 0.09], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.41], ['c', 0.00, 1.11, -0.03, 1.14, -0.09, 1.23], ['c', -0.03, 0.03, -0.48, 0.39, -1.02, 0.75], ['l', -0.99, 0.66], ['l', 0.00, 2.37], ['c', 0.00, 1.32, 0.00, 2.37, 0.03, 2.37], ['l', 0.72, -0.48], ['c', 0.69, -0.48, 0.69, -0.51, 0.87, -0.51], ['c', 0.15, 0.00, 0.18, 0.03, 0.27, 0.09], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.41], ['c', 0.00, 1.11, -0.03, 1.14, -0.09, 1.23], ['c', -0.03, 0.03, -0.48, 0.39, -1.02, 0.75], ['l', -0.99, 0.66], ['l', 0.00, 2.25], ['c', 0.00, 1.95, 0.00, 2.28, -0.06, 2.37], ['c', -0.06, 0.12, -0.12, 0.21, -0.24, 0.27], ['c', -0.27, 0.12, -0.54, 0.03, -0.69, -0.24], ['c', -0.06, -0.12, -0.06, -0.21, -0.06, -2.01], ['c', 0.00, -1.05, 0.00, -1.89, -0.03, -1.89], ['l', -0.72, 0.48], ['c', -0.69, 0.48, -0.69, 0.48, -0.87, 0.48], ['c', -0.15, 0.00, -0.18, 0.00, -0.27, -0.06], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.41], ['c', 0.00, -1.11, 0.03, -1.14, 0.09, -1.23], ['c', 0.03, -0.03, 0.48, -0.39, 1.02, -0.75], ['l', 0.99, -0.66], ['l', 0.00, -2.37], ['c', 0.00, -1.32, 0.00, -2.37, -0.03, -2.37], ['l', -0.72, 0.48], ['c', -0.69, 0.48, -0.69, 0.48, -0.87, 0.48], ['c', -0.15, 0.00, -0.18, 0.00, -0.27, -0.06], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.41], ['c', 0.00, -1.11, 0.03, -1.14, 0.09, -1.23], ['c', 0.03, -0.03, 0.48, -0.39, 1.02, -0.75], ['l', 0.99, -0.66], ['l', 0.00, -2.25], ['c', 0.00, -2.13, 0.00, -2.28, 0.06, -2.40], ['c', 0.06, -0.12, 0.12, -0.18, 0.27, -0.24], ['z']], w: 5.25, h: 20.174 },\n\t'accidentals.nat': { d: [['M', 0.21, -11.40], ['c', 0.24, -0.06, 0.78, 0.00, 0.99, 0.15], ['c', 0.03, 0.03, 0.03, 0.48, 0.00, 2.61], ['c', -0.03, 1.44, -0.03, 2.61, -0.03, 2.61], ['c', 0.00, 0.03, 0.75, -0.09, 1.68, -0.24], ['c', 0.96, -0.18, 1.71, -0.27, 1.74, -0.27], ['c', 0.15, 0.03, 0.27, 0.15, 0.36, 0.30], ['l', 0.06, 0.12], ['l', 0.09, 8.67], ['c', 0.09, 6.96, 0.12, 8.67, 0.09, 8.67], ['c', -0.03, 0.03, -0.12, 0.06, -0.21, 0.09], ['c', -0.24, 0.09, -0.72, 0.09, -0.96, 0.00], ['c', -0.09, -0.03, -0.18, -0.06, -0.21, -0.09], ['c', -0.03, -0.03, -0.03, -0.48, 0.00, -2.61], ['c', 0.03, -1.44, 0.03, -2.61, 0.03, -2.61], ['c', 0.00, -0.03, -0.75, 0.09, -1.68, 0.24], ['c', -0.96, 0.18, -1.71, 0.27, -1.74, 0.27], ['c', -0.15, -0.03, -0.27, -0.15, -0.36, -0.30], ['l', -0.06, -0.15], ['l', -0.09, -7.53], ['c', -0.06, -4.14, -0.09, -8.04, -0.12, -8.67], ['l', 0.00, -1.11], ['l', 0.15, -0.06], ['c', 0.09, -0.03, 0.21, -0.06, 0.27, -0.09], ['z'], ['m', 3.75, 8.40], ['c', 0.00, -0.33, 0.00, -0.42, -0.03, -0.42], ['c', -0.12, 0.00, -2.79, 0.45, -2.79, 0.48], ['c', -0.03, 0.00, -0.09, 6.30, -0.09, 6.33], ['c', 0.03, 0.00, 2.79, -0.45, 2.82, -0.48], ['c', 0.00, 0.00, 0.09, -4.53, 0.09, -5.91], ['z']], w: 5.4, h: 22.8 },\n\t'accidentals.flat': { d: [['M', -0.36, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z']], w: 6.75, h: 18.801 },\n\t'accidentals.halfflat': { d: [['M', 4.83, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.60, -0.12, 9.06], ['c', -0.09, 5.55, -0.15, 9.06, -0.18, 9.12], ['c', -0.03, 0.09, -0.09, 0.18, -0.15, 0.27], ['c', -0.24, 0.21, -0.54, 0.24, -0.81, 0.06], ['c', -0.06, -0.03, -0.27, -0.24, -0.45, -0.42], ['c', -0.36, -0.42, -0.66, -0.66, -1.80, -1.44], ['c', -1.23, -0.84, -1.83, -1.32, -2.25, -1.77], ['c', -0.66, -0.78, -0.96, -1.56, -0.93, -2.46], ['c', 0.09, -1.41, 1.11, -2.58, 2.40, -2.79], ['c', 0.30, -0.06, 0.84, -0.03, 1.23, 0.06], ['c', 0.54, 0.12, 1.08, 0.33, 1.53, 0.63], ['c', 0.12, 0.09, 0.24, 0.15, 0.24, 0.12], ['c', 0.00, 0.00, -0.12, -8.37, -0.18, -9.75], ['l', 0.00, -0.66], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', -1.65, 10.95], ['c', -0.60, -0.18, -1.08, 0.09, -1.38, 0.69], ['c', -0.27, 0.60, -0.36, 1.38, -0.18, 2.07], ['c', 0.12, 0.42, 0.42, 0.99, 0.72, 1.41], ['c', 0.30, 0.42, 0.93, 1.05, 1.56, 1.59], ['l', 0.48, 0.39], ['l', 0.00, -0.12], ['c', 0.03, -0.09, 0.03, -0.48, 0.06, -0.90], ['c', 0.03, -0.57, 0.03, -1.08, 0.00, -2.22], ['c', -0.03, -1.62, -0.03, -1.62, -0.24, -2.07], ['c', -0.21, -0.42, -0.60, -0.75, -1.02, -0.84], ['z']], w: 6.728, h: 18.801 },\n\t'accidentals.dblflat': { d: [['M', -0.36, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z'], ['m', 3, -11], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z']], w: 12.1, h: 18.804 },\n\t'accidentals.dblsharp': { d: [['M', -0.18, -3.96], ['c', 0.06, -0.03, 0.12, -0.06, 0.15, -0.06], ['c', 0.09, 0.00, 2.76, 0.27, 2.79, 0.30], ['c', 0.12, 0.03, 0.15, 0.12, 0.15, 0.51], ['c', 0.06, 0.96, 0.24, 1.59, 0.57, 2.10], ['c', 0.06, 0.09, 0.15, 0.21, 0.18, 0.24], ['l', 0.09, 0.06], ['l', 0.09, -0.06], ['c', 0.03, -0.03, 0.12, -0.15, 0.18, -0.24], ['c', 0.33, -0.51, 0.51, -1.14, 0.57, -2.10], ['c', 0.00, -0.39, 0.03, -0.45, 0.12, -0.51], ['c', 0.03, 0.00, 0.66, -0.09, 1.44, -0.15], ['c', 1.47, -0.15, 1.50, -0.15, 1.56, -0.03], ['c', 0.03, 0.06, 0.00, 0.42, -0.09, 1.44], ['c', -0.09, 0.72, -0.15, 1.35, -0.15, 1.38], ['c', 0.00, 0.03, -0.03, 0.09, -0.06, 0.12], ['c', -0.06, 0.06, -0.12, 0.09, -0.51, 0.09], ['c', -1.08, 0.06, -1.80, 0.30, -2.28, 0.75], ['l', -0.12, 0.09], ['l', 0.09, 0.09], ['c', 0.12, 0.15, 0.39, 0.33, 0.63, 0.45], ['c', 0.42, 0.18, 0.96, 0.27, 1.68, 0.33], ['c', 0.39, 0.00, 0.45, 0.03, 0.51, 0.09], ['c', 0.03, 0.03, 0.06, 0.09, 0.06, 0.12], ['c', 0.00, 0.03, 0.06, 0.66, 0.15, 1.38], ['c', 0.09, 1.02, 0.12, 1.38, 0.09, 1.44], ['c', -0.06, 0.12, -0.09, 0.12, -1.56, -0.03], ['c', -0.78, -0.06, -1.41, -0.15, -1.44, -0.15], ['c', -0.09, -0.06, -0.12, -0.12, -0.12, -0.54], ['c', -0.06, -0.93, -0.24, -1.56, -0.57, -2.07], ['c', -0.06, -0.09, -0.15, -0.21, -0.18, -0.24], ['l', -0.09, -0.06], ['l', -0.09, 0.06], ['c', -0.03, 0.03, -0.12, 0.15, -0.18, 0.24], ['c', -0.33, 0.51, -0.51, 1.14, -0.57, 2.07], ['c', 0.00, 0.42, -0.03, 0.48, -0.12, 0.54], ['c', -0.03, 0.00, -0.66, 0.09, -1.44, 0.15], ['c', -1.47, 0.15, -1.50, 0.15, -1.56, 0.03], ['c', -0.03, -0.06, 0.00, -0.42, 0.09, -1.44], ['c', 0.09, -0.72, 0.15, -1.35, 0.15, -1.38], ['c', 0.00, -0.03, 0.03, -0.09, 0.06, -0.12], ['c', 0.06, -0.06, 0.12, -0.09, 0.51, -0.09], ['c', 0.72, -0.06, 1.26, -0.15, 1.68, -0.33], ['c', 0.24, -0.12, 0.51, -0.30, 0.63, -0.45], ['l', 0.09, -0.09], ['l', -0.12, -0.09], ['c', -0.48, -0.45, -1.20, -0.69, -2.28, -0.75], ['c', -0.39, 0.00, -0.45, -0.03, -0.51, -0.09], ['c', -0.03, -0.03, -0.06, -0.09, -0.06, -0.12], ['c', 0.00, -0.03, -0.06, -0.63, -0.12, -1.38], ['c', -0.09, -0.72, -0.15, -1.35, -0.15, -1.38], ['z']], w: 7.95, h: 7.977 },\n\t'dots.dot': { d: [['M', 1.32, -1.68], ['c', 0.09, -0.03, 0.27, -0.06, 0.39, -0.06], ['c', 0.96, 0.00, 1.74, 0.78, 1.74, 1.71], ['c', 0.00, 0.96, -0.78, 1.74, -1.71, 1.74], ['c', -0.96, 0.00, -1.74, -0.78, -1.74, -1.71], ['c', 0.00, -0.78, 0.54, -1.50, 1.32, -1.68], ['z']], w: 3.45, h: 3.45 },\n\t'noteheads.dbl': { d: [['M', -0.69, -4.02], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['c', 0.06, 0.15, 0.06, 0.18, 0.06, 1.41], ['l', 0.00, 1.23], ['l', 0.12, -0.18], ['c', 0.72, -1.26, 2.64, -2.31, 4.86, -2.64], ['c', 0.81, -0.15, 1.11, -0.15, 2.13, -0.15], ['c', 0.99, 0.00, 1.29, 0.00, 2.10, 0.15], ['c', 0.75, 0.12, 1.38, 0.27, 2.04, 0.54], ['c', 1.35, 0.51, 2.34, 1.26, 2.82, 2.10], ['l', 0.12, 0.18], ['l', 0.00, -1.23], ['c', 0.00, -1.20, 0.00, -1.26, 0.06, -1.38], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 3.54], ['l', 0.00, 3.54], ['l', -0.06, 0.15], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.06, -0.12, -0.06, -0.18, -0.06, -1.38], ['l', 0.00, -1.23], ['l', -0.12, 0.18], ['c', -0.48, 0.84, -1.47, 1.59, -2.82, 2.10], ['c', -0.84, 0.33, -1.71, 0.54, -2.85, 0.66], ['c', -0.45, 0.06, -2.16, 0.06, -2.61, 0.00], ['c', -1.14, -0.12, -2.01, -0.33, -2.85, -0.66], ['c', -1.35, -0.51, -2.34, -1.26, -2.82, -2.10], ['l', -0.12, -0.18], ['l', 0.00, 1.23], ['c', 0.00, 1.23, 0.00, 1.26, -0.06, 1.38], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['l', -0.06, -0.15], ['l', 0.00, -3.54], ['c', 0.00, -3.48, 0.00, -3.54, 0.06, -3.66], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z'], ['m', 7.71, 0.63], ['c', -0.36, -0.06, -0.90, -0.06, -1.14, 0.00], ['c', -0.30, 0.03, -0.66, 0.24, -0.87, 0.42], ['c', -0.60, 0.54, -0.90, 1.62, -0.75, 2.82], ['c', 0.12, 0.93, 0.51, 1.68, 1.11, 2.31], ['c', 0.75, 0.72, 1.83, 1.20, 2.85, 1.26], ['c', 1.05, 0.06, 1.83, -0.54, 2.10, -1.65], ['c', 0.21, -0.90, 0.12, -1.95, -0.24, -2.82], ['c', -0.36, -0.81, -1.08, -1.53, -1.95, -1.95], ['c', -0.30, -0.15, -0.78, -0.30, -1.11, -0.39], ['z']], w: 16.83, h: 8.145 },\n\t'noteheads.whole': { d: [['M', 6.51, -4.05], ['c', 0.51, -0.03, 2.01, 0.00, 2.52, 0.03], ['c', 1.41, 0.18, 2.64, 0.51, 3.72, 1.08], ['c', 1.20, 0.63, 1.95, 1.41, 2.19, 2.31], ['c', 0.09, 0.33, 0.09, 0.90, 0.00, 1.23], ['c', -0.24, 0.90, -0.99, 1.68, -2.19, 2.31], ['c', -1.08, 0.57, -2.28, 0.90, -3.75, 1.08], ['c', -0.66, 0.06, -2.31, 0.06, -2.97, 0.00], ['c', -1.47, -0.18, -2.67, -0.51, -3.75, -1.08], ['c', -1.20, -0.63, -1.95, -1.41, -2.19, -2.31], ['c', -0.09, -0.33, -0.09, -0.90, 0.00, -1.23], ['c', 0.24, -0.90, 0.99, -1.68, 2.19, -2.31], ['c', 1.20, -0.63, 2.61, -0.99, 4.23, -1.11], ['z'], ['m', 0.57, 0.66], ['c', -0.87, -0.15, -1.53, 0.00, -2.04, 0.51], ['c', -0.15, 0.15, -0.24, 0.27, -0.33, 0.48], ['c', -0.24, 0.51, -0.36, 1.08, -0.33, 1.77], ['c', 0.03, 0.69, 0.18, 1.26, 0.42, 1.77], ['c', 0.60, 1.17, 1.74, 1.98, 3.18, 2.22], ['c', 1.11, 0.21, 1.95, -0.15, 2.34, -0.99], ['c', 0.24, -0.51, 0.36, -1.08, 0.33, -1.80], ['c', -0.06, -1.11, -0.45, -2.04, -1.17, -2.76], ['c', -0.63, -0.63, -1.47, -1.05, -2.40, -1.20], ['z']], w: 14.985, h: 8.097 },\n\t'noteheads.half': { d: [['M', 7.44, -4.05], ['c', 0.06, -0.03, 0.27, -0.03, 0.48, -0.03], ['c', 1.05, 0.00, 1.71, 0.24, 2.10, 0.81], ['c', 0.42, 0.60, 0.45, 1.35, 0.18, 2.40], ['c', -0.42, 1.59, -1.14, 2.73, -2.16, 3.39], ['c', -1.41, 0.93, -3.18, 1.44, -5.40, 1.53], ['c', -1.17, 0.03, -1.89, -0.21, -2.28, -0.81], ['c', -0.42, -0.60, -0.45, -1.35, -0.18, -2.40], ['c', 0.42, -1.59, 1.14, -2.73, 2.16, -3.39], ['c', 0.63, -0.42, 1.23, -0.72, 1.98, -0.96], ['c', 0.90, -0.30, 1.65, -0.42, 3.12, -0.54], ['z'], ['m', 1.29, 0.87], ['c', -0.27, -0.09, -0.63, -0.12, -0.90, -0.03], ['c', -0.72, 0.24, -1.53, 0.69, -3.27, 1.80], ['c', -2.34, 1.50, -3.30, 2.25, -3.57, 2.79], ['c', -0.36, 0.72, -0.06, 1.50, 0.66, 1.77], ['c', 0.24, 0.12, 0.69, 0.09, 0.99, 0.00], ['c', 0.84, -0.30, 1.92, -0.93, 4.14, -2.37], ['c', 1.62, -1.08, 2.37, -1.71, 2.61, -2.19], ['c', 0.36, -0.72, 0.06, -1.50, -0.66, -1.77], ['z']], w: 10.37, h: 8.132 },\n\t'noteheads.quarter': { d: [['M', 6.09, -4.05], ['c', 0.36, -0.03, 1.20, 0.00, 1.53, 0.06], ['c', 1.17, 0.24, 1.89, 0.84, 2.16, 1.83], ['c', 0.06, 0.18, 0.06, 0.30, 0.06, 0.66], ['c', 0.00, 0.45, 0.00, 0.63, -0.15, 1.08], ['c', -0.66, 2.04, -3.06, 3.93, -5.52, 4.38], ['c', -0.54, 0.09, -1.44, 0.09, -1.83, 0.03], ['c', -1.23, -0.27, -1.98, -0.87, -2.25, -1.86], ['c', -0.06, -0.18, -0.06, -0.30, -0.06, -0.66], ['c', 0.00, -0.45, 0.00, -0.63, 0.15, -1.08], ['c', 0.24, -0.78, 0.75, -1.53, 1.44, -2.22], ['c', 1.20, -1.20, 2.85, -2.01, 4.47, -2.22], ['z']], w: 9.81, h: 8.094 },\n\t'noteheads.slash.nostem': { d: [['M', 9.30, -7.77], ['c', 0.06, -0.06, 0.18, -0.06, 1.71, -0.06], ['l', 1.65, 0.00], ['l', 0.09, 0.09], ['c', 0.06, 0.06, 0.06, 0.09, 0.06, 0.15], ['c', -0.03, 0.12, -9.21, 15.24, -9.30, 15.33], ['c', -0.06, 0.06, -0.18, 0.06, -1.71, 0.06], ['l', -1.65, 0.00], ['l', -0.09, -0.09], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.15], ['c', 0.03, -0.12, 9.21, -15.24, 9.30, -15.33], ['z']], w: 12.81, h: 15.63 },\n\t'noteheads.indeterminate': { d: [['M', 0.78, -4.05], ['c', 0.12, -0.03, 0.24, -0.03, 0.36, 0.03], ['c', 0.03, 0.03, 0.93, 0.72, 1.95, 1.56], ['l', 1.86, 1.50], ['l', 1.86, -1.50], ['c', 1.02, -0.84, 1.92, -1.53, 1.95, -1.56], ['c', 0.21, -0.12, 0.33, -0.09, 0.75, 0.24], ['c', 0.30, 0.27, 0.36, 0.36, 0.36, 0.54], ['c', 0.00, 0.03, -0.03, 0.12, -0.06, 0.18], ['c', -0.03, 0.06, -0.90, 0.75, -1.89, 1.56], ['l', -1.80, 1.47], ['c', 0.00, 0.03, 0.81, 0.69, 1.80, 1.50], ['c', 0.99, 0.81, 1.86, 1.50, 1.89, 1.56], ['c', 0.03, 0.06, 0.06, 0.15, 0.06, 0.18], ['c', 0.00, 0.18, -0.06, 0.27, -0.36, 0.54], ['c', -0.42, 0.33, -0.54, 0.36, -0.75, 0.24], ['c', -0.03, -0.03, -0.93, -0.72, -1.95, -1.56], ['l', -1.86, -1.50], ['l', -1.86, 1.50], ['c', -1.02, 0.84, -1.92, 1.53, -1.95, 1.56], ['c', -0.21, 0.12, -0.33, 0.09, -0.75, -0.24], ['c', -0.30, -0.27, -0.36, -0.36, -0.36, -0.54], ['c', 0.00, -0.03, 0.03, -0.12, 0.06, -0.18], ['c', 0.03, -0.06, 0.90, -0.75, 1.89, -1.56], ['l', 1.80, -1.47], ['c', 0.00, -0.03, -0.81, -0.69, -1.80, -1.50], ['c', -0.99, -0.81, -1.86, -1.50, -1.89, -1.56], ['c', -0.06, -0.12, -0.09, -0.21, -0.03, -0.36], ['c', 0.03, -0.09, 0.57, -0.57, 0.72, -0.63], ['z']], w: 9.843, h: 8.139 },\n\t'scripts.ufermata': { d: [['M', -0.75, -10.77], ['c', 0.12, 0.00, 0.45, -0.03, 0.69, -0.03], ['c', 2.91, -0.03, 5.55, 1.53, 7.41, 4.35], ['c', 1.17, 1.71, 1.95, 3.72, 2.43, 6.03], ['c', 0.12, 0.51, 0.12, 0.57, 0.03, 0.69], ['c', -0.12, 0.21, -0.48, 0.27, -0.69, 0.12], ['c', -0.12, -0.09, -0.18, -0.24, -0.27, -0.69], ['c', -0.78, -3.63, -3.42, -6.54, -6.78, -7.38], ['c', -0.78, -0.21, -1.20, -0.24, -2.07, -0.24], ['c', -0.63, 0.00, -0.84, 0.00, -1.20, 0.06], ['c', -1.83, 0.27, -3.42, 1.08, -4.80, 2.37], ['c', -1.41, 1.35, -2.40, 3.21, -2.85, 5.19], ['c', -0.09, 0.45, -0.15, 0.60, -0.27, 0.69], ['c', -0.21, 0.15, -0.57, 0.09, -0.69, -0.12], ['c', -0.09, -0.12, -0.09, -0.18, 0.03, -0.69], ['c', 0.33, -1.62, 0.78, -3.00, 1.47, -4.38], ['c', 1.77, -3.54, 4.44, -5.67, 7.56, -5.97], ['z'], ['m', 0.33, 7.47], ['c', 1.38, -0.30, 2.58, 0.90, 2.31, 2.25], ['c', -0.15, 0.72, -0.78, 1.35, -1.47, 1.50], ['c', -1.38, 0.27, -2.58, -0.93, -2.31, -2.31], ['c', 0.15, -0.69, 0.78, -1.29, 1.47, -1.44], ['z']], w: 19.748, h: 11.289 },\n\t'scripts.dfermata': { d: [['M', -9.63, -0.42], ['c', 0.15, -0.09, 0.36, -0.06, 0.51, 0.03], ['c', 0.12, 0.09, 0.18, 0.24, 0.27, 0.66], ['c', 0.78, 3.66, 3.42, 6.57, 6.78, 7.41], ['c', 0.78, 0.21, 1.20, 0.24, 2.07, 0.24], ['c', 0.63, 0.00, 0.84, 0.00, 1.20, -0.06], ['c', 1.83, -0.27, 3.42, -1.08, 4.80, -2.37], ['c', 1.41, -1.35, 2.40, -3.21, 2.85, -5.22], ['c', 0.09, -0.42, 0.15, -0.57, 0.27, -0.66], ['c', 0.21, -0.15, 0.57, -0.09, 0.69, 0.12], ['c', 0.09, 0.12, 0.09, 0.18, -0.03, 0.69], ['c', -0.33, 1.62, -0.78, 3.00, -1.47, 4.38], ['c', -1.92, 3.84, -4.89, 6.00, -8.31, 6.00], ['c', -3.42, 0.00, -6.39, -2.16, -8.31, -6.00], ['c', -0.48, -0.96, -0.84, -1.92, -1.14, -2.97], ['c', -0.18, -0.69, -0.42, -1.74, -0.42, -1.92], ['c', 0.00, -0.12, 0.09, -0.27, 0.24, -0.33], ['z'], ['m', 9.21, 0.00], ['c', 1.20, -0.27, 2.34, 0.63, 2.34, 1.86], ['c', 0.00, 0.90, -0.66, 1.68, -1.50, 1.89], ['c', -1.38, 0.27, -2.58, -0.93, -2.31, -2.31], ['c', 0.15, -0.69, 0.78, -1.29, 1.47, -1.44], ['z']], w: 19.744, h: 11.274 },\n\t'scripts.sforzato': { d: [['M', -6.45, -3.69], ['c', 0.06, -0.03, 0.15, -0.06, 0.18, -0.06], ['c', 0.06, 0.00, 2.85, 0.72, 6.24, 1.59], ['l', 6.33, 1.65], ['c', 0.33, 0.06, 0.45, 0.21, 0.45, 0.51], ['c', 0.00, 0.30, -0.12, 0.45, -0.45, 0.51], ['l', -6.33, 1.65], ['c', -3.39, 0.87, -6.18, 1.59, -6.21, 1.59], ['c', -0.21, 0.00, -0.48, -0.24, -0.51, -0.45], ['c', 0.00, -0.15, 0.06, -0.36, 0.18, -0.45], ['c', 0.09, -0.06, 0.87, -0.27, 3.84, -1.05], ['c', 2.04, -0.54, 3.84, -0.99, 4.02, -1.02], ['c', 0.15, -0.06, 1.14, -0.24, 2.22, -0.42], ['c', 1.05, -0.18, 1.92, -0.36, 1.92, -0.36], ['c', 0.00, 0.00, -0.87, -0.18, -1.92, -0.36], ['c', -1.08, -0.18, -2.07, -0.36, -2.22, -0.42], ['c', -0.18, -0.03, -1.98, -0.48, -4.02, -1.02], ['c', -2.97, -0.78, -3.75, -0.99, -3.84, -1.05], ['c', -0.12, -0.09, -0.18, -0.30, -0.18, -0.45], ['c', 0.03, -0.15, 0.15, -0.30, 0.30, -0.39], ['z']], w: 13.5, h: 7.5 },\n\t'scripts.staccato': { d: [['M', -0.36, -1.47], ['c', 0.93, -0.21, 1.86, 0.51, 1.86, 1.47], ['c', 0.00, 0.93, -0.87, 1.65, -1.80, 1.47], ['c', -0.54, -0.12, -1.02, -0.57, -1.14, -1.08], ['c', -0.21, -0.81, 0.27, -1.65, 1.08, -1.86], ['z']], w: 2.989, h: 3.004 },\n\t'scripts.tenuto': { d: [['M', -4.20, -0.48], ['l', 0.12, -0.06], ['l', 4.08, 0.00], ['l', 4.08, 0.00], ['l', 0.12, 0.06], ['c', 0.39, 0.21, 0.39, 0.75, 0.00, 0.96], ['l', -0.12, 0.06], ['l', -4.08, 0.00], ['l', -4.08, 0.00], ['l', -0.12, -0.06], ['c', -0.39, -0.21, -0.39, -0.75, 0.00, -0.96], ['z']], w: 8.985, h: 1.08 },\n\t'scripts.umarcato': { d: [['M', -0.15, -8.19], ['c', 0.15, -0.12, 0.36, -0.03, 0.45, 0.15], ['c', 0.21, 0.42, 3.45, 7.65, 3.45, 7.71], ['c', 0.00, 0.12, -0.12, 0.27, -0.21, 0.30], ['c', -0.03, 0.03, -0.51, 0.03, -1.14, 0.03], ['c', -1.05, 0.00, -1.08, 0.00, -1.17, -0.06], ['c', -0.09, -0.06, -0.24, -0.36, -1.17, -2.40], ['c', -0.57, -1.29, -1.05, -2.34, -1.08, -2.34], ['c', 0.00, -0.03, -0.51, 1.02, -1.08, 2.34], ['c', -0.93, 2.07, -1.08, 2.34, -1.14, 2.40], ['c', -0.06, 0.03, -0.15, 0.06, -0.18, 0.06], ['c', -0.15, 0.00, -0.33, -0.18, -0.33, -0.33], ['c', 0.00, -0.06, 3.24, -7.32, 3.45, -7.71], ['c', 0.03, -0.06, 0.09, -0.15, 0.15, -0.15], ['z']], w: 7.5, h: 8.245 },\n\t'scripts.dmarcato': { d: [['M', -3.57, 0.03], ['c', 0.03, 0.00, 0.57, -0.03, 1.17, -0.03], ['c', 1.05, 0.00, 1.08, 0.00, 1.17, 0.06], ['c', 0.09, 0.06, 0.24, 0.36, 1.17, 2.40], ['c', 0.57, 1.29, 1.05, 2.34, 1.08, 2.34], ['c', 0.00, 0.03, 0.51, -1.02, 1.08, -2.34], ['c', 0.93, -2.07, 1.08, -2.34, 1.14, -2.40], ['c', 0.06, -0.03, 0.15, -0.06, 0.18, -0.06], ['c', 0.15, 0.00, 0.33, 0.18, 0.33, 0.33], ['c', 0.00, 0.09, -3.45, 7.74, -3.54, 7.83], ['c', -0.12, 0.12, -0.30, 0.12, -0.42, 0.00], ['c', -0.09, -0.09, -3.54, -7.74, -3.54, -7.83], ['c', 0.00, -0.09, 0.12, -0.27, 0.18, -0.30], ['z']], w: 7.5, h: 8.25 },\n\t'scripts.stopped': { d: [['M', -0.27, -4.08], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 1.50], ['l', 0.00, 1.47], ['l', 1.47, 0.00], ['l', 1.50, 0.00], ['l', 0.15, 0.06], ['c', 0.15, 0.09, 0.21, 0.15, 0.30, 0.33], ['c', 0.09, 0.18, 0.09, 0.36, 0.00, 0.54], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.12, 0.06, -0.18, 0.06, -1.62, 0.06], ['l', -1.47, 0.00], ['l', 0.00, 1.47], ['l', 0.00, 1.47], ['l', -0.06, 0.15], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['l', -0.06, -0.15], ['l', 0.00, -1.47], ['l', 0.00, -1.47], ['l', -1.47, 0.00], ['c', -1.44, 0.00, -1.50, 0.00, -1.62, -0.06], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.09, -0.36, 0.00, -0.54], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['l', 0.15, -0.06], ['l', 1.47, 0.00], ['l', 1.47, 0.00], ['l', 0.00, -1.47], ['c', 0.00, -1.44, 0.00, -1.50, 0.06, -1.62], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z']], w: 8.295, h: 8.295 },\n\t'scripts.upbow': { d: [['M', -4.65, -15.54], ['c', 0.12, -0.09, 0.36, -0.06, 0.48, 0.03], ['c', 0.03, 0.03, 0.09, 0.09, 0.12, 0.15], ['c', 0.03, 0.06, 0.66, 2.13, 1.41, 4.62], ['c', 1.35, 4.41, 1.38, 4.56, 2.01, 6.96], ['l', 0.63, 2.46], ['l', 0.63, -2.46], ['c', 0.63, -2.40, 0.66, -2.55, 2.01, -6.96], ['c', 0.75, -2.49, 1.38, -4.56, 1.41, -4.62], ['c', 0.06, -0.15, 0.18, -0.21, 0.36, -0.24], ['c', 0.15, 0.00, 0.30, 0.06, 0.39, 0.18], ['c', 0.15, 0.21, 0.24, -0.18, -2.10, 7.56], ['c', -1.20, 3.96, -2.22, 7.32, -2.25, 7.41], ['c', 0.00, 0.12, -0.06, 0.27, -0.09, 0.30], ['c', -0.12, 0.21, -0.60, 0.21, -0.72, 0.00], ['c', -0.03, -0.03, -0.09, -0.18, -0.09, -0.30], ['c', -0.03, -0.09, -1.05, -3.45, -2.25, -7.41], ['c', -2.34, -7.74, -2.25, -7.35, -2.10, -7.56], ['c', 0.03, -0.03, 0.09, -0.09, 0.15, -0.12], ['z']], w: 9.73, h: 15.608 },\n\t'scripts.downbow': { d: [['M', -5.55, -9.93], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.46, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 4.77], ['c', 0.00, 5.28, 0.00, 4.89, -0.18, 5.01], ['c', -0.18, 0.12, -0.42, 0.06, -0.54, -0.12], ['c', -0.06, -0.09, -0.06, -0.18, -0.06, -2.97], ['l', 0.00, -2.85], ['l', -4.83, 0.00], ['l', -4.83, 0.00], ['l', 0.00, 2.85], ['c', 0.00, 2.79, 0.00, 2.88, -0.06, 2.97], ['c', -0.15, 0.24, -0.51, 0.24, -0.66, 0.00], ['c', -0.06, -0.09, -0.06, -0.21, -0.06, -4.89], ['l', 0.00, -4.77], ['z']], w: 11.22, h: 9.992 },\n\t'scripts.turn': { d: [['M', -4.77, -3.90], ['c', 0.36, -0.06, 1.05, -0.06, 1.44, 0.03], ['c', 0.78, 0.15, 1.50, 0.51, 2.34, 1.14], ['c', 0.60, 0.45, 1.05, 0.87, 2.22, 2.01], ['c', 1.11, 1.08, 1.62, 1.50, 2.22, 1.86], ['c', 0.60, 0.36, 1.32, 0.57, 1.92, 0.57], ['c', 0.90, 0.00, 1.71, -0.57, 1.89, -1.35], ['c', 0.24, -0.93, -0.39, -1.89, -1.35, -2.10], ['l', -0.15, -0.06], ['l', -0.09, 0.15], ['c', -0.03, 0.09, -0.15, 0.24, -0.24, 0.33], ['c', -0.72, 0.72, -2.04, 0.54, -2.49, -0.36], ['c', -0.48, -0.93, 0.03, -1.86, 1.17, -2.19], ['c', 0.30, -0.09, 1.02, -0.09, 1.35, 0.00], ['c', 0.99, 0.27, 1.74, 0.87, 2.25, 1.83], ['c', 0.69, 1.41, 0.63, 3.00, -0.21, 4.26], ['c', -0.21, 0.30, -0.69, 0.81, -0.99, 1.02], ['c', -0.30, 0.21, -0.84, 0.45, -1.17, 0.54], ['c', -1.23, 0.36, -2.49, 0.15, -3.72, -0.60], ['c', -0.75, -0.48, -1.41, -1.02, -2.85, -2.46], ['c', -1.11, -1.08, -1.62, -1.50, -2.22, -1.86], ['c', -0.60, -0.36, -1.32, -0.57, -1.92, -0.57], ['c', -0.90, 0.00, -1.71, 0.57, -1.89, 1.35], ['c', -0.24, 0.93, 0.39, 1.89, 1.35, 2.10], ['l', 0.15, 0.06], ['l', 0.09, -0.15], ['c', 0.03, -0.09, 0.15, -0.24, 0.24, -0.33], ['c', 0.72, -0.72, 2.04, -0.54, 2.49, 0.36], ['c', 0.48, 0.93, -0.03, 1.86, -1.17, 2.19], ['c', -0.30, 0.09, -1.02, 0.09, -1.35, 0.00], ['c', -0.99, -0.27, -1.74, -0.87, -2.25, -1.83], ['c', -0.69, -1.41, -0.63, -3.00, 0.21, -4.26], ['c', 0.21, -0.30, 0.69, -0.81, 0.99, -1.02], ['c', 0.48, -0.33, 1.11, -0.57, 1.74, -0.66], ['z']], w: 16.366, h: 7.893 },\n\t'scripts.trill': { d: [['M', -0.51, -16.02], ['c', 0.12, -0.09, 0.21, -0.18, 0.21, -0.18], ['l', -0.81, 4.02], ['l', -0.81, 4.02], ['c', 0.03, 0.00, 0.51, -0.27, 1.08, -0.60], ['c', 0.60, -0.30, 1.14, -0.63, 1.26, -0.66], ['c', 1.14, -0.54, 2.31, -0.60, 3.09, -0.18], ['c', 0.27, 0.15, 0.54, 0.36, 0.60, 0.51], ['l', 0.06, 0.12], ['l', 0.21, -0.21], ['c', 0.90, -0.81, 2.22, -0.99, 3.12, -0.42], ['c', 0.60, 0.42, 0.90, 1.14, 0.78, 2.07], ['c', -0.15, 1.29, -1.05, 2.31, -1.95, 2.25], ['c', -0.48, -0.03, -0.78, -0.30, -0.96, -0.81], ['c', -0.09, -0.27, -0.09, -0.90, -0.03, -1.20], ['c', 0.21, -0.75, 0.81, -1.23, 1.59, -1.32], ['l', 0.24, -0.03], ['l', -0.09, -0.12], ['c', -0.51, -0.66, -1.62, -0.63, -2.31, 0.03], ['c', -0.39, 0.42, -0.30, 0.09, -1.23, 4.77], ['l', -0.81, 4.14], ['c', -0.03, 0.00, -0.12, -0.03, -0.21, -0.09], ['c', -0.33, -0.15, -0.54, -0.18, -0.99, -0.18], ['c', -0.42, 0.00, -0.66, 0.03, -1.05, 0.18], ['c', -0.12, 0.06, -0.21, 0.09, -0.21, 0.09], ['c', 0.00, -0.03, 0.36, -1.86, 0.81, -4.11], ['c', 0.90, -4.47, 0.87, -4.26, 0.69, -4.53], ['c', -0.21, -0.36, -0.66, -0.51, -1.17, -0.36], ['c', -0.15, 0.06, -2.22, 1.14, -2.58, 1.38], ['c', -0.12, 0.09, -0.12, 0.09, -0.21, 0.60], ['l', -0.09, 0.51], ['l', 0.21, 0.24], ['c', 0.63, 0.75, 1.02, 1.47, 1.20, 2.19], ['c', 0.06, 0.27, 0.06, 0.36, 0.06, 0.81], ['c', 0.00, 0.42, 0.00, 0.54, -0.06, 0.78], ['c', -0.15, 0.54, -0.33, 0.93, -0.63, 1.35], ['c', -0.18, 0.24, -0.57, 0.63, -0.81, 0.78], ['c', -0.24, 0.15, -0.63, 0.36, -0.84, 0.42], ['c', -0.27, 0.06, -0.66, 0.06, -0.87, 0.03], ['c', -0.81, -0.18, -1.32, -1.05, -1.38, -2.46], ['c', -0.03, -0.60, 0.03, -0.99, 0.33, -2.46], ['c', 0.21, -1.08, 0.24, -1.32, 0.21, -1.29], ['c', -1.20, 0.48, -2.40, 0.75, -3.21, 0.72], ['c', -0.69, -0.06, -1.17, -0.30, -1.41, -0.72], ['c', -0.39, -0.75, -0.12, -1.80, 0.66, -2.46], ['c', 0.24, -0.18, 0.69, -0.42, 1.02, -0.51], ['c', 0.69, -0.18, 1.53, -0.15, 2.31, 0.09], ['c', 0.30, 0.09, 0.75, 0.30, 0.99, 0.45], ['c', 0.12, 0.09, 0.15, 0.09, 0.15, 0.03], ['c', 0.03, -0.03, 0.33, -1.59, 0.72, -3.45], ['c', 0.36, -1.86, 0.66, -3.42, 0.69, -3.45], ['c', 0.00, -0.03, 0.03, -0.03, 0.21, 0.03], ['c', 0.21, 0.06, 0.27, 0.06, 0.48, 0.06], ['c', 0.42, -0.03, 0.78, -0.18, 1.26, -0.48], ['c', 0.15, -0.12, 0.36, -0.27, 0.48, -0.39], ['z'], ['m', -5.73, 7.68], ['c', -0.27, -0.03, -0.96, -0.06, -1.20, -0.03], ['c', -0.81, 0.12, -1.35, 0.57, -1.50, 1.20], ['c', -0.18, 0.66, 0.12, 1.14, 0.75, 1.29], ['c', 0.66, 0.12, 1.92, -0.12, 3.18, -0.66], ['l', 0.33, -0.15], ['l', 0.09, -0.39], ['c', 0.06, -0.21, 0.09, -0.42, 0.09, -0.45], ['c', 0.00, -0.03, -0.45, -0.30, -0.75, -0.45], ['c', -0.27, -0.15, -0.66, -0.27, -0.99, -0.36], ['z'], ['m', 4.29, 3.63], ['c', -0.24, -0.39, -0.51, -0.75, -0.51, -0.69], ['c', -0.06, 0.12, -0.39, 1.92, -0.45, 2.28], ['c', -0.09, 0.54, -0.12, 1.14, -0.06, 1.38], ['c', 0.06, 0.42, 0.21, 0.60, 0.51, 0.57], ['c', 0.39, -0.06, 0.75, -0.48, 0.93, -1.14], ['c', 0.09, -0.33, 0.09, -1.05, 0.00, -1.38], ['c', -0.09, -0.39, -0.24, -0.69, -0.42, -1.02], ['z']], w: 17.963, h: 16.49 },\n\t'scripts.segno': { d: [['M', -3.72, -11.22], ['c', 0.78, -0.09, 1.59, 0.03, 2.31, 0.42], ['c', 1.20, 0.60, 2.01, 1.71, 2.31, 3.09], ['c', 0.09, 0.42, 0.09, 1.20, 0.03, 1.50], ['c', -0.15, 0.45, -0.39, 0.81, -0.66, 0.93], ['c', -0.33, 0.18, -0.84, 0.21, -1.23, 0.15], ['c', -0.81, -0.18, -1.32, -0.93, -1.26, -1.89], ['c', 0.03, -0.36, 0.09, -0.57, 0.24, -0.90], ['c', 0.15, -0.33, 0.45, -0.60, 0.72, -0.75], ['c', 0.12, -0.06, 0.18, -0.09, 0.18, -0.12], ['c', 0.00, -0.03, -0.03, -0.15, -0.09, -0.24], ['c', -0.18, -0.45, -0.54, -0.87, -0.96, -1.08], ['c', -1.11, -0.57, -2.34, -0.18, -2.88, 0.90], ['c', -0.24, 0.51, -0.33, 1.11, -0.24, 1.83], ['c', 0.27, 1.92, 1.50, 3.54, 3.93, 5.13], ['c', 0.48, 0.33, 1.26, 0.78, 1.29, 0.78], ['c', 0.03, 0.00, 1.35, -2.19, 2.94, -4.89], ['l', 2.88, -4.89], ['l', 0.84, 0.00], ['l', 0.87, 0.00], ['l', -0.03, 0.06], ['c', -0.15, 0.21, -6.15, 10.41, -6.15, 10.44], ['c', 0.00, 0.00, 0.21, 0.15, 0.48, 0.27], ['c', 2.61, 1.47, 4.35, 3.03, 5.13, 4.65], ['c', 1.14, 2.34, 0.51, 5.07, -1.44, 6.39], ['c', -0.66, 0.42, -1.32, 0.63, -2.13, 0.69], ['c', -2.01, 0.09, -3.81, -1.41, -4.26, -3.54], ['c', -0.09, -0.42, -0.09, -1.20, -0.03, -1.50], ['c', 0.15, -0.45, 0.39, -0.81, 0.66, -0.93], ['c', 0.33, -0.18, 0.84, -0.21, 1.23, -0.15], ['c', 0.81, 0.18, 1.32, 0.93, 1.26, 1.89], ['c', -0.03, 0.36, -0.09, 0.57, -0.24, 0.90], ['c', -0.15, 0.33, -0.45, 0.60, -0.72, 0.75], ['c', -0.12, 0.06, -0.18, 0.09, -0.18, 0.12], ['c', 0.00, 0.03, 0.03, 0.15, 0.09, 0.24], ['c', 0.18, 0.45, 0.54, 0.87, 0.96, 1.08], ['c', 1.11, 0.57, 2.34, 0.18, 2.88, -0.90], ['c', 0.24, -0.51, 0.33, -1.11, 0.24, -1.83], ['c', -0.27, -1.92, -1.50, -3.54, -3.93, -5.13], ['c', -0.48, -0.33, -1.26, -0.78, -1.29, -0.78], ['c', -0.03, 0.00, -1.35, 2.19, -2.91, 4.89], ['l', -2.88, 4.89], ['l', -0.87, 0.00], ['l', -0.87, 0.00], ['l', 0.03, -0.06], ['c', 0.15, -0.21, 6.15, -10.41, 6.15, -10.44], ['c', 0.00, 0.00, -0.21, -0.15, -0.48, -0.30], ['c', -2.61, -1.44, -4.35, -3.00, -5.13, -4.62], ['c', -0.90, -1.89, -0.72, -4.02, 0.48, -5.52], ['c', 0.69, -0.84, 1.68, -1.41, 2.73, -1.53], ['z'], ['m', 8.76, 9.09], ['c', 0.03, -0.03, 0.15, -0.03, 0.27, -0.03], ['c', 0.33, 0.03, 0.57, 0.18, 0.72, 0.48], ['c', 0.09, 0.18, 0.09, 0.57, 0.00, 0.75], ['c', -0.09, 0.18, -0.21, 0.30, -0.36, 0.39], ['c', -0.15, 0.06, -0.21, 0.06, -0.39, 0.06], ['c', -0.21, 0.00, -0.27, 0.00, -0.39, -0.06], ['c', -0.30, -0.15, -0.48, -0.45, -0.48, -0.75], ['c', 0.00, -0.39, 0.24, -0.72, 0.63, -0.84], ['z'], ['m', -10.53, 2.61], ['c', 0.03, -0.03, 0.15, -0.03, 0.27, -0.03], ['c', 0.33, 0.03, 0.57, 0.18, 0.72, 0.48], ['c', 0.09, 0.18, 0.09, 0.57, 0.00, 0.75], ['c', -0.09, 0.18, -0.21, 0.30, -0.36, 0.39], ['c', -0.15, 0.06, -0.21, 0.06, -0.39, 0.06], ['c', -0.21, 0.00, -0.27, 0.00, -0.39, -0.06], ['c', -0.30, -0.15, -0.48, -0.45, -0.48, -0.75], ['c', 0.00, -0.39, 0.24, -0.72, 0.63, -0.84], ['z']], w: 15, h: 22.504 },\n\t'scripts.coda': { d: [['M', -0.21, -10.47], ['c', 0.18, -0.12, 0.42, -0.06, 0.54, 0.12], ['c', 0.06, 0.09, 0.06, 0.18, 0.06, 1.50], ['l', 0.00, 1.38], ['l', 0.18, 0.00], ['c', 0.39, 0.06, 0.96, 0.24, 1.38, 0.48], ['c', 1.68, 0.93, 2.82, 3.24, 3.03, 6.12], ['c', 0.03, 0.24, 0.03, 0.45, 0.03, 0.45], ['c', 0.00, 0.03, 0.60, 0.03, 1.35, 0.03], ['c', 1.50, 0.00, 1.47, 0.00, 1.59, 0.18], ['c', 0.09, 0.12, 0.09, 0.30, 0.00, 0.42], ['c', -0.12, 0.18, -0.09, 0.18, -1.59, 0.18], ['c', -0.75, 0.00, -1.35, 0.00, -1.35, 0.03], ['c', 0.00, 0.00, 0.00, 0.21, -0.03, 0.42], ['c', -0.24, 3.15, -1.53, 5.58, -3.45, 6.36], ['c', -0.27, 0.12, -0.72, 0.24, -0.96, 0.27], ['l', -0.18, 0.00], ['l', 0.00, 1.38], ['c', 0.00, 1.32, 0.00, 1.41, -0.06, 1.50], ['c', -0.15, 0.24, -0.51, 0.24, -0.66, 0.00], ['c', -0.06, -0.09, -0.06, -0.18, -0.06, -1.50], ['l', 0.00, -1.38], ['l', -0.18, 0.00], ['c', -0.39, -0.06, -0.96, -0.24, -1.38, -0.48], ['c', -1.68, -0.93, -2.82, -3.24, -3.03, -6.15], ['c', -0.03, -0.21, -0.03, -0.42, -0.03, -0.42], ['c', 0.00, -0.03, -0.60, -0.03, -1.35, -0.03], ['c', -1.50, 0.00, -1.47, 0.00, -1.59, -0.18], ['c', -0.09, -0.12, -0.09, -0.30, 0.00, -0.42], ['c', 0.12, -0.18, 0.09, -0.18, 1.59, -0.18], ['c', 0.75, 0.00, 1.35, 0.00, 1.35, -0.03], ['c', 0.00, 0.00, 0.00, -0.21, 0.03, -0.45], ['c', 0.24, -3.12, 1.53, -5.55, 3.45, -6.33], ['c', 0.27, -0.12, 0.72, -0.24, 0.96, -0.27], ['l', 0.18, 0.00], ['l', 0.00, -1.38], ['c', 0.00, -1.53, 0.00, -1.50, 0.18, -1.62], ['z'], ['m', -0.18, 6.93], ['c', 0.00, -2.97, 0.00, -3.15, -0.06, -3.15], ['c', -0.09, 0.00, -0.51, 0.15, -0.66, 0.21], ['c', -0.87, 0.51, -1.38, 1.62, -1.56, 3.51], ['c', -0.06, 0.54, -0.12, 1.59, -0.12, 2.16], ['l', 0.00, 0.42], ['l', 1.20, 0.00], ['l', 1.20, 0.00], ['l', 0.00, -3.15], ['z'], ['m', 1.17, -3.06], ['c', -0.09, -0.03, -0.21, -0.06, -0.27, -0.09], ['l', -0.12, 0.00], ['l', 0.00, 3.15], ['l', 0.00, 3.15], ['l', 1.20, 0.00], ['l', 1.20, 0.00], ['l', 0.00, -0.81], ['c', -0.06, -2.40, -0.33, -3.69, -0.93, -4.59], ['c', -0.27, -0.39, -0.66, -0.69, -1.08, -0.81], ['z'], ['m', -1.17, 10.14], ['l', 0.00, -3.15], ['l', -1.20, 0.00], ['l', -1.20, 0.00], ['l', 0.00, 0.81], ['c', 0.03, 0.96, 0.06, 1.47, 0.15, 2.13], ['c', 0.24, 2.04, 0.96, 3.12, 2.13, 3.36], ['l', 0.12, 0.00], ['l', 0.00, -3.15], ['z'], ['m', 3.18, -2.34], ['l', 0.00, -0.81], ['l', -1.20, 0.00], ['l', -1.20, 0.00], ['l', 0.00, 3.15], ['l', 0.00, 3.15], ['l', 0.12, 0.00], ['c', 1.17, -0.24, 1.89, -1.32, 2.13, -3.36], ['c', 0.09, -0.66, 0.12, -1.17, 0.15, -2.13], ['z']], w: 16.035, h: 21.062 },\n\t'scripts.comma': { d: [['M', 1.14, -4.62], ['c', 0.30, -0.12, 0.69, -0.03, 0.93, 0.15], ['c', 0.12, 0.12, 0.36, 0.45, 0.51, 0.78], ['c', 0.90, 1.77, 0.54, 4.05, -1.08, 6.75], ['c', -0.36, 0.63, -0.87, 1.38, -0.96, 1.44], ['c', -0.18, 0.12, -0.42, 0.06, -0.54, -0.12], ['c', -0.09, -0.18, -0.09, -0.30, 0.12, -0.60], ['c', 0.96, -1.44, 1.44, -2.97, 1.38, -4.35], ['c', -0.06, -0.93, -0.30, -1.68, -0.78, -2.46], ['c', -0.27, -0.39, -0.33, -0.63, -0.24, -0.96], ['c', 0.09, -0.27, 0.36, -0.54, 0.66, -0.63], ['z']], w: 3.042, h: 9.237 },\n\t'scripts.roll': { d: [['M', 1.95, -6.00], ['c', 0.21, -0.09, 0.36, -0.09, 0.57, 0.00], ['c', 0.39, 0.15, 0.63, 0.39, 1.47, 1.35], ['c', 0.66, 0.75, 0.78, 0.87, 1.08, 1.05], ['c', 0.75, 0.45, 1.65, 0.42, 2.40, -0.06], ['c', 0.12, -0.09, 0.27, -0.27, 0.54, -0.60], ['c', 0.42, -0.54, 0.51, -0.63, 0.69, -0.63], ['c', 0.09, 0.00, 0.30, 0.12, 0.36, 0.21], ['c', 0.09, 0.12, 0.12, 0.30, 0.03, 0.42], ['c', -0.06, 0.12, -3.15, 3.90, -3.30, 4.08], ['c', -0.06, 0.06, -0.18, 0.12, -0.27, 0.18], ['c', -0.27, 0.12, -0.60, 0.06, -0.99, -0.27], ['c', -0.27, -0.21, -0.42, -0.39, -1.08, -1.14], ['c', -0.63, -0.72, -0.81, -0.90, -1.17, -1.08], ['c', -0.36, -0.18, -0.57, -0.21, -0.99, -0.21], ['c', -0.39, 0.00, -0.63, 0.03, -0.93, 0.18], ['c', -0.36, 0.15, -0.51, 0.27, -0.90, 0.81], ['c', -0.24, 0.27, -0.45, 0.51, -0.48, 0.54], ['c', -0.12, 0.09, -0.27, 0.06, -0.39, 0.00], ['c', -0.24, -0.15, -0.33, -0.39, -0.21, -0.60], ['c', 0.09, -0.12, 3.18, -3.87, 3.33, -4.02], ['c', 0.06, -0.06, 0.18, -0.15, 0.24, -0.21], ['z']], w: 10.817, h: 6.125 },\n\t'scripts.prall': { d: [['M', -4.38, -3.69], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['c', 0.03, 0.00, 0.57, -0.84, 1.23, -1.83], ['c', 1.14, -1.68, 1.23, -1.83, 1.35, -1.89], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['l', 0.48, -0.69], ['c', 0.51, -0.78, 0.54, -0.84, 0.69, -0.90], ['c', 0.42, -0.18, 0.87, 0.15, 0.81, 0.60], ['c', -0.03, 0.12, -0.30, 0.51, -1.50, 2.37], ['c', -1.38, 2.07, -1.50, 2.22, -1.62, 2.28], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['c', -0.03, 0.00, -0.57, 0.84, -1.23, 1.83], ['c', -1.14, 1.68, -1.23, 1.83, -1.35, 1.89], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['l', -0.48, 0.69], ['c', -0.51, 0.78, -0.54, 0.84, -0.69, 0.90], ['c', -0.42, 0.18, -0.87, -0.15, -0.81, -0.60], ['c', 0.03, -0.12, 0.30, -0.51, 1.50, -2.37], ['c', 1.38, -2.07, 1.50, -2.22, 1.62, -2.28], ['z']], w: 15.011, h: 7.5 },\n\t'scripts.arpeggio': { d: [['M', 1.5, 0], ['c', 1.5, 2, 1.5, 3, 1.5, 3], ['s', 0, 1, -2, 1.5], ['s', -0.5, 3, 1, 5.5], ['l', 1.5, 0], ['s', -1.75, -2, -1.9, -3.25], ['s', 2.15, -0.6, 2.95, -1.6], ['s', 0.45, -1, 0.5, -1.25], ['s', 0, -1, -2, -3.9], ['l', -1.5, 0], ['z']], w: 5, h: 10 },\n\t'scripts.mordent': { d: [['M', -0.21, -4.95], ['c', 0.27, -0.15, 0.63, 0.00, 0.75, 0.27], ['c', 0.06, 0.12, 0.06, 0.24, 0.06, 1.44], ['l', 0.00, 1.29], ['l', 0.57, -0.84], ['c', 0.51, -0.75, 0.57, -0.84, 0.69, -0.90], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['l', 0.48, -0.69], ['c', 0.51, -0.78, 0.54, -0.84, 0.69, -0.90], ['c', 0.42, -0.18, 0.87, 0.15, 0.81, 0.60], ['c', -0.03, 0.12, -0.30, 0.51, -1.50, 2.37], ['c', -1.38, 2.07, -1.50, 2.22, -1.62, 2.28], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.83, -1.89], ['c', -0.81, -0.99, -1.50, -1.80, -1.53, -1.86], ['c', -0.06, -0.03, -0.06, -0.03, -0.12, 0.03], ['c', -0.06, 0.06, -0.06, 0.15, -0.06, 2.28], ['c', 0.00, 1.95, 0.00, 2.25, -0.06, 2.34], ['c', -0.18, 0.45, -0.81, 0.48, -1.05, 0.03], ['c', -0.03, -0.06, -0.06, -0.24, -0.06, -1.41], ['l', 0.00, -1.35], ['l', -0.57, 0.84], ['c', -0.54, 0.78, -0.60, 0.87, -0.72, 0.93], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['l', -0.48, 0.69], ['c', -0.51, 0.78, -0.54, 0.84, -0.69, 0.90], ['c', -0.42, 0.18, -0.87, -0.15, -0.81, -0.60], ['c', 0.03, -0.12, 0.30, -0.51, 1.50, -2.37], ['c', 1.38, -2.07, 1.50, -2.22, 1.62, -2.28], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['c', 0.03, 0.00, 0.06, -0.06, 0.09, -0.09], ['c', 0.06, -0.12, 0.06, -0.15, 0.06, -2.28], ['c', 0.00, -1.92, 0.00, -2.22, 0.06, -2.31], ['c', 0.06, -0.15, 0.15, -0.24, 0.30, -0.30], ['z']], w: 15.011, h: 10.012 },\n\t'flags.u8th': { d: [['M', -0.42, 3.75], ['l', 0.00, -3.75], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.18], ['c', 0.00, 0.30, 0.06, 0.84, 0.12, 1.23], ['c', 0.24, 1.53, 0.90, 3.12, 2.13, 5.16], ['l', 0.99, 1.59], ['c', 0.87, 1.44, 1.38, 2.34, 1.77, 3.09], ['c', 0.81, 1.68, 1.20, 3.06, 1.26, 4.53], ['c', 0.03, 1.53, -0.21, 3.27, -0.75, 5.01], ['c', -0.21, 0.69, -0.51, 1.50, -0.60, 1.59], ['c', -0.09, 0.12, -0.27, 0.21, -0.42, 0.21], ['c', -0.15, 0.00, -0.42, -0.12, -0.51, -0.21], ['c', -0.15, -0.18, -0.18, -0.42, -0.09, -0.66], ['c', 0.15, -0.33, 0.45, -1.20, 0.57, -1.62], ['c', 0.42, -1.38, 0.60, -2.58, 0.60, -3.90], ['c', 0.00, -0.66, 0.00, -0.81, -0.06, -1.11], ['c', -0.39, -2.07, -1.80, -4.26, -4.59, -7.14], ['l', -0.42, -0.45], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -3.75], ['z']], w: 6.692, h: 22.59 },\n\t'flags.u16th': { d: [['M', -0.42, 7.50], ['l', 0.00, -7.50], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.39], ['c', 0.06, 1.08, 0.39, 2.19, 0.99, 3.39], ['c', 0.45, 0.90, 0.87, 1.59, 1.95, 3.12], ['c', 1.29, 1.86, 1.77, 2.64, 2.22, 3.57], ['c', 0.45, 0.93, 0.72, 1.80, 0.87, 2.64], ['c', 0.06, 0.51, 0.06, 1.50, 0.00, 1.92], ['c', -0.12, 0.60, -0.30, 1.20, -0.54, 1.71], ['l', -0.09, 0.24], ['l', 0.18, 0.45], ['c', 0.51, 1.20, 0.72, 2.22, 0.69, 3.42], ['c', -0.06, 1.53, -0.39, 3.03, -0.99, 4.53], ['c', -0.30, 0.75, -0.36, 0.81, -0.57, 0.90], ['c', -0.15, 0.09, -0.33, 0.06, -0.48, 0.00], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.12, -0.75], ['c', 0.66, -1.41, 1.02, -2.88, 1.08, -4.32], ['c', 0.00, -0.60, -0.03, -1.05, -0.18, -1.59], ['c', -0.30, -1.20, -0.99, -2.40, -2.25, -3.87], ['c', -0.42, -0.48, -1.53, -1.62, -2.19, -2.22], ['l', -0.45, -0.42], ['l', -0.03, 1.11], ['l', 0.00, 1.11], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -7.50], ['z'], ['m', 1.65, 0.09], ['c', -0.30, -0.30, -0.69, -0.72, -0.90, -0.87], ['l', -0.33, -0.33], ['l', 0.00, 0.15], ['c', 0.00, 0.30, 0.06, 0.81, 0.15, 1.26], ['c', 0.27, 1.29, 0.87, 2.61, 2.04, 4.29], ['c', 0.15, 0.24, 0.60, 0.87, 0.96, 1.38], ['l', 1.08, 1.53], ['l', 0.42, 0.63], ['c', 0.03, 0.00, 0.12, -0.36, 0.21, -0.72], ['c', 0.06, -0.33, 0.06, -1.20, 0.00, -1.62], ['c', -0.33, -1.71, -1.44, -3.48, -3.63, -5.70], ['z']], w: 6.693, h: 26.337 },\n\t'flags.u32nd': { d: [['M', -0.42, 11.25], ['l', 0.00, -11.25], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.36], ['c', 0.09, 1.68, 0.69, 3.27, 2.07, 5.46], ['l', 0.87, 1.35], ['c', 1.02, 1.62, 1.47, 2.37, 1.86, 3.18], ['c', 0.48, 1.02, 0.78, 1.92, 0.93, 2.88], ['c', 0.06, 0.48, 0.06, 1.50, 0.00, 1.89], ['c', -0.09, 0.42, -0.21, 0.87, -0.36, 1.26], ['l', -0.12, 0.30], ['l', 0.15, 0.39], ['c', 0.69, 1.56, 0.84, 2.88, 0.54, 4.38], ['c', -0.09, 0.45, -0.27, 1.08, -0.45, 1.47], ['l', -0.12, 0.24], ['l', 0.18, 0.36], ['c', 0.33, 0.72, 0.57, 1.56, 0.69, 2.34], ['c', 0.12, 1.02, -0.06, 2.52, -0.42, 3.84], ['c', -0.27, 0.93, -0.75, 2.13, -0.93, 2.31], ['c', -0.18, 0.15, -0.45, 0.18, -0.66, 0.09], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.06, -0.60], ['c', 0.21, -0.36, 0.42, -0.90, 0.57, -1.38], ['c', 0.51, -1.41, 0.69, -3.06, 0.48, -4.08], ['c', -0.15, -0.81, -0.57, -1.68, -1.20, -2.55], ['c', -0.72, -0.99, -1.83, -2.13, -3.30, -3.33], ['l', -0.48, -0.42], ['l', -0.03, 1.53], ['l', 0.00, 1.56], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -11.25], ['z'], ['m', 1.26, -3.96], ['c', -0.27, -0.30, -0.54, -0.60, -0.66, -0.72], ['l', -0.18, -0.21], ['l', 0.00, 0.42], ['c', 0.06, 0.87, 0.24, 1.74, 0.66, 2.67], ['c', 0.36, 0.87, 0.96, 1.86, 1.92, 3.18], ['c', 0.21, 0.33, 0.63, 0.87, 0.87, 1.23], ['c', 0.27, 0.39, 0.60, 0.84, 0.75, 1.08], ['l', 0.27, 0.39], ['l', 0.03, -0.12], ['c', 0.12, -0.45, 0.15, -1.05, 0.09, -1.59], ['c', -0.27, -1.86, -1.38, -3.78, -3.75, -6.33], ['z'], ['m', -0.27, 6.09], ['c', -0.27, -0.21, -0.48, -0.42, -0.51, -0.45], ['c', -0.06, -0.03, -0.06, -0.03, -0.06, 0.21], ['c', 0.00, 0.90, 0.30, 2.04, 0.81, 3.09], ['c', 0.48, 1.02, 0.96, 1.77, 2.37, 3.63], ['c', 0.60, 0.78, 1.05, 1.44, 1.29, 1.77], ['c', 0.06, 0.12, 0.15, 0.21, 0.15, 0.18], ['c', 0.03, -0.03, 0.18, -0.57, 0.24, -0.87], ['c', 0.06, -0.45, 0.06, -1.32, -0.03, -1.74], ['c', -0.09, -0.48, -0.24, -0.90, -0.51, -1.44], ['c', -0.66, -1.35, -1.83, -2.70, -3.75, -4.38], ['z']], w: 6.697, h: 32.145 },\n\t'flags.u64th': { d: [['M', -0.42, 15.00], ['l', 0.00, -15.00], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.36], ['c', 0.06, 1.20, 0.39, 2.37, 1.02, 3.66], ['c', 0.39, 0.81, 0.84, 1.56, 1.80, 3.09], ['c', 0.81, 1.26, 1.05, 1.68, 1.35, 2.22], ['c', 0.87, 1.50, 1.35, 2.79, 1.56, 4.08], ['c', 0.06, 0.54, 0.06, 1.56, -0.03, 2.04], ['c', -0.09, 0.48, -0.21, 0.99, -0.36, 1.35], ['l', -0.12, 0.27], ['l', 0.12, 0.27], ['c', 0.09, 0.15, 0.21, 0.45, 0.27, 0.66], ['c', 0.69, 1.89, 0.63, 3.66, -0.18, 5.46], ['l', -0.18, 0.39], ['l', 0.15, 0.33], ['c', 0.30, 0.66, 0.51, 1.44, 0.63, 2.10], ['c', 0.06, 0.48, 0.06, 1.35, 0.00, 1.71], ['c', -0.15, 0.57, -0.42, 1.20, -0.78, 1.68], ['l', -0.21, 0.27], ['l', 0.18, 0.33], ['c', 0.57, 1.05, 0.93, 2.13, 1.02, 3.18], ['c', 0.06, 0.72, 0.00, 1.83, -0.21, 2.79], ['c', -0.18, 1.02, -0.63, 2.34, -1.02, 3.09], ['c', -0.15, 0.33, -0.48, 0.45, -0.78, 0.30], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.03, -0.54], ['c', 0.75, -1.50, 1.23, -3.45, 1.17, -4.89], ['c', -0.06, -1.02, -0.42, -2.01, -1.17, -3.15], ['c', -0.48, -0.72, -1.02, -1.35, -1.89, -2.22], ['c', -0.57, -0.57, -1.56, -1.50, -1.92, -1.77], ['l', -0.12, -0.09], ['l', 0.00, 1.68], ['l', 0.00, 1.68], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -15.00], ['z'], ['m', 0.93, -8.07], ['c', -0.27, -0.30, -0.48, -0.54, -0.51, -0.54], ['c', 0.00, 0.00, 0.00, 0.69, 0.03, 1.02], ['c', 0.15, 1.47, 0.75, 2.94, 2.04, 4.83], ['l', 1.08, 1.53], ['c', 0.39, 0.57, 0.84, 1.20, 0.99, 1.44], ['c', 0.15, 0.24, 0.30, 0.45, 0.30, 0.45], ['c', 0.00, 0.00, 0.03, -0.09, 0.06, -0.21], ['c', 0.36, -1.59, -0.15, -3.33, -1.47, -5.40], ['c', -0.63, -0.93, -1.35, -1.83, -2.52, -3.12], ['z'], ['m', 0.06, 6.72], ['c', -0.24, -0.21, -0.48, -0.42, -0.51, -0.45], ['l', -0.06, -0.06], ['l', 0.00, 0.33], ['c', 0.00, 1.20, 0.30, 2.34, 0.93, 3.60], ['c', 0.45, 0.90, 0.96, 1.68, 2.25, 3.51], ['c', 0.39, 0.54, 0.84, 1.17, 1.02, 1.44], ['c', 0.21, 0.33, 0.33, 0.51, 0.33, 0.48], ['c', 0.06, -0.09, 0.21, -0.63, 0.30, -0.99], ['c', 0.06, -0.33, 0.06, -0.45, 0.06, -0.96], ['c', 0.00, -0.60, -0.03, -0.84, -0.18, -1.35], ['c', -0.30, -1.08, -1.02, -2.28, -2.13, -3.57], ['c', -0.39, -0.45, -1.44, -1.47, -2.01, -1.98], ['z'], ['m', 0.00, 6.72], ['c', -0.24, -0.21, -0.48, -0.39, -0.51, -0.42], ['l', -0.06, -0.06], ['l', 0.00, 0.33], ['c', 0.00, 1.41, 0.45, 2.82, 1.38, 4.35], ['c', 0.42, 0.72, 0.72, 1.14, 1.86, 2.73], ['c', 0.36, 0.45, 0.75, 0.99, 0.87, 1.20], ['c', 0.15, 0.21, 0.30, 0.36, 0.30, 0.36], ['c', 0.06, 0.00, 0.30, -0.48, 0.39, -0.75], ['c', 0.09, -0.36, 0.12, -0.63, 0.12, -1.05], ['c', -0.06, -1.05, -0.45, -2.04, -1.20, -3.18], ['c', -0.57, -0.87, -1.11, -1.53, -2.07, -2.49], ['c', -0.36, -0.33, -0.84, -0.78, -1.08, -1.02], ['z']], w: 6.682, h: 39.694 },\n\t'flags.d8th': { d: [['M', 5.67, -21.63], ['c', 0.24, -0.12, 0.54, -0.06, 0.69, 0.15], ['c', 0.06, 0.06, 0.21, 0.36, 0.39, 0.66], ['c', 0.84, 1.77, 1.26, 3.36, 1.32, 5.10], ['c', 0.03, 1.29, -0.21, 2.37, -0.81, 3.63], ['c', -0.60, 1.23, -1.26, 2.13, -3.21, 4.38], ['c', -1.35, 1.53, -1.86, 2.19, -2.40, 2.97], ['c', -0.63, 0.93, -1.11, 1.92, -1.38, 2.79], ['c', -0.15, 0.54, -0.27, 1.35, -0.27, 1.80], ['l', 0.00, 0.15], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -3.75], ['l', 0.00, -3.75], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.48, -0.30], ['c', 1.83, -1.11, 3.12, -2.10, 4.17, -3.12], ['c', 0.78, -0.81, 1.32, -1.53, 1.71, -2.31], ['c', 0.45, -0.93, 0.60, -1.74, 0.51, -2.88], ['c', -0.12, -1.56, -0.63, -3.18, -1.47, -4.68], ['c', -0.12, -0.21, -0.15, -0.33, -0.06, -0.51], ['c', 0.06, -0.15, 0.15, -0.24, 0.33, -0.33], ['z']], w: 8.492, h: 21.691 },\n\t'flags.ugrace': { d: [['M', 6.03, 6.93], ['c', 0.15, -0.09, 0.33, -0.06, 0.51, 0.00], ['c', 0.15, 0.09, 0.21, 0.15, 0.30, 0.33], ['c', 0.09, 0.18, 0.06, 0.39, -0.03, 0.54], ['c', -0.06, 0.15, -10.89, 8.88, -11.07, 8.97], ['c', -0.15, 0.09, -0.33, 0.06, -0.48, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.39, 0.03, -0.54], ['c', 0.06, -0.15, 10.89, -8.88, 11.07, -8.97], ['z']], w: 12.019, h: 9.954 },\n\t'flags.dgrace': { d: [['M', -6.06, -15.93], ['c', 0.18, -0.09, 0.33, -0.12, 0.48, -0.06], ['c', 0.18, 0.09, 14.01, 8.04, 14.10, 8.10], ['c', 0.12, 0.12, 0.18, 0.33, 0.18, 0.51], ['c', -0.03, 0.21, -0.15, 0.39, -0.36, 0.48], ['c', -0.18, 0.09, -0.33, 0.12, -0.48, 0.06], ['c', -0.18, -0.09, -14.01, -8.04, -14.10, -8.10], ['c', -0.12, -0.12, -0.18, -0.33, -0.18, -0.51], ['c', 0.03, -0.21, 0.15, -0.39, 0.36, -0.48], ['z']], w: 15.12, h: 9.212 },\n\t'flags.d16th': { d: [['M', 6.84, -22.53], ['c', 0.27, -0.12, 0.57, -0.06, 0.72, 0.15], ['c', 0.15, 0.15, 0.33, 0.87, 0.45, 1.56], ['c', 0.06, 0.33, 0.06, 1.35, 0.00, 1.65], ['c', -0.06, 0.33, -0.15, 0.78, -0.27, 1.11], ['c', -0.12, 0.33, -0.45, 0.96, -0.66, 1.32], ['l', -0.18, 0.27], ['l', 0.09, 0.18], ['c', 0.48, 1.02, 0.72, 2.25, 0.69, 3.30], ['c', -0.06, 1.23, -0.42, 2.28, -1.26, 3.45], ['c', -0.57, 0.87, -0.99, 1.32, -3.00, 3.39], ['c', -1.56, 1.56, -2.22, 2.40, -2.76, 3.45], ['c', -0.42, 0.84, -0.66, 1.80, -0.66, 2.55], ['l', 0.00, 0.15], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -7.50], ['l', 0.00, -7.50], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.14], ['l', 0.00, 1.11], ['l', 0.27, -0.15], ['c', 1.11, -0.57, 1.77, -0.99, 2.52, -1.47], ['c', 2.37, -1.56, 3.69, -3.15, 4.05, -4.83], ['c', 0.03, -0.18, 0.03, -0.39, 0.03, -0.78], ['c', 0.00, -0.60, -0.03, -0.93, -0.24, -1.50], ['c', -0.06, -0.18, -0.12, -0.39, -0.15, -0.45], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.63, 7.50], ['c', -0.06, -0.18, -0.15, -0.36, -0.15, -0.36], ['c', -0.03, 0.00, -0.03, 0.03, -0.06, 0.06], ['c', -0.06, 0.12, -0.96, 1.02, -1.95, 1.98], ['c', -0.63, 0.57, -1.26, 1.17, -1.44, 1.35], ['c', -1.53, 1.62, -2.28, 2.85, -2.55, 4.32], ['c', -0.03, 0.18, -0.03, 0.54, -0.06, 0.99], ['l', 0.00, 0.69], ['l', 0.18, -0.09], ['c', 0.93, -0.54, 2.10, -1.29, 2.82, -1.83], ['c', 0.69, -0.51, 1.02, -0.81, 1.53, -1.29], ['c', 1.86, -1.89, 2.37, -3.66, 1.68, -5.82], ['z']], w: 8.475, h: 22.591 },\n\t'flags.d32nd': { d: [['M', 6.84, -29.13], ['c', 0.27, -0.12, 0.57, -0.06, 0.72, 0.15], ['c', 0.12, 0.12, 0.27, 0.63, 0.36, 1.11], ['c', 0.33, 1.59, 0.06, 3.06, -0.81, 4.47], ['l', -0.18, 0.27], ['l', 0.09, 0.15], ['c', 0.12, 0.24, 0.33, 0.69, 0.45, 1.05], ['c', 0.63, 1.83, 0.45, 3.57, -0.57, 5.22], ['l', -0.18, 0.30], ['l', 0.15, 0.27], ['c', 0.42, 0.87, 0.60, 1.71, 0.57, 2.61], ['c', -0.06, 1.29, -0.48, 2.46, -1.35, 3.78], ['c', -0.54, 0.81, -0.93, 1.29, -2.46, 3.00], ['c', -0.51, 0.54, -1.05, 1.17, -1.26, 1.41], ['c', -1.56, 1.86, -2.25, 3.36, -2.37, 5.01], ['l', 0.00, 0.33], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -11.25], ['l', 0.00, -11.25], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.35], ['l', 0.03, 1.35], ['l', 0.78, -0.39], ['c', 1.38, -0.69, 2.34, -1.26, 3.24, -1.92], ['c', 1.38, -1.02, 2.28, -2.13, 2.64, -3.21], ['c', 0.15, -0.48, 0.18, -0.72, 0.18, -1.29], ['c', 0.00, -0.57, -0.06, -0.90, -0.24, -1.47], ['c', -0.06, -0.18, -0.12, -0.39, -0.15, -0.45], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.63, 7.20], ['c', -0.09, -0.18, -0.12, -0.21, -0.12, -0.15], ['c', -0.03, 0.09, -1.02, 1.08, -2.04, 2.04], ['c', -1.17, 1.08, -1.65, 1.56, -2.07, 2.04], ['c', -0.84, 0.96, -1.38, 1.86, -1.68, 2.76], ['c', -0.21, 0.57, -0.27, 0.99, -0.30, 1.65], ['l', 0.00, 0.54], ['l', 0.66, -0.33], ['c', 3.57, -1.86, 5.49, -3.69, 5.94, -5.70], ['c', 0.06, -0.39, 0.06, -1.20, -0.03, -1.65], ['c', -0.06, -0.39, -0.24, -0.90, -0.36, -1.20], ['z'], ['m', -0.06, 7.20], ['c', -0.06, -0.15, -0.12, -0.33, -0.15, -0.45], ['l', -0.06, -0.18], ['l', -0.18, 0.21], ['l', -1.83, 1.83], ['c', -0.87, 0.90, -1.77, 1.80, -1.95, 2.01], ['c', -1.08, 1.29, -1.62, 2.31, -1.89, 3.51], ['c', -0.06, 0.30, -0.06, 0.51, -0.09, 0.93], ['l', 0.00, 0.57], ['l', 0.09, -0.06], ['c', 0.75, -0.45, 1.89, -1.26, 2.52, -1.74], ['c', 0.81, -0.66, 1.74, -1.53, 2.22, -2.16], ['c', 1.26, -1.53, 1.68, -3.06, 1.32, -4.47], ['z']], w: 8.385, h: 29.191 },\n\t'flags.d64th': { d: [['M', 7.08, -32.88], ['c', 0.30, -0.12, 0.66, -0.03, 0.78, 0.24], ['c', 0.18, 0.33, 0.27, 2.10, 0.15, 2.64], ['c', -0.09, 0.39, -0.21, 0.78, -0.39, 1.08], ['l', -0.15, 0.30], ['l', 0.09, 0.27], ['c', 0.03, 0.12, 0.09, 0.45, 0.12, 0.69], ['c', 0.27, 1.44, 0.18, 2.55, -0.30, 3.60], ['l', -0.12, 0.33], ['l', 0.06, 0.42], ['c', 0.27, 1.35, 0.33, 2.82, 0.21, 3.63], ['c', -0.12, 0.60, -0.30, 1.23, -0.57, 1.80], ['l', -0.15, 0.27], ['l', 0.03, 0.42], ['c', 0.06, 1.02, 0.06, 2.70, 0.03, 3.06], ['c', -0.15, 1.47, -0.66, 2.76, -1.74, 4.41], ['c', -0.45, 0.69, -0.75, 1.11, -1.74, 2.37], ['c', -1.05, 1.38, -1.50, 1.98, -1.95, 2.73], ['c', -0.93, 1.50, -1.38, 2.82, -1.44, 4.20], ['l', 0.00, 0.42], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -15.00], ['l', 0.00, -15.00], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.86], ['l', 0.00, 1.89], ['c', 0.00, 0.00, 0.21, -0.03, 0.45, -0.09], ['c', 2.22, -0.39, 4.08, -1.11, 5.19, -2.01], ['c', 0.63, -0.54, 1.02, -1.14, 1.20, -1.80], ['c', 0.06, -0.30, 0.06, -1.14, -0.03, -1.65], ['c', -0.03, -0.18, -0.06, -0.39, -0.09, -0.48], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.45, 6.15], ['c', -0.03, -0.18, -0.06, -0.42, -0.06, -0.54], ['l', -0.03, -0.18], ['l', -0.33, 0.30], ['c', -0.42, 0.36, -0.87, 0.72, -1.68, 1.29], ['c', -1.98, 1.38, -2.25, 1.59, -2.85, 2.16], ['c', -0.75, 0.69, -1.23, 1.44, -1.47, 2.19], ['c', -0.15, 0.45, -0.18, 0.63, -0.21, 1.35], ['l', 0.00, 0.66], ['l', 0.39, -0.18], ['c', 1.83, -0.90, 3.45, -1.95, 4.47, -2.91], ['c', 0.93, -0.90, 1.53, -1.83, 1.74, -2.82], ['c', 0.06, -0.33, 0.06, -0.87, 0.03, -1.32], ['z'], ['m', -0.27, 4.86], ['c', -0.03, -0.21, -0.06, -0.36, -0.06, -0.36], ['c', 0.00, -0.03, -0.12, 0.09, -0.24, 0.24], ['c', -0.39, 0.48, -0.99, 1.08, -2.16, 2.19], ['c', -1.47, 1.38, -1.92, 1.83, -2.46, 2.49], ['c', -0.66, 0.87, -1.08, 1.74, -1.29, 2.58], ['c', -0.09, 0.42, -0.15, 0.87, -0.15, 1.44], ['l', 0.00, 0.54], ['l', 0.48, -0.33], ['c', 1.50, -1.02, 2.58, -1.89, 3.51, -2.82], ['c', 1.47, -1.47, 2.25, -2.85, 2.40, -4.26], ['c', 0.03, -0.39, 0.03, -1.17, -0.03, -1.71], ['z'], ['m', -0.66, 7.68], ['c', 0.03, -0.15, 0.03, -0.60, 0.03, -0.99], ['l', 0.00, -0.72], ['l', -0.27, 0.33], ['l', -1.74, 1.98], ['c', -1.77, 1.92, -2.43, 2.76, -2.97, 3.90], ['c', -0.51, 1.02, -0.72, 1.77, -0.75, 2.91], ['c', 0.00, 0.63, 0.00, 0.63, 0.06, 0.60], ['c', 0.03, -0.03, 0.30, -0.27, 0.63, -0.54], ['c', 0.66, -0.60, 1.86, -1.80, 2.31, -2.31], ['c', 1.65, -1.89, 2.52, -3.54, 2.70, -5.16], ['z']], w: 8.485, h: 32.932 },\n\t'clefs.C': { d: [['M', 0.06, -14.94], ['l', 0.09, -0.06], ['l', 1.92, 0.00], ['l', 1.92, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 14.85], ['l', 0.00, 14.82], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.92, 0.00], ['l', -1.92, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -14.82], ['l', 0.00, -14.85], ['z'], ['m', 5.37, 0.00], ['c', 0.09, -0.06, 0.09, -0.06, 0.57, -0.06], ['c', 0.45, 0.00, 0.45, 0.00, 0.54, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.14], ['l', 0.00, 7.11], ['l', 0.09, -0.06], ['c', 0.18, -0.18, 0.72, -0.84, 0.96, -1.20], ['c', 0.30, -0.45, 0.66, -1.17, 0.84, -1.65], ['c', 0.36, -0.90, 0.57, -1.83, 0.60, -2.79], ['c', 0.03, -0.48, 0.03, -0.54, 0.09, -0.63], ['c', 0.12, -0.18, 0.36, -0.21, 0.54, -0.12], ['c', 0.18, 0.09, 0.21, 0.15, 0.24, 0.66], ['c', 0.06, 0.87, 0.21, 1.56, 0.57, 2.22], ['c', 0.51, 1.02, 1.26, 1.68, 2.22, 1.92], ['c', 0.21, 0.06, 0.33, 0.06, 0.78, 0.06], ['c', 0.45, 0.00, 0.57, 0.00, 0.84, -0.06], ['c', 0.45, -0.12, 0.81, -0.33, 1.08, -0.60], ['c', 0.57, -0.57, 0.87, -1.41, 0.99, -2.88], ['c', 0.06, -0.54, 0.06, -3.00, 0.00, -3.57], ['c', -0.21, -2.58, -0.84, -3.87, -2.16, -4.50], ['c', -0.48, -0.21, -1.17, -0.36, -1.77, -0.36], ['c', -0.69, 0.00, -1.29, 0.27, -1.50, 0.72], ['c', -0.06, 0.15, -0.06, 0.21, -0.06, 0.42], ['c', 0.00, 0.24, 0.00, 0.30, 0.06, 0.45], ['c', 0.12, 0.24, 0.24, 0.39, 0.63, 0.66], ['c', 0.42, 0.30, 0.57, 0.48, 0.69, 0.72], ['c', 0.06, 0.15, 0.06, 0.21, 0.06, 0.48], ['c', 0.00, 0.39, -0.03, 0.63, -0.21, 0.96], ['c', -0.30, 0.60, -0.87, 1.08, -1.50, 1.26], ['c', -0.27, 0.06, -0.87, 0.06, -1.14, 0.00], ['c', -0.78, -0.24, -1.44, -0.87, -1.65, -1.68], ['c', -0.12, -0.42, -0.09, -1.17, 0.09, -1.71], ['c', 0.51, -1.65, 1.98, -2.82, 3.81, -3.09], ['c', 0.84, -0.09, 2.46, 0.03, 3.51, 0.27], ['c', 2.22, 0.57, 3.69, 1.80, 4.44, 3.75], ['c', 0.36, 0.93, 0.57, 2.13, 0.57, 3.36], ['c', 0.00, 1.44, -0.48, 2.73, -1.38, 3.81], ['c', -1.26, 1.50, -3.27, 2.43, -5.28, 2.43], ['c', -0.48, 0.00, -0.51, 0.00, -0.75, -0.09], ['c', -0.15, -0.03, -0.48, -0.21, -0.78, -0.36], ['c', -0.69, -0.36, -0.87, -0.42, -1.26, -0.42], ['c', -0.27, 0.00, -0.30, 0.00, -0.51, 0.09], ['c', -0.57, 0.30, -0.81, 0.90, -0.81, 2.10], ['c', 0.00, 1.23, 0.24, 1.83, 0.81, 2.13], ['c', 0.21, 0.09, 0.24, 0.09, 0.51, 0.09], ['c', 0.39, 0.00, 0.57, -0.06, 1.26, -0.42], ['c', 0.30, -0.15, 0.63, -0.33, 0.78, -0.36], ['c', 0.24, -0.09, 0.27, -0.09, 0.75, -0.09], ['c', 2.01, 0.00, 4.02, 0.93, 5.28, 2.40], ['c', 0.90, 1.11, 1.38, 2.40, 1.38, 3.84], ['c', 0.00, 1.50, -0.30, 2.88, -0.84, 3.96], ['c', -0.78, 1.59, -2.19, 2.64, -4.17, 3.15], ['c', -1.05, 0.24, -2.67, 0.36, -3.51, 0.27], ['c', -1.83, -0.27, -3.30, -1.44, -3.81, -3.09], ['c', -0.18, -0.54, -0.21, -1.29, -0.09, -1.74], ['c', 0.15, -0.60, 0.63, -1.20, 1.23, -1.47], ['c', 0.36, -0.18, 0.57, -0.21, 0.99, -0.21], ['c', 0.42, 0.00, 0.63, 0.03, 1.02, 0.21], ['c', 0.42, 0.21, 0.84, 0.63, 1.05, 1.05], ['c', 0.18, 0.36, 0.21, 0.60, 0.21, 0.96], ['c', 0.00, 0.30, 0.00, 0.36, -0.06, 0.51], ['c', -0.12, 0.24, -0.27, 0.42, -0.69, 0.72], ['c', -0.57, 0.42, -0.69, 0.63, -0.69, 1.08], ['c', 0.00, 0.24, 0.00, 0.30, 0.06, 0.45], ['c', 0.12, 0.21, 0.30, 0.39, 0.57, 0.54], ['c', 0.42, 0.18, 0.87, 0.21, 1.53, 0.15], ['c', 1.08, -0.15, 1.80, -0.57, 2.34, -1.32], ['c', 0.54, -0.75, 0.84, -1.83, 0.99, -3.51], ['c', 0.06, -0.57, 0.06, -3.03, 0.00, -3.57], ['c', -0.12, -1.47, -0.42, -2.31, -0.99, -2.88], ['c', -0.27, -0.27, -0.63, -0.48, -1.08, -0.60], ['c', -0.27, -0.06, -0.39, -0.06, -0.84, -0.06], ['c', -0.45, 0.00, -0.57, 0.00, -0.78, 0.06], ['c', -1.14, 0.27, -2.01, 1.17, -2.46, 2.49], ['c', -0.21, 0.57, -0.30, 0.99, -0.33, 1.65], ['c', -0.03, 0.51, -0.06, 0.57, -0.24, 0.66], ['c', -0.12, 0.06, -0.27, 0.06, -0.39, 0.00], ['c', -0.21, -0.09, -0.21, -0.15, -0.24, -0.75], ['c', -0.09, -1.92, -0.78, -3.72, -2.01, -5.19], ['c', -0.18, -0.21, -0.36, -0.42, -0.39, -0.45], ['l', -0.09, -0.06], ['l', 0.00, 7.11], ['l', 0.00, 7.14], ['l', -0.06, 0.09], ['c', -0.09, 0.06, -0.09, 0.06, -0.54, 0.06], ['c', -0.48, 0.00, -0.48, 0.00, -0.57, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -14.82], ['l', 0.00, -14.85], ['z']], w: 20.31, h: 29.97 },\n\t'clefs.F': { d: [['M', 6.30, -7.80], ['c', 0.36, -0.03, 1.65, 0.00, 2.13, 0.03], ['c', 3.60, 0.42, 6.03, 2.10, 6.93, 4.86], ['c', 0.27, 0.84, 0.36, 1.50, 0.36, 2.58], ['c', 0.00, 0.90, -0.03, 1.35, -0.18, 2.16], ['c', -0.78, 3.78, -3.54, 7.08, -8.37, 9.96], ['c', -1.74, 1.05, -3.87, 2.13, -6.18, 3.12], ['c', -0.39, 0.18, -0.75, 0.33, -0.81, 0.36], ['c', -0.06, 0.03, -0.15, 0.06, -0.18, 0.06], ['c', -0.15, 0.00, -0.33, -0.18, -0.33, -0.33], ['c', 0.00, -0.15, 0.06, -0.21, 0.51, -0.48], ['c', 3.00, -1.77, 5.13, -3.21, 6.84, -4.74], ['c', 0.51, -0.45, 1.59, -1.50, 1.95, -1.95], ['c', 1.89, -2.19, 2.88, -4.32, 3.15, -6.78], ['c', 0.06, -0.42, 0.06, -1.77, 0.00, -2.19], ['c', -0.24, -2.01, -0.93, -3.63, -2.04, -4.71], ['c', -0.63, -0.63, -1.29, -1.02, -2.07, -1.20], ['c', -1.62, -0.39, -3.36, 0.15, -4.56, 1.44], ['c', -0.54, 0.60, -1.05, 1.47, -1.32, 2.22], ['l', -0.09, 0.21], ['l', 0.24, -0.12], ['c', 0.39, -0.21, 0.63, -0.24, 1.11, -0.24], ['c', 0.30, 0.00, 0.45, 0.00, 0.66, 0.06], ['c', 1.92, 0.48, 2.85, 2.55, 1.95, 4.38], ['c', -0.45, 0.99, -1.41, 1.62, -2.46, 1.71], ['c', -1.47, 0.09, -2.91, -0.87, -3.39, -2.25], ['c', -0.18, -0.57, -0.21, -1.32, -0.03, -2.28], ['c', 0.39, -2.25, 1.83, -4.20, 3.81, -5.19], ['c', 0.69, -0.36, 1.59, -0.60, 2.37, -0.69], ['z'], ['m', 11.58, 2.52], ['c', 0.84, -0.21, 1.71, 0.30, 1.89, 1.14], ['c', 0.30, 1.17, -0.72, 2.19, -1.89, 1.89], ['c', -0.99, -0.21, -1.50, -1.32, -1.02, -2.25], ['c', 0.18, -0.39, 0.60, -0.69, 1.02, -0.78], ['z'], ['m', 0.00, 7.50], ['c', 0.84, -0.21, 1.71, 0.30, 1.89, 1.14], ['c', 0.21, 0.87, -0.30, 1.71, -1.14, 1.89], ['c', -0.87, 0.21, -1.71, -0.30, -1.89, -1.14], ['c', -0.21, -0.84, 0.30, -1.71, 1.14, -1.89], ['z']], w: 20.153, h: 23.142 },\n\t'clefs.G': { d: [['M', 9.69, -37.41], ['c', 0.09, -0.09, 0.24, -0.06, 0.36, 0.00], ['c', 0.12, 0.09, 0.57, 0.60, 0.96, 1.11], ['c', 1.77, 2.34, 3.21, 5.85, 3.57, 8.73], ['c', 0.21, 1.56, 0.03, 3.27, -0.45, 4.86], ['c', -0.69, 2.31, -1.92, 4.47, -4.23, 7.44], ['c', -0.30, 0.39, -0.57, 0.72, -0.60, 0.75], ['c', -0.03, 0.06, 0.00, 0.15, 0.18, 0.78], ['c', 0.54, 1.68, 1.38, 4.44, 1.68, 5.49], ['l', 0.09, 0.42], ['l', 0.39, 0.00], ['c', 1.47, 0.09, 2.76, 0.51, 3.96, 1.29], ['c', 1.83, 1.23, 3.06, 3.21, 3.39, 5.52], ['c', 0.09, 0.45, 0.12, 1.29, 0.06, 1.74], ['c', -0.09, 1.02, -0.33, 1.83, -0.75, 2.73], ['c', -0.84, 1.71, -2.28, 3.06, -4.02, 3.72], ['l', -0.33, 0.12], ['l', 0.03, 1.26], ['c', 0.00, 1.74, -0.06, 3.63, -0.21, 4.62], ['c', -0.45, 3.06, -2.19, 5.49, -4.47, 6.21], ['c', -0.57, 0.18, -0.90, 0.21, -1.59, 0.21], ['c', -0.69, 0.00, -1.02, -0.03, -1.65, -0.21], ['c', -1.14, -0.27, -2.13, -0.84, -2.94, -1.65], ['c', -0.99, -0.99, -1.56, -2.16, -1.71, -3.54], ['c', -0.09, -0.81, 0.06, -1.53, 0.45, -2.13], ['c', 0.63, -0.99, 1.83, -1.56, 3.00, -1.53], ['c', 1.50, 0.09, 2.64, 1.32, 2.73, 2.94], ['c', 0.06, 1.47, -0.93, 2.70, -2.37, 2.97], ['c', -0.45, 0.06, -0.84, 0.03, -1.29, -0.09], ['l', -0.21, -0.09], ['l', 0.09, 0.12], ['c', 0.39, 0.54, 0.78, 0.93, 1.32, 1.26], ['c', 1.35, 0.87, 3.06, 1.02, 4.35, 0.36], ['c', 1.44, -0.72, 2.52, -2.28, 2.97, -4.35], ['c', 0.15, -0.66, 0.24, -1.50, 0.30, -3.03], ['c', 0.03, -0.84, 0.03, -2.94, 0.00, -3.00], ['c', -0.03, 0.00, -0.18, 0.00, -0.36, 0.03], ['c', -0.66, 0.12, -0.99, 0.12, -1.83, 0.12], ['c', -1.05, 0.00, -1.71, -0.06, -2.61, -0.30], ['c', -4.02, -0.99, -7.11, -4.35, -7.80, -8.46], ['c', -0.12, -0.66, -0.12, -0.99, -0.12, -1.83], ['c', 0.00, -0.84, 0.00, -1.14, 0.15, -1.92], ['c', 0.36, -2.28, 1.41, -4.62, 3.30, -7.29], ['l', 2.79, -3.60], ['c', 0.54, -0.66, 0.96, -1.20, 0.96, -1.23], ['c', 0.00, -0.03, -0.09, -0.33, -0.18, -0.69], ['c', -0.96, -3.21, -1.41, -5.28, -1.59, -7.68], ['c', -0.12, -1.38, -0.15, -3.09, -0.06, -3.96], ['c', 0.33, -2.67, 1.38, -5.07, 3.12, -7.08], ['c', 0.36, -0.42, 0.99, -1.05, 1.17, -1.14], ['z'], ['m', 2.01, 4.71], ['c', -0.15, -0.30, -0.30, -0.54, -0.30, -0.54], ['c', -0.03, 0.00, -0.18, 0.09, -0.30, 0.21], ['c', -2.40, 1.74, -3.87, 4.20, -4.26, 7.11], ['c', -0.06, 0.54, -0.06, 1.41, -0.03, 1.89], ['c', 0.09, 1.29, 0.48, 3.12, 1.08, 5.22], ['c', 0.15, 0.42, 0.24, 0.78, 0.24, 0.81], ['c', 0.00, 0.03, 0.84, -1.11, 1.23, -1.68], ['c', 1.89, -2.73, 2.88, -5.07, 3.15, -7.53], ['c', 0.09, -0.57, 0.12, -1.74, 0.06, -2.37], ['c', -0.09, -1.23, -0.27, -1.92, -0.87, -3.12], ['z'], ['m', -2.94, 20.70], ['c', -0.21, -0.72, -0.39, -1.32, -0.42, -1.32], ['c', 0.00, 0.00, -1.20, 1.47, -1.86, 2.37], ['c', -2.79, 3.63, -4.02, 6.30, -4.35, 9.30], ['c', -0.03, 0.21, -0.03, 0.69, -0.03, 1.08], ['c', 0.00, 0.69, 0.00, 0.75, 0.06, 1.11], ['c', 0.12, 0.54, 0.27, 0.99, 0.51, 1.47], ['c', 0.69, 1.38, 1.83, 2.55, 3.42, 3.42], ['c', 0.96, 0.54, 2.07, 0.90, 3.21, 1.08], ['c', 0.78, 0.12, 2.04, 0.12, 2.94, -0.03], ['c', 0.51, -0.06, 0.45, -0.03, 0.42, -0.30], ['c', -0.24, -3.33, -0.72, -6.33, -1.62, -10.08], ['c', -0.09, -0.39, -0.18, -0.75, -0.18, -0.78], ['c', -0.03, -0.03, -0.42, 0.00, -0.81, 0.09], ['c', -0.90, 0.18, -1.65, 0.57, -2.22, 1.14], ['c', -0.72, 0.72, -1.08, 1.65, -1.05, 2.64], ['c', 0.06, 0.96, 0.48, 1.83, 1.23, 2.58], ['c', 0.36, 0.36, 0.72, 0.63, 1.17, 0.90], ['c', 0.33, 0.18, 0.36, 0.21, 0.42, 0.33], ['c', 0.18, 0.42, -0.18, 0.90, -0.60, 0.87], ['c', -0.18, -0.03, -0.84, -0.36, -1.26, -0.63], ['c', -0.78, -0.51, -1.38, -1.11, -1.86, -1.83], ['c', -1.77, -2.70, -0.99, -6.42, 1.71, -8.19], ['c', 0.30, -0.21, 0.81, -0.48, 1.17, -0.63], ['c', 0.30, -0.09, 1.02, -0.30, 1.14, -0.30], ['c', 0.06, 0.00, 0.09, 0.00, 0.09, -0.03], ['c', 0.03, -0.03, -0.51, -1.92, -1.23, -4.26], ['z'], ['m', 3.78, 7.41], ['c', -0.18, -0.03, -0.36, -0.06, -0.39, -0.06], ['c', -0.03, 0.00, 0.00, 0.21, 0.18, 1.02], ['c', 0.75, 3.18, 1.26, 6.30, 1.50, 9.09], ['c', 0.06, 0.72, 0.00, 0.69, 0.51, 0.42], ['c', 0.78, -0.36, 1.44, -0.96, 1.98, -1.77], ['c', 1.08, -1.62, 1.20, -3.69, 0.30, -5.55], ['c', -0.81, -1.62, -2.31, -2.79, -4.08, -3.15], ['z']], w: 19.051, h: 57.057 },\n\t'clefs.perc': { d: [['M', 5.07, -7.44], ['l', 0.09, -0.06], ['l', 1.53, 0.00], ['l', 1.53, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.35], ['l', 0.00, 7.32], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.53, 0.00], ['l', -1.53, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -7.32], ['l', 0.00, -7.35], ['z'], ['m', 6.63, 0.00], ['l', 0.09, -0.06], ['l', 1.53, 0.00], ['l', 1.53, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.35], ['l', 0.00, 7.32], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.53, 0.00], ['l', -1.53, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -7.32], ['l', 0.00, -7.35], ['z']], w: 21, h: 14.97 },\n\t'tab.big': { d: [['M', 20.16, -21.66], ['c', 0.24, -0.09, 0.66, 0.09, 0.78, 0.36], ['c', 0.09, 0.21, 0.09, 0.24, -0.18, 0.54], ['c', -0.78, 0.81, -1.86, 1.44, -2.94, 1.71], ['c', -0.87, 0.24, -1.71, 0.24, -2.55, 0.03], ['l', -0.06, -0.03], ['l', -0.18, 0.99], ['c', -0.33, 1.98, -0.75, 4.26, -0.96, 5.04], ['c', -0.42, 1.65, -1.26, 3.18, -2.28, 4.14], ['c', -0.57, 0.57, -1.17, 0.90, -1.86, 1.08], ['c', -0.18, 0.06, -0.33, 0.06, -0.66, 0.06], ['c', -0.54, 0.00, -0.78, -0.03, -1.23, -0.27], ['c', -0.39, -0.18, -0.66, -0.39, -1.38, -0.99], ['c', -0.30, -0.24, -0.66, -0.51, -0.75, -0.57], ['c', -0.21, -0.15, -0.27, -0.24, -0.24, -0.45], ['c', 0.06, -0.27, 0.36, -0.60, 0.60, -0.66], ['c', 0.18, -0.03, 0.33, 0.06, 0.90, 0.57], ['c', 0.48, 0.42, 0.72, 0.57, 0.93, 0.69], ['c', 0.66, 0.33, 1.38, 0.21, 1.95, -0.36], ['c', 0.63, -0.60, 1.05, -1.62, 1.23, -3.00], ['c', 0.03, -0.18, 0.09, -0.66, 0.09, -1.11], ['c', 0.09, -1.56, 0.33, -3.81, 0.57, -5.49], ['c', 0.06, -0.33, 0.09, -0.63, 0.09, -0.63], ['c', -0.03, -0.03, -0.81, -0.12, -1.02, -0.12], ['c', -0.57, 0.00, -1.32, 0.12, -1.80, 0.33], ['c', -0.87, 0.30, -1.35, 0.78, -1.50, 1.41], ['c', -0.18, 0.63, 0.09, 1.26, 0.66, 1.65], ['c', 0.12, 0.06, 0.15, 0.12, 0.18, 0.24], ['c', 0.09, 0.27, 0.06, 0.57, -0.09, 0.75], ['c', -0.03, 0.06, -0.12, 0.09, -0.27, 0.15], ['c', -0.72, 0.21, -1.44, 0.15, -2.10, -0.18], ['c', -0.54, -0.27, -0.96, -0.66, -1.20, -1.14], ['c', -0.39, -0.75, -0.33, -1.74, 0.15, -2.52], ['c', 0.27, -0.42, 0.84, -0.93, 1.41, -1.23], ['c', 1.17, -0.57, 2.88, -0.90, 4.80, -0.90], ['c', 0.69, 0.00, 0.78, 0.00, 1.08, 0.06], ['c', 0.45, 0.09, 1.11, 0.30, 2.07, 0.60], ['c', 1.47, 0.48, 1.83, 0.57, 2.55, 0.54], ['c', 1.02, -0.06, 2.04, -0.45, 2.94, -1.11], ['c', 0.12, -0.09, 0.24, -0.18, 0.27, -0.18], ['z'], ['m', -5.88, 13.05], ['c', 0.21, -0.03, 0.81, 0.00, 1.08, 0.06], ['c', 0.48, 0.12, 0.90, 0.42, 0.99, 0.69], ['c', 0.03, 0.09, 0.03, 0.15, 0.00, 0.27], ['c', 0.00, 0.09, -0.03, 0.57, -0.06, 1.08], ['c', -0.09, 2.19, -0.24, 5.76, -0.39, 8.28], ['c', -0.06, 1.53, -0.06, 1.77, 0.03, 2.01], ['c', 0.09, 0.18, 0.15, 0.24, 0.30, 0.30], ['c', 0.24, 0.12, 0.54, 0.06, 1.23, -0.27], ['c', 0.57, -0.27, 0.66, -0.30, 0.75, -0.24], ['c', 0.09, 0.06, 0.18, 0.30, 0.18, 0.45], ['c', 0.00, 0.33, -0.15, 0.51, -0.45, 0.63], ['c', -0.12, 0.03, -0.39, 0.15, -0.60, 0.27], ['c', -1.17, 0.60, -1.38, 0.69, -1.80, 0.72], ['c', -0.45, 0.03, -0.78, -0.09, -1.08, -0.39], ['c', -0.39, -0.42, -0.66, -1.20, -1.02, -3.12], ['c', -0.24, -1.23, -0.36, -2.07, -0.54, -3.75], ['l', 0.00, -0.18], ['l', -0.36, 0.45], ['c', -0.60, 0.75, -1.32, 1.59, -1.95, 2.25], ['c', -0.15, 0.18, -0.27, 0.30, -0.27, 0.33], ['c', 0.00, 0.00, 0.06, 0.09, 0.15, 0.18], ['c', 0.24, 0.33, 0.60, 0.57, 1.05, 0.69], ['c', 0.18, 0.06, 0.30, 0.06, 0.69, 0.06], ['l', 0.48, 0.03], ['l', 0.06, 0.12], ['c', 0.15, 0.27, 0.03, 0.72, -0.21, 0.90], ['c', -0.18, 0.12, -0.93, 0.27, -1.41, 0.27], ['c', -0.84, 0.00, -1.59, -0.30, -1.98, -0.84], ['l', -0.12, -0.15], ['l', -0.45, 0.42], ['c', -0.99, 0.87, -1.53, 1.32, -2.16, 1.74], ['c', -0.78, 0.51, -1.50, 0.84, -2.10, 0.93], ['c', -0.69, 0.12, -1.20, 0.03, -1.95, -0.42], ['c', -0.21, -0.12, -0.51, -0.27, -0.66, -0.36], ['c', -0.24, -0.12, -0.30, -0.18, -0.33, -0.24], ['c', -0.12, -0.27, 0.15, -0.78, 0.45, -0.93], ['c', 0.24, -0.12, 0.33, -0.09, 0.90, 0.18], ['c', 0.60, 0.30, 0.84, 0.39, 1.20, 0.36], ['c', 0.87, -0.09, 1.77, -0.69, 3.24, -2.31], ['c', 2.67, -2.85, 4.59, -5.94, 5.70, -9.15], ['c', 0.15, -0.45, 0.24, -0.63, 0.42, -0.81], ['c', 0.21, -0.24, 0.60, -0.45, 0.99, -0.51], ['z'], ['m', -3.99, 16.05], ['c', 0.18, 0.00, 0.69, -0.03, 1.17, 0.00], ['c', 3.27, 0.03, 5.37, 0.75, 6.00, 2.07], ['c', 0.45, 0.99, 0.12, 2.40, -0.81, 3.42], ['c', -0.24, 0.27, -0.57, 0.57, -0.84, 0.75], ['c', -0.09, 0.06, -0.18, 0.09, -0.18, 0.12], ['c', 0.00, 0.00, 0.18, 0.03, 0.42, 0.09], ['c', 1.23, 0.30, 2.01, 0.81, 2.37, 1.59], ['c', 0.27, 0.54, 0.30, 1.32, 0.09, 2.10], ['c', -0.12, 0.36, -0.45, 1.05, -0.69, 1.35], ['c', -0.87, 1.17, -2.10, 1.92, -3.54, 2.25], ['c', -0.36, 0.06, -0.48, 0.06, -0.96, 0.06], ['c', -0.45, 0.00, -0.66, 0.00, -0.84, -0.03], ['c', -0.84, -0.18, -1.47, -0.51, -2.07, -1.11], ['c', -0.33, -0.33, -0.45, -0.51, -0.45, -0.63], ['c', 0.00, -0.06, 0.03, -0.15, 0.06, -0.24], ['c', 0.18, -0.33, 0.69, -0.60, 0.93, -0.48], ['c', 0.03, 0.03, 0.15, 0.12, 0.27, 0.24], ['c', 0.39, 0.42, 0.99, 0.57, 1.62, 0.45], ['c', 1.05, -0.21, 1.98, -1.02, 2.31, -2.01], ['c', 0.48, -1.53, -0.48, -2.55, -2.58, -2.67], ['c', -0.21, 0.00, -0.36, -0.03, -0.42, -0.06], ['c', -0.15, -0.09, -0.21, -0.51, -0.06, -0.78], ['c', 0.12, -0.27, 0.24, -0.33, 0.60, -0.36], ['c', 0.57, -0.06, 1.11, -0.42, 1.50, -0.99], ['c', 0.48, -0.72, 0.54, -1.59, 0.18, -2.31], ['c', -0.12, -0.21, -0.45, -0.54, -0.69, -0.69], ['c', -0.33, -0.21, -0.93, -0.45, -1.35, -0.51], ['l', -0.12, -0.03], ['l', -0.06, 0.48], ['c', -0.54, 2.94, -1.14, 6.24, -1.29, 6.75], ['c', -0.33, 1.35, -0.93, 2.61, -1.65, 3.60], ['c', -0.30, 0.36, -0.81, 0.90, -1.14, 1.14], ['c', -0.30, 0.24, -0.84, 0.48, -1.14, 0.57], ['c', -0.33, 0.09, -0.96, 0.09, -1.26, 0.03], ['c', -0.45, -0.12, -0.87, -0.39, -1.53, -0.96], ['c', -0.24, -0.15, -0.51, -0.39, -0.63, -0.48], ['c', -0.30, -0.21, -0.33, -0.33, -0.21, -0.63], ['c', 0.12, -0.18, 0.27, -0.36, 0.42, -0.45], ['c', 0.27, -0.12, 0.36, -0.09, 0.87, 0.33], ['c', 0.78, 0.60, 1.08, 0.75, 1.65, 0.72], ['c', 0.45, -0.03, 0.81, -0.21, 1.17, -0.54], ['c', 0.87, -0.90, 1.38, -2.85, 1.38, -5.37], ['c', 0.00, -0.60, 0.03, -1.11, 0.12, -2.04], ['c', 0.06, -0.69, 0.24, -2.01, 0.33, -2.58], ['c', 0.06, -0.24, 0.06, -0.42, 0.06, -0.42], ['c', 0.00, 0.00, -0.12, 0.03, -0.21, 0.09], ['c', -1.44, 0.57, -2.16, 1.65, -1.74, 2.55], ['c', 0.09, 0.15, 0.18, 0.24, 0.27, 0.33], ['c', 0.24, 0.21, 0.30, 0.27, 0.33, 0.39], ['c', 0.06, 0.24, 0.00, 0.63, -0.15, 0.78], ['c', -0.09, 0.12, -0.54, 0.21, -0.96, 0.24], ['c', -1.02, 0.03, -2.01, -0.48, -2.43, -1.32], ['c', -0.21, -0.45, -0.27, -0.90, -0.15, -1.44], ['c', 0.06, -0.27, 0.21, -0.66, 0.39, -0.93], ['c', 0.87, -1.29, 3.00, -2.22, 5.64, -2.43], ['z']], w: 19.643, h: 43.325 },\n\t'tab.tiny': { d: [['M', 16.02, -17.25], ['c', 0.12, -0.09, 0.15, -0.09, 0.27, -0.09], ['c', 0.21, 0.03, 0.51, 0.30, 0.51, 0.45], ['c', 0.00, 0.06, -0.12, 0.18, -0.30, 0.36], ['c', -1.11, 1.08, -2.55, 1.59, -3.84, 1.41], ['c', -0.15, -0.03, -0.33, -0.06, -0.39, -0.09], ['c', -0.06, -0.03, -0.09, -0.03, -0.12, -0.03], ['c', 0.00, 0.00, -0.06, 0.42, -0.15, 0.93], ['c', -0.33, 2.01, -0.66, 3.69, -0.84, 4.26], ['c', -0.42, 1.41, -1.23, 2.67, -2.16, 3.33], ['c', -0.27, 0.18, -0.75, 0.42, -0.99, 0.48], ['c', -0.30, 0.09, -0.72, 0.09, -1.02, 0.06], ['c', -0.45, -0.09, -0.84, -0.33, -1.53, -0.90], ['c', -0.21, -0.18, -0.51, -0.39, -0.63, -0.48], ['c', -0.27, -0.21, -0.30, -0.24, -0.30, -0.36], ['c', 0.00, -0.12, 0.09, -0.36, 0.18, -0.45], ['c', 0.09, -0.09, 0.27, -0.18, 0.36, -0.18], ['c', 0.12, 0.00, 0.30, 0.12, 0.66, 0.45], ['c', 0.57, 0.51, 0.87, 0.69, 1.23, 0.72], ['c', 0.93, 0.06, 1.68, -0.78, 1.98, -2.37], ['c', 0.09, -0.39, 0.15, -0.75, 0.18, -1.53], ['c', 0.06, -0.99, 0.24, -2.79, 0.42, -4.05], ['c', 0.03, -0.30, 0.06, -0.57, 0.06, -0.60], ['c', 0.00, -0.06, -0.03, -0.09, -0.15, -0.12], ['c', -0.90, -0.18, -2.13, 0.06, -2.76, 0.57], ['c', -0.36, 0.30, -0.51, 0.60, -0.51, 1.02], ['c', 0.00, 0.45, 0.15, 0.75, 0.48, 0.99], ['c', 0.06, 0.06, 0.15, 0.18, 0.18, 0.24], ['c', 0.12, 0.24, 0.03, 0.63, -0.15, 0.69], ['c', -0.24, 0.12, -0.60, 0.15, -0.90, 0.15], ['c', -0.36, -0.03, -0.57, -0.09, -0.87, -0.24], ['c', -0.78, -0.36, -1.23, -1.11, -1.20, -1.92], ['c', 0.12, -1.53, 1.74, -2.49, 4.62, -2.70], ['c', 1.20, -0.09, 1.47, -0.03, 3.33, 0.57], ['c', 0.90, 0.30, 1.14, 0.36, 1.56, 0.39], ['c', 0.45, 0.00, 0.93, -0.06, 1.38, -0.21], ['c', 0.51, -0.18, 0.81, -0.33, 1.41, -0.75], ['z'], ['m', -4.68, 10.38], ['c', 0.39, -0.06, 0.84, 0.00, 1.20, 0.15], ['c', 0.24, 0.12, 0.36, 0.21, 0.45, 0.36], ['l', 0.09, 0.09], ['l', -0.06, 1.41], ['c', -0.09, 2.19, -0.18, 3.96, -0.27, 5.49], ['c', -0.03, 0.78, -0.06, 1.59, -0.06, 1.86], ['c', 0.00, 0.42, 0.00, 0.48, 0.06, 0.57], ['c', 0.06, 0.18, 0.18, 0.24, 0.36, 0.27], ['c', 0.18, 0.00, 0.39, -0.06, 0.84, -0.27], ['c', 0.45, -0.21, 0.54, -0.24, 0.63, -0.18], ['c', 0.12, 0.12, 0.15, 0.54, 0.03, 0.69], ['c', -0.03, 0.03, -0.15, 0.12, -0.27, 0.18], ['c', -0.15, 0.03, -0.30, 0.12, -0.36, 0.15], ['c', -0.87, 0.45, -1.02, 0.51, -1.26, 0.57], ['c', -0.33, 0.09, -0.60, 0.06, -0.84, -0.06], ['c', -0.42, -0.18, -0.63, -0.60, -0.87, -1.44], ['c', -0.30, -1.23, -0.57, -2.97, -0.66, -4.08], ['c', 0.00, -0.18, -0.03, -0.30, -0.03, -0.33], ['l', -0.06, 0.06], ['c', -0.18, 0.27, -1.11, 1.38, -1.68, 2.01], ['l', -0.33, 0.33], ['l', 0.06, 0.09], ['c', 0.06, 0.15, 0.27, 0.33, 0.48, 0.42], ['c', 0.27, 0.18, 0.51, 0.24, 0.96, 0.27], ['l', 0.39, 0.00], ['l', 0.03, 0.12], ['c', 0.12, 0.21, 0.03, 0.57, -0.15, 0.69], ['c', -0.03, 0.03, -0.21, 0.09, -0.36, 0.15], ['c', -0.27, 0.06, -0.39, 0.06, -0.75, 0.06], ['c', -0.48, 0.00, -0.75, -0.03, -1.08, -0.21], ['c', -0.21, -0.12, -0.51, -0.36, -0.57, -0.48], ['l', -0.03, -0.09], ['l', -0.39, 0.36], ['c', -1.47, 1.35, -2.49, 1.98, -3.42, 2.13], ['c', -0.54, 0.09, -0.96, -0.03, -1.62, -0.39], ['c', -0.21, -0.15, -0.45, -0.27, -0.54, -0.30], ['c', -0.18, -0.09, -0.21, -0.21, -0.12, -0.45], ['c', 0.06, -0.27, 0.33, -0.48, 0.54, -0.48], ['c', 0.03, 0.00, 0.27, 0.09, 0.48, 0.21], ['c', 0.48, 0.24, 0.69, 0.27, 0.99, 0.27], ['c', 0.60, -0.06, 1.17, -0.42, 2.10, -1.35], ['c', 2.22, -2.22, 4.02, -4.98, 4.95, -7.59], ['c', 0.21, -0.57, 0.30, -0.78, 0.48, -0.93], ['c', 0.15, -0.15, 0.42, -0.27, 0.66, -0.33], ['z'], ['m', -3.06, 12.84], ['c', 0.27, -0.03, 1.68, 0.00, 2.01, 0.03], ['c', 1.92, 0.18, 3.15, 0.69, 3.63, 1.50], ['c', 0.18, 0.33, 0.24, 0.51, 0.21, 0.93], ['c', 0.00, 0.45, -0.06, 0.72, -0.24, 1.11], ['c', -0.24, 0.51, -0.69, 1.02, -1.17, 1.35], ['c', -0.21, 0.15, -0.21, 0.15, -0.12, 0.18], ['c', 0.72, 0.15, 1.11, 0.30, 1.50, 0.57], ['c', 0.39, 0.24, 0.63, 0.57, 0.75, 0.96], ['c', 0.09, 0.30, 0.09, 0.96, 0.00, 1.29], ['c', -0.15, 0.57, -0.39, 1.05, -0.78, 1.50], ['c', -0.66, 0.75, -1.62, 1.32, -2.61, 1.53], ['c', -0.27, 0.06, -0.42, 0.06, -0.84, 0.06], ['c', -0.48, 0.00, -0.57, 0.00, -0.81, -0.06], ['c', -0.60, -0.18, -1.05, -0.42, -1.47, -0.81], ['c', -0.36, -0.39, -0.42, -0.51, -0.30, -0.75], ['c', 0.12, -0.21, 0.39, -0.39, 0.60, -0.39], ['c', 0.09, 0.00, 0.15, 0.03, 0.33, 0.18], ['c', 0.12, 0.12, 0.27, 0.24, 0.36, 0.27], ['c', 0.96, 0.48, 2.46, -0.33, 2.82, -1.50], ['c', 0.24, -0.81, -0.03, -1.44, -0.69, -1.77], ['c', -0.39, -0.21, -1.02, -0.33, -1.53, -0.33], ['c', -0.18, 0.00, -0.21, 0.00, -0.27, -0.09], ['c', -0.06, -0.09, -0.06, -0.30, -0.03, -0.48], ['c', 0.06, -0.18, 0.18, -0.36, 0.33, -0.36], ['c', 0.39, -0.06, 0.51, -0.09, 0.72, -0.18], ['c', 0.69, -0.36, 1.11, -1.23, 0.99, -2.01], ['c', -0.09, -0.51, -0.42, -0.90, -0.93, -1.17], ['c', -0.24, -0.12, -0.60, -0.27, -0.87, -0.30], ['c', -0.09, -0.03, -0.09, -0.03, -0.12, 0.12], ['c', 0.00, 0.09, -0.21, 1.11, -0.42, 2.25], ['c', -0.66, 3.75, -0.72, 3.99, -1.26, 5.07], ['c', -0.90, 1.89, -2.25, 2.85, -3.48, 2.61], ['c', -0.39, -0.09, -0.69, -0.27, -1.38, -0.84], ['c', -0.63, -0.51, -0.63, -0.48, -0.63, -0.60], ['c', 0.00, -0.18, 0.18, -0.48, 0.39, -0.57], ['c', 0.21, -0.12, 0.30, -0.09, 0.81, 0.33], ['c', 0.15, 0.15, 0.39, 0.30, 0.54, 0.36], ['c', 0.18, 0.12, 0.27, 0.12, 0.48, 0.15], ['c', 0.99, 0.06, 1.71, -0.78, 2.04, -2.46], ['c', 0.12, -0.66, 0.18, -1.14, 0.21, -2.22], ['c', 0.03, -1.23, 0.12, -2.25, 0.36, -3.63], ['c', 0.03, -0.24, 0.06, -0.45, 0.06, -0.48], ['c', -0.06, -0.03, -0.66, 0.27, -0.90, 0.42], ['c', -0.06, 0.06, -0.21, 0.18, -0.33, 0.30], ['c', -0.57, 0.57, -0.60, 1.35, -0.06, 1.74], ['c', 0.18, 0.12, 0.24, 0.24, 0.21, 0.51], ['c', -0.03, 0.30, -0.15, 0.42, -0.57, 0.48], ['c', -1.11, 0.24, -2.22, -0.42, -2.43, -1.38], ['c', -0.09, -0.45, 0.03, -1.02, 0.30, -1.47], ['c', 0.18, -0.24, 0.60, -0.63, 0.90, -0.84], ['c', 0.90, -0.60, 2.28, -1.02, 3.69, -1.11], ['z']], w: 15.709, h: 34.656 },\n\t'timesig.common': { d: [['M', 6.66, -7.83], ['c', 0.72, -0.06, 1.41, -0.03, 1.98, 0.09], ['c', 1.20, 0.27, 2.34, 0.96, 3.09, 1.92], ['c', 0.63, 0.81, 1.08, 1.86, 1.14, 2.73], ['c', 0.06, 1.02, -0.51, 1.92, -1.44, 2.22], ['c', -0.24, 0.09, -0.30, 0.09, -0.63, 0.09], ['c', -0.33, 0.00, -0.42, 0.00, -0.63, -0.06], ['c', -0.66, -0.24, -1.14, -0.63, -1.41, -1.20], ['c', -0.15, -0.30, -0.21, -0.51, -0.24, -0.90], ['c', -0.06, -1.08, 0.57, -2.04, 1.56, -2.37], ['c', 0.18, -0.06, 0.27, -0.06, 0.63, -0.06], ['l', 0.45, 0.00], ['c', 0.06, 0.03, 0.09, 0.03, 0.09, 0.00], ['c', 0.00, 0.00, -0.09, -0.12, -0.24, -0.27], ['c', -1.02, -1.11, -2.55, -1.68, -4.08, -1.50], ['c', -1.29, 0.15, -2.04, 0.69, -2.40, 1.74], ['c', -0.36, 0.93, -0.42, 1.89, -0.42, 5.37], ['c', 0.00, 2.97, 0.06, 3.96, 0.24, 4.77], ['c', 0.24, 1.08, 0.63, 1.68, 1.41, 2.07], ['c', 0.81, 0.39, 2.16, 0.45, 3.18, 0.09], ['c', 1.29, -0.45, 2.37, -1.53, 3.03, -2.97], ['c', 0.15, -0.33, 0.33, -0.87, 0.39, -1.17], ['c', 0.09, -0.24, 0.15, -0.36, 0.30, -0.39], ['c', 0.21, -0.03, 0.42, 0.15, 0.39, 0.36], ['c', -0.06, 0.39, -0.42, 1.38, -0.69, 1.89], ['c', -0.96, 1.80, -2.49, 2.94, -4.23, 3.18], ['c', -0.99, 0.12, -2.58, -0.06, -3.63, -0.45], ['c', -0.96, -0.36, -1.71, -0.84, -2.40, -1.50], ['c', -1.11, -1.11, -1.80, -2.61, -2.04, -4.56], ['c', -0.06, -0.60, -0.06, -2.01, 0.00, -2.61], ['c', 0.24, -1.95, 0.90, -3.45, 2.01, -4.56], ['c', 0.69, -0.66, 1.44, -1.11, 2.37, -1.47], ['c', 0.63, -0.24, 1.47, -0.42, 2.22, -0.48], ['z']], w: 13.038, h: 15.689 },\n\t'timesig.cut': { d: [['M', 6.24, -10.44], ['c', 0.09, -0.06, 0.09, -0.06, 0.48, -0.06], ['c', 0.36, 0.00, 0.36, 0.00, 0.45, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 1.23], ['l', 0.00, 1.26], ['l', 0.27, 0.00], ['c', 1.26, 0.00, 2.49, 0.45, 3.48, 1.29], ['c', 1.05, 0.87, 1.80, 2.28, 1.89, 3.48], ['c', 0.06, 1.02, -0.51, 1.92, -1.44, 2.22], ['c', -0.24, 0.09, -0.30, 0.09, -0.63, 0.09], ['c', -0.33, 0.00, -0.42, 0.00, -0.63, -0.06], ['c', -0.66, -0.24, -1.14, -0.63, -1.41, -1.20], ['c', -0.15, -0.30, -0.21, -0.51, -0.24, -0.90], ['c', -0.06, -1.08, 0.57, -2.04, 1.56, -2.37], ['c', 0.18, -0.06, 0.27, -0.06, 0.63, -0.06], ['l', 0.45, 0.00], ['c', 0.06, 0.03, 0.09, 0.03, 0.09, 0.00], ['c', 0.00, -0.03, -0.45, -0.51, -0.66, -0.69], ['c', -0.87, -0.69, -1.83, -1.05, -2.94, -1.11], ['l', -0.42, 0.00], ['l', 0.00, 7.17], ['l', 0.00, 7.14], ['l', 0.42, 0.00], ['c', 0.69, -0.03, 1.23, -0.18, 1.86, -0.51], ['c', 1.05, -0.51, 1.89, -1.47, 2.46, -2.70], ['c', 0.15, -0.33, 0.33, -0.87, 0.39, -1.17], ['c', 0.09, -0.24, 0.15, -0.36, 0.30, -0.39], ['c', 0.21, -0.03, 0.42, 0.15, 0.39, 0.36], ['c', -0.03, 0.24, -0.21, 0.78, -0.39, 1.20], ['c', -0.96, 2.37, -2.94, 3.90, -5.13, 3.90], ['l', -0.30, 0.00], ['l', 0.00, 1.26], ['l', 0.00, 1.23], ['l', -0.06, 0.09], ['c', -0.09, 0.06, -0.09, 0.06, -0.45, 0.06], ['c', -0.39, 0.00, -0.39, 0.00, -0.48, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -1.29], ['l', 0.00, -1.29], ['l', -0.21, -0.03], ['c', -1.23, -0.21, -2.31, -0.63, -3.21, -1.29], ['c', -0.15, -0.09, -0.45, -0.36, -0.66, -0.57], ['c', -1.11, -1.11, -1.80, -2.61, -2.04, -4.56], ['c', -0.06, -0.60, -0.06, -2.01, 0.00, -2.61], ['c', 0.24, -1.95, 0.93, -3.45, 2.04, -4.59], ['c', 0.42, -0.39, 0.78, -0.66, 1.26, -0.93], ['c', 0.75, -0.45, 1.65, -0.75, 2.61, -0.90], ['l', 0.21, -0.03], ['l', 0.00, -1.29], ['l', 0.00, -1.29], ['z'], ['m', -0.06, 10.44], ['c', 0.00, -5.58, 0.00, -6.99, -0.03, -6.99], ['c', -0.15, 0.00, -0.63, 0.27, -0.87, 0.45], ['c', -0.45, 0.36, -0.75, 0.93, -0.93, 1.77], ['c', -0.18, 0.81, -0.24, 1.80, -0.24, 4.74], ['c', 0.00, 2.97, 0.06, 3.96, 0.24, 4.77], ['c', 0.24, 1.08, 0.66, 1.68, 1.41, 2.07], ['c', 0.12, 0.06, 0.30, 0.12, 0.33, 0.15], ['l', 0.09, 0.00], ['l', 0.00, -6.96], ['z']], w: 13.038, h: 20.97 },\n\t'timesig.imperfectum': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.imperfectum2': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.perfectum': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.perfectum2': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'f': { d: [['M', 9.93, -14.28], ['c', 1.53, -0.18, 2.88, 0.45, 3.12, 1.50], ['c', 0.12, 0.51, 0.00, 1.32, -0.27, 1.86], ['c', -0.15, 0.30, -0.42, 0.57, -0.63, 0.69], ['c', -0.69, 0.36, -1.56, 0.03, -1.83, -0.69], ['c', -0.09, -0.24, -0.09, -0.69, 0.00, -0.87], ['c', 0.06, -0.12, 0.21, -0.24, 0.45, -0.42], ['c', 0.42, -0.24, 0.57, -0.45, 0.60, -0.72], ['c', 0.03, -0.33, -0.09, -0.39, -0.63, -0.42], ['c', -0.30, 0.00, -0.45, 0.00, -0.60, 0.03], ['c', -0.81, 0.21, -1.35, 0.93, -1.74, 2.46], ['c', -0.06, 0.27, -0.48, 2.25, -0.48, 2.31], ['c', 0.00, 0.03, 0.39, 0.03, 0.90, 0.03], ['c', 0.72, 0.00, 0.90, 0.00, 0.99, 0.06], ['c', 0.42, 0.15, 0.45, 0.72, 0.03, 0.90], ['c', -0.12, 0.06, -0.24, 0.06, -1.17, 0.06], ['l', -1.05, 0.00], ['l', -0.78, 2.55], ['c', -0.45, 1.41, -0.87, 2.79, -0.96, 3.06], ['c', -0.87, 2.37, -2.37, 4.74, -3.78, 5.91], ['c', -1.05, 0.90, -2.04, 1.23, -3.09, 1.08], ['c', -1.11, -0.18, -1.89, -0.78, -2.04, -1.59], ['c', -0.12, -0.66, 0.15, -1.71, 0.54, -2.19], ['c', 0.69, -0.75, 1.86, -0.54, 2.22, 0.39], ['c', 0.06, 0.15, 0.09, 0.27, 0.09, 0.48], ['c', 0.00, 0.24, -0.03, 0.27, -0.12, 0.42], ['c', -0.03, 0.09, -0.15, 0.18, -0.27, 0.27], ['c', -0.09, 0.06, -0.27, 0.21, -0.36, 0.27], ['c', -0.24, 0.18, -0.36, 0.36, -0.39, 0.60], ['c', -0.03, 0.33, 0.09, 0.39, 0.63, 0.42], ['c', 0.42, 0.00, 0.63, -0.03, 0.90, -0.15], ['c', 0.60, -0.30, 0.96, -0.96, 1.38, -2.64], ['c', 0.09, -0.42, 0.63, -2.55, 1.17, -4.77], ['l', 1.02, -4.08], ['c', 0.00, -0.03, -0.36, -0.03, -0.81, -0.03], ['c', -0.72, 0.00, -0.81, 0.00, -0.93, -0.06], ['c', -0.42, -0.18, -0.39, -0.75, 0.03, -0.90], ['c', 0.09, -0.06, 0.27, -0.06, 1.05, -0.06], ['l', 0.96, 0.00], ['l', 0.00, -0.09], ['c', 0.06, -0.18, 0.30, -0.72, 0.51, -1.17], ['c', 1.20, -2.46, 3.30, -4.23, 5.34, -4.50], ['z']], w: 16.155, h: 19.445 },\n\t'm': { d: [['M', 2.79, -8.91], ['c', 0.09, 0.00, 0.30, -0.03, 0.45, -0.03], ['c', 0.24, 0.03, 0.30, 0.03, 0.45, 0.12], ['c', 0.36, 0.15, 0.63, 0.54, 0.75, 1.02], ['l', 0.03, 0.21], ['l', 0.33, -0.30], ['c', 0.69, -0.69, 1.38, -1.02, 2.07, -1.02], ['c', 0.27, 0.00, 0.33, 0.00, 0.48, 0.06], ['c', 0.21, 0.09, 0.48, 0.36, 0.63, 0.60], ['c', 0.03, 0.09, 0.12, 0.27, 0.18, 0.42], ['c', 0.03, 0.15, 0.09, 0.27, 0.12, 0.27], ['c', 0.00, 0.00, 0.09, -0.09, 0.18, -0.21], ['c', 0.33, -0.39, 0.87, -0.81, 1.29, -0.99], ['c', 0.78, -0.33, 1.47, -0.21, 2.01, 0.33], ['c', 0.30, 0.33, 0.48, 0.69, 0.60, 1.14], ['c', 0.09, 0.42, 0.06, 0.54, -0.54, 3.06], ['c', -0.33, 1.29, -0.57, 2.40, -0.57, 2.43], ['c', 0.00, 0.12, 0.09, 0.21, 0.21, 0.21], ['c', 0.24, 0.00, 0.75, -0.30, 1.20, -0.72], ['c', 0.45, -0.39, 0.60, -0.45, 0.78, -0.27], ['c', 0.18, 0.18, 0.09, 0.36, -0.45, 0.87], ['c', -1.05, 0.96, -1.83, 1.47, -2.58, 1.71], ['c', -0.93, 0.33, -1.53, 0.21, -1.80, -0.33], ['c', -0.06, -0.15, -0.06, -0.21, -0.06, -0.45], ['c', 0.00, -0.24, 0.03, -0.48, 0.60, -2.82], ['c', 0.42, -1.71, 0.60, -2.64, 0.63, -2.79], ['c', 0.03, -0.57, -0.30, -0.75, -0.84, -0.48], ['c', -0.24, 0.12, -0.54, 0.39, -0.66, 0.63], ['c', -0.03, 0.09, -0.42, 1.38, -0.90, 3.00], ['c', -0.90, 3.15, -0.84, 3.00, -1.14, 3.15], ['l', -0.15, 0.09], ['l', -0.78, 0.00], ['c', -0.60, 0.00, -0.78, 0.00, -0.84, -0.06], ['c', -0.09, -0.03, -0.18, -0.18, -0.18, -0.27], ['c', 0.00, -0.03, 0.36, -1.38, 0.84, -2.97], ['c', 0.57, -2.04, 0.81, -2.97, 0.84, -3.12], ['c', 0.03, -0.54, -0.30, -0.72, -0.84, -0.45], ['c', -0.24, 0.12, -0.57, 0.42, -0.66, 0.63], ['c', -0.06, 0.09, -0.51, 1.44, -1.05, 2.97], ['c', -0.51, 1.56, -0.99, 2.85, -0.99, 2.91], ['c', -0.06, 0.12, -0.21, 0.24, -0.36, 0.30], ['c', -0.12, 0.06, -0.21, 0.06, -0.90, 0.06], ['c', -0.60, 0.00, -0.78, 0.00, -0.84, -0.06], ['c', -0.09, -0.03, -0.18, -0.18, -0.18, -0.27], ['c', 0.00, -0.03, 0.45, -1.38, 0.99, -2.97], ['c', 1.05, -3.18, 1.05, -3.18, 0.93, -3.45], ['c', -0.12, -0.27, -0.39, -0.30, -0.72, -0.15], ['c', -0.54, 0.27, -1.14, 1.17, -1.56, 2.40], ['c', -0.06, 0.15, -0.15, 0.30, -0.18, 0.36], ['c', -0.21, 0.21, -0.57, 0.27, -0.72, 0.09], ['c', -0.09, -0.09, -0.06, -0.21, 0.06, -0.63], ['c', 0.48, -1.26, 1.26, -2.46, 2.01, -3.21], ['c', 0.57, -0.54, 1.20, -0.87, 1.83, -1.02], ['z']], w: 14.687, h: 9.126 },\n\t'p': { d: [['M', 1.92, -8.70], ['c', 0.27, -0.09, 0.81, -0.06, 1.11, 0.03], ['c', 0.54, 0.18, 0.93, 0.51, 1.17, 0.99], ['c', 0.09, 0.15, 0.15, 0.33, 0.18, 0.36], ['l', 0.00, 0.12], ['l', 0.30, -0.27], ['c', 0.66, -0.60, 1.35, -1.02, 2.13, -1.20], ['c', 0.21, -0.06, 0.33, -0.06, 0.78, -0.06], ['c', 0.45, 0.00, 0.51, 0.00, 0.84, 0.09], ['c', 1.29, 0.33, 2.07, 1.32, 2.25, 2.79], ['c', 0.09, 0.81, -0.09, 2.01, -0.45, 2.79], ['c', -0.54, 1.26, -1.86, 2.55, -3.18, 3.03], ['c', -0.45, 0.18, -0.81, 0.24, -1.29, 0.24], ['c', -0.69, -0.03, -1.35, -0.18, -1.86, -0.45], ['c', -0.30, -0.15, -0.51, -0.18, -0.69, -0.09], ['c', -0.09, 0.03, -0.18, 0.09, -0.18, 0.12], ['c', -0.09, 0.12, -1.05, 2.94, -1.05, 3.06], ['c', 0.00, 0.24, 0.18, 0.48, 0.51, 0.63], ['c', 0.18, 0.06, 0.54, 0.15, 0.75, 0.15], ['c', 0.21, 0.00, 0.36, 0.06, 0.42, 0.18], ['c', 0.12, 0.18, 0.06, 0.42, -0.12, 0.54], ['c', -0.09, 0.03, -0.15, 0.03, -0.78, 0.00], ['c', -1.98, -0.15, -3.81, -0.15, -5.79, 0.00], ['c', -0.63, 0.03, -0.69, 0.03, -0.78, 0.00], ['c', -0.24, -0.15, -0.24, -0.57, 0.03, -0.66], ['c', 0.06, -0.03, 0.48, -0.09, 0.99, -0.12], ['c', 0.87, -0.06, 1.11, -0.09, 1.35, -0.21], ['c', 0.18, -0.06, 0.33, -0.18, 0.39, -0.30], ['c', 0.06, -0.12, 3.24, -9.42, 3.27, -9.60], ['c', 0.06, -0.33, 0.03, -0.57, -0.15, -0.69], ['c', -0.09, -0.06, -0.12, -0.06, -0.30, -0.06], ['c', -0.69, 0.06, -1.53, 1.02, -2.28, 2.61], ['c', -0.09, 0.21, -0.21, 0.45, -0.27, 0.51], ['c', -0.09, 0.12, -0.33, 0.24, -0.48, 0.24], ['c', -0.18, 0.00, -0.36, -0.15, -0.36, -0.30], ['c', 0.00, -0.24, 0.78, -1.83, 1.26, -2.55], ['c', 0.72, -1.11, 1.47, -1.74, 2.28, -1.92], ['z'], ['m', 5.37, 1.47], ['c', -0.27, -0.12, -0.75, -0.03, -1.14, 0.21], ['c', -0.75, 0.48, -1.47, 1.68, -1.89, 3.15], ['c', -0.45, 1.47, -0.42, 2.34, 0.00, 2.70], ['c', 0.45, 0.39, 1.26, 0.21, 1.83, -0.36], ['c', 0.51, -0.51, 0.99, -1.68, 1.38, -3.27], ['c', 0.30, -1.17, 0.33, -1.74, 0.15, -2.13], ['c', -0.09, -0.15, -0.15, -0.21, -0.33, -0.30], ['z']], w: 14.689, h: 13.127 },\n\t'r': { d: [['M', 6.33, -9.12], ['c', 0.27, -0.03, 0.93, 0.00, 1.20, 0.06], ['c', 0.84, 0.21, 1.23, 0.81, 1.02, 1.53], ['c', -0.24, 0.75, -0.90, 1.17, -1.56, 0.96], ['c', -0.33, -0.09, -0.51, -0.30, -0.66, -0.75], ['c', -0.03, -0.12, -0.09, -0.24, -0.12, -0.30], ['c', -0.09, -0.15, -0.30, -0.24, -0.48, -0.24], ['c', -0.57, 0.00, -1.38, 0.54, -1.65, 1.08], ['c', -0.06, 0.15, -0.33, 1.17, -0.90, 3.27], ['c', -0.57, 2.31, -0.81, 3.12, -0.87, 3.21], ['c', -0.03, 0.06, -0.12, 0.15, -0.18, 0.21], ['l', -0.12, 0.06], ['l', -0.81, 0.03], ['c', -0.69, 0.00, -0.81, 0.00, -0.90, -0.03], ['c', -0.09, -0.06, -0.18, -0.21, -0.18, -0.30], ['c', 0.00, -0.06, 0.39, -1.62, 0.90, -3.51], ['c', 0.84, -3.24, 0.87, -3.45, 0.87, -3.72], ['c', 0.00, -0.21, 0.00, -0.27, -0.03, -0.36], ['c', -0.12, -0.15, -0.21, -0.24, -0.42, -0.24], ['c', -0.24, 0.00, -0.45, 0.15, -0.78, 0.42], ['c', -0.33, 0.36, -0.45, 0.54, -0.72, 1.14], ['c', -0.03, 0.12, -0.21, 0.24, -0.36, 0.27], ['c', -0.12, 0.00, -0.15, 0.00, -0.24, -0.06], ['c', -0.18, -0.12, -0.18, -0.21, -0.06, -0.54], ['c', 0.21, -0.57, 0.42, -0.93, 0.78, -1.32], ['c', 0.54, -0.51, 1.20, -0.81, 1.95, -0.87], ['c', 0.81, -0.03, 1.53, 0.30, 1.92, 0.87], ['l', 0.12, 0.18], ['l', 0.09, -0.09], ['c', 0.57, -0.45, 1.41, -0.84, 2.19, -0.96], ['z']], w: 9.41, h: 9.132 },\n\t's': { d: [['M', 4.47, -8.73], ['c', 0.09, 0.00, 0.36, -0.03, 0.57, -0.03], ['c', 0.75, 0.03, 1.29, 0.24, 1.71, 0.63], ['c', 0.51, 0.54, 0.66, 1.26, 0.36, 1.83], ['c', -0.24, 0.42, -0.63, 0.57, -1.11, 0.42], ['c', -0.33, -0.09, -0.60, -0.36, -0.60, -0.57], ['c', 0.00, -0.03, 0.06, -0.21, 0.15, -0.39], ['c', 0.12, -0.21, 0.15, -0.33, 0.18, -0.48], ['c', 0.00, -0.24, -0.06, -0.48, -0.15, -0.60], ['c', -0.15, -0.21, -0.42, -0.24, -0.75, -0.15], ['c', -0.27, 0.06, -0.48, 0.18, -0.69, 0.36], ['c', -0.39, 0.39, -0.51, 0.96, -0.33, 1.38], ['c', 0.09, 0.21, 0.42, 0.51, 0.78, 0.72], ['c', 1.11, 0.69, 1.59, 1.11, 1.89, 1.68], ['c', 0.21, 0.39, 0.24, 0.78, 0.15, 1.29], ['c', -0.18, 1.20, -1.17, 2.16, -2.52, 2.52], ['c', -1.02, 0.24, -1.95, 0.12, -2.70, -0.42], ['c', -0.72, -0.51, -0.99, -1.47, -0.60, -2.19], ['c', 0.24, -0.48, 0.72, -0.63, 1.17, -0.42], ['c', 0.33, 0.18, 0.54, 0.45, 0.57, 0.81], ['c', 0.00, 0.21, -0.03, 0.30, -0.33, 0.51], ['c', -0.33, 0.24, -0.39, 0.42, -0.27, 0.69], ['c', 0.06, 0.15, 0.21, 0.27, 0.45, 0.33], ['c', 0.30, 0.09, 0.87, 0.09, 1.20, 0.00], ['c', 0.75, -0.21, 1.23, -0.72, 1.29, -1.35], ['c', 0.03, -0.42, -0.15, -0.81, -0.54, -1.20], ['c', -0.24, -0.24, -0.48, -0.42, -1.41, -1.02], ['c', -0.69, -0.42, -1.05, -0.93, -1.05, -1.47], ['c', 0.00, -0.39, 0.12, -0.87, 0.30, -1.23], ['c', 0.27, -0.57, 0.78, -1.05, 1.38, -1.35], ['c', 0.24, -0.12, 0.63, -0.27, 0.90, -0.30], ['z']], w: 6.632, h: 8.758 },\n\t'z': { d: [['M', 2.64, -7.95], ['c', 0.36, -0.09, 0.81, -0.03, 1.71, 0.27], ['c', 0.78, 0.21, 0.96, 0.27, 1.74, 0.30], ['c', 0.87, 0.06, 1.02, 0.03, 1.38, -0.21], ['c', 0.21, -0.15, 0.33, -0.15, 0.48, -0.06], ['c', 0.15, 0.09, 0.21, 0.30, 0.15, 0.45], ['c', -0.03, 0.06, -1.26, 1.26, -2.76, 2.67], ['l', -2.73, 2.55], ['l', 0.54, 0.03], ['c', 0.54, 0.03, 0.72, 0.03, 2.01, 0.15], ['c', 0.36, 0.03, 0.90, 0.06, 1.20, 0.09], ['c', 0.66, 0.00, 0.81, -0.03, 1.02, -0.24], ['c', 0.30, -0.30, 0.39, -0.72, 0.27, -1.23], ['c', -0.06, -0.27, -0.06, -0.27, -0.03, -0.39], ['c', 0.15, -0.30, 0.54, -0.27, 0.69, 0.03], ['c', 0.15, 0.33, 0.27, 1.02, 0.27, 1.50], ['c', 0.00, 1.47, -1.11, 2.70, -2.52, 2.79], ['c', -0.57, 0.03, -1.02, -0.09, -2.01, -0.51], ['c', -1.02, -0.42, -1.23, -0.48, -2.13, -0.54], ['c', -0.81, -0.06, -0.96, -0.03, -1.26, 0.18], ['c', -0.12, 0.06, -0.24, 0.12, -0.27, 0.12], ['c', -0.27, 0.00, -0.45, -0.30, -0.36, -0.51], ['c', 0.03, -0.06, 1.32, -1.32, 2.91, -2.79], ['l', 2.88, -2.73], ['c', -0.03, 0.00, -0.21, 0.03, -0.42, 0.06], ['c', -0.21, 0.03, -0.78, 0.09, -1.23, 0.12], ['c', -1.11, 0.12, -1.23, 0.15, -1.95, 0.27], ['c', -0.72, 0.15, -1.17, 0.18, -1.29, 0.09], ['c', -0.27, -0.18, -0.21, -0.75, 0.12, -1.26], ['c', 0.39, -0.60, 0.93, -1.02, 1.59, -1.20], ['z']], w: 8.573, h: 8.743 },\n\t'+': { d: [['M', 3.48, -9.3], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 1.29], ['l', 0.00, 1.29], ['l', 1.29, 0.00], ['c', 1.23, 0.00, 1.29, 0.00, 1.41, 0.06], ['c', 0.06, 0.03, 0.15, 0.09, 0.18, 0.12], ['c', 0.12, 0.09, 0.21, 0.33, 0.21, 0.48], ['c', 0.00, 0.15, -0.09, 0.39, -0.21, 0.48], ['c', -0.03, 0.03, -0.12, 0.09, -0.18, 0.12], ['c', -0.12, 0.06, -0.18, 0.06, -1.41, 0.06], ['l', -1.29, 0.00], ['l', 0.00, 1.29], ['c', 0.00, 1.23, 0.00, 1.29, -0.06, 1.41], ['c', -0.09, 0.18, -0.15, 0.24, -0.30, 0.33], ['c', -0.21, 0.09, -0.39, 0.09, -0.57, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.06, -0.12, -0.06, -0.18, -0.06, -1.41], ['l', 0.00, -1.29], ['l', -1.29, 0.00], ['c', -1.23, 0.00, -1.29, 0.00, -1.41, -0.06], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.09, -0.36, 0.00, -0.54], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['l', 0.15, -0.06], ['l', 1.26, 0.00], ['l', 1.29, 0.00], ['l', 0.00, -1.29], ['c', 0.00, -1.23, 0.00, -1.29, 0.06, -1.41], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z']], w: 7.507, h: 7.515 },\n\t',': { d: [['M', 1.85, -3.36], ['c', 0.57, -0.15, 1.17, 0.03, 1.59, 0.45], ['c', 0.45, 0.45, 0.60, 0.96, 0.51, 1.89], ['c', -0.09, 1.23, -0.42, 2.46, -0.99, 3.93], ['c', -0.30, 0.72, -0.72, 1.62, -0.78, 1.68], ['c', -0.18, 0.21, -0.51, 0.18, -0.66, -0.06], ['c', -0.03, -0.06, -0.06, -0.15, -0.06, -0.18], ['c', 0.00, -0.06, 0.12, -0.33, 0.24, -0.63], ['c', 0.84, -1.80, 1.02, -2.61, 0.69, -3.24], ['c', -0.12, -0.24, -0.27, -0.36, -0.75, -0.60], ['c', -0.36, -0.15, -0.42, -0.21, -0.60, -0.39], ['c', -0.69, -0.69, -0.69, -1.71, 0.00, -2.40], ['c', 0.21, -0.21, 0.51, -0.39, 0.81, -0.45], ['z']], w: 3.452, h: 8.143 },\n\t'-': { d: [['M', 0.18, -5.34], ['c', 0.09, -0.06, 0.15, -0.06, 2.31, -0.06], ['c', 2.46, 0.00, 2.37, 0.00, 2.46, 0.21], ['c', 0.12, 0.21, 0.03, 0.42, -0.15, 0.54], ['c', -0.09, 0.06, -0.15, 0.06, -2.28, 0.06], ['c', -2.16, 0.00, -2.22, 0.00, -2.31, -0.06], ['c', -0.27, -0.15, -0.27, -0.54, -0.03, -0.69], ['z']], w: 5.001, h: 0.81 },\n\t'.': { d: [['M', 1.32, -3.36], ['c', 1.05, -0.27, 2.10, 0.57, 2.10, 1.65], ['c', 0.00, 1.08, -1.05, 1.92, -2.10, 1.65], ['c', -0.90, -0.21, -1.50, -1.14, -1.26, -2.04], ['c', 0.12, -0.63, 0.63, -1.11, 1.26, -1.26], ['z']], w: 3.413, h: 3.402 },\n\t'scripts.wedge': { d: [['M', -3.66, -7.44], ['c', 0.06, -0.09, 0.00, -0.09, 0.81, 0.03], ['c', 1.86, 0.30, 3.84, 0.30, 5.73, 0.00], ['c', 0.78, -0.12, 0.72, -0.12, 0.78, -0.03], ['c', 0.15, 0.15, 0.12, 0.24, -0.24, 0.60], ['c', -0.93, 0.93, -1.98, 2.76, -2.67, 4.62], ['c', -0.30, 0.78, -0.51, 1.71, -0.51, 2.13], ['c', 0.00, 0.15, 0.00, 0.18, -0.06, 0.27], ['c', -0.12, 0.09, -0.24, 0.09, -0.36, 0.00], ['c', -0.06, -0.09, -0.06, -0.12, -0.06, -0.27], ['c', 0.00, -0.42, -0.21, -1.35, -0.51, -2.13], ['c', -0.69, -1.86, -1.74, -3.69, -2.67, -4.62], ['c', -0.36, -0.36, -0.39, -0.45, -0.24, -0.60], ['z']], w: 7.49, h: 7.752 },\n\t'scripts.thumb': { d: [['M', -0.54, -3.69], ['c', 0.15, -0.03, 0.36, -0.06, 0.51, -0.06], ['c', 1.44, 0.00, 2.58, 1.11, 2.94, 2.85], ['c', 0.09, 0.48, 0.09, 1.32, 0.00, 1.80], ['c', -0.27, 1.41, -1.08, 2.43, -2.16, 2.73], ['l', -0.18, 0.06], ['l', 0.00, 0.12], ['c', 0.03, 0.06, 0.06, 0.45, 0.09, 0.87], ['c', 0.03, 0.57, 0.03, 0.78, 0.00, 0.84], ['c', -0.09, 0.27, -0.39, 0.48, -0.66, 0.48], ['c', -0.27, 0.00, -0.57, -0.21, -0.66, -0.48], ['c', -0.03, -0.06, -0.03, -0.27, 0.00, -0.84], ['c', 0.03, -0.42, 0.06, -0.81, 0.09, -0.87], ['l', 0.00, -0.12], ['l', -0.18, -0.06], ['c', -1.08, -0.30, -1.89, -1.32, -2.16, -2.73], ['c', -0.09, -0.48, -0.09, -1.32, 0.00, -1.80], ['c', 0.15, -0.84, 0.51, -1.53, 1.02, -2.04], ['c', 0.39, -0.39, 0.84, -0.63, 1.35, -0.75], ['z'], ['m', 1.05, 0.90], ['c', -0.15, -0.09, -0.21, -0.09, -0.45, -0.12], ['c', -0.15, 0.00, -0.30, 0.03, -0.39, 0.03], ['c', -0.57, 0.18, -0.90, 0.72, -1.08, 1.74], ['c', -0.06, 0.48, -0.06, 1.80, 0.00, 2.28], ['c', 0.15, 0.90, 0.42, 1.44, 0.90, 1.65], ['c', 0.18, 0.09, 0.21, 0.09, 0.51, 0.09], ['c', 0.30, 0.00, 0.33, 0.00, 0.51, -0.09], ['c', 0.48, -0.21, 0.75, -0.75, 0.90, -1.65], ['c', 0.03, -0.27, 0.03, -0.54, 0.03, -1.14], ['c', 0.00, -0.60, 0.00, -0.87, -0.03, -1.14], ['c', -0.15, -0.90, -0.45, -1.44, -0.90, -1.65], ['z']], w: 5.955, h: 9.75 },\n\t'scripts.open': { d: [['M', -0.54, -3.69], ['c', 0.15, -0.03, 0.36, -0.06, 0.51, -0.06], ['c', 1.44, 0.00, 2.58, 1.11, 2.94, 2.85], ['c', 0.09, 0.48, 0.09, 1.32, 0.00, 1.80], ['c', -0.33, 1.74, -1.47, 2.85, -2.91, 2.85], ['c', -1.44, 0.00, -2.58, -1.11, -2.91, -2.85], ['c', -0.09, -0.48, -0.09, -1.32, 0.00, -1.80], ['c', 0.15, -0.84, 0.51, -1.53, 1.02, -2.04], ['c', 0.39, -0.39, 0.84, -0.63, 1.35, -0.75], ['z'], ['m', 1.11, 0.90], ['c', -0.21, -0.09, -0.27, -0.09, -0.51, -0.12], ['c', -0.30, 0.00, -0.42, 0.03, -0.66, 0.15], ['c', -0.24, 0.12, -0.51, 0.39, -0.66, 0.63], ['c', -0.54, 0.93, -0.63, 2.64, -0.21, 3.81], ['c', 0.21, 0.54, 0.51, 0.90, 0.93, 1.11], ['c', 0.21, 0.09, 0.24, 0.09, 0.54, 0.09], ['c', 0.30, 0.00, 0.33, 0.00, 0.54, -0.09], ['c', 0.42, -0.21, 0.72, -0.57, 0.93, -1.11], ['c', 0.36, -0.99, 0.36, -2.37, 0.00, -3.36], ['c', -0.21, -0.54, -0.51, -0.90, -0.90, -1.11], ['z']], w: 5.955, h: 7.5 },\n\t'scripts.longphrase': { d: [['M', 1.47, -15.09], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.54, 0.06, 11.25], ['l', 0.00, 11.25], ['l', -0.63, 0.15], ['c', -0.66, 0.18, -1.44, 0.39, -1.50, 0.39], ['c', -0.03, 0.00, -0.03, -3.39, -0.03, -11.25], ['l', 0.00, -11.25], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 23.04 },\n\t'scripts.mediumphrase': { d: [['M', 1.47, -7.59], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.39, 0.06, 7.50], ['l', 0.00, 7.50], ['l', -0.63, 0.15], ['c', -0.66, 0.18, -1.44, 0.39, -1.50, 0.39], ['c', -0.03, 0.00, -0.03, -2.28, -0.03, -7.50], ['l', 0.00, -7.50], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 15.54 },\n\t'scripts.shortphrase': { d: [['M', 1.47, -7.59], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.21, 0.06, 3.75], ['l', 0.00, 3.75], ['l', -0.42, 0.09], ['c', -0.57, 0.18, -1.65, 0.45, -1.71, 0.45], ['c', -0.03, 0.00, -0.03, -0.72, -0.03, -3.75], ['l', 0.00, -3.75], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 8.04 },\n\t'scripts.snap': { d: [['M', 4.50, -3.39], ['c', 0.36, -0.03, 0.96, -0.03, 1.35, 0.00], ['c', 1.56, 0.15, 3.15, 0.90, 4.20, 2.01], ['c', 0.24, 0.27, 0.33, 0.42, 0.33, 0.60], ['c', 0.00, 0.27, 0.03, 0.24, -2.46, 2.22], ['c', -1.29, 1.02, -2.40, 1.86, -2.49, 1.92], ['c', -0.18, 0.09, -0.30, 0.09, -0.48, 0.00], ['c', -0.09, -0.06, -1.20, -0.90, -2.49, -1.92], ['c', -2.49, -1.98, -2.46, -1.95, -2.46, -2.22], ['c', 0.00, -0.18, 0.09, -0.33, 0.33, -0.60], ['c', 1.05, -1.08, 2.64, -1.86, 4.17, -2.01], ['z'], ['m', 1.29, 1.17], ['c', -1.47, -0.15, -2.97, 0.30, -4.14, 1.20], ['l', -0.18, 0.15], ['l', 0.06, 0.09], ['c', 0.15, 0.12, 3.63, 2.85, 3.66, 2.85], ['c', 0.03, 0.00, 3.51, -2.73, 3.66, -2.85], ['l', 0.06, -0.09], ['l', -0.18, -0.15], ['c', -0.84, -0.66, -1.89, -1.08, -2.94, -1.20], ['z']], w: 10.38, h: 6.84 }\n};\n\n// Custom characters that weren't generated from the font:\nglyphs['noteheads.slash.whole'] = { d: [['M', 5, -5], ['l', 1, 1], ['l', -5, 5], ['l', -1, -1], ['z'], ['m', 4, 6], ['l', -5, -5], ['l', 2, -2], ['l', 5, 5], ['z'], ['m', 0, -2], ['l', 1, 1], ['l', -5, 5], ['l', -1, -1], ['z'], ['m', -4, 6], ['l', -5, -5], ['l', 2, -2], ['l', 5, 5], ['z']], w: 10.81, h: 15.63 };\n\nglyphs['noteheads.slash.quarter'] = { d: [['M', 9, -6], ['l', 0, 4], ['l', -9, 9], ['l', 0, -4], ['z']], w: 9, h: 9 };\n\nglyphs['noteheads.harmonic.quarter'] = { d: [['M', 3.63, -4.02], ['c', 0.09, -0.06, 0.18, -0.09, 0.24, -0.03], ['c', 0.03, 0.03, 0.87, 0.93, 1.83, 2.01], ['c', 1.50, 1.65, 1.80, 1.98, 1.80, 2.04], ['c', 0.00, 0.06, -0.30, 0.39, -1.80, 2.04], ['c', -0.96, 1.08, -1.80, 1.98, -1.83, 2.01], ['c', -0.06, 0.06, -0.15, 0.03, -0.24, -0.03], ['c', -0.12, -0.09, -3.54, -3.84, -3.60, -3.93], ['c', -0.03, -0.03, -0.03, -0.09, -0.03, -0.15], ['c', 0.03, -0.06, 3.45, -3.84, 3.63, -3.96], ['z']], w: 7.5, h: 8.165 };\n\nglyphs['noteheads.triangle.quarter'] = { d: [['M', 0, 4], ['l', 9, 0], ['l', -4.5, -9], ['z']], w: 9, h: 9 };\n\nvar pathClone = function (pathArray) {\n\tvar res = [];\n\tfor (var i = 0, ii = pathArray.length; i < ii; i++) {\n\t\tres[i] = [];\n\t\tfor (var j = 0, jj = pathArray[i].length; j < jj; j++) {\n\t\t\tres[i][j] = pathArray[i][j];\n\t\t}\n\t}\n\treturn res;\n};\n\nvar pathScale = function (pathArray, kx, ky) {\n\tfor (var i = 0, ii = pathArray.length; i < ii; i++) {\n\t\tvar p = pathArray[i];\n\t\tvar j, jj;\n\t\tfor (j = 1, jj = p.length; j < jj; j++) {\n\t\t\tp[j] *= (j % 2) ? kx : ky;\n\t\t}\n\t}\n};\n\nvar Glyphs = {\n\tprintSymbol: function (x, y, symb, paper, attrs) {\n\t\tif (!glyphs[symb]) return null;\n\t\tvar pathArray = pathClone(glyphs[symb].d);\n\t\tpathArray[0][1] += x;\n\t\tpathArray[0][2] += y;\n\t\tvar path = \"\";\n\t\tfor (var i = 0; i < pathArray.length; i++)\n\t\t\tpath += pathArray[i].join(\" \");\n\t\tattrs.path = path;\n\t\treturn paper.path(attrs);\n\t},\n\n\tgetPathForSymbol: function (x, y, symb, scalex, scaley) {\n\t\tscalex = scalex || 1;\n\t\tscaley = scaley || 1;\n\t\tif (!glyphs[symb]) return null;\n\t\tvar pathArray = pathClone(glyphs[symb].d);\n\t\tif (scalex !== 1 || scaley !== 1) pathScale(pathArray, scalex, scaley);\n\t\tpathArray[0][1] += x;\n\t\tpathArray[0][2] += y;\n\n\t\treturn pathArray;\n\t},\n\n\tgetSymbolWidth: function (symbol) {\n\t\tif (glyphs[symbol]) return glyphs[symbol].w;\n\t\treturn 0;\n\t},\n\n\tsymbolHeightInPitches: function (symbol) {\n\t\tvar height = glyphs[symbol] ? glyphs[symbol].h : 0;\n\t\treturn height / spacing.STEP;\n\t},\n\n\tgetSymbolAlign: function (symbol) {\n\t\tif (symbol.substring(0, 7) === \"scripts\" &&\n\t\t\tsymbol !== \"scripts.roll\") {\n\t\t\treturn \"center\";\n\t\t}\n\t\treturn \"left\";\n\t},\n\n\tgetYCorr: function (symbol) {\n\t\tswitch (symbol) {\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"6\":\n\t\t\tcase \"7\":\n\t\t\tcase \"8\":\n\t\t\tcase \"9\":\n\t\t\tcase \"+\": return -2;\n\t\t\tcase \"timesig.common\":\n\t\t\tcase \"timesig.cut\": return 0;\n\t\t\tcase \"flags.d32nd\": return -1;\n\t\t\tcase \"flags.d64th\": return -2;\n\t\t\tcase \"flags.u32nd\": return 1;\n\t\t\tcase \"flags.u64th\": return 3;\n\t\t\tcase \"rests.whole\": return 1;\n\t\t\tcase \"rests.half\": return -1;\n\t\t\tcase \"rests.8th\": return -1;\n\t\t\tcase \"rests.quarter\": return -1;\n\t\t\tcase \"rests.16th\": return -1;\n\t\t\tcase \"rests.32nd\": return -1;\n\t\t\tcase \"rests.64th\": return -1;\n\t\t\tcase \"f\":\n\t\t\tcase \"m\":\n\t\t\tcase \"p\":\n\t\t\tcase \"s\":\n\t\t\tcase \"z\":\n\t\t\t\treturn -4;\n\t\t\tcase \"scripts.trill\":\n\t\t\tcase \"scripts.upbow\":\n\t\t\tcase \"scripts.downbow\":\n\t\t\t\treturn -2;\n\t\t\tcase \"scripts.ufermata\":\n\t\t\tcase \"scripts.wedge\":\n\t\t\tcase \"scripts.roll\":\n\t\t\tcase \"scripts.shortphrase\":\n\t\t\tcase \"scripts.longphrase\":\n\t\t\t\treturn -1;\n\t\t\tcase \"scripts.dfermata\":\n\t\t\t\treturn 1;\n\t\t\tdefault: return 0;\n\t\t}\n\t},\n\tsetSymbol: function (name, path) {\n\t\tglyphs[name] = path;\n\t}\n};\n\nmodule.exports = Glyphs; // we need the glyphs for layout information\n","function germanNote(note) {\n\tswitch (note) {\n\t\tcase \"B#\": return \"H#\";\n\t\tcase \"B♯\": return \"H♯\";\n\t\tcase \"B\": return \"H\";\n\t\tcase \"Bb\": return \"B\";\n\t\tcase \"B♭\": return \"B\";\n\t}\n\treturn note;\n}\n\nfunction translateChord(chordString, jazzchords, germanAlphabet) {\n\tvar lines = chordString.split(\"\\n\");\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tlet chord = lines[i];\n\t\t// If the chord isn't in a recognizable format then just skip it.\n\t\tlet reg = chord.match(/^([ABCDEFG][♯♭]?)?([^\\/]+)?(\\/([ABCDEFG][#b♯♭]?))?/);\n\t\tif (!reg) {\n\t\t\tcontinue;\n\t\t}\n\t\tlet baseChord = reg[1] || \"\";\n\t\tlet modifier = reg[2] || \"\";\n\t\tlet bassNote = reg[4] || \"\";\n\t\tif (germanAlphabet) {\n\t\t\tbaseChord = germanNote(baseChord);\n\t\t\tbassNote = germanNote(bassNote);\n\t\t}\n\t\t// This puts markers in the pieces of the chord that are read by the svg creator.\n\t\t// After the main part of the chord (the letter, a sharp or flat, and \"m\") a marker is added. Before a slash a marker is added.\n\t\tconst marker = jazzchords ? \"\\x03\" : \"\";\n\t\tconst bass = bassNote ? \"/\" + bassNote : \"\";\n\t\tlines[i] = [baseChord, modifier, bass].join(marker);\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nmodule.exports = translateChord;\n","var drawTempo = require('./tempo');\nvar drawRelativeElement = require('./relative');\nvar spacing = require('../helpers/spacing');\nvar setClass = require('../helpers/set-class');\nvar elementGroup = require('./group-elements');\n\nfunction drawAbsolute(renderer, params, bartop, selectables, staffPos) {\n\tif (params.invisible) return;\n\tvar isTempo = params.children.length > 0 && params.children[0].type === \"TempoElement\";\n\tparams.elemset = [];\n\telementGroup.beginGroup(renderer.paper, renderer.controller);\n\tfor (var i = 0; i < params.children.length; i++) {\n\t\tvar child = params.children[i];\n\t\tswitch (child.type) {\n\t\t\tcase \"TempoElement\":\n\t\t\t\tdrawTempo(renderer, child);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar el = drawRelativeElement(renderer, child, bartop);\n\t\t\t\tif (child.type === \"symbol\" && child.c && child.c.indexOf('notehead') >= 0) {\n\t\t\t\t\tel.setAttribute('class', 'abcjs-notehead')\n\t\t\t\t}\n\t\t}\n\t}\n\tvar klass = params.type;\n\tif (params.type === 'note' || params.type === 'rest') {\n\t\tparams.counters = renderer.controller.classes.getCurrent();\n\t\tklass += ' d' + Math.round(params.durationClass * 1000) / 1000;\n\t\tklass = klass.replace(/\\./g, '-');\n\t\tif (params.abcelem.pitches) {\n\t\t\tfor (var j = 0; j < params.abcelem.pitches.length; j++) {\n\t\t\t\tklass += ' p' + params.abcelem.pitches[j].pitch;\n\t\t\t}\n\t\t}\n\t}\n\tvar g = elementGroup.endGroup(klass, params.type);\n\tif (g) {\n\t\t// TODO-PER-HACK! This corrects the classes because the tablature is not being created at the right time.\n\t\tif (params.cloned) {\n\t\t\tparams.cloned.overrideClasses = g.className.baseVal\n\t\t}\n\t\tif (params.overrideClasses) {\n\t\t\tvar type = g.classList && g.classList.length > 0 ? g.classList[0] + ' ' : ''\n\t\t\tg.setAttribute(\"class\", type + params.overrideClasses)\n\t\t}\n\t\tif (isTempo) {\n\t\t\tparams.startChar = params.abcelem.startChar;\n\t\t\tparams.endChar = params.abcelem.endChar;\n\t\t\tselectables.add(params, g, false, staffPos);\n\t\t} else {\n\t\t\tparams.elemset.push(g);\n\t\t\tvar isSelectable = false;\n\t\t\tif (params.type === 'note' || params.type === 'tabNumber') {\n\t\t\t\tisSelectable = true;\n\t\t\t}\n\t\t\tselectables.add(params, g, isSelectable, staffPos);\n\t\t}\n\t} else if (params.elemset.length > 0)\n\t\tselectables.add(params, params.elemset[0], params.type === 'note', staffPos);\n\t// If there was no output, then don't add to the selectables. This happens when using the \"y\" spacer, for instance.\n\n\tif (params.klass)\n\t\tsetClass(params.elemset, \"mark\", \"\", \"#00ff00\");\n\tif (params.hint)\n\t\tsetClass(params.elemset, \"abcjs-hint\", \"\", null);\n\tparams.abcelem.abselem = params;\n\n\tif (params.heads && params.heads.length > 0) {\n\t\tparams.notePositions = [];\n\t\tfor (var jj = 0; jj < params.heads.length; jj++) {\n\t\t\tparams.notePositions.push({\n\t\t\t\tx: params.heads[jj].x + params.heads[jj].w / 2,\n\t\t\t\ty: staffPos.zero - params.heads[jj].pitch * spacing.STEP\n\t\t\t});\n\t\t}\n\t}\n}\n\nmodule.exports = drawAbsolute;\n","var printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawBeam(renderer, params) {\n\tif (params.beams.length === 0) return;\n\n\tvar pathString = \"\";\n\tfor (var i = 0; i < params.beams.length; i++) {\n\t\tvar beam = params.beams[i];\n\t\tif (beam.split) {\n\t\t\tvar slope = getSlope(renderer, beam.startX, beam.startY, beam.endX, beam.endY);\n\t\t\tvar xes = [];\n\t\t\tfor (var j = 0; j < beam.split.length; j += 2) {\n\t\t\t\txes.push([beam.split[j], beam.split[j + 1]]);\n\t\t\t}\n\t\t\tfor (j = 0; j < xes.length; j++) {\n\t\t\t\tvar y1 = getY(beam.startX, beam.startY, slope, xes[j][0]);\n\t\t\t\tvar y2 = getY(beam.startX, beam.startY, slope, xes[j][1]);\n\t\t\t\tpathString += draw(renderer, xes[j][0], y1, xes[j][1], y2, beam.dy);\n\t\t\t}\n\t\t} else\n\t\t\tpathString += draw(renderer, beam.startX, beam.startY, beam.endX, beam.endY, beam.dy);\n\t}\n\tvar durationClass = (\"abcjs-d\" + params.duration).replace(/\\./g, \"-\");\n\tvar klasses = renderer.controller.classes.generate('beam-elem ' + durationClass);\n\tvar el = printPath(renderer, {\n\t\tpath: pathString,\n\t\tstroke: \"none\",\n\t\tfill: renderer.foregroundColor,\n\t\t'class': klasses\n\t});\n\treturn [el];\n}\n\nfunction draw(renderer, startX, startY, endX, endY, dy) {\n\t// the X coordinates are actual coordinates, but the Y coordinates are in pitches.\n\tstartY = roundNumber(renderer.calcY(startY));\n\tendY = roundNumber(renderer.calcY(endY));\n\tstartX = roundNumber(startX);\n\tendX = roundNumber(endX);\n\tvar startY2 = roundNumber(startY + dy);\n\tvar endY2 = roundNumber(endY + dy);\n\treturn \"M\" + startX + \" \" + startY + \" L\" + endX + \" \" + endY +\n\t\t\"L\" + endX + \" \" + endY2 + \" L\" + startX + \" \" + startY2 + \"z\";\n}\n\nfunction getSlope(renderer, startX, startY, endX, endY) {\n\treturn (endY - startY) / (endX - startX);\n}\n\nfunction getY(startX, startY, slope, currentX) {\n\tvar x = currentX - startX;\n\treturn startY + x * slope;\n}\n\nmodule.exports = drawBeam;\n","var sprintf = require('./sprintf');\nvar spacing = require('../helpers/spacing');\nvar renderText = require('./text');\n\nfunction drawBrace(renderer, params, selectables) {\n\t// The absoluteY number is the spot where the note on the first ledger line is drawn (i.e. middle C if treble clef)\n\t// The STEP offset here moves it to the top and bottom lines\n\tvar startY = params.startVoice.staff.absoluteY - spacing.STEP * 10;\n\tif (params.endVoice && params.endVoice.staff)\n\t\tparams.endY = params.endVoice.staff.absoluteY - spacing.STEP * 2;\n\telse if (params.lastContinuedVoice && params.lastContinuedVoice.staff)\n\t\tparams.endY = params.lastContinuedVoice.staff.absoluteY - spacing.STEP * 2;\n\telse\n\t\tparams.endY = params.startVoice.staff.absoluteY - spacing.STEP * 2;\n\treturn draw(renderer, params.x, startY, params.endY, params.type, params.header, selectables);\n}\n\nfunction straightPath(renderer, xLeft, yTop, yBottom, type) {\n\txLeft += spacing.STEP;\n\tvar xLineWidth = spacing.STEP * 0.75;\n\tvar yOverlap = spacing.STEP * 0.75;\n\tvar height = yBottom - yTop;\n\t// Straight line\n\tvar pathString = sprintf(\"M %f %f l %f %f l %f %f l %f %f z\",\n\t\txLeft, yTop - yOverlap, // top left line\n\t\t0, height + yOverlap * 2, // bottom left line\n\t\txLineWidth, 0, // bottom right line\n\t\t0, - (height + yOverlap * 2) // top right line\n\t);\n\t// Top arm\n\tvar wCurve = spacing.STEP * 2;\n\tvar hCurve = spacing.STEP;\n\tpathString += sprintf(\"M %f %f q %f %f %f %f q %f %f %f %f z\",\n\t\txLeft + xLineWidth, yTop - yOverlap, // top left arm\n\t\twCurve * 0.6, hCurve * 0.2,\n\t\twCurve, -hCurve, // right point\n\t\t-wCurve * 0.1, hCurve * 0.3,\n\t\t-wCurve, hCurve + spacing.STEP // left bottom\n\t);\n\t// Bottom arm\n\tpathString += sprintf(\"M %f %f q %f %f %f %f q %f %f %f %f z\",\n\t\txLeft + xLineWidth, yTop + yOverlap + height, // bottom left arm\n\t\twCurve * 0.6, -hCurve * 0.2,\n\t\twCurve, hCurve, // right point\n\t\t-wCurve * 0.1, -hCurve * 0.3,\n\t\t-wCurve, -hCurve - spacing.STEP // left bottom\n\t);\n\treturn renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(type), \"data-name\": type });\n}\n\nfunction curvyPath(renderer, xLeft, yTop, yBottom, type) {\n\tvar yHeight = yBottom - yTop;\n\n\tvar pathString = curve(xLeft,\n\t\tyTop,\n\t\t[7.5, -8, 21, 0, 18.5, -10.5, 7.5],\n\t\t[0, yHeight / 5.5, yHeight / 3.14, yHeight / 2, yHeight / 2.93, yHeight / 4.88, 0]);\n\n\tpathString += curve(xLeft,\n\t\tyTop,\n\t\t[0, 17.5, -7.5, 6.6, -5, 20, 0],\n\t\t[yHeight / 2, yHeight / 1.46, yHeight / 1.22, yHeight, yHeight / 1.19, yHeight / 1.42, yHeight / 2]);\n\n\treturn renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(type), \"data-name\": type });\n}\n\nfunction curve(xLeft, yTop, xCurve, yCurve) {\n\treturn sprintf(\"M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z\",\n\t\txLeft + xCurve[0], yTop + yCurve[0],\n\t\txLeft + xCurve[1], yTop + yCurve[1],\n\t\txLeft + xCurve[2], yTop + yCurve[2],\n\t\txLeft + xCurve[3], yTop + yCurve[3],\n\t\txLeft + xCurve[4], yTop + yCurve[4],\n\t\txLeft + xCurve[5], yTop + yCurve[5],\n\t\txLeft + xCurve[6], yTop + yCurve[6]);\n}\n\nvar draw = function (renderer, xLeft, yTop, yBottom, type, header, selectables) {//Tony\n\tvar ret;\n\tif (header) {\n\t\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate(\"staff-extra voice-name\"), \"data-name\": type });\n\t\tvar position = yTop + (yBottom - yTop) / 2;\n\t\tposition = position - renderer.controller.getTextSize.baselineToCenter(header, \"voicefont\", 'staff-extra voice-name', 0, 1);\n\n\t\trenderText(renderer, {\n\t\t\tx: renderer.padding.left,\n\t\t\ty: position,\n\t\t\ttext: header,\n\t\t\ttype: 'voicefont',\n\t\t\tklass: 'staff-extra voice-name',\n\t\t\tanchor: 'start',\n\t\t\tcenterVertically: true\n\t\t});\n\t}\n\tif (type === \"brace\")\n\t\tret = curvyPath(renderer, xLeft, yTop, yBottom, type);\n\telse if (type === \"bracket\")\n\t\tret = straightPath(renderer, xLeft, yTop, yBottom, type);\n\tif (header) {\n\t\tret = renderer.paper.closeGroup();\n\t}\n\tselectables.wrapSvgEl({ el_type: type, startChar: -1, endChar: -1 }, ret);\n\n\treturn ret;\n};\nmodule.exports = drawBrace;\n","var sprintf = require('./sprintf');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawCrescendo(renderer, params, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Crescendo Element y-coordinate not set.\");\n\tvar y = renderer.calcY(params.pitch) + 4; // This is the top pixel to use (it is offset a little so that it looks good with the volume marks.)\n\tvar height = 8;\n\n\t// TODO-PER: This is just a quick hack to make the dynamic marks not crash if they are mismatched. See the slur treatment for the way to get the beginning and end.\n\tvar left = params.anchor1 ? params.anchor1.x : 0;\n\tvar right = params.anchor2 ? params.anchor2.x : 800;\n\n\tvar el;\n\tif (params.dir === \"<\") {\n\t\tel = drawLine(renderer, y + height / 2, y, y + height / 2, y + height, left, right);\n\t} else {\n\t\tel = drawLine(renderer, y, y + height / 2, y + height, y + height / 2, left, right);\n\t}\n\tselectables.wrapSvgEl({ el_type: \"dynamicDecoration\", startChar: -1, endChar: -1 }, el);\n\treturn [el];\n}\n\nvar drawLine = function (renderer, y1, y2, y3, y4, left, right) {\n\ty1 = roundNumber(y1);\n\ty2 = roundNumber(y2);\n\ty3 = roundNumber(y3);\n\ty4 = roundNumber(y4);\n\tleft = roundNumber(left);\n\tright = roundNumber(right);\n\n\tvar pathString = sprintf(\"M %f %f L %f %f M %f %f L %f %f\",\n\t\tleft, y1, right, y2, left, y3, right, y4);\n\treturn printPath(renderer, { path: pathString, highlight: \"stroke\", stroke: renderer.foregroundColor, 'class': renderer.controller.classes.generate('dynamics decoration'), \"data-name\": \"dynamics\" });\n};\n\nmodule.exports = drawCrescendo;\n","function printDebugBox(renderer, attr, comment) {\n\tvar box = renderer.paper.rectBeneath(attr);\n\tif (comment)\n\t\trenderer.paper.text(comment, { x: 0, y: attr.y + 7, \"text-anchor\": \"start\", \"font-size\": \"14px\", fill: \"rgba(0,0,255,.4)\", stroke: \"rgba(0,0,255,.4)\" });\n\treturn box;\n}\n\nmodule.exports = printDebugBox;\n","var drawStaffGroup = require('./staff-group');\nvar setPaperSize = require('./set-paper-size');\nvar nonMusic = require('./non-music');\nvar spacing = require('../helpers/spacing');\nvar Selectables = require('./selectables');\n\nfunction draw(renderer, classes, abcTune, width, maxWidth, responsive, scale, selectTypes, tuneNumber, lineOffset) {\n\tvar selectables = new Selectables(renderer.paper, selectTypes, tuneNumber);\n\tvar groupClasses = {}\n\tif (classes.shouldAddClasses)\n\t\tgroupClasses.klass = \"abcjs-meta-top\"\n\trenderer.paper.openGroup(groupClasses)\n\trenderer.moveY(renderer.padding.top);\n\tnonMusic(renderer, abcTune.topText, selectables);\n\trenderer.paper.closeGroup()\n\trenderer.moveY(renderer.spacing.music);\n\tvar staffgroups = [];\n\tfor (var line = 0; line < abcTune.lines.length; line++) {\n\t\tclasses.incrLine();\n\t\tvar abcLine = abcTune.lines[line];\n\t\tif (abcLine.staff) {\n\t\t\tif (classes.shouldAddClasses)\n\t\t\t\tgroupClasses.klass = \"abcjs-staff-wrapper abcjs-l\" + classes.lineNumber\n\t\t\trenderer.paper.openGroup(groupClasses)\n\t\t\tif (abcLine.vskip) {\n\t\t\t\trenderer.moveY(abcLine.vskip);\n\t\t\t}\n\t\t\tif (staffgroups.length >= 1)\n\t\t\t\taddStaffPadding(renderer, renderer.spacing.staffSeparation, staffgroups[staffgroups.length - 1], abcLine.staffGroup);\n\t\t\tvar staffgroup = engraveStaffLine(renderer, abcLine.staffGroup, selectables, line);\n\t\t\tstaffgroup.line = lineOffset + line; // If there are non-music lines then the staffgroup array won't line up with the line array, so this keeps track.\n\t\t\tstaffgroups.push(staffgroup);\n\t\t\trenderer.paper.closeGroup()\n\t\t} else if (abcLine.nonMusic) {\n\t\t\tif (classes.shouldAddClasses)\n\t\t\t\tgroupClasses.klass = \"abcjs-non-music\"\n\t\t\trenderer.paper.openGroup(groupClasses)\n\t\t\tnonMusic(renderer, abcLine.nonMusic, selectables);\n\t\t\trenderer.paper.closeGroup()\n\t\t}\n\t}\n\n\tclasses.reset();\n\tif (abcTune.bottomText && abcTune.bottomText.rows && abcTune.bottomText.rows.length > 0) {\n\t\tif (classes.shouldAddClasses)\n\t\t\tgroupClasses.klass = \"abcjs-meta-bottom\"\n\t\trenderer.paper.openGroup(groupClasses)\n\t\trenderer.moveY(24); // TODO-PER: Empirically discovered. What variable should this be?\n\t\tnonMusic(renderer, abcTune.bottomText, selectables);\n\t\trenderer.paper.closeGroup()\n\t}\n\tsetPaperSize(renderer, maxWidth, scale, responsive);\n\treturn { staffgroups: staffgroups, selectables: selectables.getElements() };\n}\n\nfunction engraveStaffLine(renderer, staffGroup, selectables, lineNumber) {\n\tdrawStaffGroup(renderer, staffGroup, selectables, lineNumber);\n\tvar height = staffGroup.height * spacing.STEP;\n\trenderer.y += height;\n\treturn staffGroup;\n}\n\nfunction addStaffPadding(renderer, staffSeparation, lastStaffGroup, thisStaffGroup) {\n\tvar lastStaff = lastStaffGroup.staffs[lastStaffGroup.staffs.length - 1];\n\tvar lastBottomLine = -(lastStaff.bottom - 2); // The 2 is because the scale goes to 2 below the last line.\n\tvar nextTopLine = thisStaffGroup.staffs[0].top - 10; // Because 10 represents the top line.\n\tvar naturalSeparation = nextTopLine + lastBottomLine; // This is how far apart they'd be without extra spacing\n\tvar separationInPixels = naturalSeparation * spacing.STEP;\n\tif (separationInPixels < staffSeparation)\n\t\trenderer.moveY(staffSeparation - separationInPixels);\n}\n\nmodule.exports = draw;\n","var printSymbol = require('./print-symbol');\n\nfunction drawDynamics(renderer, params, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Dynamic Element y-coordinate not set.\");\n\tvar scalex = 1;\n\tvar scaley = 1;\n\tvar el = printSymbol(renderer, params.anchor.x, params.pitch, params.dec, {\n\t\tscalex: scalex,\n\t\tscaley: scaley,\n\t\tklass: renderer.controller.classes.generate('decoration dynamics'),\n\t\tfill: renderer.foregroundColor,\n\t\tstroke: \"none\",\n\t\tname: \"dynamics\"\n\t});\n\tselectables.wrapSvgEl({ el_type: \"dynamicDecoration\", startChar: -1, endChar: -1, decoration: params.dec }, el);\n\treturn [el];\n}\n\nmodule.exports = drawDynamics;\n","var sprintf = require('./sprintf');\nvar renderText = require('./text');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawEnding(renderer, params, linestartx, lineendx, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Ending Element y-coordinate not set.\");\n\tvar y = roundNumber(renderer.calcY(params.pitch));\n\tvar height = 20;\n\tvar pathString = '';\n\n\tif (params.anchor1) {\n\t\tlinestartx = roundNumber(params.anchor1.x + params.anchor1.w);\n\t\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\t\tlinestartx, y, linestartx, roundNumber(y + height));\n\t}\n\n\tif (params.anchor2) {\n\t\tlineendx = roundNumber(params.anchor2.x);\n\t\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\t\tlineendx, y, lineendx, roundNumber(y + height));\n\t}\n\n\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\tlinestartx, y, lineendx, y);\n\n\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate(\"ending\"), \"data-name\": \"ending\" });\n\tprintPath(renderer, { path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, \"data-name\": \"line\" });\n\tif (params.anchor1)\n\t\trenderText(renderer, {\n\t\t\tx: roundNumber(linestartx + 5),\n\t\t\ty: roundNumber(renderer.calcY(params.pitch - 0.5)),\n\t\t\ttext: params.text,\n\t\t\ttype: 'repeatfont',\n\t\t\tklass: 'ending',\n\t\t\tanchor: \"start\",\n\t\t\tnoClass: true,\n\t\t\tname: params.text\n\t\t});\n\tvar g = renderer.paper.closeGroup();\n\tselectables.wrapSvgEl({ el_type: \"ending\", startChar: -1, endChar: -1 }, g);\n\treturn [g];\n}\n\nmodule.exports = drawEnding;\n","var sprintf = require('./sprintf');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawGlissando(renderer, params, selectables) {\n\tif (!params.anchor1 || !params.anchor2 || !params.anchor1.heads || !params.anchor2.heads || params.anchor1.heads.length === 0 || params.anchor2.heads.length === 0)\n\t\twindow.console.error(\"Glissando Element not set.\");\n\n\tvar margin = 4;\n\tvar leftY = renderer.calcY(params.anchor1.heads[0].pitch)\n\tvar rightY = renderer.calcY(params.anchor2.heads[0].pitch)\n\tvar leftX = params.anchor1.x + params.anchor1.w / 2\n\tvar rightX = params.anchor2.x + params.anchor2.w / 2\n\t\n\tvar len = lineLength(leftX, leftY, rightX, rightY)\n\tvar marginLeft = params.anchor1.w / 2 + margin\n\tvar marginRight = params.anchor2.w / 2 + margin\n\tvar s = slope(leftX, leftY, rightX, rightY)\n\tvar leftYAdj = getY(leftY, s, marginLeft)\n\tvar rightYAdj = getY(rightY, s, -marginRight)\n\tvar num = numSquigglies(len - marginLeft - marginRight)\n\n\tvar el = drawSquiggly(renderer, leftX + marginLeft, leftYAdj, num, s)\n\tselectables.wrapSvgEl({ el_type: \"glissando\", startChar: -1, endChar: -1 }, el);\n\treturn [el];\n}\n\nfunction lineLength(leftX, leftY, rightX, rightY) {\n\t// The length from notehead center to notehead center.\n\tvar w = rightX - leftX\n\tvar h = rightY - leftY\n\treturn Math.sqrt(w * w + h * h)\n}\n\nfunction slope(leftX, leftY, rightX, rightY) {\n\treturn (rightY - leftY) / (rightX - leftX)\n}\n\nfunction getY(y, slope, xOfs) {\n\treturn roundNumber(y + (xOfs) * slope);\n}\n\nfunction numSquigglies(length) {\n\tvar endLen = 5; // The width of the end - that is, the non repeating part\n\treturn Math.max(2, Math.floor((length - endLen * 2) / 6));\n}\n\nvar leftStart = [[3.5, -4.8]]\nvar right = [[1.5, -1], [.3, -.3], [-3.5, 3.8]]\nvar leftEnd = [[-1.5, 2]]\nvar top = [[3, 4], [3, -4]]\nvar bottom = [[-3, 4], [-3, -4]]\n\nfunction segment(arr, slope) {\n\tvar ret = \"\";\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tret += 'l' + arr[i][0] + ' ' + getY(arr[i][1], slope, arr[i][0])\n\t}\n\treturn ret\n}\n\nvar drawSquiggly = function (renderer, x, y, num, slope) {\n\tvar p = sprintf(\"M %f %f\", x, y);\n\tp += segment(leftStart, slope)\n\tvar i\n\tfor (i = 0; i < num; i++) {\n\t\tp += segment(top, slope)\n\t}\n\tp += segment(right, slope)\n\tfor (i = 0; i < num; i++)\n\t\tp += segment(bottom, slope)\n\tp += segment(leftEnd, slope) + 'z'\n\treturn printPath(renderer, { path: p, highlight: \"stroke\", stroke: renderer.foregroundColor, 'class': renderer.controller.classes.generate('decoration'), \"data-name\": \"glissando\" });\n}\n\nmodule.exports = drawGlissando;\n","/**\n * Begin a group of glyphs that will always be moved, scaled and highlighted together\n */\n\nvar roundNumber = require(\"./round-number\");\n\nfunction Group() {\n\tthis.ingroup = false;\n}\n\nGroup.prototype.beginGroup = function (paper, controller) {\n\tthis.paper = paper;\n\tthis.controller = controller;\n\tthis.path = [];\n\tthis.lastM = [0, 0];\n\tthis.ingroup = true;\n\tthis.paper.openGroup();\n};\n\nGroup.prototype.isInGroup = function () {\n\treturn this.ingroup;\n}\n\nGroup.prototype.addPath = function (path) {\n\tpath = path || [];\n\tif (path.length === 0) return;\n\tpath[0][0] = \"m\";\n\tpath[0][1] = roundNumber(path[0][1] - this.lastM[0]);\n\tpath[0][2] = roundNumber(path[0][2] - this.lastM[1]);\n\tthis.lastM[0] += path[0][1];\n\tthis.lastM[1] += path[0][2];\n\tthis.path.push(path[0]);\n\tfor (var i = 1, ii = path.length; i < ii; i++) {\n\t\tif (path[i][0] === \"m\") {\n\t\t\tthis.lastM[0] += path[i][1];\n\t\t\tthis.lastM[1] += path[i][2];\n\t\t}\n\t\tthis.path.push(path[i]);\n\t}\n};\n\n/**\n * End a group of glyphs that will always be moved, scaled and highlighted together\n */\nGroup.prototype.endGroup = function (klass, name) {\n\tthis.ingroup = false;\n\t//if (this.path.length === 0) return null;\n\tvar path = \"\";\n\tfor (var i = 0; i < this.path.length; i++)\n\t\tpath += this.path[i].join(\" \");\n\tthis.path = [];\n\n\tvar ret = this.paper.closeGroup();\n\tif (ret) {\n\t\tret.setAttribute(\"class\", this.controller.classes.generate(klass))\n\t\tret.setAttribute(\"fill\", this.controller.renderer.foregroundColor)\n\t\tret.setAttribute(\"stroke\", \"none\")\n\t\tret.setAttribute(\"data-name\", name)\n\t}\n\treturn ret;\n};\n\n// There is just a singleton of this object.\nvar elementGroup = new Group();\n\nmodule.exports = elementGroup;\n","var drawSeparator = require('./separator');\nvar renderText = require('./text');\n\nfunction nonMusic(renderer, obj, selectables) {\n\tfor (var i = 0; i < obj.rows.length; i++) {\n\t\tvar row = obj.rows[i];\n\t\tif (row.absmove) {\n\t\t\trenderer.absolutemoveY(row.absmove);\n\t\t} else if (row.move) {\n\t\t\trenderer.moveY(row.move);\n\t\t} else if (row.text || row.phrases) {\n\t\t\tvar x = row.left ? row.left : 0;\n\t\t\tvar el = renderText(renderer, {\n\t\t\t\tx: x,\n\t\t\t\ty: renderer.y,\n\t\t\t\ttext: row.text,\n\t\t\t\tphrases: row.phrases,\n\t\t\t\t'dominant-baseline': row['dominant-baseline'],\n\t\t\t\ttype: row.font,\n\t\t\t\tklass: row.klass,\n\t\t\t\tname: row.name,\n\t\t\t\tanchor: row.anchor\n\t\t\t});\n\t\t\tif (row.absElemType) {\n\t\t\t\tselectables.wrapSvgEl({\n\t\t\t\t\tel_type: row.absElemType,\n\t\t\t\t\tname: row.name,\n\t\t\t\t\tstartChar: row.startChar,\n\t\t\t\t\tendChar: row.endChar,\n\t\t\t\t\ttext: row.text\n\t\t\t\t}, el);\n\t\t\t}\n\t\t} else if (row.separator) {\n\t\t\tdrawSeparator(renderer, row.separator)\n\t\t} else if (row.startGroup) {\n\t\t\trenderer.paper.openGroup({ klass: row.klass, \"data-name\": row.name });\n\t\t} else if (row.endGroup) {\n\t\t\t// TODO-PER: also create a history element with the title \"row.endGroup\"\n\t\t\tvar g = renderer.paper.closeGroup();\n\t\t\tif (row.absElemType)\n\t\t\t\tselectables.wrapSvgEl({\n\t\t\t\t\tel_type: row.absElemType,\n\t\t\t\t\tname: row.name,\n\t\t\t\t\tstartChar: row.startChar,\n\t\t\t\t\tendChar: row.endChar,\n\t\t\t\t\ttext: \"\"\n\t\t\t\t}, g);\n\t\t}\n\t}\n}\n\nmodule.exports = nonMusic;\n","var sprintf = require('./sprintf');\nvar roundNumber = require(\"./round-number\");\n\nfunction printLine(renderer, x1, x2, y, klass, name, dy) {\n\tvar fill = renderer.foregroundColor;\n\tx1 = roundNumber(x1);\n\tx2 = roundNumber(x2);\n\tvar y1 = roundNumber(y - dy);\n\tvar y2 = roundNumber(y + dy);\n\t// TODO-PER: This fixes a firefox bug where it isn't displayed\n\tif (renderer.firefox112) {\n\t\ty += dy / 2; // Because the y coordinate is the edge of where the line goes but the width widens from the middle.\n\t\tvar attr = {\n\t\t\tx1: x1,\n\t\t\tx2: x2,\n\t\t\ty1: y,\n\t\t\ty2: y,\n\t\t\tstroke: renderer.foregroundColor,\n\t\t\t'stroke-width': Math.abs(dy*2)\n\t\t}\n\t\tif (klass)\n\t\t\tattr['class'] = klass;\n\t\tif (name)\n\t\t\tattr['data-name'] = name;\n\t\t\n\t\treturn renderer.paper.lineToBack(attr);\n\t}\n\n\tvar pathString = sprintf(\"M %f %f L %f %f L %f %f L %f %f z\", x1, y1, x2, y1,\n\t\tx2, y2, x1, y2);\n\tvar options = { path: pathString, stroke: \"none\", fill: fill };\n\tif (name)\n\t\toptions['data-name'] = name;\n\tif (klass)\n\t\toptions['class'] = klass;\n\tvar ret = renderer.paper.pathToBack(options);\n\n\treturn ret;\n}\n\nmodule.exports = printLine;\n\n","function printPath(renderer, attrs, params) {\n\tvar ret = renderer.paper.path(attrs);\n\n\treturn ret;\n}\n\nmodule.exports = printPath;\n","var elementGroup = require('./group-elements');\nvar roundNumber = require(\"./round-number\");\n\nfunction printStem(renderer, x, dx, y1, y2, klass, name) {\n\tif (dx < 0 || y1 < y2) { // correct path \"handedness\" for intersection with other elements\n\t\tvar tmp = roundNumber(y2);\n\t\ty2 = roundNumber(y1);\n\t\ty1 = tmp;\n\t} else {\n\t\ty1 = roundNumber(y1);\n\t\ty2 = roundNumber(y2);\n\t}\n\tx = roundNumber(x);\n\tvar x2 = roundNumber(x + dx);\n\t// TODO-PER: This fixes a firefox bug where it isn't displayed\n\tif (renderer.firefox112) {\n\t\tx += dx / 2; // Because the x coordinate is the edge of where the line goes but the width widens from the middle.\n\t\tvar attr = {\n\t\t\tx1: x,\n\t\t\tx2: x,\n\t\t\ty1: y1,\n\t\t\ty2: y2,\n\t\t\tstroke: renderer.foregroundColor,\n\t\t\t'stroke-width': Math.abs(dx)\n\t\t}\n\t\tif (klass)\n\t\t\tattr['class'] = klass;\n\t\tif (name)\n\t\t\tattr['data-name'] = name;\n\t\t\n\t\treturn renderer.paper.lineToBack(attr);\n\t}\n\tvar pathArray = [[\"M\", x, y1], [\"L\", x, y2], [\"L\", x2, y2], [\"L\", x2, y1], [\"z\"]];\n\tvar attr = { path: \"\" };\n\tfor (var i = 0; i < pathArray.length; i++)\n\t\tattr.path += pathArray[i].join(\" \");\n\tif (klass)\n\t\tattr['class'] = klass;\n\tif (name)\n\t\tattr['data-name'] = name;\n\tif (!elementGroup.isInGroup()) {\n\t\tattr.stroke = \"none\";\n\t\tattr.fill = renderer.foregroundColor;\n\t}\n\treturn renderer.paper.pathToBack(attr);\n}\n\nmodule.exports = printStem;\n","var renderText = require('./text');\nvar glyphs = require('../creation/glyphs');\nvar elementGroup = require('./group-elements');\n\n/**\n * assumes this.y is set appropriately\n * if symbol is a multichar string without a . (as in scripts.staccato) 1 symbol per char is assumed\n * not scaled if not in printgroup\n */\nfunction printSymbol(renderer, x, offset, symbol, options) {\n\t// TODO-PER: what happened to scalex, and scaley? That might have been a bug introduced in refactoring\n\tvar el;\n\tvar ycorr;\n\tif (!symbol) return null;\n\tif (symbol.length > 1 && symbol.indexOf(\".\") < 0) {\n\t\tvar groupClass = elementGroup.isInGroup() ? '' : options.klass // If this is already in a group then don't repeat the classes for the sub-group)\n\t\trenderer.paper.openGroup({ \"data-name\": options.name, klass: groupClass });\n\t\tvar dx = 0;\n\t\tfor (var i = 0; i < symbol.length; i++) {\n\t\t\tvar s = symbol[i];\n\t\t\tycorr = glyphs.getYCorr(s);\n\t\t\tel = glyphs.printSymbol(x + dx, renderer.calcY(offset + ycorr), s, renderer.paper, { stroke: options.stroke, fill: options.fill });\n\t\t\tif (el) {\n\t\t\t\tif (i < symbol.length - 1)\n\t\t\t\t\tdx += kernSymbols(s, symbol[i + 1], glyphs.getSymbolWidth(s));\n\t\t\t} else {\n\t\t\t\trenderText(renderer, { x: x, y: renderer.y, text: \"no symbol:\" + symbol, type: \"debugfont\", klass: 'debug-msg', anchor: 'start' }, false);\n\t\t\t}\n\t\t}\n\t\tvar g = renderer.paper.closeGroup();\n\t\treturn g;\n\t} else {\n\t\tycorr = glyphs.getYCorr(symbol);\n\t\tif (elementGroup.isInGroup()) {\n\t\t\tel = glyphs.printSymbol(x, renderer.calcY(offset + ycorr), symbol, renderer.paper, { \"data-name\": options.name });\n\t\t} else {\n\t\t\tel = glyphs.printSymbol(x, renderer.calcY(offset + ycorr), symbol, renderer.paper, { klass: options.klass, stroke: options.stroke, fill: options.fill, \"data-name\": options.name });\n\t\t}\n\t\tif (el) {\n\t\t\treturn el;\n\t\t}\n\t\trenderText(renderer, { x: x, y: renderer.y, text: \"no symbol:\" + symbol, type: \"debugfont\", klass: 'debug-msg', anchor: 'start' }, false);\n\t\treturn null;\n\t}\n}\n\nfunction kernSymbols(lastSymbol, thisSymbol, lastSymbolWidth) {\n\t// This is just some adjustments to make it look better.\n\tvar width = lastSymbolWidth;\n\tif (lastSymbol === 'f' && thisSymbol === 'f')\n\t\twidth = width * 2 / 3;\n\tif (lastSymbol === 'p' && thisSymbol === 'p')\n\t\twidth = width * 5 / 6;\n\tif (lastSymbol === 'f' && thisSymbol === 'z')\n\t\twidth = width * 5 / 8;\n\treturn width;\n}\n\nmodule.exports = printSymbol;\n","var renderText = require('./text');\nvar printStem = require('./print-stem');\nvar printStaffLine = require('./staff-line');\nvar printSymbol = require('./print-symbol');\n\nfunction drawRelativeElement(renderer, params, bartop) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(params.type + \" Relative Element y-coordinate not set.\");\n\tvar y = renderer.calcY(params.pitch);\n\tswitch (params.type) {\n\t\tcase \"symbol\":\n\t\t\tif (params.c === null) return null;\n\t\t\tvar klass = \"symbol\";\n\t\t\tif (params.klass) klass += \" \" + params.klass;\n\t\t\tparams.graphelem = printSymbol(renderer, params.x, params.pitch, params.c, {\n\t\t\t\tscalex: params.scalex,\n\t\t\t\tscaley: params.scaley,\n\t\t\t\tklass: renderer.controller.classes.generate(klass),\n\t\t\t\t//\t\t\t\tfill:\"none\",\n\t\t\t\t//\t\t\t\tstroke: renderer.foregroundColor,\n\t\t\t\tname: params.name\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: renderer.calcY(15), text: \"\" + params.c, type: \"debugfont\", klass: renderer.controller.classes.generate('debug-msg'), anchor: 'start', centerVertically: false, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"tabNumber\":\n\t\t\tvar hAnchor = \"middle\";\n\t\t\tvar tabFont = \"tabnumberfont\";\n\t\t\tvar tabClass = 'abcjs-tab-number';\n\t\t\tif (params.isGrace) {\n\t\t\t\ttabFont = \"tabgracefont\";\n\t\t\t\ty += 2.5;\n\t\t\t\ttabClass = 'tab-grace'\n\t\t\t}\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: \"\" + params.c, type: tabFont, klass: renderer.controller.classes.generate(tabClass), anchor: hAnchor, centerVertically: false, dim: params.dim, cursor: 'default' }, false);\n\t\t\tbreak;\n\t\tcase \"barNumber\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: \"\" + params.c, type: \"measurefont\", klass: renderer.controller.classes.generate('bar-number'), anchor: \"middle\", dim: params.dim, name: \"bar-number\" }, true);\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: \"vocalfont\", klass: renderer.controller.classes.generate('lyric'), anchor: \"middle\", dim: params.dim, name: \"lyric\" }, false);\n\t\t\tbreak;\n\t\tcase \"chord\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'gchordfont', klass: renderer.controller.classes.generate(\"chord\"), anchor: \"middle\", dim: params.dim, lane: params.getLane(), name: \"chord\" }, false);\n\t\t\tbreak;\n\t\tcase \"decoration\":\n\t\t\t// The +6 is to compensate for the placement of text in svg: to be on the same row as symbols, the y-coord needs to compensate for the center line.\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y + 6, text: params.c, type: 'annotationfont', klass: renderer.controller.classes.generate(\"annotation\"), anchor: params.anchor, centerVertically: true, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'annotationfont', klass: renderer.controller.classes.generate(\"annotation\"), anchor: \"start\", centerVertically: params.centerVertically, dim: params.dim, lane: params.getLane(), name: \"annotation\" }, false);\n\t\t\tbreak;\n\t\tcase \"multimeasure-text\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x + params.w / 2, y: y, text: params.c, type: 'tempofont', klass: renderer.controller.classes.generate(\"rest\"), anchor: \"middle\", centerVertically: false, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"part\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'partsfont', klass: renderer.controller.classes.generate(\"part\"), anchor: \"start\", dim: params.dim, name: params.c }, true);\n\t\t\tbreak;\n\t\tcase \"bar\":\n\t\t\tparams.graphelem = printStem(renderer, params.x, params.linewidth + renderer.lineThickness, y, (bartop) ? bartop : renderer.calcY(params.pitch2), null, \"bar\"); break; // bartop can't be 0\n\t\tcase \"stem\":\n\t\t\tvar stemWidth = params.linewidth > 0 ? params.linewidth + renderer.lineThickness : params.linewidth - renderer.lineThickness\n\t\t\tparams.graphelem = printStem(renderer, params.x, stemWidth, y, renderer.calcY(params.pitch2), 'abcjs-stem', 'stem'); break;\n\t\tcase \"ledger\":\n\t\t\tparams.graphelem = printStaffLine(renderer, params.x, params.x + params.w, params.pitch, \"abcjs-ledger\", \"ledger\", 0.35 + renderer.lineThickness); break;\n\t}\n\tif (params.scalex !== 1 && params.graphelem) {\n\t\tscaleExistingElem(renderer.paper, params.graphelem, params.scalex, params.scaley, params.x, y);\n\t}\n\treturn params.graphelem;\n}\n\nfunction scaleExistingElem(paper, elem, scaleX, scaleY, x, y) {\n\tpaper.setAttributeOnElement(elem, { style: \"transform:scale(\" + scaleX + \",\" + scaleY + \");transform-origin:\" + x + \"px \" + y + \"px;\" });\n}\n\nmodule.exports = drawRelativeElement;\n","function roundNumber(x) {\n\treturn parseFloat(x.toFixed(2));\n}\n\nmodule.exports = roundNumber;\n","var highlight = require('../interactive/highlight');\nvar unhighlight = require('../interactive/unhighlight');\n\nfunction Selectables(paper, selectTypes, tuneNumber) {\n\tthis.elements = [];\n\tthis.paper = paper;\n\tthis.tuneNumber = tuneNumber;\n\tthis.selectTypes = selectTypes;\n}\n\nSelectables.prototype.getElements = function () {\n\treturn this.elements;\n};\n\nSelectables.prototype.add = function (absEl, svgEl, isNoteOrTabNumber, staffPos) {\n\tif (!this.canSelect(absEl))\n\t\treturn;\n\tvar params;\n\tif (this.selectTypes === undefined)\n\t\tparams = { selectable: false, \"data-index\": this.elements.length }; // This is the old behavior.\n\telse\n\t\tparams = { selectable: true, tabindex: 0, \"data-index\": this.elements.length };\n\tthis.paper.setAttributeOnElement(svgEl, params);\n\tvar sel = { absEl: absEl, svgEl: svgEl, isDraggable: isNoteOrTabNumber };\n\tif (staffPos !== undefined)\n\t\tsel.staffPos = staffPos;\n\tthis.elements.push(sel);\n\n};\n\nSelectables.prototype.canSelect = function (absEl) {\n\tif (this.selectTypes === false)\n\t\treturn false;\n\tif (!absEl || !absEl.abcelem)\n\t\treturn false;\n\tif (this.selectTypes === true)\n\t\treturn true;\n\tif (this.selectTypes === undefined) {\n\t\t// by default, only notes and tab numbers can be clicked.\n\t\tif (absEl.abcelem.el_type === 'note' || absEl.abcelem.el_type === 'tabNumber') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\treturn this.selectTypes.indexOf(absEl.abcelem.el_type) >= 0;\n};\n\nSelectables.prototype.wrapSvgEl = function (abcelem, el) {\n\tvar absEl = {\n\t\ttuneNumber: this.tuneNumber,\n\t\tabcelem: abcelem,\n\t\telemset: [el],\n\t\thighlight: highlight,\n\t\tunhighlight: unhighlight\n\t};\n\tthis.add(absEl, el, false);\n};\n\nmodule.exports = Selectables;\n","function drawSeparator(renderer, width) {\n\tvar fill = \"rgba(0,0,0,255)\";\n\tvar stroke = \"rgba(0,0,0,0)\";\n\tvar y = Math.round(renderer.y);\n\tvar staffWidth = renderer.controller.width;\n\tvar x1 = (staffWidth - width) / 2;\n\tvar x2 = x1 + width;\n\tvar pathString = 'M ' + x1 + ' ' + y +\n\t\t' L ' + x2 + ' ' + y +\n\t\t' L ' + x2 + ' ' + (y + 1) +\n\t\t' L ' + x1 + ' ' + (y + 1) +\n\t\t' L ' + x1 + ' ' + y + ' z';\n\trenderer.paper.pathToBack({ path: pathString, stroke: stroke, fill: fill, 'class': renderer.controller.classes.generate('defined-text') });\n}\n\nmodule.exports = drawSeparator;\n","function setPaperSize(renderer, maxwidth, scale, responsive) {\n\tvar w = (maxwidth + renderer.padding.left + renderer.padding.right) * scale;\n\tvar h = (renderer.y + renderer.padding.bottom) * scale;\n\tif (renderer.isPrint)\n\t\th = Math.max(h, 1056); // 11in x 72pt/in x 1.33px/pt\n\t// TODO-PER: We are letting the page get as long as it needs now, but eventually that should go to a second page.\n\n\t// for accessibility\n\tif (renderer.ariaLabel !== '') {\n\t\tvar text = \"Sheet Music\";\n\t\tif (renderer.abctune && renderer.abctune.metaText && renderer.abctune.metaText.title)\n\t\t\ttext += \" for \\\"\" + renderer.abctune.metaText.title + '\"';\n\t\trenderer.paper.setTitle(text);\n\t\tvar label = renderer.ariaLabel ? renderer.ariaLabel : text;\n\t\trenderer.paper.setAttribute(\"aria-label\", label);\n\t}\n\n\t// for dragging - don't select during drag\n\tvar styles = [\n\t\t\"-webkit-touch-callout: none;\",\n\t\t\"-webkit-user-select: none;\",\n\t\t\"-khtml-user-select: none;\",\n\t\t\"-moz-user-select: none;\",\n\t\t\"-ms-user-select: none;\",\n\t\t\"user-select: none;\"\n\t];\n\trenderer.paper.insertStyles(\".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {\" + styles.join(\" \") + \"}\");\n\n\tvar parentStyles = { overflow: \"hidden\" };\n\tif (responsive === 'resize') {\n\t\trenderer.paper.setResponsiveWidth(w, h);\n\t} else {\n\t\tparentStyles.width = \"\";\n\t\tparentStyles.height = h + \"px\";\n\t\tif (scale < 1) {\n\t\t\tparentStyles.width = w + \"px\";\n\t\t\trenderer.paper.setSize(w / scale, h / scale);\n\t\t} else\n\t\t\trenderer.paper.setSize(w, h);\n\t}\n\trenderer.paper.setScale(scale);\n\trenderer.paper.setParentStyles(parentStyles);\n}\n\nmodule.exports = setPaperSize;\n","/**\n * sprintf() for JavaScript v.0.4\n *\n Copyright (c) 2007-present, Alexandru Mărășteanu \n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n * Neither the name of this software nor the names of its contributors may be\n used to endorse or promote products derived from this software without\n specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n//function str_repeat(i, m) { for (var o = []; m > 0; o[--m] = i); return(o.join('')); }\n\nvar sprintf = function () {\n\tvar i = 0, a, f = arguments[i++], o = [], m, p, c, x;\n\twhile (f) {\n\t\tif (m = /^[^\\x25]+/.exec(f)) o.push(m[0]);\n\t\telse if (m = /^\\x25{2}/.exec(f)) o.push('%');\n\t\telse if (m = /^\\x25(?:(\\d+)\\$)?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosuxX])/.exec(f)) {\n\t\t\tif (((a = arguments[m[1] || i++]) == null) || (a == undefined)) throw (\"Too few arguments.\");\n\t\t\tif (/[^s]/.test(m[7]) && (typeof (a) != 'number'))\n\t\t\t\tthrow (\"Expecting number but found \" + typeof (a));\n\t\t\tswitch (m[7]) {\n\t\t\t\tcase 'b': a = a.toString(2); break;\n\t\t\t\tcase 'c': a = String.fromCharCode(a); break;\n\t\t\t\tcase 'd': a = parseInt(a); break;\n\t\t\t\tcase 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;\n\t\t\t\tcase 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;\n\t\t\t\tcase 'o': a = a.toString(8); break;\n\t\t\t\tcase 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;\n\t\t\t\tcase 'u': a = Math.abs(a); break;\n\t\t\t\tcase 'x': a = a.toString(16); break;\n\t\t\t\tcase 'X': a = a.toString(16).toUpperCase(); break;\n\t\t\t}\n\t\t\ta = (/[def]/.test(m[7]) && m[2] && a > 0 ? '+' + a : a);\n\t\t\tc = m[3] ? m[3] == '0' ? '0' : m[3][1] : ' ';\n\t\t\tx = m[5] - String(a).length;\n\t\t\tp = m[5] ? str_repeat(c, x) : '';\n\t\t\to.push(m[4] ? a + p : p + a);\n\t\t}\n\t\telse throw (\"Huh ?!\");\n\t\tf = f.substring(m[0].length);\n\t}\n\treturn o.join('');\n};\n\nmodule.exports = sprintf;\n","var spacing = require('../helpers/spacing');\nvar drawBrace = require('./brace');\nvar drawVoice = require('./voice');\nvar printStaff = require('./staff');\nvar printDebugBox = require('./debug-box');\nvar printStem = require('./print-stem');\nvar nonMusic = require('./non-music');\n\nfunction drawStaffGroup(renderer, params, selectables, lineNumber) {\n\t// We enter this method with renderer.y pointing to the topmost coordinate that we're allowed to draw.\n\t// All of the children that will be drawn have a relative \"pitch\" set, where zero is the first ledger line below the staff.\n\t// renderer.y will be offset at the beginning of each staff by the amount required to make the relative pitch work.\n\t// If there are multiple staves, then renderer.y will be incremented for each new staff.\n\n\tvar colorIndex;\n\n\t// An invisible marker is useful to be able to find where each system starts.\n\t//addInvisibleMarker(renderer, \"abcjs-top-of-system\");\n\n\tvar startY = renderer.y; // So that it can be restored after we're done.\n\t// Set the absolute Y position for each staff here, so the voice drawing below can just use if.\n\tfor (var j = 0; j < params.staffs.length; j++) {\n\t\tvar staff1 = params.staffs[j];\n\t\t//renderer.printHorizontalLine(50, renderer.y, \"start\");\n\t\trenderer.moveY(spacing.STEP, staff1.top);\n\t\tstaff1.absoluteY = renderer.y;\n\t\tif (renderer.showDebug) {\n\t\t\tif (renderer.showDebug.indexOf(\"box\") >= 0 && staff1.voices) {\n\t\t\t\tboxAllElements(renderer, params.voices, staff1.voices);\n\t\t\t}\n\t\t\tif (renderer.showDebug.indexOf(\"grid\") >= 0) {\n\t\t\t\trenderer.paper.dottedLine({ x1: renderer.padding.left, x2: renderer.padding.left + renderer.controller.width, y1: startY, y2: startY, stroke: \"#0000ff\" });\n\t\t\t\tprintDebugBox(renderer,\n\t\t\t\t\t{\n\t\t\t\t\t\tx: renderer.padding.left,\n\t\t\t\t\t\ty: renderer.calcY(staff1.originalTop),\n\t\t\t\t\t\twidth: renderer.controller.width,\n\t\t\t\t\t\theight: renderer.calcY(staff1.originalBottom) - renderer.calcY(staff1.originalTop),\n\t\t\t\t\t\tfill: renderer.foregroundColor,\n\t\t\t\t\t\tstroke: renderer.foregroundColor,\n\t\t\t\t\t\t\"fill-opacity\": 0.1,\n\t\t\t\t\t\t\"stroke-opacity\": 0.1\n\t\t\t\t\t});\n\t\t\t\tcolorIndex = 0;\n\t\t\t\tdebugPrintGridItem(staff1, 'chordHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'chordHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'dynamicHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'dynamicHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'endingHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'lyricHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'lyricHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'partHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'tempoHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'volumeHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'volumeHeightBelow');\n\t\t\t}\n\t\t}\n\t\trenderer.moveY(spacing.STEP, -staff1.bottom);\n\t\tif (renderer.showDebug) {\n\t\t\tif (renderer.showDebug.indexOf(\"grid\") >= 0) {\n\t\t\t\trenderer.paper.dottedLine({\n\t\t\t\t\tx1: renderer.padding.left,\n\t\t\t\t\tx2: renderer.padding.left + renderer.controller.width,\n\t\t\t\t\ty1: renderer.y,\n\t\t\t\t\ty2: renderer.y,\n\t\t\t\t\tstroke: \"#0000aa\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tvar topLine; // these are to connect multiple staves. We need to remember where they are.\n\tvar bottomLine;\n\n\tvar linePitch = 2;\n\tvar bartop = 0;\n\tfor (var i = 0; i < params.voices.length; i++) {\n\t\tvar staff = params.voices[i].staff;\n\t\tvar tabName = params.voices[i].tabNameInfos;\n\t\trenderer.y = staff.absoluteY;\n\t\trenderer.controller.classes.incrVoice();\n\t\t//renderer.y = staff.y;\n\t\t// offset for starting the counting at middle C\n\t\tif (!params.voices[i].duplicate) {\n\t\t\t//\t\t\trenderer.moveY(spacing.STEP, staff.top);\n\t\t\tif (!topLine) topLine = renderer.calcY(10);\n\t\t\tbottomLine = renderer.calcY(linePitch);\n\t\t\tif (staff.lines !== 0) {\n\t\t\t\tif (staff.linePitch) {\n\t\t\t\t\tlinePitch = staff.linePitch;\n\t\t\t\t}\n\t\t\t\trenderer.controller.classes.newMeasure();\n\t\t\t\tvar lines = printStaff(renderer, params.startx, params.w, staff.lines, staff.linePitch, 0.35);\n\t\t\t\tbottomLine = lines[1];\n\t\t\t\tstaff.bottomLine = bottomLine;\n\t\t\t\tstaff.topLine = lines[0];\n\t\t\t\t// rework bartop when tabs are present with current staff\n\t\t\t\tif (staff.hasTab) {\n\t\t\t\t\t// do not link to staff above (ugly looking)\n\t\t\t\t\tbartop = staff.topLine;\n\t\t\t\t}\n\t\t\t\tif (staff.hasStaff) {\n\t\t\t\t\t// this is a tab\n\t\t\t\t\tbartop = staff.hasStaff.topLine;\n\t\t\t\t\tparams.voices[i].barto = true;\n\t\t\t\t\tparams.voices[i].topLine = topLine;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tprintBrace(renderer, staff.absoluteY, params.brace, i, selectables);\n\t\t\tprintBrace(renderer, staff.absoluteY, params.bracket, i, selectables);\n\t\t}\n\t\tdrawVoice(renderer, params.voices[i], bartop, selectables, {\n\t\t\ttop: startY,\n\t\t\tzero: renderer.y,\n\t\t\theight: params.height * spacing.STEP\n\t\t});\n\t\tvar tabNameHeight = 0;\n\t\tif (tabName) {\n\t\t\t// print tab infos on staffBottom\n\t\t\tvar r = { rows: [] };\n\t\t\tr.rows.push({ absmove: bottomLine + 2 });\n\t\t\tvar leftMargin = 8;\n\t\t\tr.rows.push({ left: params.startx + leftMargin, text: tabName.name, font: 'tablabelfont', klass: 'text instrument-name', anchor: 'start' });\n\t\t\tr.rows.push({ move: tabName.textSize.height });\n\t\t\tnonMusic(renderer, r);\n\t\t\ttabNameHeight = tabName.textSize.height;\n\t\t}\n\n\t\trenderer.controller.classes.newMeasure();\n\t\tif (!params.voices[i].duplicate) {\n\t\t\tbartop = renderer.calcY(2 + tabNameHeight); // This connects the bar lines between two different staves.\n\t\t\t//\t\t\tif (staff.bottom < 0)\n\t\t\t//\t\t\t\trenderer.moveY(spacing.STEP, -staff.bottom);\n\t\t}\n\t}\n\trenderer.controller.classes.newMeasure();\n\n\t// connect all the staves together with a vertical line\n\tvar staffSize = params.staffs.length;\n\tif (staffSize > 1) {\n\t\ttopLine = params.staffs[0].topLine;\n\t\tbottomLine = params.staffs[staffSize - 1].bottomLine;\n\t\tprintStem(renderer, params.startx, 0.6, topLine, bottomLine, null);\n\t}\n\trenderer.y = startY;\n\n\tfunction debugPrintGridItem(staff, key) {\n\t\tvar colors = [\"rgb(207,27,36)\", \"rgb(168,214,80)\", \"rgb(110,161,224)\", \"rgb(191,119,218)\", \"rgb(195,30,151)\",\n\t\t\t\"rgb(31,170,177)\", \"rgb(220,166,142)\"];\n\t\tif (staff.positionY && staff.positionY[key]) {\n\t\t\tvar height = staff.specialY[key] * spacing.STEP;\n\t\t\tif (key === \"chordHeightAbove\" && staff.specialY.chordLines && staff.specialY.chordLines.above)\n\t\t\t\theight *= staff.specialY.chordLines.above;\n\t\t\tif (key === \"chordHeightBelow\" && staff.specialY.chordLines && staff.specialY.chordLines.below)\n\t\t\t\theight *= staff.specialY.chordLines.below;\n\t\t\tprintDebugBox(renderer,\n\t\t\t\t{\n\t\t\t\t\tx: renderer.padding.left,\n\t\t\t\t\ty: renderer.calcY(staff.positionY[key]),\n\t\t\t\t\twidth: renderer.controller.width,\n\t\t\t\t\theight: height,\n\t\t\t\t\tfill: colors[colorIndex],\n\t\t\t\t\tstroke: colors[colorIndex],\n\t\t\t\t\t\"fill-opacity\": 0.4,\n\t\t\t\t\t\"stroke-opacity\": 0.4\n\t\t\t\t},\n\t\t\t\tkey.substr(0, 4));\n\t\t\tcolorIndex += 1; if (colorIndex > 6) colorIndex = 0;\n\t\t}\n\t}\n}\n\nfunction printBrace(renderer, absoluteY, brace, index, selectables) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tif (brace[i].isStartVoice(index)) {\n\t\t\t\tbrace[i].startY = absoluteY - spacing.STEP * 10;\n\t\t\t\tbrace[i].elemset = drawBrace(renderer, brace[i], selectables);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// function addInvisibleMarker(renderer, className) {\n// \tvar y = Math.round(renderer.y);\n// \trenderer.paper.pathToBack({path:\"M 0 \" + y + \" L 0 0\", stroke:\"none\", fill:\"none\", \"stroke-opacity\": 0, \"fill-opacity\": 0, 'class': renderer.controller.classes.generate(className), 'data-vertical': y });\n// }\n\nfunction boxAllElements(renderer, voices, which) {\n\tfor (var i = 0; i < which.length; i++) {\n\t\tvar children = voices[which[i]].children;\n\t\tfor (var j = 0; j < children.length; j++) {\n\t\t\tvar elem = children[j];\n\t\t\tvar coords = elem.getFixedCoords();\n\t\t\tif (elem.invisible || coords.t === undefined || coords.b === undefined)\n\t\t\t\tcontinue;\n\t\t\tvar height = (coords.t - coords.b) * spacing.STEP;\n\t\t\tprintDebugBox(renderer,\n\t\t\t\t{\n\t\t\t\t\tx: coords.x,\n\t\t\t\t\ty: renderer.calcY(coords.t),\n\t\t\t\t\twidth: coords.w,\n\t\t\t\t\theight: height,\n\t\t\t\t\tfill: \"#88e888\",\n\t\t\t\t\t\"fill-opacity\": 0.4,\n\t\t\t\t\tstroke: \"#4aa93d\",\n\t\t\t\t\t\"stroke-opacity\": 0.8\n\t\t\t\t});\n\n\t\t\tfor (var k = 0; k < elem.children.length; k++) {\n\t\t\t\tvar relElem = elem.children[k];\n\t\t\t\tvar chord = relElem.getChordDim();\n\t\t\t\tif (chord) {\n\t\t\t\t\tvar y = renderer.calcY(relElem.pitch);\n\t\t\t\t\ty += relElem.dim.font.size * relElem.getLane();\n\t\t\t\t\tprintDebugBox(renderer,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: chord.left,\n\t\t\t\t\t\t\ty: y,\n\t\t\t\t\t\t\twidth: chord.right - chord.left,\n\t\t\t\t\t\t\theight: relElem.dim.font.size,\n\t\t\t\t\t\t\tfill: \"none\",\n\t\t\t\t\t\t\tstroke: \"#4aa93d\",\n\t\t\t\t\t\t\t\"stroke-opacity\": 0.8\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = drawStaffGroup;\n","var printLine = require('./print-line');\n\nfunction printStaffLine(renderer, x1, x2, pitch, klass, name, dy) {\n\tvar y = renderer.calcY(pitch);\n\treturn printLine(renderer, x1, x2, y, klass, name, dy);\n}\n\nmodule.exports = printStaffLine;\n\n","var printStaffLine = require('./staff-line');\n\nfunction printStaff(renderer, startx, endx, numLines, linePitch, dy) {\n\tvar klass = \"abcjs-top-line\";\n\tvar pitch = 2;\n\tif (linePitch) {\n\t\tpitch = linePitch;\n\t}\n\trenderer.paper.openGroup({ prepend: true, klass: renderer.controller.classes.generate(\"abcjs-staff\") });\n\t// If there is one line, it is the B line. Otherwise, the bottom line is the E line.\n\tvar firstYLine = 0;\n\tvar lastYLine = 0;\n\tif (numLines === 1) {\n\t\tprintStaffLine(renderer, startx, endx, 6, klass, null, dy + renderer.lineThickness);\n\t\tfirstYLine = renderer.calcY(10);\n\t\tlastYLine = renderer.calcY(2);\n\t} else {\n\n\t\tfor (var i = numLines - 1; i >= 0; i--) {\n\t\t\tvar curpitch = (i + 1) * pitch;\n\t\t\tlastYLine = renderer.calcY(curpitch);\n\t\t\tif (firstYLine === 0) {\n\t\t\t\tfirstYLine = lastYLine;\n\t\t\t}\n\t\t\tprintStaffLine(renderer, startx, endx, curpitch, klass, null, dy + renderer.lineThickness);\n\t\t\tklass = undefined;\n\t\t}\n\t}\n\trenderer.paper.closeGroup();\n\treturn [firstYLine, lastYLine];\n}\n\nmodule.exports = printStaff;\n","var drawRelativeElement = require('./relative');\nvar renderText = require('./text');\n\nfunction drawTempo(renderer, params) {\n\tvar x = params.x;\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Tempo Element y-coordinate not set.\");\n\n\t//var tempoGroup;\n\tparams.tempo.el_type = \"tempo\";\n\t//\trenderer.wrapInAbsElem(params.tempo, \"abcjs-tempo\", function () {\n\t//renderer.paper.openGroup({klass: renderer.controller.classes.generate(\"tempo wha\")});\n\t// The text is aligned with extra room for descenders but numbers look like they are a little too high, so bump it a little.\n\tvar descenderHeight = 2;\n\tvar y = renderer.calcY(params.pitch) + 2;\n\tvar text;\n\tvar size;\n\tif (params.tempo.preString) {\n\t\ttext = renderText(renderer, { x: x, y: y, text: params.tempo.preString, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"pre\" }, true);\n\t\tsize = renderer.controller.getTextSize.calc(params.tempo.preString, 'tempofont', 'tempo', text);\n\t\tvar preWidth = size.width;\n\t\tvar charWidth = preWidth / params.tempo.preString.length; // Just get some average number to increase the spacing.\n\t\tx += preWidth + charWidth;\n\t}\n\tif (params.note) {\n\t\tparams.note.setX(x);\n\t\tfor (var i = 0; i < params.note.children.length; i++)\n\t\t\tdrawRelativeElement(renderer, params.note.children[i], x);\n\t\tx += (params.note.w + 5);\n\t\tvar str = \"= \" + params.tempo.bpm;\n\t\ttext = renderText(renderer, { x: x, y: y, text: str, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"beats\" });\n\t\tsize = renderer.controller.getTextSize.calc(str, 'tempofont', 'tempo', text);\n\t\tvar postWidth = size.width;\n\t\tvar charWidth2 = postWidth / str.length; // Just get some average number to increase the spacing.\n\t\tx += postWidth + charWidth2;\n\t}\n\tif (params.tempo.postString) {\n\t\trenderText(renderer, { x: x, y: y, text: params.tempo.postString, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"post\" }, true);\n\t}\n\t//tempoGroup = renderer.paper.closeGroup();\n\t//\t});\n\t//return [tempoGroup];\n}\n\nmodule.exports = drawTempo;\n","var roundNumber = require(\"./round-number\");\n\nfunction renderText(renderer, params, alreadyInGroup) {\n\tvar y = params.y;\n\n\t// TODO-PER: Probably need to merge the regular text and rich text better. At the least, rich text loses the font box.\n\tif (params.phrases) {\n\t\t//richTextLine = function (phrases, x, y, klass, anchor, target)\n\t\tvar elem = renderer.paper.richTextLine(params.phrases, params.x, params.y, params.klass, params.anchor);\n\t\treturn elem;\n\t}\n\n\tif (params.lane) {\n\t\tvar laneMargin = params.dim.font.size * 0.25;\n\t\ty += (params.dim.font.size + laneMargin) * params.lane;\n\t}\n\n\tvar hash;\n\tif (params.dim) {\n\t\thash = params.dim;\n\t\thash.attr.class = params.klass;\n\t} else\n\t\thash = renderer.controller.getFontAndAttr.calc(params.type, params.klass);\n\tif (params.anchor)\n\t\thash.attr[\"text-anchor\"] = params.anchor;\n\tif (params['dominant-baseline'])\n\t\thash.attr[\"dominant-baseline\"] = params['dominant-baseline'];\n\thash.attr.x = params.x;\n\thash.attr.y = y;\n\tif (!params.centerVertically)\n\t\thash.attr.y += hash.font.size;\n\tif (params.type === 'debugfont') {\n\t\tconsole.log(\"Debug msg: \" + params.text);\n\t\thash.attr.stroke = \"#ff0000\";\n\t}\n\tif (params.cursor) {\n\t\thash.attr.cursor = params.cursor;\n\t}\n\n\tvar text = params.text.replace(/\\n\\n/g, \"\\n \\n\");\n\ttext = text.replace(/^\\n/, \"\\xA0\\n\");\n\n\tif (hash.font.box) {\n\t\tif (!alreadyInGroup)\n\t\t\trenderer.paper.openGroup({ klass: hash.attr['class'], fill: renderer.foregroundColor, \"data-name\": params.name });\n\t\tif (hash.attr[\"text-anchor\"] === \"end\") {\n\t\t\thash.attr.x -= hash.font.padding;\n\t\t} else if (hash.attr[\"text-anchor\"] === \"start\") {\n\t\t\thash.attr.x += hash.font.padding;\n\t\t}\n\t\thash.attr.y += hash.font.padding;\n\t\tdelete hash.attr['class'];\n\t}\n\tif (params.noClass)\n\t\tdelete hash.attr['class'];\n\thash.attr.x = roundNumber(hash.attr.x);\n\thash.attr.y = roundNumber(hash.attr.y);\n\tif (params.name)\n\t\thash.attr[\"data-name\"] = params.name;\n\tvar elem = renderer.paper.text(text, hash.attr);\n\tif (hash.font.box) {\n\t\tvar size = elem.getBBox();\n\n\t\tvar delta = 0;\n\t\tif (hash.attr[\"text-anchor\"] === \"middle\") {\n\t\t\tdelta = size.width / 2 + hash.font.padding;\n\t\t} else if (hash.attr[\"text-anchor\"] === \"end\") {\n\t\t\tdelta = size.width + hash.font.padding * 2;\n\t\t}\n\t\tvar deltaY = 0;\n\t\tif (params.centerVertically) {\n\t\t\tdeltaY = size.height - hash.font.padding;\n\t\t}\n\t\trenderer.paper.rect({ \"data-name\": \"box\", x: Math.round(params.x - delta), y: Math.round(y - deltaY), width: Math.round(size.width + hash.font.padding * 2), height: Math.round(size.height + hash.font.padding * 2) });\n\t\tif (!alreadyInGroup)\n\t\t\telem = renderer.paper.closeGroup();\n\t}\n\treturn elem;\n}\n\nmodule.exports = renderText;\n","var sprintf = require('./sprintf');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawTie(renderer, params, linestartx, lineendx, selectables) {\n\tlayout(params, linestartx, lineendx);\n\n\tvar klass = '';\n\tif (params.anchor1) {\n\t\tklass += 'abcjs-start-m' + params.anchor1.parent.counters.measure + '-n' + params.anchor1.parent.counters.note;\n\t} else\n\t\tklass += 'abcjs-start-edge';\n\tif (params.anchor2) {\n\t\tklass += ' abcjs-end-m' + params.anchor2.parent.counters.measure + '-n' + params.anchor2.parent.counters.note;\n\t} else\n\t\tklass += ' abcjs-end-edge';\n\tif (params.hint)\n\t\tklass = \"abcjs-hint\";\n\tvar fudgeY = params.fixedY ? 1.5 : 0; // TODO-PER: This just compensates for drawArc, which contains too much knowledge of ties and slurs.\n\tvar el = drawArc(renderer, params.startX, params.endX, params.startY + fudgeY, params.endY + fudgeY, params.above, klass, params.isTie, params.dotted);\n\tvar startChar = -1\n\t// This gets the start and end points of the contents of the slur. We assume that the parenthesis are just to the outside of that.\n\tif (params.anchor1 && !params.isTie)\n\t\tstartChar = params.anchor1.parent.abcelem.startChar - 1\n\tvar endChar = -1\n\tif (params.anchor2 && !params.isTie)\n\t\tendChar = params.anchor2.parent.abcelem.endChar + 1\n\n\tselectables.wrapSvgEl({ el_type: \"slur\", startChar: startChar, endChar: endChar }, el);\n\treturn [el];\n}\n\n// TODO-PER: I think params part should have been done earlier in the layout pass.\nvar layout = function (params, lineStartX, lineEndX) {\n\t// We now have all of the input variables set, so we can figure out the start and ending x,y coordinates, and finalize the direction of the arc.\n\n\t// Ties and slurs are handled a little differently, so do calculations for them separately.\n\tif (!params.anchor1 || !params.anchor2)\n\t\tparams.isTie = true; // if the slur goes off the end of the line, then draw it like a tie\n\telse if (params.anchor1.pitch === params.anchor2.pitch && params.internalNotes.length === 0)\n\t\tparams.isTie = true;\n\telse\n\t\tparams.isTie = false;\n\n\tif (params.isTie) {\n\t\tparams.calcTieDirection();\n\t\tparams.calcX(lineStartX, lineEndX);\n\t\tparams.calcTieY();\n\n\t} else {\n\t\tparams.calcSlurDirection();\n\t\tparams.calcX(lineStartX, lineEndX);\n\t\tparams.calcSlurY();\n\t}\n\tparams.avoidCollisionAbove();\n};\n\nvar drawArc = function (renderer, x1, x2, pitch1, pitch2, above, klass, isTie, dotted) {\n\t// If it is a tie vs. a slur, draw it shallower.\n\tvar spacing = isTie ? 1.2 : 1.5;\n\n\tx1 = roundNumber(x1 + 6);\n\tx2 = roundNumber(x2 + 4);\n\tpitch1 = pitch1 + ((above) ? spacing : -spacing);\n\tpitch2 = pitch2 + ((above) ? spacing : -spacing);\n\tvar y1 = roundNumber(renderer.calcY(pitch1));\n\tvar y2 = roundNumber(renderer.calcY(pitch2));\n\n\t//unit direction vector\n\tvar dx = x2 - x1;\n\tvar dy = y2 - y1;\n\tvar norm = Math.sqrt(dx * dx + dy * dy);\n\tvar ux = dx / norm;\n\tvar uy = dy / norm;\n\n\tvar flatten = norm / 3.5;\n\tvar maxFlatten = isTie ? 10 : 25; // If it is a tie vs. a slur, draw it shallower.\n\tvar curve = ((above) ? -1 : 1) * Math.min(maxFlatten, Math.max(4, flatten));\n\n\tvar controlx1 = roundNumber(x1 + flatten * ux - curve * uy);\n\tvar controly1 = roundNumber(y1 + flatten * uy + curve * ux);\n\tvar controlx2 = roundNumber(x2 - flatten * ux - curve * uy);\n\tvar controly2 = roundNumber(y2 - flatten * uy + curve * ux);\n\tvar thickness = 2;\n\tif (klass)\n\t\tklass += ' slur';\n\telse\n\t\tklass = 'slur';\n\tklass += isTie ? ' tie' : ' legato';\n\tvar ret;\n\tif (dotted) {\n\t\tklass += ' dotted';\n\t\tvar pathString2 = sprintf(\"M %f %f C %f %f %f %f %f %f\", x1, y1,\n\t\t\tcontrolx1, controly1, controlx2, controly2, x2, y2);\n\t\tret = renderer.paper.path({ path: pathString2, stroke: renderer.foregroundColor, fill: \"none\", 'stroke-dasharray': \"5 5\", 'class': renderer.controller.classes.generate(klass), \"data-name\": isTie ? \"tie\" : \"slur\" });\n\t} else {\n\t\tvar pathString = sprintf(\"M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z\", x1, y1,\n\t\t\tcontrolx1, controly1, controlx2, controly2, x2, y2,\n\t\t\troundNumber(controlx2 - thickness * uy), roundNumber(controly2 + thickness * ux), roundNumber(controlx1 - thickness * uy), roundNumber(controly1 + thickness * ux), x1, y1);\n\t\tret = renderer.paper.path({ path: pathString, stroke: \"none\", fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(klass), \"data-name\": isTie ? \"tie\" : \"slur\" });\n\t}\n\n\treturn ret;\n};\n\nmodule.exports = drawTie;\n","var sprintf = require('./sprintf');\nvar renderText = require('./text');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawTriplet(renderer, params, selectables) {\n\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate('triplet ' + params.durationClass), \"data-name\": \"triplet\" });\n\tif (!params.hasBeam) {\n\t\tdrawBracket(renderer, params.anchor1.x, params.startNote, params.anchor2.x + params.anchor2.w, params.endNote);\n\t}\n\t// HACK: adjust the position of \"3\". It is too high in all cases so we fudge it by subtracting 1 here.\n\trenderText(renderer, { x: params.xTextPos, y: renderer.calcY(params.yTextPos - 1), text: \"\" + params.number, type: 'tripletfont', anchor: \"middle\", centerVertically: true, noClass: true, name: \"\" + params.number }, true);\n\tvar g = renderer.paper.closeGroup();\n\tselectables.wrapSvgEl({ el_type: \"triplet\", startChar: -1, endChar: -1 }, g);\n\treturn g;\n}\n\nfunction drawLine(l, t, r, b) {\n\treturn sprintf(\"M %f %f L %f %f\", roundNumber(l), roundNumber(t), roundNumber(r), roundNumber(b));\n}\n\nfunction drawBracket(renderer, x1, y1, x2, y2) {\n\ty1 = renderer.calcY(y1);\n\ty2 = renderer.calcY(y2);\n\tvar bracketHeight = 5;\n\n\t// Draw vertical lines at the beginning and end\n\tvar pathString = \"\";\n\tpathString += drawLine(x1, y1, x1, y1 + bracketHeight);\n\tpathString += drawLine(x2, y2, x2, y2 + bracketHeight);\n\n\t// figure out midpoints to draw the broken line.\n\tvar midX = x1 + (x2 - x1) / 2;\n\t//var midY = y1 + (y2-y1)/2;\n\tvar gapWidth = 8;\n\tvar slope = (y2 - y1) / (x2 - x1);\n\tvar leftEndX = midX - gapWidth;\n\tvar leftEndY = y1 + (leftEndX - x1) * slope;\n\tpathString += drawLine(x1, y1, leftEndX, leftEndY);\n\tvar rightStartX = midX + gapWidth;\n\tvar rightStartY = y1 + (rightStartX - x1) * slope;\n\tpathString += drawLine(rightStartX, rightStartY, x2, y2);\n\tprintPath(renderer, { path: pathString, stroke: renderer.foregroundColor, \"data-name\": \"triplet-bracket\" });\n}\n\nmodule.exports = drawTriplet;\n","var drawGlissando = require('./glissando');\nvar drawCrescendo = require('./crescendo');\nvar drawDynamics = require('./dynamics');\nvar drawTriplet = require('./triplet');\nvar drawEnding = require('./ending');\nvar drawTie = require('./tie');\nvar drawBeam = require('./beam');\nvar renderText = require('./text');\nvar drawAbsolute = require('./absolute');\n\nfunction drawVoice(renderer, params, bartop, selectables, staffPos) {\n\tvar width = params.w - 1;\n\trenderer.staffbottom = params.staff.bottom;\n\tvar saveColor = renderer.foregroundColor\n\tif (params.color)\n\t\trenderer.foregroundColor = params.color\n\n\tif (params.header) { // print voice name\n\t\tvar textEl = renderText(renderer, { x: renderer.padding.left, y: renderer.calcY(params.headerPosition), text: params.header, type: 'voicefont', klass: 'staff-extra voice-name', anchor: 'start', centerVertically: true, name: \"voice-name\" }, true);\n\t\tselectables.wrapSvgEl({ el_type: \"voiceName\", startChar: -1, endChar: -1, text: params.header }, textEl);\n\t}\n\n\tvar i;\n\tvar child;\n\tvar foundNote = false;\n\tfor (i = 0; i < params.children.length; i++) {\n\t\tchild = params.children[i];\n\t\tif (child.type === 'note' || child.type === 'rest')\n\t\t\tfoundNote = true;\n\t\tvar justInitializedMeasureNumber = false;\n\t\tif (child.type !== 'staff-extra' && !renderer.controller.classes.isInMeasure()) {\n\t\t\trenderer.controller.classes.startMeasure();\n\t\t\tjustInitializedMeasureNumber = true;\n\t\t}\n\t\tif (params.staff.isTabStaff) {\n\t\t\tchild.invisible = false;\n\t\t\tif (child.type == 'bar') {\n\t\t\t\tif (child.abcelem.lastBar) {\n\t\t\t\t\tbartop = params.topLine;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdrawAbsolute(renderer, child, (params.barto || i === params.children.length - 1) ? bartop : 0, selectables, staffPos);\n\n\t\tif (child.type === 'note' || isNonSpacerRest(child))\n\t\t\trenderer.controller.classes.incrNote();\n\t\tif (child.type === 'bar' && !justInitializedMeasureNumber && foundNote) {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t}\n\t}\n\n\trenderer.controller.classes.startMeasure();\n\n\tfor (i = 0; i < params.beams.length; i++) {\n\t\tvar beam = params.beams[i];\n\t\tif (beam === 'bar') {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t} else\n\t\t\tdrawBeam(renderer, beam, selectables); // beams must be drawn first for proper printing of triplets, slurs and ties.\n\t}\n\n\trenderer.controller.classes.startMeasure();\n\tfor (i = 0; i < params.otherchildren.length; i++) {\n\t\tchild = params.otherchildren[i];\n\t\tif (child === 'bar') {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t} else {\n\t\t\tswitch (child.type) {\n\t\t\t\tcase \"GlissandoElem\":\n\t\t\t\t\tchild.elemset = drawGlissando(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CrescendoElem\":\n\t\t\t\t\tchild.elemset = drawCrescendo(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DynamicDecoration\":\n\t\t\t\t\tchild.elemset = drawDynamics(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"TripletElem\":\n\t\t\t\t\tdrawTriplet(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EndingElem\":\n\t\t\t\t\tchild.elemset = drawEnding(renderer, child, params.startx + 10, width, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"TieElem\":\n\t\t\t\t\tchild.elemset = drawTie(renderer, child, params.startx + 10, width, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.log(child);\n\t\t\t\t\tdrawAbsolute(renderer, child, params.startx + 10, width, selectables, staffPos);\n\t\t\t}\n\t\t}\n\t}\n\trenderer.foregroundColor = saveColor\n\n}\n\nfunction isNonSpacerRest(elem) {\n\tif (elem.type !== 'rest')\n\t\treturn false;\n\tif (elem.abcelem && elem.abcelem.rest && elem.abcelem.rest.type !== 'spacer')\n\t\treturn true;\n\treturn false;\n}\n\nmodule.exports = drawVoice;\n","// abc_engraver_controller.js: Controls the engraving process of an ABCJS abstract syntax tree as produced by ABCJS/parse\n\n/*global Math */\n\nvar spacing = require('./helpers/spacing');\nvar AbstractEngraver = require('./creation/abstract-engraver');\nvar Renderer = require('./renderer');\nvar FreeText = require('./creation/elements/free-text');\nvar Separator = require('./creation/elements/separator');\nvar Subtitle = require('./creation/elements/subtitle');\nvar TopText = require('./creation/elements/top-text');\nvar BottomText = require('./creation/elements/bottom-text');\nvar setupSelection = require('./interactive/selection');\nvar layout = require('./layout/layout');\nvar Classes = require('./helpers/classes');\nvar GetFontAndAttr = require('./helpers/get-font-and-attr');\nvar GetTextSize = require('./helpers/get-text-size');\nvar draw = require('./draw/draw');\nvar tablatures = require('../tablatures/abc_tablatures');\nvar findSelectableElement = require('./interactive/find-selectable-element');\n\n/**\n * @class\n * Controls the engraving process, from ABCJS Abstract Syntax Tree (ABCJS AST) to rendered score sheet\n *\n * Call engraveABC to run the process. This creates a graphelems ABCJS Abstract Engraving Structure (ABCJS AES) that can be accessed through this.staffgroups\n * this data structure is first laid out (giving the graphelems x and y coordinates) and then drawn onto the renderer\n * each ABCJS AES represents a single staffgroup - all elements that are not in a staffgroup are rendered directly by the controller\n *\n * elements in ABCJS AES know their \"source data\" in the ABCJS AST, and their \"target shape\"\n * in the renderer for highlighting purposes\n *\n */\nvar EngraverController = function (paper, params) {\n\tparams = params || {};\n\tthis.findSelectableElement = findSelectableElement;\n\tthis.oneSvgPerLine = params.oneSvgPerLine;\n\tthis.selectionColor = params.selectionColor;\n\tthis.dragColor = params.dragColor ? params.dragColor : params.selectionColor;\n\tthis.dragging = !!params.dragging;\n\tthis.selectTypes = params.selectTypes;\n\tthis.responsive = params.responsive;\n\tthis.space = 3 * spacing.SPACE;\n\tthis.initialClef = params.initialClef;\n\tthis.timeBasedLayout = params.timeBasedLayout;\n\tthis.expandToWidest = !!params.expandToWidest;\n\tthis.scale = params.scale ? parseFloat(params.scale) : 0;\n\tthis.classes = new Classes({ shouldAddClasses: params.add_classes });\n\tif (!(this.scale > 0.1))\n\t\tthis.scale = undefined;\n\n\tif (params.staffwidth) {\n\t\t// Note: Normally all measurements to the engraver are in POINTS. However, if a person is formatting for the\n\t\t// screen and directly inputting the width, then it is more logical to have the measurement in pixels.\n\t\tthis.staffwidthScreen = params.staffwidth;\n\t\tthis.staffwidthPrint = params.staffwidth;\n\t} else {\n\t\tthis.staffwidthScreen = 740; // TODO-PER: Not sure where this number comes from, but this is how it's always been.\n\t\tthis.staffwidthPrint = 680; // The number of pixels in 8.5\", after 1cm of margin has been removed.\n\t}\n\tthis.listeners = [];\n\tif (params.clickListener)\n\t\tthis.addSelectListener(params.clickListener);\n\n\tthis.renderer = new Renderer(paper);\n\tthis.renderer.setPaddingOverride(params);\n\tif (params.showDebug)\n\t\tthis.renderer.showDebug = params.showDebug;\n\tif (params.jazzchords)\n\t\tthis.jazzchords = params.jazzchords;\n\tif (params.accentAbove)\n\t\tthis.accentAbove = params.accentAbove;\n\tif (params.germanAlphabet)\n\t\tthis.germanAlphabet = params.germanAlphabet;\n\tif (params.lineThickness)\n\t\tthis.lineThickness = params.lineThickness;\n\tthis.renderer.controller = this; // TODO-GD needed for highlighting\n\tthis.renderer.foregroundColor = params.foregroundColor ? params.foregroundColor : \"currentColor\";\n\tif (params.ariaLabel !== undefined)\n\t\tthis.renderer.ariaLabel = params.ariaLabel;\n\tthis.renderer.minPadding = params.minPadding ? params.minPadding : 0;\n\n\tthis.reset();\n};\n\nEngraverController.prototype.reset = function () {\n\tthis.selected = [];\n\tthis.staffgroups = [];\n\tif (this.engraver)\n\t\tthis.engraver.reset();\n\tthis.engraver = null;\n\tthis.renderer.reset();\n\tthis.dragTarget = null;\n\tthis.dragIndex = -1;\n\tthis.dragMouseStart = { x: -1, y: -1 };\n\tthis.dragYStep = 0;\n\tif (this.lineThickness)\n\t\tthis.renderer.setLineThickness(this.lineThickness)\n};\n\n/**\n * run the engraving process\n */\nEngraverController.prototype.engraveABC = function (abctunes, tuneNumber, lineOffset) {\n\tif (abctunes[0] === undefined) {\n\t\tabctunes = [abctunes];\n\t}\n\tthis.reset();\n\n\tfor (var i = 0; i < abctunes.length; i++) {\n\t\tif (tuneNumber === undefined)\n\t\t\ttuneNumber = i;\n\t\tthis.getFontAndAttr = new GetFontAndAttr(abctunes[i].formatting, this.classes);\n\t\tthis.getTextSize = new GetTextSize(this.getFontAndAttr, this.renderer.paper);\n\t\tthis.engraveTune(abctunes[i], tuneNumber, lineOffset);\n\t}\n};\n\n/**\n * Some of the items on the page are not scaled, so adjust them in the opposite direction of scaling to cancel out the scaling.\n */\nEngraverController.prototype.adjustNonScaledItems = function (scale) {\n\tthis.width /= scale;\n\tthis.renderer.adjustNonScaledItems(scale);\n};\n\nEngraverController.prototype.getMeasureWidths = function (abcTune) {\n\tthis.reset();\n\tthis.getFontAndAttr = new GetFontAndAttr(abcTune.formatting, this.classes);\n\tthis.getTextSize = new GetTextSize(this.getFontAndAttr, this.renderer.paper);\n\tvar origJazzChords = this.jazzchords\n\n\tthis.setupTune(abcTune, 0);\n\tthis.constructTuneElements(abcTune);\n\t// layout() sets the x-coordinate of the abcTune element here:\n\t// abcTune.lines[0].staffGroup.voices[0].children[0].x\n\tlayout(this.renderer, abcTune, 0, this.space, this.timeBasedLayout);\n\n\tvar ret = [];\n\tvar section;\n\n\tvar needNewSection = true;\n\tfor (var i = 0; i < abcTune.lines.length; i++) {\n\t\tvar abcLine = abcTune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\tif (needNewSection) {\n\t\t\t\tsection = {\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tmeasureWidths: [],\n\t\t\t\t\t//height: this.renderer.padding.top + this.renderer.spacing.music + this.renderer.padding.bottom + 24, // the 24 is the empirical value added to the bottom of all tunes.\n\t\t\t\t\ttotal: 0\n\t\t\t\t};\n\t\t\t\tret.push(section);\n\t\t\t\tneedNewSection = false;\n\t\t\t}\n\t\t\t// At this point, the voices are laid out so that the bar lines are even with each other. So we just need to get the placement of the first voice.\n\t\t\tif (abcLine.staffGroup.voices.length > 0) {\n\t\t\t\tvar voice = abcLine.staffGroup.voices[0];\n\t\t\t\tvar foundNotStaffExtra = false;\n\t\t\t\tvar lastXPosition = 0;\n\t\t\t\tfor (var k = 0; k < voice.children.length; k++) {\n\t\t\t\t\tvar child = voice.children[k];\n\t\t\t\t\tif (!foundNotStaffExtra && !child.isClef && !child.isKeySig) {\n\t\t\t\t\t\tfoundNotStaffExtra = true;\n\t\t\t\t\t\tsection.left = child.x;\n\t\t\t\t\t\tlastXPosition = child.x;\n\t\t\t\t\t}\n\t\t\t\t\tif (child.type === 'bar') {\n\t\t\t\t\t\tsection.measureWidths.push(child.x - lastXPosition);\n\t\t\t\t\t\tsection.total += (child.x - lastXPosition);\n\t\t\t\t\t\tlastXPosition = child.x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//section.height += calcHeight(abcLine.staffGroup) * spacing.STEP;\n\t\t} else\n\t\t\tneedNewSection = true;\n\t}\n\tthis.jazzchords = origJazzChords\n\treturn ret;\n};\n\nEngraverController.prototype.setupTune = function (abcTune, tuneNumber) {\n\tthis.classes.reset();\n\n\tif (abcTune.formatting.jazzchords !== undefined)\n\t\tthis.jazzchords = abcTune.formatting.jazzchords;\n\tif (abcTune.formatting.accentAbove !== undefined)\n\t\tthis.accentAbove = abcTune.formatting.accentAbove;\n\n\tthis.renderer.newTune(abcTune);\n\tthis.engraver = new AbstractEngraver(this.getTextSize, tuneNumber, {\n\t\tbagpipes: abcTune.formatting.bagpipes,\n\t\tflatbeams: abcTune.formatting.flatbeams,\n\t\tgraceSlurs: abcTune.formatting.graceSlurs !== false, // undefined is the default, which is true\n\t\tpercmap: abcTune.formatting.percmap,\n\t\tinitialClef: this.initialClef,\n\t\tjazzchords: this.jazzchords,\n\t\ttimeBasedLayout: this.timeBasedLayout,\n\t\taccentAbove: this.accentAbove,\n\t\tgermanAlphabet: this.germanAlphabet\n\t});\n\tthis.engraver.setStemHeight(this.renderer.spacing.stemHeight);\n\tthis.engraver.measureLength = abcTune.getMeterFraction().num / abcTune.getMeterFraction().den;\n\tif (abcTune.formatting.staffwidth) {\n\t\tthis.width = abcTune.formatting.staffwidth * 1.33; // The width is expressed in pt; convert to px.\n\t} else {\n\t\tthis.width = this.renderer.isPrint ? this.staffwidthPrint : this.staffwidthScreen;\n\t}\n\n\tvar scale = abcTune.formatting.scale ? abcTune.formatting.scale : this.scale;\n\tif (this.responsive === \"resize\") // The resizing will mess with the scaling, so just don't do it explicitly.\n\t\tscale = undefined;\n\tif (scale === undefined) scale = this.renderer.isPrint ? 0.75 : 1;\n\tthis.adjustNonScaledItems(scale);\n\treturn scale;\n};\n\nEngraverController.prototype.constructTuneElements = function (abcTune) {\n\tabcTune.topText = new TopText(abcTune.metaText, abcTune.metaTextInfo, abcTune.formatting, abcTune.lines, this.width, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n\n\t// Generate the raw staff line data\n\tvar i;\n\tvar abcLine;\n\tvar hasPrintedTempo = false;\n\tvar hasSeenNonSubtitle = false;\n\tfor (i = 0; i < abcTune.lines.length; i++) {\n\t\tabcLine = abcTune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.staffGroup = this.engraver.createABCLine(abcLine.staff, !hasPrintedTempo ? abcTune.metaText.tempo : null, i);\n\t\t\thasPrintedTempo = true;\n\t\t} else if (abcLine.subtitle) {\n\t\t\t// If the subtitle is at the top, then it was already accounted for. So skip all subtitles until the first non-subtitle line.\n\t\t\tif (hasSeenNonSubtitle) {\n\t\t\t\tvar center = this.width / 2 + this.renderer.padding.left;\n\t\t\t\tabcLine.nonMusic = new Subtitle(this.renderer.spacing.subtitle, abcTune.formatting, abcLine.subtitle, center, this.renderer.padding.left, this.getTextSize);\n\t\t\t}\n\t\t} else if (abcLine.text !== undefined) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.nonMusic = new FreeText(abcLine.text, abcLine.vskip, this.getFontAndAttr, this.renderer.padding.left, this.width, this.getTextSize);\n\t\t} else if (abcLine.separator !== undefined && abcLine.separator.lineLength) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.nonMusic = new Separator(abcLine.separator.spaceAbove, abcLine.separator.lineLength, abcLine.separator.spaceBelow);\n\t\t}\n\t}\n\tabcTune.bottomText = new BottomText(abcTune.metaText, this.width, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n};\n\nEngraverController.prototype.engraveTune = function (abcTune, tuneNumber, lineOffset) {\n\n\tvar origJazzChords = this.jazzchords\n\tvar scale = this.setupTune(abcTune, tuneNumber);\n \n\t// Create all of the element objects that will appear on the page.\n\tthis.constructTuneElements(abcTune);\n \n\t//Set the top text now that we know the width\n \n\t// Do all the positioning, both horizontally and vertically\n\tvar maxWidth = layout(this.renderer, abcTune, this.width, this.space, this.expandToWidest, this.timeBasedLayout);\n \n\t//Set the top text now that we know the width\n\tif (this.expandToWidest && maxWidth > this.width + 1) {\n \n\t\tabcTune.topText = new TopText(abcTune.metaText, abcTune.metaTextInfo, abcTune.formatting, abcTune.lines, maxWidth, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n \n\t\tif ((abcTune.lines)&&(abcTune.lines.length > 0)){\n\t\t\tvar nlines = abcTune.lines.length;\n\n\t\t\tfor (var i=0;i 0)){\n\t\t\t\t\t\tvar nRows = entry.nonMusic.rows.length;\n\t\t\t\t\t\tfor (var j=0;j0)){\n\t\t\t\t\t\t\t\t\t\tif (entry.text[0].center){\n\t\t\t\t\t\t\t\t\t\t\tthisRow.left = (maxWidth/2) + this.renderer.padding.left;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Deal with tablature for staff\n\tif (abcTune.tablatures) {\n\t tablatures.layoutTablatures(this.renderer, abcTune);\n\t}\n \n\t// Do all the writing to the SVG\n\tvar ret = draw(this.renderer, this.classes, abcTune, this.width, maxWidth, this.responsive, scale, this.selectTypes, tuneNumber, lineOffset);\n\tthis.staffgroups = ret.staffgroups;\n\tthis.selectables = ret.selectables;\n\tif (this.oneSvgPerLine) {\n\t var div = this.renderer.paper.svg.parentNode;\n\t this.svgs = splitSvgIntoLines(this.renderer, div, abcTune.metaText.title, this.responsive, scale);\n\t} else {\n\t this.svgs = [this.renderer.paper.svg];\n\t}\n\tsetupSelection(this, this.svgs);\n\t\n\tthis.jazzchords = origJazzChords\n};\n\nfunction splitSvgIntoLines(renderer, output, title, responsive, scale) {\n\t// Each line is a top level in the svg. To split it into separate\n\t// svgs iterate through each of those and put them in a new svg. Since\n\t// they are placed absolutely, the viewBox needs to be manipulated to\n\t// get the correct vertical positioning.\n\t// We copy all the attributes from the original svg except for the aria-label\n\t// since we want that to include a count. And the height is now a fraction of the original svg.\n\tif (!title) title = \"Untitled\"\n\tvar source = output.querySelector(\"svg\")\n\tif (responsive === 'resize')\n\t\toutput.style.paddingBottom = ''\n\tvar style = source.querySelector(\"style\")\n\tvar width = responsive === 'resize' ? source.viewBox.baseVal.width : source.getAttribute(\"width\")\n\tvar sections = output.querySelectorAll(\"svg > g\") // each section is a line, or the top matter or the bottom matter, or text that has been inserted.\n\tvar nextTop = 0 // There are often gaps between the elements for spacing, so the actual top and height needs to be inferred.\n\tvar wrappers = [] // Create all the elements and place them at once because we use the current svg to get data. It would disappear after placing the first line.\n\tvar svgs = []\n\tfor (var i = 0; i < sections.length; i++) {\n\t\tvar section = sections[i]\n\t\tvar box = section.getBBox()\n\t\tvar gapBetweenLines = box.y - nextTop // take the margin into account\n\t\tvar height = box.height + gapBetweenLines;\n\t\tvar wrapper = document.createElement(\"div\");\n\t\tvar divStyles = \"overflow: hidden;\"\n\t\tif (responsive !== 'resize')\n\t\t\tdivStyles += \"height:\" + (height * scale) + \"px;\"\n\t\twrapper.setAttribute(\"style\", divStyles)\n\t\tvar svg = duplicateSvg(source)\n\t\tvar fullTitle = \"Sheet Music for \\\"\" + title + \"\\\" section \" + (i + 1)\n\t\tsvg.setAttribute(\"aria-label\", fullTitle)\n\t\tif (responsive !== 'resize')\n\t\t\tsvg.setAttribute(\"height\", height)\n\t\tif (responsive === 'resize')\n\t\t\tsvg.style.position = ''\n\t\t// TODO-PER: Hack! Not sure why this is needed.\n\t\tvar viewBoxHeight = renderer.firefox112 ? height+1 : height\n\t\tsvg.setAttribute(\"viewBox\", \"0 \" + nextTop + \" \" + width + \" \" + viewBoxHeight)\n\t\tsvg.appendChild(style.cloneNode(true))\n\t\tvar titleEl = document.createElement(\"title\")\n\t\ttitleEl.innerText = fullTitle\n\t\tsvg.appendChild(titleEl)\n\t\tsvg.appendChild(section)\n\n\t\twrapper.appendChild(svg)\n\t\tsvgs.push(svg)\n\t\toutput.appendChild(wrapper)\n\t\t//wrappers.push(wrapper)\n\t\tnextTop = box.y + box.height\n\t}\n\t// for (i = 0; i < wrappers.length; i++)\n\t// \toutput.appendChild(wrappers[i])\n\toutput.removeChild(source)\n\treturn svgs;\n}\n\nfunction duplicateSvg(source) {\n\tvar svgNS = \"http://www.w3.org/2000/svg\";\n\tvar svg = document.createElementNS(svgNS, \"svg\");\n\tfor (var i = 0; i < source.attributes.length; i++) {\n\t\tvar attr = source.attributes[i];\n\t\tif (attr.name !== \"height\" && attr.name != \"aria-label\")\n\t\t\tsvg.setAttribute(attr.name, attr.value)\n\t}\n\treturn svg;\n}\n\nEngraverController.prototype.getDim = function (historyEl) {\n\t// Get the dimensions on demand because the getBBox call is expensive.\n\tif (!historyEl.dim) {\n\t\tvar box = historyEl.svgEl.getBBox();\n\t\thistoryEl.dim = { left: Math.round(box.x), top: Math.round(box.y), right: Math.round(box.x + box.width), bottom: Math.round(box.y + box.height) };\n\t}\n\treturn historyEl.dim;\n};\n\nEngraverController.prototype.addSelectListener = function (clickListener) {\n\tthis.listeners[this.listeners.length] = clickListener;\n};\n\nmodule.exports = EngraverController;\n","var Classes = function Classes(options) {\n\tthis.shouldAddClasses = options.shouldAddClasses;\n\tthis.reset();\n}\n\nClasses.prototype.reset = function () {\n\tthis.lineNumber = null;\n\tthis.voiceNumber = null;\n\tthis.measureNumber = null;\n\tthis.measureTotalPerLine = [];\n\tthis.noteNumber = null;\n}\n\nClasses.prototype.incrLine = function () {\n\tif (this.lineNumber === null)\n\t\tthis.lineNumber = 0;\n\telse\n\t\tthis.lineNumber++;\n\tthis.voiceNumber = null;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.incrVoice = function () {\n\tif (this.voiceNumber === null)\n\t\tthis.voiceNumber = 0;\n\telse\n\t\tthis.voiceNumber++;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.isInMeasure = function () {\n\treturn this.measureNumber !== null;\n};\n\nClasses.prototype.newMeasure = function () {\n\tif (this.measureNumber)\n\t\tthis.measureTotalPerLine[this.lineNumber] = this.measureNumber;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.startMeasure = function () {\n\tthis.measureNumber = 0;\n\tthis.noteNumber = 0;\n};\n\nClasses.prototype.incrMeasure = function () {\n\tthis.measureNumber++;\n\tthis.noteNumber = 0;\n};\n\nClasses.prototype.incrNote = function () {\n\tthis.noteNumber++;\n};\n\nClasses.prototype.measureTotal = function () {\n\tvar total = 0;\n\tfor (var i = 0; i < this.lineNumber; i++)\n\t\ttotal += this.measureTotalPerLine[i] ? this.measureTotalPerLine[i] : 0; // This can be null when non-music things are present.\n\tif (this.measureNumber)\n\t\ttotal += this.measureNumber;\n\treturn total;\n};\n\nClasses.prototype.getCurrent = function (c) {\n\treturn {\n\t\tline: this.lineNumber,\n\t\tmeasure: this.measureNumber,\n\t\tmeasureTotal: this.measureTotal(),\n\t\tvoice: this.voiceNumber,\n\t\tnote: this.noteNumber\n\t};\n};\n\nClasses.prototype.generate = function (c) {\n\tif (!this.shouldAddClasses)\n\t\treturn \"\";\n\tvar ret = [];\n\tif (c && c.length > 0) ret.push(c);\n\tif (c === \"abcjs-tab-number\") // TODO-PER-HACK! straighten out the tablature\n\t\treturn ret.join(' ')\n\tif (c === \"text instrument-name\")\n\t\treturn \"abcjs-text abcjs-instrument-name\"\n\tif (this.lineNumber !== null) ret.push(\"l\" + this.lineNumber);\n\tif (this.measureNumber !== null) ret.push(\"m\" + this.measureNumber);\n\tif (this.measureNumber !== null) ret.push(\"mm\" + this.measureTotal()); // measureNumber is null between measures so this is still the test for measureTotal\n\tif (this.voiceNumber !== null) ret.push(\"v\" + this.voiceNumber);\n\tif (c && (c.indexOf('note') >= 0 || c.indexOf('rest') >= 0 || c.indexOf('lyric') >= 0) && this.noteNumber !== null) ret.push(\"n\" + this.noteNumber);\n\t// add a prefix to all classes that abcjs adds.\n\tif (ret.length > 0) {\n\t\tret = ret.join(' '); // Some strings are compound classes - that is, specify more than one class in a string.\n\t\tret = ret.split(' ');\n\t\tfor (var i = 0; i < ret.length; i++) {\n\t\t\tif (ret[i].indexOf('abcjs-') !== 0 && ret[i].length > 0) // if the prefix doesn't already exist and the class is not blank.\n\t\t\t\tret[i] = 'abcjs-' + ret[i];\n\t\t}\n\t}\n\treturn ret.join(' ');\n};\n\n\nmodule.exports = Classes;\n","var GetFontAndAttr = function GetFontAndAttr(formatting, classes) {\n\tthis.formatting = formatting;\n\tthis.classes = classes;\n};\n\nGetFontAndAttr.prototype.updateFonts = function (fontOverrides) {\n\tif (fontOverrides.gchordfont)\n\t\tthis.formatting.gchordfont = fontOverrides.gchordfont;\n\tif (fontOverrides.tripletfont)\n\t\tthis.formatting.tripletfont = fontOverrides.tripletfont;\n\tif (fontOverrides.annotationfont)\n\t\tthis.formatting.annotationfont = fontOverrides.annotationfont;\n\tif (fontOverrides.vocalfont)\n\t\tthis.formatting.vocalfont = fontOverrides.vocalfont;\n};\n\nGetFontAndAttr.prototype.getFamily = function (type) {\n\tif (type[0] === '\"' && type[type.length-1] === '\"') {\n\t\treturn type.substring(1, type.length-1)\n\t}\n\treturn type\n};\n\nGetFontAndAttr.prototype.calc = function (type, klass) {\n\tvar font;\n\tif (typeof type === 'string') {\n\t\tfont = this.formatting[type];\n\t\t// Raphael deliberately changes the font units to pixels for some reason, so we need to change points to pixels here.\n\t\tif (font)\n\t\t\tfont = { face: font.face, size: Math.round(font.size * 4 / 3), decoration: font.decoration, style: font.style, weight: font.weight, box: font.box };\n\t\telse\n\t\t\tfont = { face: \"Arial\", size: Math.round(12 * 4 / 3), decoration: \"underline\", style: \"normal\", weight: \"normal\" };\n\t} else\n\t\tfont = { face: type.face, size: Math.round(type.size * 4 / 3), decoration: type.decoration, style: type.style, weight: type.weight, box: type.box };\n\tvar paddingPercent = this.formatting.fontboxpadding ? this.formatting.fontboxpadding : 0.1\n\tfont.padding = font.size * paddingPercent;\n\n\tvar attr = {\n\t\t\"font-size\": font.size, 'font-style': font.style,\n\t\t\"font-family\": this.getFamily(font.face), 'font-weight': font.weight, 'text-decoration': font.decoration,\n\t\t'class': this.classes.generate(klass)\n\t};\n\treturn { font: font, attr: attr };\n};\n\nmodule.exports = GetFontAndAttr;\n","var GetTextSize = function GetTextSize(getFontAndAttr, svg) {\n\tthis.getFontAndAttr = getFontAndAttr;\n\tthis.svg = svg;\n};\n\nGetTextSize.prototype.updateFonts = function (fontOverrides) {\n\tthis.getFontAndAttr.updateFonts(fontOverrides);\n};\n\nGetTextSize.prototype.attr = function (type, klass) {\n\treturn this.getFontAndAttr.calc(type, klass);\n};\n\nGetTextSize.prototype.getFamily = function (type) {\n\tif (type[0] === '\"' && type[type.length-1] === '\"') {\n\t\treturn type.substring(1, type.length-1)\n\t}\n\treturn type\n};\n\nGetTextSize.prototype.calc = function (text, type, klass, el) {\n\tvar hash;\n\t// This can be passed in either a string or a font. If it is a string it names one of the standard fonts.\n\tif (typeof type === 'string')\n\t\thash = this.attr(type, klass);\n\telse {\n\t\thash = {\n\t\t\tfont: {\n\t\t\t\tface: type.face,\n\t\t\t\tsize: type.size,\n\t\t\t\tdecoration: type.decoration,\n\t\t\t\tstyle: type.style,\n\t\t\t\tweight: type.weight\n\t\t\t},\n\t\t\tattr: {\n\t\t\t\t\"font-size\": type.size,\n\t\t\t\t\"font-style\": type.style,\n\t\t\t\t\"font-family\": this.getFamily(type.face),\n\t\t\t\t\"font-weight\": type.weight,\n\t\t\t\t\"text-decoration\": type.decoration,\n\t\t\t\t\"class\": this.getFontAndAttr.classes.generate(klass)\n\t\t\t}\n\t\t}\n\t}\n\tvar size = this.svg.getTextSize(text, hash.attr, el);\n\tif (hash.font.box) {\n\t\t// Add padding and an equal margin to each side.\n\t\treturn { height: size.height + hash.font.padding * 4, width: size.width + hash.font.padding * 4 };\n\t}\n\treturn size;\n};\n\nGetTextSize.prototype.baselineToCenter = function (text, type, klass, index, total) {\n\t// This is for the case where SVG wants to use the baseline of the first line as the Y coordinate.\n\t// If there are multiple lines of text or there is an array of text then that will not be centered so this adjusts it.\n\tvar height = this.calc(text, type, klass).height;\n\tvar fontHeight = this.attr(type, klass).font.size;\n\n\treturn height * 0.5 + (total - index - 2) * fontHeight;\n};\n\n\nmodule.exports = GetTextSize;\n","var setClass = function (elemset, addClass, removeClass, color) {\n\tif (!elemset)\n\t\treturn;\n\tfor (var i = 0; i < elemset.length; i++) {\n\t\tvar el = elemset[i];\n\t\tvar attr = el.getAttribute(\"highlight\");\n\t\tif (!attr) attr = \"fill\";\n\t\tel.setAttribute(attr, color);\n\t\tvar kls = el.getAttribute(\"class\");\n\t\tif (!kls) kls = \"\";\n\t\tkls = kls.replace(removeClass, \"\");\n\t\tkls = kls.replace(addClass, \"\");\n\t\tif (addClass.length > 0) {\n\t\t\tif (kls.length > 0 && kls[kls.length - 1] !== ' ') kls += \" \";\n\t\t\tkls += addClass;\n\t\t}\n\t\tel.setAttribute(\"class\", kls);\n\t}\n};\n\nmodule.exports = setClass;\n","var spacing = {};\n\nspacing.FONTEM = 360;\nspacing.FONTSIZE = 30;\nspacing.STEP = spacing.FONTSIZE * 93 / 720;\nspacing.SPACE = 10;\nspacing.TOPNOTE = 15;\nspacing.STAVEHEIGHT = 100;\nspacing.INDENT = 50;\n\nmodule.exports = spacing;\n","function findNumber(klass, match, target, name) {\n\tif (klass.indexOf(match) === 0) {\n\t\tvar value = klass.replace(match, '');\n\t\tvar num = parseInt(value, 10);\n\t\tif ('' + num === value)\n\t\t\ttarget[name] = num;\n\t}\n}\n\nfunction createAnalysis(target, ev) {\n\tvar classes = [];\n\tif (target.absEl.elemset) {\n\t\tvar classObj = {};\n\t\tfor (var j = 0; j < target.absEl.elemset.length; j++) {\n\t\t\tvar es = target.absEl.elemset[j];\n\t\t\tif (es) {\n\t\t\t\tvar klass = es.getAttribute(\"class\").split(' ');\n\t\t\t\tfor (var k = 0; k < klass.length; k++)\n\t\t\t\t\tclassObj[klass[k]] = true;\n\t\t\t}\n\t\t}\n\t\tfor (var kk = 0; kk < Object.keys(classObj).length; kk++)\n\t\t\tclasses.push(Object.keys(classObj)[kk]);\n\t}\n\tvar analysis = {};\n\tfor (var ii = 0; ii < classes.length; ii++) {\n\t\tfindNumber(classes[ii], \"abcjs-v\", analysis, \"voice\");\n\t\tfindNumber(classes[ii], \"abcjs-l\", analysis, \"line\");\n\t\tfindNumber(classes[ii], \"abcjs-m\", analysis, \"measure\");\n\t}\n\tif (target.staffPos)\n\t\tanalysis.staffPos = target.staffPos;\n\tvar closest = ev.target;\n\twhile (closest && closest.dataset && !closest.dataset.name && closest.tagName.toLowerCase() !== 'svg')\n\t\tclosest = closest.parentNode;\n\tvar parent = ev.target;\n\twhile (parent && parent.dataset && !parent.dataset.index && parent.tagName.toLowerCase() !== 'svg')\n\t\tparent = parent.parentNode;\n\tif (parent && parent.dataset) {\n\t\tanalysis.name = parent.dataset.name;\n\t\tanalysis.clickedName = closest.dataset.name;\n\t\tanalysis.parentClasses = parent.classList;\n\t}\n\tif (closest && closest.classList)\n\t\tanalysis.clickedClasses = closest.classList;\n\tanalysis.selectableElement = target.svgEl;\n\treturn {classes: classes, analysis: analysis}\n}\n\nmodule.exports = createAnalysis;\n","var createAnalysis = require('./create-analysis');\n\nfunction findSelectableElement(event) {\n\tvar selectable = event\n\twhile (selectable && selectable.attributes && selectable.tagName.toLowerCase() !== 'svg' && !selectable.attributes.selectable) {\n\t\tselectable = selectable.parentNode\n\t}\n\tif (selectable && selectable.attributes && selectable.attributes.selectable) {\n\t\tvar index = selectable.attributes['data-index'].nodeValue\n\t\tif (index) {\n\t\t\tindex = parseInt(index, 10)\n\t\t\tif (index >= 0 && index < this.selectables.length) {\n\t\t\t\tvar element = this.selectables[index]\n\t\t\t\tvar ret = createAnalysis(element, event)\n\t\t\t\tret.index = index\n\t\t\t\tret.element = element\n\t\t\t\treturn ret\n\t\t\t}\n\t\t}\n\t}\n\treturn null\n}\n\nmodule.exports = findSelectableElement;\n","var setClass = require('../helpers/set-class');\n\nvar highlight = function (klass, color) {\n\tif (klass === undefined)\n\t\tklass = \"abcjs-note_selected\";\n\tif (color === undefined)\n\t\tcolor = \"#ff0000\";\n\tsetClass(this.elemset, klass, \"\", color);\n};\n\nmodule.exports = highlight;\n","var spacing = require('../helpers/spacing');\nvar createAnalysis = require('./create-analysis');\n\nfunction setupSelection(engraver, svgs) {\n\tengraver.rangeHighlight = rangeHighlight;\n\tif (engraver.dragging) {\n\t\tfor (var h = 0; h < engraver.selectables.length; h++) {\n\t\t\tvar hist = engraver.selectables[h];\n\t\t\tif (hist.svgEl.getAttribute(\"selectable\") === \"true\") {\n\t\t\t\thist.svgEl.setAttribute(\"tabindex\", 0);\n\t\t\t\thist.svgEl.setAttribute(\"data-index\", h);\n\t\t\t\thist.svgEl.addEventListener(\"keydown\", keyboardDown.bind(engraver));\n\t\t\t\thist.svgEl.addEventListener(\"keyup\", keyboardSelection.bind(engraver));\n\t\t\t\thist.svgEl.addEventListener(\"focus\", elementFocused.bind(engraver));\n\t\t\t}\n\t\t}\n\t}\n\tfor (var i = 0; i < svgs.length; i++) {\n\t\tsvgs[i].addEventListener('touchstart', mouseDown.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('touchmove', mouseMove.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('touchend', mouseUp.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('mousedown', mouseDown.bind(engraver));\n\t\tsvgs[i].addEventListener('mousemove', mouseMove.bind(engraver));\n\t\tsvgs[i].addEventListener('mouseup', mouseUp.bind(engraver));\n\t}\n}\n\nfunction getCoord(ev) {\n\tvar scaleX = 1;\n\tvar scaleY = 1;\n\tvar svg = ev.target.closest('svg')\n\tvar yOffset = 0\n\n\t// when renderer.options.responsive === 'resize' the click coords are in relation to the HTML\n\t// element, we need to convert to the SVG viewBox coords\n\tif (svg && svg.viewBox && svg.viewBox.baseVal) { // Firefox passes null to this when no viewBox is given\n\t\t// Chrome makes these values null when no viewBox is given.\n\t\tif (svg.viewBox.baseVal.width !== 0)\n\t\t\tscaleX = svg.viewBox.baseVal.width / svg.clientWidth\n\t\tif (svg.viewBox.baseVal.height !== 0)\n\t\t\tscaleY = svg.viewBox.baseVal.height / svg.clientHeight\n\t\tyOffset = svg.viewBox.baseVal.y\n\t}\n\n\tvar svgClicked = ev.target && ev.target.tagName === \"svg\";\n\tvar x;\n\tvar y;\n\tif (svgClicked) {\n\t\tx = ev.offsetX;\n\t\ty = ev.offsetY;\n\t} else {\n\t\tx = ev.layerX;\n\t\ty = ev.layerY;\n\t}\n\n\tx = x * scaleX;\n\ty = y * scaleY;\n\t//console.log(x, y)\n\n\treturn [x, y + yOffset];\n}\n\nfunction elementFocused(ev) {\n\t// If there had been another element focused and is being dragged, then report that before setting the new element up.\n\tif (this.dragMechanism === \"keyboard\" && this.dragYStep !== 0 && this.dragTarget)\n\t\tnotifySelect.bind(this)(this.dragTarget, this.dragYStep, this.selectables.length, this.dragIndex, ev);\n\n\tthis.dragYStep = 0;\n}\n\nfunction keyboardDown(ev) {\n\t// Swallow the up and down arrow events - they will be used for dragging with the keyboard\n\tswitch (ev.keyCode) {\n\t\tcase 38:\n\t\tcase 40:\n\t\t\tev.preventDefault();\n\t}\n}\n\nfunction keyboardSelection(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar handled = false;\n\tvar index = ev.target.dataset.index;\n\tswitch (ev.keyCode) {\n\t\tcase 13:\n\t\tcase 32:\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tthis.dragMechanism = \"keyboard\";\n\t\t\tmouseUp.bind(this)(ev);\n\t\t\tbreak;\n\t\tcase 38: // arrow up\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tif (this.dragTarget && this.dragTarget.isDraggable) {\n\t\t\t\tif (this.dragging && this.dragTarget.isDraggable)\n\t\t\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t\t\tthis.dragYStep--;\n\t\t\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (this.dragYStep * spacing.STEP) + \")\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 40: // arrow down\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tthis.dragMechanism = \"keyboard\";\n\t\t\tif (this.dragTarget && this.dragTarget.isDraggable) {\n\t\t\t\tif (this.dragging && this.dragTarget.isDraggable)\n\t\t\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t\t\tthis.dragYStep++;\n\t\t\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (this.dragYStep * spacing.STEP) + \")\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 9: // tab\n\t\t\t// This is losing focus - if there had been dragging, then do the callback\n\t\t\tif (this.dragYStep !== 0) {\n\t\t\t\tmouseUp.bind(this)(ev);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t//console.log(ev);\n\t\t\tbreak;\n\t}\n\tif (handled)\n\t\tev.preventDefault();\n}\n\nfunction findElementInHistory(selectables, el) {\n\tif (!el)\n\t\treturn -1;\n\tfor (var i = 0; i < selectables.length; i++) {\n\t\tif (el.dataset.index === selectables[i].svgEl.dataset.index)\n\t\t\treturn i;\n\t}\n\treturn -1;\n}\n\nfunction findElementByCoord(self, x, y) {\n\tvar minDistance = 9999999;\n\tvar closestIndex = -1;\n\tfor (var i = 0; i < self.selectables.length && minDistance > 0; i++) {\n\t\tvar el = self.selectables[i];\n\n\t\tself.getDim(el);\n\t\tif (el.dim.left < x && el.dim.right > x && el.dim.top < y && el.dim.bottom > y) {\n\t\t\t// See if it is a direct hit on an element - if so, definitely take it (there are no overlapping elements)\n\t\t\tclosestIndex = i;\n\t\t\tminDistance = 0;\n\t\t} else if (el.dim.top < y && el.dim.bottom > y) {\n\t\t\t// See if it is the same vertical as the element. Then the distance is the x difference\n\t\t\tvar horiz = Math.min(Math.abs(el.dim.left - x), Math.abs(el.dim.right - x));\n\t\t\tif (horiz < minDistance) {\n\t\t\t\tminDistance = horiz;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t} else if (el.dim.left < x && el.dim.right > x) {\n\t\t\t// See if it is the same horizontal as the element. Then the distance is the y difference\n\t\t\tvar vert = Math.min(Math.abs(el.dim.top - y), Math.abs(el.dim.bottom - y));\n\t\t\tif (vert < minDistance) {\n\t\t\t\tminDistance = vert;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t} else {\n\t\t\t// figure out the distance to this element.\n\t\t\tvar dx = Math.abs(x - el.dim.left) > Math.abs(x - el.dim.right) ? Math.abs(x - el.dim.right) : Math.abs(x - el.dim.left);\n\t\t\tvar dy = Math.abs(y - el.dim.top) > Math.abs(y - el.dim.bottom) ? Math.abs(y - el.dim.bottom) : Math.abs(y - el.dim.top);\n\t\t\tvar hypotenuse = Math.sqrt(dx * dx + dy * dy);\n\t\t\tif (hypotenuse < minDistance) {\n\t\t\t\tminDistance = hypotenuse;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t}\n\t}\n\treturn (closestIndex >= 0 && minDistance <= 12) ? closestIndex : -1;\n}\n\nfunction getBestMatchCoordinates(dim, ev, scale) {\n\t// Different browsers have conflicting meanings for the coordinates that are returned.\n\t// If the item we want is clicked on directly, then we will just see what is the best match.\n\t// This seems like less of a hack than browser sniffing.\n\tif (dim.x <= ev.offsetX && dim.x + dim.width >= ev.offsetX &&\n\t\tdim.y <= ev.offsetY && dim.y + dim.height >= ev.offsetY)\n\t\treturn [ev.offsetX, ev.offsetY];\n\t// Firefox returns a weird value for offset, but layer is correct.\n\t// Safari and Chrome return the correct value for offset, but layer is multiplied by the scale (that is, if it were rendered with { scale: 2 })\n\t// For instance (if scale is 2):\n\t// Firefox: { offsetY: 5, layerY: 335 }\n\t// Others: {offsetY: 335, layerY: 670} (there could be a little rounding, so the number might not be exactly 2x)\n\t// So, if layerY/scale is approx. offsetY, then use offsetY, otherwise use layerY\n\tvar epsilon = Math.abs(ev.layerY / scale - ev.offsetY);\n\tif (epsilon < 3)\n\t\treturn [ev.offsetX, ev.offsetY];\n\telse\n\t\treturn [ev.layerX, ev.layerY];\n}\n\nfunction getTarget(target) {\n\t// This searches up the dom for the first item containing the attribute \"selectable\", or stopping at the SVG.\n\tif (!target)\n\t\treturn null;\n\tif (target.tagName === \"svg\")\n\t\treturn target;\n\n\tif (!target.getAttribute)\n\t\treturn null;\t\n\tvar found = target.getAttribute(\"selectable\");\n\twhile (!found) {\n\t\tif (!target.parentElement)\n\t\t\tfound = true;\n\t\telse {\n\t\t\ttarget = target.parentElement;\n\t\t\tif (target.tagName === \"svg\")\n\t\t\t\tfound = true;\n\t\t\telse\n\t\t\t\tfound = target.getAttribute(\"selectable\");\n\t\t}\n\t}\n\treturn target;\n}\n\nfunction getMousePosition(self, ev) {\n\t// if the user clicked exactly on an element that we're interested in, then we already have the answer.\n\t// This is more reliable than the calculations because firefox returns different coords for offsetX, offsetY\n\tvar x;\n\tvar y;\n\tvar box;\n\tvar clickedOn = findElementInHistory(self.selectables, getTarget(ev.target));\n\tif (clickedOn >= 0) {\n\t\t// There was a direct hit on an element.\n\t\tbox = getBestMatchCoordinates(self.selectables[clickedOn].svgEl.getBBox(), ev, self.scale);\n\t\tx = box[0];\n\t\ty = box[1];\n\t\t//console.log(\"clicked on\", clickedOn, x, y, self.selectables[clickedOn].svgEl.getBBox(), ev.target.getBBox());\n\t} else {\n\t\t// See if they clicked close to an element.\n\t\tbox = getCoord(ev);\n\t\tx = box[0];\n\t\ty = box[1];\n\t\tclickedOn = findElementByCoord(self, x, y);\n\t\t//console.log(\"clicked near\", clickedOn, x, y, printEl(ev.target));\n\t}\n\treturn { x: x, y: y, clickedOn: clickedOn };\n}\n\nfunction attachMissingTouchEventAttributes(touchEv) {\n\tif (!touchEv || !touchEv.target || !touchEv.touches || touchEv.touches.length < 1)\n\t\treturn\n\tvar rect = touchEv.target.getBoundingClientRect();\n\tvar offsetX = touchEv.touches[0].pageX - rect.left;\n\tvar offsetY = touchEv.touches[0].pageY - rect.top;\n\n\ttouchEv.touches[0].offsetX = offsetX;\n\ttouchEv.touches[0].offsetY = offsetY;\n\n\ttouchEv.touches[0].layerX = touchEv.touches[0].pageX;\n\ttouchEv.touches[0].layerY = touchEv.touches[0].pageY;\n}\n\nfunction mouseDown(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar _ev = ev;\n\tif (ev.type === 'touchstart') {\n\t\tattachMissingTouchEventAttributes(ev);\n\t\tif (ev.touches.length > 0)\n\t\t\t_ev = ev.touches[0];\n\t}\n\n\tvar positioning = getMousePosition(this, _ev);\n\n\t// Only start dragging if the user clicked close enough to an element and clicked with the main mouse button.\n\tif (positioning.clickedOn >= 0 && (ev.type === 'touchstart' || ev.button === 0) && this.selectables[positioning.clickedOn]) {\n\t\tthis.dragTarget = this.selectables[positioning.clickedOn];\n\t\tthis.dragIndex = positioning.clickedOn;\n\t\tthis.dragMechanism = \"mouse\";\n\t\tthis.dragMouseStart = { x: positioning.x, y: positioning.y };\n\t\tif (this.dragging && this.dragTarget.isDraggable) {\n\t\t\taddGlobalClass(this.renderer.paper, \"abcjs-dragging-in-progress\");\n\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t}\n\t}\n}\n\nfunction mouseMove(ev) {\n\tvar _ev = ev;\n\tif (ev.type === 'touchmove') {\n\t\tattachMissingTouchEventAttributes(ev);\n\t\tif (ev.touches.length > 0)\n\t\t\t_ev = ev.touches[0];\n\t}\n\tthis.lastTouchMove = ev;\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\n\tif (!this.dragTarget || !this.dragging || !this.dragTarget.isDraggable || this.dragMechanism !== 'mouse' || !this.dragMouseStart)\n\t\treturn;\n\n\tvar positioning = getMousePosition(this, _ev);\n\n\tvar yDist = Math.round((positioning.y - this.dragMouseStart.y) / spacing.STEP);\n\tif (yDist !== this.dragYStep) {\n\t\tthis.dragYStep = yDist;\n\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (yDist * spacing.STEP) + \")\");\n\t}\n}\n\nfunction mouseUp(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar _ev = ev;\n\tif (ev.type === 'touchend' && this.lastTouchMove) {\n\t\tattachMissingTouchEventAttributes(this.lastTouchMove);\n\t\tif (this.lastTouchMove && this.lastTouchMove.touches && this.lastTouchMove.touches.length > 0)\n\t\t\t_ev = this.lastTouchMove.touches[0];\n\t}\n\n\tif (!this.dragTarget)\n\t\treturn;\n\n\tclearSelection.bind(this)();\n\tif (this.dragTarget.absEl && this.dragTarget.absEl.highlight) {\n\t\tthis.selected = [this.dragTarget.absEl];\n\t\tthis.dragTarget.absEl.highlight(undefined, this.selectionColor);\n\t}\n\n\tnotifySelect.bind(this)(this.dragTarget, this.dragYStep, this.selectables.length, this.dragIndex, _ev);\n\tif (this.dragTarget.svgEl && this.dragTarget.svgEl.focus) {\n\t\tthis.dragTarget.svgEl.focus();\n\t\tthis.dragTarget = null;\n\t\tthis.dragIndex = -1;\n\t}\n\tremoveGlobalClass(this.renderer.svg, \"abcjs-dragging-in-progress\");\n}\n\nfunction setSelection(dragIndex) {\n\tif (dragIndex >= 0 && dragIndex < this.selectables.length) {\n\t\tthis.dragTarget = this.selectables[dragIndex];\n\t\tthis.dragIndex = dragIndex;\n\t\tthis.dragMechanism = \"keyboard\";\n\t\tmouseUp.bind(this)({ target: this.dragTarget.svgEl });\n\t}\n}\n\n\nfunction notifySelect(target, dragStep, dragMax, dragIndex, ev) {\n\tvar ret = createAnalysis(target, ev)\n\tvar classes = ret.classes\n\tvar analysis = ret.analysis\n\n\tfor (var i = 0; i < this.listeners.length; i++) {\n\t\tthis.listeners[i](target.absEl.abcelem, target.absEl.tuneNumber, classes.join(' '), analysis, { step: dragStep, max: dragMax, index: dragIndex, setSelection: setSelection.bind(this) }, ev);\n\t}\n}\n\nfunction clearSelection() {\n\tfor (var i = 0; i < this.selected.length; i++) {\n\t\tthis.selected[i].unhighlight(undefined, this.renderer.foregroundColor);\n\t}\n\tthis.selected = [];\n}\n\nfunction rangeHighlight(start, end) {\n\tclearSelection.bind(this)();\n\tfor (var line = 0; line < this.staffgroups.length; line++) {\n\t\tvar voices = this.staffgroups[line].voices;\n\t\tfor (var voice = 0; voice < voices.length; voice++) {\n\t\t\tvar elems = voices[voice].children;\n\t\t\tfor (var elem = 0; elem < elems.length; elem++) {\n\t\t\t\t// Since the user can highlight more than an element, or part of an element, a hit is if any of the endpoints\n\t\t\t\t// is inside the other range.\n\t\t\t\tvar elStart = elems[elem].abcelem.startChar;\n\t\t\t\tvar elEnd = elems[elem].abcelem.endChar;\n\t\t\t\tif ((end > elStart && start < elEnd) || ((end === start) && end === elEnd)) {\n\t\t\t\t\t//\t\tif (elems[elem].abcelem.startChar>=start && elems[elem].abcelem.endChar<=end) {\n\t\t\t\t\tthis.selected[this.selected.length] = elems[elem];\n\t\t\t\t\telems[elem].highlight(undefined, this.selectionColor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getClassSet(el) {\n\tvar oldClass = el.getAttribute('class');\n\tif (!oldClass)\n\t\toldClass = \"\";\n\tvar klasses = oldClass.split(\" \");\n\tvar obj = {};\n\tfor (var i = 0; i < klasses.length; i++)\n\t\tobj[klasses[i]] = true;\n\treturn obj;\n}\n\nfunction setClassSet(el, klassSet) {\n\tvar klasses = [];\n\tfor (var key in klassSet) {\n\t\tif (klassSet.hasOwnProperty(key))\n\t\t\tklasses.push(key);\n\t}\n\tel.setAttribute('class', klasses.join(' '));\n}\n\nfunction addGlobalClass(svg, klass) {\n\tif (svg) {\n\t\tvar obj = getClassSet(svg.svg);\n\t\tobj[klass] = true;\n\t\tsetClassSet(svg.svg, obj);\n\t}\n}\n\nfunction removeGlobalClass(svg, klass) {\n\tif (svg) {\n\t\tvar obj = getClassSet(svg.svg);\n\t\tdelete obj[klass];\n\t\tsetClassSet(svg.svg, obj);\n\t}\n}\n\nmodule.exports = setupSelection;\n","var setClass = require('../helpers/set-class');\n\nvar unhighlight = function (klass, color) {\n\tif (klass === undefined)\n\t\tklass = \"abcjs-note_selected\";\n\tif (color === undefined)\n\t\tcolor = \"#000000\";\n\tsetClass(this.elemset, \"\", klass, color);\n};\n\nmodule.exports = unhighlight;\n","var RelativeElement = require('../creation/elements/relative-element');\nvar spacing = require('../helpers/spacing');\nvar getBarYAt = require('./get-bar-y-at');\n\nvar layoutBeam = function (beam) {\n\tif (beam.elems.length === 0 || beam.allrests) return;\n\n\tvar dy = calcDy(beam.stemsUp, beam.isgrace); // This is the width of the beam line.\n\n\t// create the main beam\n\tvar firstElement = beam.elems[0];\n\tvar lastElement = beam.elems[beam.elems.length - 1];\n\tvar minStemHeight = 0; // The following is to leave space for \"!///!\" marks.\n\tvar referencePitch = beam.stemsUp ? firstElement.abcelem.maxpitch : firstElement.abcelem.minpitch;\n\tminStemHeight = minStem(firstElement, beam.stemsUp, referencePitch, minStemHeight);\n\tminStemHeight = minStem(lastElement, beam.stemsUp, referencePitch, minStemHeight);\n\tminStemHeight = Math.max(beam.stemHeight, minStemHeight + 3); // TODO-PER: The 3 is the width of a 16th beam. The actual height of the beam should be used instead.\n\tvar yPos = calcYPos(beam.average, beam.elems.length, minStemHeight, beam.stemsUp, firstElement.abcelem.averagepitch, lastElement.abcelem.averagepitch, beam.isflat, beam.min, beam.max, beam.isgrace);\n\tvar xPos = calcXPos(beam.stemsUp, firstElement, lastElement);\n\tbeam.addBeam({ startX: xPos[0], endX: xPos[1], startY: yPos[0], endY: yPos[1], dy: dy });\n\n\t// create the rest of the beams (in the case of 1/16th notes, etc.\n\tvar beams = createAdditionalBeams(beam.elems, beam.stemsUp, beam.beams[0], beam.isgrace, dy);\n\tfor (var i = 0; i < beams.length; i++)\n\t\tbeam.addBeam(beams[i]);\n\n\t// Now that the main beam is defined, we know how tall the stems should be, so create them and attach them to the original notes.\n\tcreateStems(beam.elems, beam.stemsUp, beam.beams[0], dy, beam.mainNote);\n};\n\nvar getDurlog = function (duration) {\n\t// TODO-PER: This is a hack to prevent a Chrome lockup. Duration should have been defined already,\n\t// but there's definitely a case where it isn't. [Probably something to do with triplets.]\n\tif (duration === undefined) {\n\t\treturn 0;\n\t}\n\t// console.log(\"getDurlog: \" + duration);\n\treturn Math.floor(Math.log(duration) / Math.log(2));\n};\n\n//\n// private functions\n//\nfunction minStem(element, stemsUp, referencePitch, minStemHeight) {\n\tif (!element.children)\n\t\treturn minStemHeight;\n\tfor (var i = 0; i < element.children.length; i++) {\n\t\tvar elem = element.children[i];\n\t\tif (stemsUp && elem.top !== undefined && elem.c === \"flags.ugrace\")\n\t\t\tminStemHeight = Math.max(minStemHeight, elem.top - referencePitch);\n\t\telse if (!stemsUp && elem.bottom !== undefined && elem.c === \"flags.ugrace\")\n\t\t\tminStemHeight = Math.max(minStemHeight, referencePitch - elem.bottom + 7); // The extra 7 is because we are measuring the slash from the top.\n\t}\n\treturn minStemHeight;\n}\n\nfunction calcSlant(leftAveragePitch, rightAveragePitch, numStems, isFlat) {\n\tif (isFlat)\n\t\treturn 0;\n\tvar slant = leftAveragePitch - rightAveragePitch;\n\tvar maxSlant = numStems / 2;\n\n\tif (slant > maxSlant) slant = maxSlant;\n\tif (slant < -maxSlant) slant = -maxSlant;\n\treturn slant;\n}\n\nfunction calcDy(asc, isGrace) {\n\tvar dy = (asc) ? spacing.STEP : -spacing.STEP;\n\tif (isGrace) dy = dy * 0.4;\n\treturn dy;\n}\n\nfunction calcXPos(asc, firstElement, lastElement) {\n\tvar starthead = firstElement.heads[asc ? 0 : firstElement.heads.length - 1];\n\tvar endhead = lastElement.heads[asc ? 0 : lastElement.heads.length - 1];\n\tvar startX = starthead.x;\n\tif (asc) startX += starthead.w - 0.6;\n\tvar endX = endhead.x;\n\tendX += (asc) ? endhead.w : 0.6;\n\treturn [startX, endX];\n}\n\nfunction calcYPos(average, numElements, stemHeight, asc, firstAveragePitch, lastAveragePitch, isFlat, minPitch, maxPitch, isGrace) {\n\tvar barpos = stemHeight - 2; // (isGrace)? 5:7;\n\tvar barminpos = stemHeight - 2;\n\tvar pos = Math.round(asc ? Math.max(average + barpos, maxPitch + barminpos) : Math.min(average - barpos, minPitch - barminpos));\n\n\tvar slant = calcSlant(firstAveragePitch, lastAveragePitch, numElements, isFlat);\n\tvar startY = pos + Math.floor(slant / 2);\n\tvar endY = pos + Math.floor(-slant / 2);\n\n\t// If the notes are too high or too low, make the beam go down to the middle\n\tif (!isGrace) {\n\t\tif (asc && pos < 6) {\n\t\t\tstartY = 6;\n\t\t\tendY = 6;\n\t\t} else if (!asc && pos > 6) {\n\t\t\tstartY = 6;\n\t\t\tendY = 6;\n\t\t}\n\t}\n\n\treturn [startY, endY];\n}\n\nfunction createStems(elems, asc, beam, dy, mainNote) {\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tif (elem.abcelem.rest)\n\t\t\tcontinue;\n\t\t// TODO-PER: This is odd. If it is a regular beam then elems is an array of AbsoluteElements, if it is a grace beam then it is an array of objects , so we directly attach the element to the parent. We tell it if is a grace note because they are passed in as a generic object instead of an AbsoluteElement.\n\t\tvar isGrace = elem.addExtra ? false : true;\n\t\tvar parent = isGrace ? mainNote : elem;\n\t\tvar furthestHead = elem.heads[(asc) ? 0 : elem.heads.length - 1];\n\t\tvar ovalDelta = 1 / 5;//(isGrace)?1/3:1/5;\n\t\tvar pitch = furthestHead.pitch + ((asc) ? ovalDelta : -ovalDelta);\n\t\tvar dx = asc ? furthestHead.w : 0; // down-pointing stems start on the left side of the note, up-pointing stems start on the right side, so we offset by the note width.\n\t\tif (!isGrace)\n\t\t\tdx += furthestHead.dx;\n\t\tvar x = furthestHead.x + dx; // this is now the actual x location in pixels.\n\t\tvar bary = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, x);\n\t\tvar lineWidth = (asc) ? -0.6 : 0.6;\n\t\tif (!asc)\n\t\t\tbary -= (dy / 2) / spacing.STEP;\t// TODO-PER: This is just a fudge factor so the down-pointing stems don't overlap.\n\t\tif (isGrace)\n\t\t\tdx += elem.heads[0].dx;\n\t\t// TODO-PER-HACK: One type of note head has a different placement of the stem. This should be more generically calculated:\n\t\tif (furthestHead.c === 'noteheads.slash.quarter') {\n\t\t\tif (asc)\n\t\t\t\tpitch += 1;\n\t\t\telse\n\t\t\t\tpitch -= 1;\n\t\t}\n\t\tvar stem = new RelativeElement(null, dx, 0, pitch, {\n\t\t\t\"type\": \"stem\",\n\t\t\t\"pitch2\": bary,\n\t\t\tlinewidth: lineWidth\n\t\t});\n\t\tstem.setX(parent.x); // This is after the x coordinates were set, so we have to set it directly.\n\t\tparent.addRight(stem);\n\t}\n\n}\n\nfunction createAdditionalBeams(elems, asc, beam, isGrace, dy) {\n\tvar beams = [];\n\tvar auxBeams = []; // auxbeam will be {x, y, durlog, single} auxbeam[0] should match with durlog=-4 (16th) (j=-4-durlog)\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tif (elem.abcelem.rest)\n\t\t\tcontinue;\n\t\tvar furthestHead = elem.heads[(asc) ? 0 : elem.heads.length - 1];\n\t\tvar x = furthestHead.x + ((asc) ? furthestHead.w : 0);\n\t\tvar bary = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, x);\n\n\t\tvar sy = (asc) ? -1.5 : 1.5;\n\t\tif (isGrace) sy = sy * 2 / 3; // This makes the second beam on grace notes closer to the first one.\n\t\tvar duration = elem.abcelem.duration; // get the duration via abcelem because of triplets\n\t\tif (duration === 0) duration = 0.25; // if this is stemless, then we use quarter note as the duration.\n\t\tfor (var durlog = getDurlog(duration); durlog < -3; durlog++) {\n\t\t\tvar index = -4 - durlog;\n\t\t\tif (auxBeams[index]) {\n\t\t\t\tauxBeams[index].single = false;\n\t\t\t} else {\n\t\t\t\tauxBeams[index] = {\n\t\t\t\t\tx: x + ((asc) ? -0.6 : 0), y: bary + sy * (index + 1),\n\t\t\t\t\tdurlog: durlog, single: true\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (i > 0 && elem.abcelem.beambr && elem.abcelem.beambr <= (index + 1)) {\n\t\t\t\tif (!auxBeams[index].split)\n\t\t\t\t\tauxBeams[index].split = [auxBeams[index].x];\n\t\t\t\tvar xPos = calcXPos(asc, elems[i - 1], elem);\n\t\t\t\tif (auxBeams[index].split[auxBeams[index].split.length - 1] >= xPos[0]) {\n\t\t\t\t\t// the reduction in beams leaves a note unattached so create a small flag for it.\n\t\t\t\t\txPos[0] += elem.w;\n\t\t\t\t}\n\t\t\t\tauxBeams[index].split.push(xPos[0]);\n\t\t\t\tauxBeams[index].split.push(xPos[1]);\n\t\t\t}\n\t\t}\n\n\t\tfor (var j = auxBeams.length - 1; j >= 0; j--) {\n\t\t\tif (i === elems.length - 1 || getDurlog(elems[i + 1].abcelem.duration) > (-j - 4)) {\n\n\t\t\t\tvar auxBeamEndX = x;\n\t\t\t\tvar auxBeamEndY = bary + sy * (j + 1);\n\n\n\t\t\t\tif (auxBeams[j].single) {\n\t\t\t\t\tauxBeamEndX = (i === 0) ? x + 5 : x - 5;\n\t\t\t\t\tauxBeamEndY = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, auxBeamEndX) + sy * (j + 1);\n\t\t\t\t}\n\t\t\t\tvar b = { startX: auxBeams[j].x, endX: auxBeamEndX, startY: auxBeams[j].y, endY: auxBeamEndY, dy: dy }\n\t\t\t\tif (auxBeams[j].split !== undefined) {\n\t\t\t\t\tvar split = auxBeams[j].split;\n\t\t\t\t\tif (b.endX <= split[split.length - 1]) {\n\t\t\t\t\t\t// the reduction in beams leaves the last note by itself, so create a little flag for it\n\t\t\t\t\t\tsplit[split.length - 1] -= elem.w;\n\t\t\t\t\t}\n\t\t\t\t\tsplit.push(b.endX);\n\t\t\t\t\tb.split = auxBeams[j].split;\n\t\t\t\t}\n\t\t\t\tbeams.push(b);\n\t\t\t\tauxBeams = auxBeams.slice(0, j);\n\t\t\t}\n\t\t}\n\t}\n\treturn beams;\n}\n\nmodule.exports = layoutBeam;\n","function getBarYAt(startx, starty, endx, endy, x) {\n\treturn starty + (endy - starty) / (endx - startx) * (x - startx);\n}\n\nmodule.exports = getBarYAt;\n\n","function getLeftEdgeOfStaff(renderer, getTextSize, voices, brace, bracket) {\n\tvar x = renderer.padding.left;\n\n\t// find out how much space will be taken up by voice headers\n\tvar voiceheaderw = 0;\n\tvar i;\n\tvar size;\n\tfor (i = 0; i < voices.length; i++) {\n\t\tif (voices[i].header) {\n\t\t\tsize = getTextSize.calc(voices[i].header, 'voicefont', '');\n\t\t\tvoiceheaderw = Math.max(voiceheaderw, size.width);\n\t\t}\n\t}\n\tvoiceheaderw = addBraceSize(voiceheaderw, brace, getTextSize);\n\tvoiceheaderw = addBraceSize(voiceheaderw, bracket, getTextSize);\n\n\tif (voiceheaderw) {\n\t\t// Give enough spacing to the right - we use the width of an A for the amount of spacing.\n\t\tvar sizeW = getTextSize.calc(\"A\", 'voicefont', '');\n\t\tvoiceheaderw += sizeW.width;\n\t}\n\tx += voiceheaderw;\n\n\tvar ofs = 0;\n\tofs = setBraceLocation(brace, x, ofs);\n\tofs = setBraceLocation(bracket, x, ofs);\n\treturn x + ofs;\n}\n\nfunction addBraceSize(voiceheaderw, brace, getTextSize) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tif (brace[i].header) {\n\t\t\t\tvar size = getTextSize.calc(brace[i].header, 'voicefont', '');\n\t\t\t\tvoiceheaderw = Math.max(voiceheaderw, size.width);\n\t\t\t}\n\t\t}\n\t}\n\treturn voiceheaderw;\n}\n\nfunction setBraceLocation(brace, x, ofs) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tsetLocation(x, brace[i]);\n\t\t\tofs = Math.max(ofs, brace[i].getWidth());\n\t\t}\n\t}\n\treturn ofs;\n}\n\nfunction setLocation(x, element) {\n\telement.x = x;\n}\n\nmodule.exports = getLeftEdgeOfStaff;\n","var getLeftEdgeOfStaff = require('./get-left-edge-of-staff');\n\nfunction layoutInGrid(renderer, staffGroup, timeBasedLayout) {\n\tvar leftEdge = getLeftEdgeOfStaff(renderer, staffGroup.getTextSize, staffGroup.voices, staffGroup.brace, staffGroup.bracket);\n\tvar ret = getTotalDuration(staffGroup, timeBasedLayout.minPadding)\n\tvar totalDuration = ret.totalDuration\n\tvar minSpacing = ret.minSpacing\n\tvar totalWidth = minSpacing * totalDuration\n\tif (timeBasedLayout.minWidth)\n\t\ttotalWidth = Math.max(totalWidth, timeBasedLayout.minWidth)\n\tvar leftAlignPadding = timeBasedLayout.minPadding ? timeBasedLayout.minPadding/2 : 2 // If the padding isn't specified still give it some\n\n\tstaffGroup.startx = leftEdge\n\tstaffGroup.w = totalWidth + leftEdge\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar voice = staffGroup.voices[i]\n\t\tvoice.startx = leftEdge\n\t\tvoice.w = totalWidth + leftEdge\n\n\t\tvar x = leftEdge\n\t\tvar afterFixedLeft = false\n\t\tvar durationUnit = 0\n\t\tfor (var j = 0; j < voice.children.length; j++) {\n\t\t\tvar child = voice.children[j]\n\t\t\tif (!afterFixedLeft) {\n\t\t\t\tif (child.duration !== 0) {\n\t\t\t\t\t// We got to the first music element on the line\n\t\t\t\t\tafterFixedLeft = true\n\t\t\t\t\tdurationUnit = (totalWidth + leftEdge - x) / totalDuration\n\t\t\t\t\tstaffGroup.gridStart = x\n\t\t\t\t} else {\n\t\t\t\t\t// We are still doing the preliminary stuff - clef, time sig, etc.\n\t\t\t\t\tchild.x = x\n\t\t\t\t\tx += child.w + child.minspacing\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (afterFixedLeft) {\n\t\t\t\tif (timeBasedLayout.align === 'center')\n\t\t\t\t\tchild.x = x + (child.duration * durationUnit) / 2 - child.w / 2\n\t\t\t\telse {\n\t\t\t\t\t// left align with padding - but no padding for barlines, they should be right aligned.\n\t\t\t\t\t// TODO-PER: it looks better to move bar lines one pixel to right. Not sure why.\n\t\t\t\t\tif (child.duration === 0) {\n\t\t\t\t\t\tchild.x = x + 1 - child.w\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// child.extraw has the width of the accidentals - push the note to the right to take that into consideration. It will be 0 if there is nothing to the left.\n\t\t\t\t\t\tchild.x = x + leftAlignPadding - child.extraw\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tx += child.duration * durationUnit\n\t\t\t}\n\t\t\tfor (var k = 0; k < child.children.length; k++) {\n\t\t\t\tvar grandchild = child.children[k]\n\t\t\t\t// some elements don't have a dx - Tempo, for instance\n\t\t\t\tvar dx = grandchild.dx ? grandchild.dx : 0\n\t\t\t\tgrandchild.x = child.x + dx\n\t\t\t}\n\t\t}\n\t\tstaffGroup.gridEnd = x\n\t}\n\treturn totalWidth\n}\n\nfunction getTotalDuration(staffGroup, timeBasedLayout) {\n\tvar maxSpacing = 0\n\tvar maxCount = 0\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar count = 0\n\t\tvar voice = staffGroup.voices[i]\n\t\tfor (var j = 0; j < voice.children.length; j++) {\n\t\t\tvar element = voice.children[j]\n\t\t\tcount += element.duration\n\t\t\tif (element.duration) {\n\t\t\t\tvar width = (element.w+timeBasedLayout) / element.duration\n\t\t\t\tmaxSpacing = Math.max(maxSpacing, width)\n\t\t\t}\n\t\t}\n\t\tmaxCount = Math.max(maxCount, count)\n\t}\n\treturn { totalDuration: maxCount, minSpacing: maxSpacing}\n}\n\nmodule.exports = layoutInGrid;\n","var layoutVoice = require('./voice');\nvar setUpperAndLowerElements = require('./set-upper-and-lower-elements');\nvar layoutStaffGroup = require('./staff-group');\nvar getLeftEdgeOfStaff = require('./get-left-edge-of-staff');\nvar layoutInGrid = require('./layout-in-grid');\n\n// This sets the \"x\" attribute on all the children in abctune.lines\n// It also sets the \"w\" and \"startx\" attributes on \"voices\"\n// It also sets the \"w\" and \"startx\" attributes on \"voices.children\"\nvar layout = function (renderer, abctune, width, space, expandToWidest, timeBasedLayout) {\n\tvar i;\n\tvar abcLine;\n\t// Adjust the x-coordinates to their absolute positions\n\tvar maxWidth = width;\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\t// console.log(\"=== line\", i)\n\t\t\tvar thisWidth;\n\t\t\tif (timeBasedLayout !== undefined)\n\t\t\t\tthisWidth = layoutInGrid(renderer, abcLine.staffGroup, timeBasedLayout);\n\t\t\telse\n\t\t\t\tthisWidth = setXSpacing(renderer, maxWidth, space, abcLine.staffGroup, abctune.formatting, i === abctune.lines.length - 1, false);\n\t\t\t// console.log(thisWidth, maxWidth)\n\t\t\tif (Math.round(thisWidth) > Math.round(maxWidth)) { // to take care of floating point weirdness\n\t\t\t\tmaxWidth = thisWidth\n\t\t\t\tif (expandToWidest)\n\t\t\t\t\ti = -1 // do the calculations over with the new width\n\t\t\t}\n\t\t}\n\t}\n\n\t// Layout the beams and add the stems to the beamed notes.\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staffGroup && abcLine.staffGroup.voices) {\n\t\t\tfor (var j = 0; j < abcLine.staffGroup.voices.length; j++)\n\t\t\t\tlayoutVoice(abcLine.staffGroup.voices[j]);\n\t\t\tsetUpperAndLowerElements(renderer, abcLine.staffGroup);\n\t\t}\n\t}\n\n\t// Set the staff spacing\n\t// TODO-PER: we should have been able to do this by the time we called setUpperAndLowerElements, but for some reason the \"bottom\" element seems to be set as a side effect of setting the X spacing.\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staffGroup) {\n\t\t\tabcLine.staffGroup.setHeight();\n\t\t}\n\t}\n\treturn maxWidth;\n}\n// Do the x-axis positioning for a single line (a group of related staffs)\nvar setXSpacing = function (renderer, width, space, staffGroup, formatting, isLastLine, debug) {\n\tvar leftEdge = getLeftEdgeOfStaff(renderer, staffGroup.getTextSize, staffGroup.voices, staffGroup.brace, staffGroup.bracket);\n\tvar newspace = space;\n\t//dumpGroup(\"before\", staffGroup)\n\tfor (var it = 0; it < 8; it++) { // TODO-PER: shouldn't need multiple passes, but each pass gets it closer to the right spacing. (Only affects long lines: normal lines break out of this loop quickly.)\n\t\t// console.log(\"iteration\", it)\n\t\tvar ret = layoutStaffGroup(newspace, renderer.minPadding, debug, staffGroup, leftEdge);\n\t\tnewspace = calcHorizontalSpacing(isLastLine, formatting.stretchlast, width + renderer.padding.left, staffGroup.w, newspace, ret.spacingUnits, ret.minSpace, renderer.padding.left + renderer.padding.right);\n\t\tif (debug)\n\t\t\tconsole.log(\"setXSpace\", it, staffGroup.w, newspace, staffGroup.minspace);\n\t\tif (newspace === null) break;\n\t}\n\t//dumpGroup(\"after\",staffGroup)\n\tcenterWholeRests(staffGroup.voices);\n\treturn staffGroup.w - leftEdge\n};\n\nfunction replacer(key, value) {\n\t// Filtering out properties\n\tif (key === 'parent') {\n\t\treturn 'parent';\n\t}\n\tif (key === 'beam') {\n\t\treturn 'beam';\n\t}\n\treturn value;\n}\n\nfunction dumpGroup(label, staffGroup) {\n\tconsole.log(\"=================== \" + label + \" =========================\")\n\tconsole.log(staffGroup)\n\tconsole.log(JSON.stringify(staffGroup, replacer, \"\\t\"))\n}\n\nfunction calcHorizontalSpacing(isLastLine, stretchLast, targetWidth, lineWidth, spacing, spacingUnits, minSpace, padding) {\n\tif (isLastLine) {\n\t\tif (stretchLast === undefined) {\n\t\t\tif (lineWidth / targetWidth < 0.66) return null; // keep this for backward compatibility. The break isn't quite the same for some reason.\n\t\t} else {\n\t\t\t// \"Stretch the last music line of a tune when it lacks less than the float fraction of the page width.\"\n\t\t\tvar lack = 1 - (lineWidth + padding) / targetWidth;\n\t\t\tvar stretch = lack < stretchLast;\n\t\t\tif (!stretch) return null; // don't stretch last line too much\n\t\t}\n\t}\n\tif (Math.abs(targetWidth - lineWidth) < 2) return null; // if we are already near the target width, we're done.\n\tvar relSpace = spacingUnits * spacing;\n\tvar constSpace = lineWidth - relSpace;\n\tif (spacingUnits > 0) {\n\t\tspacing = (targetWidth - constSpace) / spacingUnits;\n\t\tif (spacing * minSpace > 50) {\n\t\t\tspacing = 50 / minSpace;\n\t\t}\n\t\treturn spacing;\n\t}\n\treturn null;\n}\n\nfunction centerWholeRests(voices) {\n\t// whole rests are a special case: if they are by themselves in a measure, then they should be centered.\n\t// (If they are not by themselves, that is probably a user error, but we'll just center it between the two items to either side of it.)\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvar voice = voices[i];\n\t\t// Look through all of the elements except for the first and last. If the whole note appears there then there isn't anything to center it between anyway.\n\t\tfor (var j = 1; j < voice.children.length - 1; j++) {\n\t\t\tvar absElem = voice.children[j];\n\t\t\tif (absElem.abcelem.rest && (absElem.abcelem.rest.type === 'whole' || absElem.abcelem.rest.type === 'multimeasure')) {\n\t\t\t\tvar before = voice.children[j - 1];\n\t\t\t\tvar after = voice.children[j + 1];\n\t\t\t\tabsElem.center(before, after);\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = layout;\n","var spacing = require('../helpers/spacing');\n\nvar setUpperAndLowerElements = function (renderer, staffGroup) {\n\t// Each staff already has the top and bottom set, now we see if there are elements that are always on top and bottom, and resolve their pitch.\n\t// Also, get the overall height of all the staves in this group.\n\tvar lastStaffBottom;\n\tfor (var i = 0; i < staffGroup.staffs.length; i++) {\n\t\tvar staff = staffGroup.staffs[i];\n\t\t// the vertical order of elements that are above is: tempo, part, volume/dynamic, ending/chord, lyric\n\t\t// the vertical order of elements that are below is: lyric, chord, volume/dynamic\n\t\tvar positionY = {\n\t\t\ttempoHeightAbove: 0,\n\t\t\tpartHeightAbove: 0,\n\t\t\tvolumeHeightAbove: 0,\n\t\t\tdynamicHeightAbove: 0,\n\t\t\tendingHeightAbove: 0,\n\t\t\tchordHeightAbove: 0,\n\t\t\tlyricHeightAbove: 0,\n\n\t\t\tlyricHeightBelow: 0,\n\t\t\tchordHeightBelow: 0,\n\t\t\tvolumeHeightBelow: 0,\n\t\t\tdynamicHeightBelow: 0\n\t\t};\n\n\t\tif (renderer.showDebug && renderer.showDebug.indexOf(\"box\") >= 0) {\n\t\t\tstaff.originalTop = staff.top; // This is just being stored for debugging purposes.\n\t\t\tstaff.originalBottom = staff.bottom; // This is just being stored for debugging purposes.\n\t\t}\n\n\t\tincTop(staff, positionY, 'lyricHeightAbove');\n\t\tincTop(staff, positionY, 'chordHeightAbove', staff.specialY.chordLines.above);\n\t\tif (staff.specialY.endingHeightAbove) {\n\t\t\tif (staff.specialY.chordHeightAbove)\n\t\t\t\tstaff.top += 2;\n\t\t\telse\n\t\t\t\tstaff.top += staff.specialY.endingHeightAbove + margin;\n\t\t\tpositionY.endingHeightAbove = staff.top;\n\t\t}\n\t\tif (staff.specialY.dynamicHeightAbove && staff.specialY.volumeHeightAbove) {\n\t\t\tstaff.top += Math.max(staff.specialY.dynamicHeightAbove, staff.specialY.volumeHeightAbove) + margin;\n\t\t\tpositionY.dynamicHeightAbove = staff.top;\n\t\t\tpositionY.volumeHeightAbove = staff.top;\n\t\t} else {\n\t\t\tincTop(staff, positionY, 'dynamicHeightAbove');\n\t\t\tincTop(staff, positionY, 'volumeHeightAbove');\n\t\t}\n\t\tincTop(staff, positionY, 'partHeightAbove');\n\t\tincTop(staff, positionY, 'tempoHeightAbove');\n\n\t\tif (staff.specialY.lyricHeightBelow) {\n\t\t\tstaff.specialY.lyricHeightBelow += renderer.spacing.vocal / spacing.STEP;\n\t\t\tpositionY.lyricHeightBelow = staff.bottom;\n\t\t\tstaff.bottom -= (staff.specialY.lyricHeightBelow + margin);\n\t\t}\n\t\tif (staff.specialY.chordHeightBelow) {\n\t\t\tpositionY.chordHeightBelow = staff.bottom;\n\t\t\tvar hgt = staff.specialY.chordHeightBelow;\n\t\t\tif (staff.specialY.chordLines.below)\n\t\t\t\thgt *= staff.specialY.chordLines.below;\n\t\t\tstaff.bottom -= (hgt + margin);\n\t\t}\n\t\tif (staff.specialY.volumeHeightBelow && staff.specialY.dynamicHeightBelow) {\n\t\t\tpositionY.volumeHeightBelow = staff.bottom;\n\t\t\tpositionY.dynamicHeightBelow = staff.bottom;\n\t\t\tstaff.bottom -= (Math.max(staff.specialY.volumeHeightBelow, staff.specialY.dynamicHeightBelow) + margin);\n\t\t} else if (staff.specialY.volumeHeightBelow) {\n\t\t\tpositionY.volumeHeightBelow = staff.bottom; staff.bottom -= (staff.specialY.volumeHeightBelow + margin);\n\t\t} else if (staff.specialY.dynamicHeightBelow) {\n\t\t\tpositionY.dynamicHeightBelow = staff.bottom; staff.bottom -= (staff.specialY.dynamicHeightBelow + margin);\n\t\t}\n\n\t\tif (renderer.showDebug && renderer.showDebug.indexOf(\"box\") >= 0)\n\t\t\tstaff.positionY = positionY; // This is just being stored for debugging purposes.\n\n\t\tfor (var j = 0; j < staff.voices.length; j++) {\n\t\t\tvar voice = staffGroup.voices[staff.voices[j]];\n\t\t\tsetUpperAndLowerVoiceElements(positionY, voice, renderer.spacing);\n\t\t}\n\t\t// We might need a little space in between staves if the staves haven't been pushed far enough apart by notes or extra vertical stuff.\n\t\t// Only try to put in extra space if this isn't the top staff.\n\t\tif (lastStaffBottom !== undefined) {\n\t\t\tvar thisStaffTop = staff.top - 10;\n\t\t\tvar forcedSpacingBetween = lastStaffBottom + thisStaffTop;\n\t\t\tvar minSpacingInPitches = renderer.spacing.systemStaffSeparation / spacing.STEP;\n\t\t\tvar addedSpace = minSpacingInPitches - forcedSpacingBetween;\n\t\t\tif (addedSpace > 0)\n\t\t\t\tstaff.top += addedSpace;\n\t\t}\n\t\tstaff.top += renderer.spacing.staffTopMargin / spacing.STEP\n\n\t\tlastStaffBottom = 2 - staff.bottom; // the staff starts at position 2 and the bottom variable is negative. Therefore to find out how large the bottom is, we reverse the sign of the bottom, and add the 2 in.\n\n\t\t// Now we need a little margin on the top, so we'll just throw that in.\n\t\t//staff.top += 4;\n\t\t//console.log(\"Staff Y: \",i,heightInPitches,staff.top,staff.bottom);\n\t}\n\t//console.log(\"Staff Height: \",heightInPitches,this.height);\n};\n\nvar margin = 1;\nfunction incTop(staff, positionY, item, count) {\n\tif (staff.specialY[item]) {\n\t\tvar height = staff.specialY[item];\n\t\tif (count)\n\t\t\theight *= count;\n\t\tstaff.top += height + margin;\n\t\tpositionY[item] = staff.top;\n\t}\n}\n\nfunction setUpperAndLowerVoiceElements(positionY, voice, spacing) {\n\tvar i;\n\tvar abselem;\n\tfor (i = 0; i < voice.children.length; i++) {\n\t\tabselem = voice.children[i];\n\t\tsetUpperAndLowerAbsoluteElements(positionY, abselem, spacing);\n\t}\n\tfor (i = 0; i < voice.otherchildren.length; i++) {\n\t\tabselem = voice.otherchildren[i];\n\t\tswitch (abselem.type) {\n\t\t\tcase 'CrescendoElem':\n\t\t\t\tsetUpperAndLowerCrescendoElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'DynamicDecoration':\n\t\t\t\tsetUpperAndLowerDynamicElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'EndingElem':\n\t\t\t\tsetUpperAndLowerEndingElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\n// For each of the relative elements that can't be placed in advance (because their vertical placement depends on everything\n// else on the line), this iterates through them and sets their pitch. By the time this is called, specialYResolved contains a\n// hash with the vertical placement (in pitch units) for each type.\n// TODO-PER: I think this needs to be separated by \"above\" and \"below\". How do we know that for dynamics at the point where they are being defined, though? We need a pass through all the relative elements to set \"above\" and \"below\".\nfunction setUpperAndLowerAbsoluteElements(specialYResolved, element, spacing) {\n\t// specialYResolved contains the actual pitch for each of the classes of elements.\n\tfor (var i = 0; i < element.children.length; i++) {\n\t\tvar child = element.children[i];\n\t\tfor (var key in element.specialY) { // for each class of element that needs to be placed vertically\n\t\t\tif (element.specialY.hasOwnProperty(key)) {\n\t\t\t\tif (child[key]) { // If this relative element has defined a height for this class of element\n\t\t\t\t\tchild.pitch = specialYResolved[key];\n\t\t\t\t\tif (child.top === undefined) { // TODO-PER: HACK! Not sure this is the right place to do this.\n\t\t\t\t\t\tif (child.type === 'TempoElement') {\n\t\t\t\t\t\t\tsetUpperAndLowerTempoElement(specialYResolved, child);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetUpperAndLowerRelativeElements(specialYResolved, child, spacing);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement.pushTop(child.top);\n\t\t\t\t\t\telement.pushBottom(child.bottom);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction setUpperAndLowerCrescendoElements(positionY, element) {\n\tif (element.dynamicHeightAbove)\n\t\telement.pitch = positionY.dynamicHeightAbove;\n\telse\n\t\telement.pitch = positionY.dynamicHeightBelow;\n}\n\nfunction setUpperAndLowerDynamicElements(positionY, element) {\n\tif (element.volumeHeightAbove)\n\t\telement.pitch = positionY.volumeHeightAbove;\n\telse\n\t\telement.pitch = positionY.volumeHeightBelow;\n}\n\nfunction setUpperAndLowerEndingElements(positionY, element) {\n\telement.pitch = positionY.endingHeightAbove - 2;\n}\n\nfunction setUpperAndLowerTempoElement(positionY, element) {\n\telement.pitch = positionY.tempoHeightAbove;\n\telement.top = positionY.tempoHeightAbove;\n\telement.bottom = positionY.tempoHeightAbove;\n\tif (element.note) {\n\t\tvar tempoPitch = element.pitch - element.totalHeightInPitches + 1; // The pitch we receive is the top of the allotted area: change that to practically the bottom.\n\t\telement.note.top = tempoPitch;\n\t\telement.note.bottom = tempoPitch;\n\t\tfor (var i = 0; i < element.note.children.length; i++) {\n\t\t\tvar child = element.note.children[i];\n\t\t\tchild.top += tempoPitch;\n\t\t\tchild.bottom += tempoPitch;\n\t\t\tchild.pitch += tempoPitch;\n\t\t\tif (child.pitch2 !== undefined)\n\t\t\t\tchild.pitch2 += tempoPitch;\n\t\t}\n\t}\n}\n\nfunction setUpperAndLowerRelativeElements(positionY, element, renderSpacing) {\n\tswitch (element.type) {\n\t\tcase \"part\":\n\t\t\telement.top = positionY.partHeightAbove + element.height;\n\t\t\telement.bottom = positionY.partHeightAbove;\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\tcase \"chord\":\n\t\t\tif (element.chordHeightAbove) {\n\t\t\t\telement.top = positionY.chordHeightAbove;\n\t\t\t\telement.bottom = positionY.chordHeightAbove;\n\t\t\t} else {\n\t\t\t\telement.top = positionY.chordHeightBelow;\n\t\t\t\telement.bottom = positionY.chordHeightBelow;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tif (element.lyricHeightAbove) {\n\t\t\t\telement.top = positionY.lyricHeightAbove;\n\t\t\t\telement.bottom = positionY.lyricHeightAbove;\n\t\t\t} else {\n\t\t\t\telement.top = positionY.lyricHeightBelow + renderSpacing.vocal / spacing.STEP;\n\t\t\t\telement.bottom = positionY.lyricHeightBelow + renderSpacing.vocal / spacing.STEP;\n\t\t\t\telement.pitch -= renderSpacing.vocal / spacing.STEP;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\telement.top = positionY.chordHeightAbove;\n\t\t\telement.bottom = positionY.chordHeightAbove;\n\t\t\tbreak;\n\t}\n\tif (element.pitch === undefined || element.top === undefined)\n\t\tconsole.error(\"RelativeElement position not set.\", element.type, element.pitch, element.top, positionY);\n}\n\nmodule.exports = setUpperAndLowerElements;\n","var layoutVoiceElements = require('./voice-elements');\n\nfunction checkLastBarX(voices) {\n\tvar maxX = 0;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvar curVoice = voices[i];\n\t\tif (curVoice.children.length > 0) {\n\t\t\tvar lastChild = curVoice.children.length - 1;\n\t\t\tvar maxChild = curVoice.children[lastChild];\n\t\t\tif (maxChild.abcelem.el_type === 'bar') {\n\t\t\t\tvar barX = maxChild.children[0].x;\n\t\t\t\tif (barX > maxX) {\n\t\t\t\t\tmaxX = barX;\n\t\t\t\t} else {\n\t\t\t\t\tmaxChild.children[0].x = maxX;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvar layoutStaffGroup = function (spacing, minPadding, debug, staffGroup, leftEdge) {\n\tvar epsilon = 0.0000001; // Fudging for inexactness of floating point math.\n\tvar spacingunits = 0; // number of times we will have ended up using the spacing distance (as opposed to fixed width distances)\n\tvar minspace = 1000; // a big number to start off with - used to find out what the smallest space between two notes is -- GD 2014.1.7\n\n\tvar x = leftEdge;\n\tstaffGroup.startx = x;\n\tvar i;\n\n\tvar currentduration = 0;\n\tif (debug) console.log(\"init layout\", spacing);\n\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\tlayoutVoiceElements.beginLayout(x, staffGroup.voices[i]);\n\t}\n\n\tvar spacingunit = 0; // number of spacingunits coming from the previously laid out element to this one\n\twhile (!finished(staffGroup.voices)) {\n\t\t// find first duration level to be laid out among candidates across voices\n\t\tcurrentduration = null; // candidate smallest duration level\n\t\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\t\tif (!layoutVoiceElements.layoutEnded(staffGroup.voices[i]) && (!currentduration || getDurationIndex(staffGroup.voices[i]) < currentduration))\n\t\t\t\tcurrentduration = getDurationIndex(staffGroup.voices[i]);\n\t\t}\n\n\n\t\t// isolate voices at current duration level\n\t\tvar currentvoices = [];\n\t\tvar othervoices = [];\n\t\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\t\tvar durationIndex = getDurationIndex(staffGroup.voices[i]);\n\t\t\t// PER: Because of the inexactness of JS floating point math, we just get close.\n\t\t\tif (durationIndex - currentduration > epsilon) {\n\t\t\t\tothervoices.push(staffGroup.voices[i]);\n\t\t\t\t//console.log(\"out: voice \",i);\n\t\t\t} else {\n\t\t\t\tcurrentvoices.push(staffGroup.voices[i]);\n\t\t\t\t//if (debug) console.log(\"in: voice \",i);\n\t\t\t}\n\t\t}\n\n\t\t// among the current duration level find the one which needs starting furthest right\n\t\tspacingunit = 0; // number of spacingunits coming from the previously laid out element to this one\n\t\tvar spacingduration = 0;\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\t//console.log(\"greatest spacing unit\", x, layoutVoiceElements.getNextX(currentvoices[i]), layoutVoiceElements.getSpacingUnits(currentvoices[i]), currentvoices[i].spacingduration);\n\t\t\tif (layoutVoiceElements.getNextX(currentvoices[i]) > x) {\n\t\t\t\tx = layoutVoiceElements.getNextX(currentvoices[i]);\n\t\t\t\tspacingunit = layoutVoiceElements.getSpacingUnits(currentvoices[i]);\n\t\t\t\tspacingduration = currentvoices[i].spacingduration;\n\t\t\t}\n\t\t}\n\t\tspacingunits += spacingunit;\n\t\tminspace = Math.min(minspace, spacingunit);\n\t\tif (debug) console.log(\"currentduration: \", currentduration, spacingunits, minspace);\n\n\t\tvar lastTopVoice = undefined;\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\tvar v = currentvoices[i];\n\t\t\tif (v.voicenumber === 0)\n\t\t\t\tlastTopVoice = i;\n\t\t\tvar topVoice = (lastTopVoice !== undefined && currentvoices[lastTopVoice].voicenumber !== v.voicenumber) ? currentvoices[lastTopVoice] : undefined;\n\t\t\tif (!isSameStaff(v, topVoice))\n\t\t\t\ttopVoice = undefined;\n\t\t\tvar voicechildx = layoutVoiceElements.layoutOneItem(x, spacing, v, minPadding, topVoice);\n\t\t\tvar dx = voicechildx - x;\n\t\t\tif (dx > 0) {\n\t\t\t\tx = voicechildx; //update x\n\t\t\t\tfor (var j = 0; j < i; j++) { // shift over all previously laid out elements\n\t\t\t\t\tlayoutVoiceElements.shiftRight(dx, currentvoices[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove the value of already counted spacing units in other voices (e.g. if a voice had planned to use up 5 spacing units but is not in line to be laid out at this duration level - where we've used 2 spacing units - then we must use up 3 spacing units, not 5)\n\t\tfor (i = 0; i < othervoices.length; i++) {\n\t\t\tothervoices[i].spacingduration -= spacingduration;\n\t\t\tlayoutVoiceElements.updateNextX(x, spacing, othervoices[i]); // adjust other voices expectations\n\t\t}\n\n\t\t// update indexes of currently laid out elems\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\tvar voice = currentvoices[i];\n\t\t\tlayoutVoiceElements.updateIndices(voice);\n\t\t}\n\t} // finished laying out\n\n\n\t// find the greatest remaining x as a base for the width\n\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\tif (layoutVoiceElements.getNextX(staffGroup.voices[i]) > x) {\n\t\t\tx = layoutVoiceElements.getNextX(staffGroup.voices[i]);\n\t\t\tspacingunit = layoutVoiceElements.getSpacingUnits(staffGroup.voices[i]);\n\t\t}\n\t}\n\n\t// adjust lastBar when needed (multi staves)\n\tcheckLastBarX(staffGroup.voices);\n\t//console.log(\"greatest remaining\",spacingunit,x);\n\tspacingunits += spacingunit;\n\tstaffGroup.setWidth(x);\n\n\treturn { spacingUnits: spacingunits, minSpace: minspace };\n};\n\n\nfunction finished(voices) {\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tif (!layoutVoiceElements.layoutEnded(voices[i])) return false;\n\t}\n\treturn true;\n}\n\nfunction getDurationIndex(element) {\n\treturn element.durationindex - (element.children[element.i] && (element.children[element.i].duration > 0) ? 0 : 0.0000005); // if the ith element doesn't have a duration (is not a note), its duration index is fractionally before. This enables CLEF KEYSIG TIMESIG PART, etc. to be laid out before we get to the first note of other voices\n}\n\nfunction isSameStaff(voice1, voice2) {\n\tif (!voice1 || !voice1.staff || !voice1.staff.voices || voice1.staff.voices.length === 0)\n\t\treturn false;\n\tif (!voice2 || !voice2.staff || !voice2.staff.voices || voice2.staff.voices.length === 0)\n\t\treturn false;\n\treturn (voice1.staff.voices[0] === voice2.staff.voices[0]);\n}\n\nmodule.exports = layoutStaffGroup;\n","var getBarYAt = require('./get-bar-y-at');\n\nfunction layoutTriplet(element) {\n\t// TODO end and beginning of line (PER: P.S. I'm not sure this can happen: I think the parser will always specify both the start and end points.)\n\tif (element.anchor1 && element.anchor2) {\n\t\telement.hasBeam = !!element.anchor1.parent.beam && element.anchor1.parent.beam === element.anchor2.parent.beam;\n\t\tvar beam = element.anchor1.parent.beam;\n\t\t// if hasBeam is true, then the first and last element in the triplet have the same beam.\n\t\t// We also need to check if the beam doesn't contain other notes so that `(3 dcdcc` will do a bracket.\n\t\tif (element.hasBeam && (beam.elems[0] !== element.anchor1.parent || beam.elems[beam.elems.length - 1] !== element.anchor2.parent))\n\t\t\telement.hasBeam = false;\n\n\t\tif (element.hasBeam) {\n\t\t\t// If there is a beam then we don't need to draw anything except the text. The beam could either be above or below.\n\t\t\tvar left = isAbove(beam) ? element.anchor1.x + element.anchor1.w : element.anchor1.x;\n\t\t\telement.yTextPos = heightAtMidpoint(left, element.anchor2.x, beam);\n\t\t\telement.yTextPos += isAbove(beam) ? 3 : -2; // This creates some space between the beam and the number.\n\t\t\telement.xTextPos = xAtMidpoint(left, element.anchor2.x);\n\t\t\telement.top = element.yTextPos + 1;\n\t\t\telement.bottom = element.yTextPos - 2;\n\t\t\tif (isAbove(beam))\n\t\t\t\telement.endingHeightAbove = 4;\n\t\t} else {\n\t\t\t// If there isn't a beam, then we need to draw the bracket and the text. The bracket is always above.\n\t\t\t// The bracket is never lower than the 'a' line, but is 4 pitches above the first and last notes. If there is\n\t\t\t// a tall note in the middle, the bracket is horizontal and above the highest note.\n\t\t\telement.startNote = Math.max(element.anchor1.parent.top, 9) + 4;\n\t\t\telement.endNote = Math.max(element.anchor2.parent.top, 9) + 4;\n\t\t\t// If it starts or ends on a rest, make the beam horizontal\n\t\t\tif (element.anchor1.parent.type === \"rest\" && element.anchor2.parent.type !== \"rest\")\n\t\t\t\telement.startNote = element.endNote;\n\t\t\telse if (element.anchor2.parent.type === \"rest\" && element.anchor1.parent.type !== \"rest\")\n\t\t\t\telement.endNote = element.startNote;\n\t\t\t// See if the middle note is really high.\n\t\t\tvar max = 0;\n\t\t\tfor (var i = 0; i < element.middleElems.length; i++) {\n\t\t\t\tmax = Math.max(max, element.middleElems[i].top);\n\t\t\t}\n\t\t\tmax += 4;\n\t\t\tif (max > element.startNote || max > element.endNote) {\n\t\t\t\telement.startNote = max;\n\t\t\t\telement.endNote = max;\n\t\t\t}\n\t\t\tif (element.flatBeams) {\n\t\t\t\telement.startNote = Math.max(element.startNote, element.endNote);\n\t\t\t\telement.endNote = Math.max(element.startNote, element.endNote);\n\t\t\t}\n\n\t\t\telement.yTextPos = element.startNote + (element.endNote - element.startNote) / 2;\n\t\t\telement.xTextPos = element.anchor1.x + (element.anchor2.x + element.anchor2.w - element.anchor1.x) / 2;\n\t\t\telement.top = element.yTextPos + 1;\n\t\t}\n\t}\n\tdelete element.middleElems;\n\tdelete element.flatBeams;\n}\n\nfunction isAbove(beam) {\n\treturn beam.stemsUp;\n}\n\n// We can't just use the entire beam for the calculation. The range has to be passed in, because the beam might extend into some unrelated notes. for instance, (3_a'f'e'f'2 when L:16\nfunction heightAtMidpoint(startX, endX, beam) {\n\tif (beam.beams.length === 0)\n\t\treturn 0;\n\tbeam = beam.beams[0];\n\tvar midPoint = startX + (endX - startX) / 2;\n\treturn getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, midPoint);\n}\n\nfunction xAtMidpoint(startX, endX) {\n\treturn startX + (endX - startX) / 2;\n}\n\nmodule.exports = layoutTriplet;\n","var VoiceElement = function VoiceElements() { }\n\nVoiceElement.beginLayout = function (startx, voice) {\n\tvoice.i = 0;\n\tvoice.durationindex = 0;\n\t//this.ii=this.children.length;\n\tvoice.startx = startx;\n\tvoice.minx = startx; // furthest left to where negatively positioned elements are allowed to go\n\tvoice.nextx = startx; // x position where the next element of this voice should be placed assuming no other voices and no fixed width constraints\n\tvoice.spacingduration = 0; // duration left to be laid out in current iteration (omitting additional spacing due to other aspects, such as bars, dots, sharps and flats)\n};\n\nVoiceElement.layoutEnded = function (voice) {\n\treturn (voice.i >= voice.children.length);\n};\n\nVoiceElement.getNextX = function (voice) {\n\treturn Math.max(voice.minx, voice.nextx);\n};\n\n// number of spacing units expected for next positioning\nVoiceElement.getSpacingUnits = function (voice) {\n\treturn Math.sqrt(voice.spacingduration * 8);\n};\n\n// Try to layout the element at index this.i\n// x - position to try to layout the element at\n// spacing - base spacing\n// can't call this function more than once per iteration\nVoiceElement.layoutOneItem = function (x, spacing, voice, minPadding, firstVoice) {\n\tvar child = voice.children[voice.i];\n\tif (!child) return 0;\n\tvar er = x - voice.minx; // available extrawidth to the left\n\tvar pad = voice.durationindex + child.duration > 0 ? minPadding : 0; // only add padding to the items that aren't fixed to the left edge.\n\t// See if this item overlaps the item in the first voice. If firstVoice is undefined then there's nothing to compare.\n\tif (child.abcelem.el_type === \"note\" && !child.abcelem.rest && voice.voicenumber !== 0 && firstVoice) {\n\t\tvar firstChild = firstVoice.children[firstVoice.i];\n\t\t// It overlaps if the either the child's top or bottom is inside the firstChild's or at least within 1\n\t\t// A special case is if the element is on the same line then it can share a note head, if the notehead is the same\n\t\tvar overlaps = firstChild &&\n\t\t\t((child.abcelem.maxpitch <= firstChild.abcelem.maxpitch + 1 && child.abcelem.maxpitch >= firstChild.abcelem.minpitch - 1) ||\n\t\t\t\t(child.abcelem.minpitch <= firstChild.abcelem.maxpitch + 1 && child.abcelem.minpitch >= firstChild.abcelem.minpitch - 1))\n\t\t// See if they can share a note head\n\t\tif (overlaps && child.abcelem.minpitch === firstChild.abcelem.minpitch && child.abcelem.maxpitch === firstChild.abcelem.maxpitch &&\n\t\t\tfirstChild.heads && firstChild.heads.length > 0 && child.heads && child.heads.length > 0 &&\n\t\t\tfirstChild.heads[0].c === child.heads[0].c)\n\t\t\toverlaps = false;\n\t\t// If this note overlaps the note in the first voice and we haven't moved the note yet (this can be called multiple times)\n\t\tif (overlaps) {\n\t\t\t// I think that firstChild should always have at least one note head, but defensively make sure.\n\t\t\t// There was a problem with this being called more than once so if a value is adjusted then it is saved so it is only adjusted once.\n\t\t\tvar firstChildNoteWidth = firstChild.heads && firstChild.heads.length > 0 ? firstChild.heads[0].realWidth : firstChild.fixed.w;\n\t\t\tif (!child.adjustedWidth)\n\t\t\t\tchild.adjustedWidth = firstChildNoteWidth + child.w;\n\t\t\tchild.w = child.adjustedWidth\n\t\t\tfor (var j = 0; j < child.children.length; j++) {\n\t\t\t\tvar relativeChild = child.children[j];\n\t\t\t\tif (relativeChild.name.indexOf(\"accidental\") < 0) {\n\t\t\t\t\tif (!relativeChild.adjustedWidth)\n\t\t\t\t\t\trelativeChild.adjustedWidth = relativeChild.dx + firstChildNoteWidth;\n\t\t\t\t\trelativeChild.dx = relativeChild.adjustedWidth\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\tvar extraWidth = getExtraWidth(child, pad);\n\tif (er < extraWidth) { // shift right by needed amount\n\t\t// There's an exception if a bar element is after a Part element, there is no shift.\n\t\tif (voice.i === 0 || child.type !== 'bar' || (voice.children[voice.i - 1].type !== 'part' && voice.children[voice.i - 1].type !== 'tempo'))\n\t\t\tx += extraWidth - er;\n\t}\n\tchild.setX(x);\n\n\tvoice.spacingduration = child.duration;\n\t//update minx\n\tvoice.minx = x + getMinWidth(child); // add necessary layout space\n\tif (voice.i !== voice.children.length - 1) voice.minx += child.minspacing; // add minimumspacing except on last elem\n\n\tthis.updateNextX(x, spacing, voice);\n\n\t// contribute to staff y position\n\t//this.staff.top = Math.max(child.top,this.staff.top);\n\t//this.staff.bottom = Math.min(child.bottom,this.staff.bottom);\n\n\treturn x; // where we end up having placed the child\n};\n\nVoiceElement.shiftRight = function (dx, voice) {\n\tvar child = voice.children[voice.i];\n\tif (!child) return;\n\tchild.setX(child.x + dx);\n\tvoice.minx += dx;\n\tvoice.nextx += dx;\n};\n\n// call when spacingduration has been updated\nVoiceElement.updateNextX = function (x, spacing, voice) {\n\tvoice.nextx = x + (spacing * this.getSpacingUnits(voice));\n};\n\nVoiceElement.updateIndices = function (voice) {\n\tif (!this.layoutEnded(voice)) {\n\t\tvoice.durationindex += voice.children[voice.i].duration;\n\t\tif (voice.children[voice.i].type === 'bar') voice.durationindex = Math.round(voice.durationindex * 64) / 64; // everytime we meet a barline, do rounding to nearest 64th\n\t\tvoice.i++;\n\t}\n};\n\nfunction getExtraWidth(child, minPadding) { // space needed to the left of the note\n\tvar padding = 0;\n\tif (child.type === 'note' || child.type === 'bar')\n\t\tpadding = minPadding;\n\treturn -child.extraw + padding;\n}\n\nfunction getMinWidth(child) { // absolute space taken to the right of the note\n\treturn child.w;\n}\n\nmodule.exports = VoiceElement;\n","var layoutBeam = require('./beam');\nvar getBarYAt = require('./get-bar-y-at');\nvar layoutTriplet = require('./triplet');\n\nvar layoutVoice = function (voice) {\n\tfor (var i = 0; i < voice.beams.length; i++) {\n\t\tif (voice.beams[i].type === 'BeamElem') {\n\t\t\tlayoutBeam(voice.beams[i]);\n\t\t\tmoveDecorations(voice.beams[i]);\n\t\t\t// The above will change the top and bottom of the abselem children, so see if we need to expand our range.\n\t\t\tfor (var j = 0; j < voice.beams[i].elems.length; j++) {\n\t\t\t\tvoice.adjustRange(voice.beams[i].elems[j]);\n\t\t\t}\n\t\t}\n\t}\n\tvoice.staff.specialY.chordLines = setLaneForChord(voice.children);\n\n\t// Now we can layout the triplets\n\tfor (i = 0; i < voice.otherchildren.length; i++) {\n\t\tvar child = voice.otherchildren[i];\n\t\tif (child.type === 'TripletElem') {\n\t\t\tlayoutTriplet(child);\n\t\t\tvoice.adjustRange(child);\n\t\t}\n\t}\n\tvoice.staff.top = Math.max(voice.staff.top, voice.top);\n\tvoice.staff.bottom = Math.min(voice.staff.bottom, voice.bottom);\n};\n\nfunction moveDecorations(beam) {\n\tvar padding = 1.5; // This is the vertical padding between elements, in pitches.\n\tfor (var ch = 0; ch < beam.elems.length; ch++) {\n\t\tvar child = beam.elems[ch];\n\t\tif (child.top) {\n\t\t\t// We now know where the ornaments should have been placed, so move them if they would overlap.\n\t\t\tvar top = yAtNote(child, beam);\n\t\t\tfor (var i = 0; i < child.children.length; i++) {\n\t\t\t\tvar el = child.children[i];\n\t\t\t\tif (el.klass === 'ornament' && el.position !== 'below') {\n\t\t\t\t\tif (el.bottom - padding < top) {\n\t\t\t\t\t\tvar distance = top - el.bottom + padding; // Find the distance that it needs to move and add a little margin so the element doesn't touch the beam.\n\t\t\t\t\t\tel.bottom += distance;\n\t\t\t\t\t\tel.top += distance;\n\t\t\t\t\t\tel.pitch += distance;\n\t\t\t\t\t\ttop = child.top = el.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction placeInLane(rightMost, relElem) {\n\t// These items are centered so figure the coordinates accordingly.\n\t// The font reports some extra space so the margin is built in.\n\tvar xCoords = relElem.getChordDim();\n\tif (xCoords) {\n\t\tfor (var i = 0; i < rightMost.length; i++) {\n\t\t\tvar fits = rightMost[i] < xCoords.left;\n\t\t\tif (fits) {\n\t\t\t\tif (i > 0)\n\t\t\t\t\trelElem.putChordInLane(i);\n\t\t\t\trightMost[i] = xCoords.right;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// If we didn't return early, then we need a new row\n\t\trightMost.push(xCoords.right);\n\t\trelElem.putChordInLane(rightMost.length - 1);\n\t}\n}\n\nfunction setLaneForChord(absElems) {\n\t// Criteria:\n\t// 1) lane numbers start from the bottom so that as many items as possible are in lane 0, closest to the music.\n\t// 2) a chord can have more than one line (for instance \"C\\nD\") each line is a lane.\n\t// 3) if two adjoining items would touch then push the second one to the next lane.\n\t// 4) use as many lanes as is necessary to get everything to not touch.\n\t// 5) leave a margin between items, so use another lane if the chords would have less than a character's width.\n\t// 6) if the chord only has one character, allow it to be closer than if the chord has more than one character.\n\tvar rightMostAbove = [0];\n\tvar rightMostBelow = [0];\n\tvar i;\n\tvar j;\n\tvar relElem;\n\tfor (i = 0; i < absElems.length; i++) {\n\t\tfor (j = 0; j < absElems[i].children.length; j++) {\n\t\t\trelElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightAbove) {\n\t\t\t\tplaceInLane(rightMostAbove, relElem);\n\t\t\t}\n\t\t}\n\t\tfor (j = absElems[i].children.length - 1; j >= 0; j--) {\n\t\t\trelElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightBelow) {\n\t\t\t\tplaceInLane(rightMostBelow, relElem);\n\t\t\t}\n\t\t}\n\t}\n\t// If we used a second line, then we need to go back and set the first lines.\n\t// Also we need to flip the indexes of the names so that we can count from the top line.\n\tif (rightMostAbove.length > 1 || rightMostBelow.length > 1)\n\t\tsetLane(absElems, rightMostAbove.length, rightMostBelow.length);\n\treturn { above: rightMostAbove.length, below: rightMostBelow.length };\n}\n\nfunction numAnnotationsBelow(absElem) {\n\tvar count = 0;\n\tfor (var j = 0; j < absElem.children.length; j++) {\n\t\tvar relElem = absElem.children[j];\n\t\tif (relElem.chordHeightBelow)\n\t\t\tcount++;\n\t}\n\treturn count;\n}\n\nfunction setLane(absElems, numLanesAbove, numLanesBelow) {\n\tfor (var i = 0; i < absElems.length; i++) {\n\t\tvar below = numAnnotationsBelow(absElems[i]);\n\t\tfor (var j = 0; j < absElems[i].children.length; j++) {\n\t\t\tvar relElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightAbove) {\n\t\t\t\trelElem.invertLane(numLanesAbove);\n\t\t\t\t// } else if (relElem.chordHeightBelow) {\n\t\t\t\t// \trelElem.invertLane(below);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction yAtNote(element, beam) {\n\tbeam = beam.beams[0];\n\treturn getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, element.x);\n}\n\n\nmodule.exports = layoutVoice;\n","// abc_renderer.js: API to render to SVG/Raphael/whatever rendering engine\n\n/*global Math */\n\nvar spacing = require('./helpers/spacing');\nvar Svg = require('./svg');\n\n/**\n * Implements the API for rendering ABCJS Abstract Rendering Structure to a canvas/paper (e.g. SVG, Raphael, etc)\n * @param {Object} paper\n */\nvar Renderer = function (paper) {\n\tthis.paper = new Svg(paper);\n\tthis.controller = null;\n\n\tthis.space = 3 * spacing.SPACE;\n\tthis.padding = {}; // renderer's padding is managed by the controller\n\tthis.reset();\n\tthis.firefox112 = navigator.userAgent.indexOf('Firefox/112.0') >= 0\n};\n\nRenderer.prototype.reset = function () {\n\n\tthis.paper.clear();\n\tthis.y = 0;\n\tthis.abctune = null;\n\tthis.path = null;\n\tthis.isPrint = false;\n\tthis.lineThickness = 0;\n\tthis.initVerticalSpace();\n};\n\nRenderer.prototype.newTune = function (abcTune) {\n\tthis.abctune = abcTune; // TODO-PER: this is just to get the font info.\n\tthis.setVerticalSpace(abcTune.formatting);\n\t//this.measureNumber = null;\n\t//this.noteNumber = null;\n\tthis.isPrint = abcTune.media === 'print';\n\tthis.setPadding(abcTune);\n};\n\nRenderer.prototype.setLineThickness = function (lineThickness) {\n\tthis.lineThickness = lineThickness\n};\n\nRenderer.prototype.setPaddingOverride = function (params) {\n\tthis.paddingOverride = {\n\t\ttop: params.paddingtop, bottom: params.paddingbottom,\n\t\tright: params.paddingright, left: params.paddingleft\n\t};\n};\n\nRenderer.prototype.setPadding = function (abctune) {\n\t// If the padding is set in the tune, then use that.\n\t// Otherwise, if the padding is set in the override, use that.\n\t// Otherwise, use the defaults (there are a different set of defaults for screen and print.)\n\tfunction setPaddingVariable(self, paddingKey, formattingKey, printDefault, screenDefault) {\n\t\tif (abctune.formatting[formattingKey] !== undefined)\n\t\t\tself.padding[paddingKey] = abctune.formatting[formattingKey];\n\t\telse if (self.paddingOverride[paddingKey] !== undefined)\n\t\t\tself.padding[paddingKey] = self.paddingOverride[paddingKey];\n\t\telse if (self.isPrint)\n\t\t\tself.padding[paddingKey] = printDefault;\n\t\telse\n\t\t\tself.padding[paddingKey] = screenDefault;\n\t}\n\t// 1cm x 0.393701in/cm x 72pt/in x 1.33px/pt = 38px\n\t// 1.8cm x 0.393701in/cm x 72pt/in x 1.33px/pt = 68px\n\tsetPaddingVariable(this, 'top', 'topmargin', 38, 15);\n\tsetPaddingVariable(this, 'bottom', 'botmargin', 38, 15);\n\tsetPaddingVariable(this, 'left', 'leftmargin', 68, 15);\n\tsetPaddingVariable(this, 'right', 'rightmargin', 68, 15);\n};\n\n/**\n * Some of the items on the page are not scaled, so adjust them in the opposite direction of scaling to cancel out the scaling.\n * @param {float} scale\n */\nRenderer.prototype.adjustNonScaledItems = function (scale) {\n\tthis.padding.top /= scale;\n\tthis.padding.bottom /= scale;\n\tthis.padding.left /= scale;\n\tthis.padding.right /= scale;\n\tthis.abctune.formatting.headerfont.size /= scale;\n\tthis.abctune.formatting.footerfont.size /= scale;\n};\n\n/**\n * Set the the values for all the configurable vertical space options.\n */\nRenderer.prototype.initVerticalSpace = function () {\n\t// conversion: 37.7953 = conversion factor for cm to px.\n\t// All of the following values are in px.\n\tthis.spacing = {\n\t\tcomposer: 7.56, // Set the vertical space above the composer.\n\t\tgraceBefore: 8.67, // Define the space before, inside and after the grace notes.\n\t\tgraceInside: 10.67,\n\t\tgraceAfter: 16,\n\t\tinfo: 0, // Set the vertical space above the infoline.\n\t\tlineSkipFactor: 1.1, // Set the factor for spacing between lines of text. (multiply this by the font size)\n\t\tmusic: 7.56, // Set the vertical space above the first staff.\n\t\tparagraphSkipFactor: 0.4, // Set the factor for spacing between text paragraphs. (multiply this by the font size)\n\t\tparts: 11.33, // Set the vertical space above a new part.\n\t\tslurHeight: 1.0, // Set the slur height factor.\n\t\tstaffSeparation: 61.33, // Do not put a staff system closer than from the previous system.\n\t\tstaffTopMargin: 0,\n\t\tstemHeight: 26.67 + 10, // Set the stem height.\n\t\tsubtitle: 3.78, // Set the vertical space above the subtitle.\n\t\tsystemStaffSeparation: 48, // Do not place the staves closer than inside a system. * This values applies to all staves when in the tune header. Otherwise, it applies to the next staff\n\t\ttext: 18.9, // Set the vertical space above the history.\n\t\ttitle: 7.56, // Set the vertical space above the title.\n\t\ttop: 30.24, //Set the vertical space above the tunes and on the top of the continuation pages.\n\t\tvocal: 0, // Set the vertical space above the lyrics under the staves.\n\t\twords: 0 // Set the vertical space above the lyrics at the end of the tune.\n\t};\n\t/*\n\tTODO-PER: Handle the x-coordinate spacing items, too.\nmaxshrink Default: 0.65\nSet how much to compress horizontally when music line breaks\nare automatic.\n must be between 0 (natural spacing)\nand 1 (max shrinking).\n\n// This next value is used to compute the natural spacing of\n// the notes. The base spacing of the crotchet is always\n// 40 pts. When the duration of a note type is twice the\n// duration of an other note type, its spacing is multiplied\n// by this factor.\n// The default value causes the note spacing to be multiplied\n// by 2 when its duration is multiplied by 4, i.e. the\n// space of the semibreve is 80 pts and the space of the\n// semiquaver is 20 pts.\n// Setting this value to 1 sets all note spacing to 40 pts.\nnoteSpacingFactor: 1.414, // Set the note spacing factor to (range 1..2).\n\nscale Default: 0.75 Set the page scale factor. Note that the header and footer are not scaled.\n\nstretchlast Default: 0.8\nStretch the last music line of a tune when it exceeds\nthe fraction of the page width.\n range is 0.0 to 1.0.\n\t */\n};\n\nRenderer.prototype.setVerticalSpace = function (formatting) {\n\t// conversion from pts to px 4/3\n\tif (formatting.staffsep !== undefined)\n\t\tthis.spacing.staffSeparation = formatting.staffsep * 4 / 3;\n\tif (formatting.composerspace !== undefined)\n\t\tthis.spacing.composer = formatting.composerspace * 4 / 3;\n\tif (formatting.partsspace !== undefined)\n\t\tthis.spacing.parts = formatting.partsspace * 4 / 3;\n\tif (formatting.textspace !== undefined)\n\t\tthis.spacing.text = formatting.textspace * 4 / 3;\n\tif (formatting.musicspace !== undefined)\n\t\tthis.spacing.music = formatting.musicspace * 4 / 3;\n\tif (formatting.titlespace !== undefined)\n\t\tthis.spacing.title = formatting.titlespace * 4 / 3;\n\tif (formatting.sysstaffsep !== undefined)\n\t\tthis.spacing.systemStaffSeparation = formatting.sysstaffsep * 4 / 3;\n\tif (formatting.stafftopmargin !== undefined)\n\t\tthis.spacing.staffTopMargin = formatting.stafftopmargin * 4 / 3;\n\tif (formatting.subtitlespace !== undefined)\n\t\tthis.spacing.subtitle = formatting.subtitlespace * 4 / 3;\n\tif (formatting.topspace !== undefined)\n\t\tthis.spacing.top = formatting.topspace * 4 / 3;\n\tif (formatting.vocalspace !== undefined)\n\t\tthis.spacing.vocal = formatting.vocalspace * 4 / 3;\n\tif (formatting.wordsspace !== undefined)\n\t\tthis.spacing.words = formatting.wordsspace * 4 / 3;\n};\n\n\n/**\n * Calculates the y for a given pitch value (relative to the stave the renderer is currently printing)\n * @param {number} ofs pitch value (bottom C on a G clef = 0, D=1, etc.)\n */\nRenderer.prototype.calcY = function (ofs) {\n\treturn this.y - ofs * spacing.STEP;\n};\n\nRenderer.prototype.moveY = function (em, numLines) {\n\tif (numLines === undefined) numLines = 1;\n\tthis.y += em * numLines;\n};\n\nRenderer.prototype.absolutemoveY = function (y) {\n\tthis.y = y;\n};\n\nmodule.exports = Renderer;\n","// abc_voice_element.js: Definition of the VoiceElement class.\n\n/*global module */\n\nvar svgNS = \"http://www.w3.org/2000/svg\";\n\nfunction Svg(wrapper) {\n\tthis.svg = createSvg();\n\tthis.currentGroup = [];\n\twrapper.appendChild(this.svg);\n}\n\nSvg.prototype.clear = function () {\n\tif (this.svg) {\n\t\tvar wrapper = this.svg.parentNode;\n\t\tthis.svg = createSvg();\n\t\tthis.currentGroup = [];\n\t\tif (wrapper) {\n\t\t\t// TODO-PER: If the wrapper is not present, then the underlying div was pulled out from under this instance. It's possible that is still useful (for creating the music off page?)\n\t\t\twrapper.innerHTML = \"\";\n\t\t\twrapper.appendChild(this.svg);\n\t\t}\n\t}\n};\n\nSvg.prototype.setTitle = function (title) {\n\tvar titleEl = document.createElement(\"title\");\n\tvar titleNode = document.createTextNode(title);\n\ttitleEl.appendChild(titleNode);\n\tthis.svg.insertBefore(titleEl, this.svg.firstChild);\n};\n\nSvg.prototype.setResponsiveWidth = function (w, h) {\n\t// this technique is from: http://thenewcode.com/744/Make-SVG-Responsive, thx to https://github.com/iantresman\n\tthis.svg.setAttribute(\"viewBox\", \"0 0 \" + w + \" \" + h);\n\tthis.svg.setAttribute(\"preserveAspectRatio\", \"xMinYMin meet\");\n\tthis.svg.removeAttribute(\"height\");\n\tthis.svg.removeAttribute(\"width\");\n\tthis.svg.style['display'] = \"inline-block\";\n\tthis.svg.style['position'] = \"absolute\";\n\tthis.svg.style['top'] = \"0\";\n\tthis.svg.style['left'] = \"0\";\n\n\tif (this.svg.parentNode) {\n\t\tvar cls = this.svg.parentNode.getAttribute(\"class\");\n\t\tif (!cls)\n\t\t\tthis.svg.parentNode.setAttribute(\"class\", \"abcjs-container\");\n\t\telse if (cls.indexOf(\"abcjs-container\") < 0)\n\t\t\tthis.svg.parentNode.setAttribute(\"class\", cls + \" abcjs-container\");\n\t\tthis.svg.parentNode.style['display'] = \"inline-block\";\n\t\tthis.svg.parentNode.style['position'] = \"relative\";\n\t\tthis.svg.parentNode.style['width'] = \"100%\";\n\t\t// PER: I changed the padding from 100% to this through trial and error.\n\t\t// The example was using a square image, but this music might be either wider or taller.\n\t\tvar padding = h / w * 100;\n\t\tthis.svg.parentNode.style['padding-bottom'] = padding + \"%\";\n\t\tthis.svg.parentNode.style['vertical-align'] = \"middle\";\n\t\tthis.svg.parentNode.style['overflow'] = \"hidden\";\n\t}\n};\n\nSvg.prototype.setSize = function (w, h) {\n\tthis.svg.setAttribute('width', w);\n\tthis.svg.setAttribute('height', h);\n};\n\nSvg.prototype.setAttribute = function (attr, value) {\n\tthis.svg.setAttribute(attr, value);\n};\n\nSvg.prototype.setScale = function (scale) {\n\tif (scale !== 1) {\n\t\tthis.svg.style.transform = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['-ms-transform'] = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['-webkit-transform'] = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['transform-origin'] = \"0 0\";\n\t\tthis.svg.style['-ms-transform-origin-x'] = \"0\";\n\t\tthis.svg.style['-ms-transform-origin-y'] = \"0\";\n\t\tthis.svg.style['-webkit-transform-origin-x'] = \"0\";\n\t\tthis.svg.style['-webkit-transform-origin-y'] = \"0\";\n\t} else {\n\t\tthis.svg.style.transform = \"\";\n\t\tthis.svg.style['-ms-transform'] = \"\";\n\t\tthis.svg.style['-webkit-transform'] = \"\";\n\t}\n};\n\nSvg.prototype.insertStyles = function (styles) {\n\tvar el = document.createElementNS(svgNS, \"style\");\n\tel.textContent = styles;\n\tthis.svg.insertBefore(el, this.svg.firstChild); // prepend is not available on older browsers.\n\t//\tthis.svg.prepend(el);\n};\n\nSvg.prototype.setParentStyles = function (attr) {\n\t// This is needed to get the size right when there is scaling involved.\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (this.svg.parentNode)\n\t\t\t\tthis.svg.parentNode.style[key] = attr[key];\n\t\t}\n\t}\n\t// This is the last thing that gets called, so delete the temporary SVG if one was created\n\tif (this.dummySvg) {\n\t\tvar body = document.querySelector('body');\n\t\tbody.removeChild(this.dummySvg);\n\t\tthis.dummySvg = null;\n\t}\n\n};\n\nfunction constructHLine(x1, y1, x2) {\n\tvar len = x2 - x1;\n\treturn \"M \" + x1 + \" \" + y1 +\n\t\t\" l \" + len + ' ' + 0 +\n\t\t\" l \" + 0 + \" \" + 1 + \" \" +\n\t\t\" l \" + (-len) + \" \" + 0 + \" \" + \" z \";\n}\n\nfunction constructVLine(x1, y1, y2) {\n\tvar len = y2 - y1;\n\treturn \"M \" + x1 + \" \" + y1 +\n\t\t\" l \" + 0 + ' ' + len +\n\t\t\" l \" + 1 + \" \" + 0 + \" \" +\n\t\t\" l \" + 0 + \" \" + (-len) + \" \" + \" z \";\n}\n\nSvg.prototype.rect = function (attr) {\n\t// This uses path instead of rect so that it can be hollow and the color changes with \"fill\" instead of \"stroke\".\n\tvar lines = [];\n\tvar x1 = attr.x;\n\tvar y1 = attr.y;\n\tvar x2 = attr.x + attr.width;\n\tvar y2 = attr.y + attr.height;\n\tlines.push(constructHLine(x1, y1, x2));\n\tlines.push(constructHLine(x1, y2, x2));\n\tlines.push(constructVLine(x2, y1, y2));\n\tlines.push(constructVLine(x1, y2, y1));\n\n\treturn this.path({ path: lines.join(\" \"), stroke: \"none\", \"data-name\": attr[\"data-name\"] });\n};\n\nSvg.prototype.dottedLine = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'line');\n\tel.setAttribute(\"x1\", attr.x1);\n\tel.setAttribute(\"x2\", attr.x2);\n\tel.setAttribute(\"y1\", attr.y1);\n\tel.setAttribute(\"y2\", attr.y2);\n\tel.setAttribute(\"stroke\", attr.stroke);\n\tel.setAttribute(\"stroke-dasharray\", \"5,5\");\n\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.rectBeneath = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'rect');\n\tel.setAttribute(\"x\", attr.x);\n\tel.setAttribute(\"width\", attr.width);\n\tel.setAttribute(\"y\", attr.y);\n\tel.setAttribute(\"height\", attr.height);\n\tif (attr.stroke)\n\t\tel.setAttribute(\"stroke\", attr.stroke);\n\tif (attr['stroke-opacity'])\n\t\tel.setAttribute(\"stroke-opacity\", attr['stroke-opacity']);\n\tif (attr.fill)\n\t\tel.setAttribute(\"fill\", attr.fill);\n\tif (attr['fill-opacity'])\n\t\tel.setAttribute(\"fill-opacity\", attr['fill-opacity']);\n\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.text = function (text, attr, target) {\n\tvar el = document.createElementNS(svgNS, 'text');\n\tel.setAttribute(\"stroke\", \"none\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tel.setAttribute(key, attr[key]);\n\t\t}\n\t}\n\tvar lines = (\"\" + text).split(\"\\n\");\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = document.createElementNS(svgNS, 'tspan');\n\t\tline.setAttribute(\"x\", attr.x ? attr.x : 0);\n\t\tif (i !== 0)\n\t\t\tline.setAttribute(\"dy\", \"1.2em\");\n\t\tif (lines[i].indexOf(\"\\x03\") !== -1) {\n\t\t\tvar parts = lines[i].split('\\x03')\n\t\t\tline.textContent = parts[0];\n\t\t\tif (parts[1]) {\n\t\t\t\tvar ts2 = document.createElementNS(svgNS, 'tspan');\n\t\t\t\tts2.setAttribute(\"dy\", \"-0.3em\");\n\t\t\t\tts2.setAttribute(\"style\", \"font-size:0.7em\");\n\t\t\t\tts2.textContent = parts[1];\n\t\t\t\tline.appendChild(ts2);\n\t\t\t}\n\t\t\tif (parts[2]) {\n\t\t\t\tvar dist = parts[1] ? \"0.4em\" : \"0.1em\";\n\t\t\t\tvar ts3 = document.createElementNS(svgNS, 'tspan');\n\t\t\t\tts3.setAttribute(\"dy\", dist);\n\t\t\t\tts3.setAttribute(\"style\", \"font-size:0.7em\");\n\t\t\t\tts3.textContent = parts[2];\n\t\t\t\tline.appendChild(ts3);\n\t\t\t}\n\t\t} else\n\t\t\tline.textContent = lines[i];\n\t\tel.appendChild(line);\n\t}\n\tif (target)\n\t\ttarget.appendChild(el);\n\telse\n\t\tthis.append(el);\n\treturn el;\n};\n\nSvg.prototype.richTextLine = function (phrases, x, y, klass, anchor, target) {\n\tvar el = document.createElementNS(svgNS, 'text');\n\tel.setAttribute(\"stroke\", \"none\");\n\tel.setAttribute(\"class\", klass);\n\tel.setAttribute(\"x\", x);\n\tel.setAttribute(\"y\", y);\n\tel.setAttribute(\"text-anchor\", anchor);\n\tel.setAttribute(\"dominant-baseline\", \"middle\");\n\n\tfor (var i = 0; i < phrases.length; i++) {\n\t\tvar phrase = phrases[i]\n\t\tvar tspan = document.createElementNS(svgNS, 'tspan');\n\t\tvar attrs = Object.keys(phrase.attrs)\n\t\tfor (var j = 0; j < attrs.length; j++) {\n\t\t\tvar value = phrase.attrs[attrs[j]]\n\t\t\tif (value !== '')\n\t\t\t\ttspan.setAttribute(attrs[j], value)\n\t\t}\n\t\ttspan.textContent = phrase.content;\n\n\t\tel.appendChild(tspan);\n\t}\n\n\tif (target)\n\t\ttarget.appendChild(el);\n\telse\n\t\tthis.append(el);\n\treturn el;\n}\n\nSvg.prototype.guessWidth = function (text, attr) {\n\tvar svg = this.createDummySvg();\n\tvar el = this.text(text, attr, svg);\n\tvar size;\n\ttry {\n\t\tsize = el.getBBox();\n\t\tif (isNaN(size.height) || !size.height) // TODO-PER: I don't think this can happen unless there isn't a browser at all.\n\t\t\tsize = { width: attr['font-size'] / 2, height: attr['font-size'] + 2 }; // Just a wild guess.\n\t\telse\n\t\t\tsize = { width: size.width, height: size.height };\n\t} catch (ex) {\n\t\tsize = { width: attr['font-size'] / 2, height: attr['font-size'] + 2 }; // Just a wild guess.\n\t}\n\tsvg.removeChild(el);\n\treturn size;\n};\n\nSvg.prototype.createDummySvg = function () {\n\tif (!this.dummySvg) {\n\t\tthis.dummySvg = createSvg();\n\t\tvar styles = [\n\t\t\t\"display: block !important;\",\n\t\t\t\"height: 1px;\",\n\t\t\t\"width: 1px;\",\n\t\t\t\"position: absolute;\"\n\t\t];\n\t\tthis.dummySvg.setAttribute('style', styles.join(\"\"));\n\t\tvar body = document.querySelector('body');\n\t\tbody.appendChild(this.dummySvg);\n\t}\n\n\treturn this.dummySvg;\n};\n\nvar sizeCache = {};\n\nSvg.prototype.getTextSize = function (text, attr, el) {\n\tif (typeof text === 'number')\n\t\ttext = '' + text;\n\tif (!text || text.match(/^\\s+$/))\n\t\treturn { width: 0, height: 0 };\n\tvar key;\n\tif (text.length < 20) {\n\t\t// The short text tends to be repetitive and getBBox is really slow, so lets cache.\n\t\tkey = text + JSON.stringify(attr);\n\t\tif (sizeCache[key])\n\t\t\treturn sizeCache[key];\n\t}\n\tvar removeLater = !el;\n\tif (!el)\n\t\tel = this.text(text, attr);\n\tvar size;\n\ttry {\n\t\tsize = el.getBBox();\n\t\tif (isNaN(size.height) || !size.height)\n\t\t\tsize = this.guessWidth(text, attr);\n\t\telse\n\t\t\tsize = { width: size.width, height: size.height };\n\t} catch (ex) {\n\t\tsize = this.guessWidth(text, attr);\n\t}\n\tif (removeLater) {\n\t\tif (this.currentGroup.length > 0)\n\t\t\tthis.currentGroup[0].removeChild(el);\n\t\telse\n\t\t\tthis.svg.removeChild(el);\n\t}\n\tif (key)\n\t\tsizeCache[key] = size;\n\treturn size;\n};\n\nSvg.prototype.openGroup = function (options) {\n\toptions = options ? options : {};\n\tvar el = document.createElementNS(svgNS, \"g\");\n\tif (options.klass)\n\t\tel.setAttribute(\"class\", options.klass);\n\tif (options.fill)\n\t\tel.setAttribute(\"fill\", options.fill);\n\tif (options.stroke)\n\t\tel.setAttribute(\"stroke\", options.stroke);\n\tif (options['data-name'])\n\t\tel.setAttribute(\"data-name\", options['data-name']);\n\n\tif (options.prepend)\n\t\tthis.prepend(el);\n\telse\n\t\tthis.append(el);\n\tthis.currentGroup.unshift(el);\n\treturn el;\n};\n\nSvg.prototype.closeGroup = function () {\n\tvar g = this.currentGroup.shift();\n\tif (g && g.children.length === 0) {\n\t\t// If nothing was added to the group it is because all the elements were invisible. We don't need the group, then.\n\t\tg.parentElement.removeChild(g);\n\t\treturn null;\n\t}\n\treturn g;\n};\n\nSvg.prototype.path = function (attr) {\n\tvar el = document.createElementNS(svgNS, \"path\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (key === 'path')\n\t\t\t\tel.setAttributeNS(null, 'd', attr.path);\n\t\t\telse if (key === 'klass')\n\t\t\t\tel.setAttributeNS(null, \"class\", attr[key]);\n\t\t\telse if (attr[key] !== undefined)\n\t\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n\tthis.append(el);\n\treturn el;\n};\n\nSvg.prototype.pathToBack = function (attr) {\n\tvar el = document.createElementNS(svgNS, \"path\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (key === 'path')\n\t\t\t\tel.setAttributeNS(null, 'd', attr.path);\n\t\t\telse if (key === 'klass')\n\t\t\t\tel.setAttributeNS(null, \"class\", attr[key]);\n\t\t\telse\n\t\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n\tthis.prepend(el);\n\treturn el;\n};\n\nSvg.prototype.lineToBack = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'line');\n\tvar keys = Object.keys(attr)\n\tfor (var i = 0; i < keys.length; i++)\n\t\tel.setAttribute(keys[i], attr[keys[i]]);\n\tthis.prepend(el);\n\treturn el;\n};\n\n\nSvg.prototype.append = function (el) {\n\tif (this.currentGroup.length > 0)\n\t\tthis.currentGroup[0].appendChild(el);\n\telse\n\t\tthis.svg.appendChild(el);\n};\n\nSvg.prototype.prepend = function (el) {\n\t// The entire group is prepended, so don't prepend the individual elements.\n\tif (this.currentGroup.length > 0)\n\t\tthis.currentGroup[0].appendChild(el);\n\telse\n\t\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.setAttributeOnElement = function (el, attr) {\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n};\n\nSvg.prototype.moveElementToChild = function (parent, child) {\n\tparent.appendChild(child);\n};\n\nfunction createSvg() {\n\tvar svg = document.createElementNS(svgNS, \"svg\");\n\tsvg.setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:xlink\", \"http://www.w3.org/1999/xlink\");\n\tsvg.setAttribute('role', 'img'); // for accessibility\n\tsvg.setAttribute('fill', 'currentColor'); // for automatically picking up dark mode and high contrast\n\tsvg.setAttribute('stroke', 'currentColor'); // for automatically picking up dark mode and high contrast\n\treturn svg;\n}\n\n\nmodule.exports = Svg;\n","var version = '6.4.2';\n\nmodule.exports = version;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./index.js\");\n",""],"names":["version","require","animation","tuneBook","sequence","strTranspose","abcjs","signature","Object","keys","forEach","key","renderAbc","tuneMetrics","TimingCallbacks","glyphs","setGlyph","setSymbol","CreateSynth","instrumentIndexToName","pitchToNoteName","SynthSequence","CreateSynthControl","registerAudioContext","activeAudioContext","supportsAudio","playEvent","SynthController","getMidiFile","midiRenderer","synth","module","exports","timer","cursor","startAnimation","paper","tune","options","stop","undefined","showCursor","querySelector","document","createElement","className","style","position","appendChild","hideMeasures","elements","i","length","element","classList","contains","display","lastMeasure","disappearMeasuresAfter","selector","querySelectorAll","disappearMeasuresBefore","measureCallback","hideCurrentMeasure","hideFinishedMeasures","getLineAndMeasure","line","measureNumber","setCursor","range","measureStart","left","top","width","height","qpm","bpm","eventCallback","start","pauseAnimation","pause","stopAnimation","target","params","self","parseInt","tempo","metaText","getBpm","extraMeasuresAtBeginning","beatCallback","lineEndCallback","lineEndAnticipation","beatSubdivisions","joggerTimer","replaceTarget","newTarget","noteTimings","setTiming","lineEndTimings","getLineEndTimings","startTime","currentBeat","currentEvent","currentLine","currentTime","isPaused","isRunning","pausedPercent","justUnpaused","newSeekPercent","lastTimestamp","millisecondsPerBeat","lastMoment","milliseconds","totalBeats","Math","round","doTiming","timestamp","type","thisStartTime","leftEvent","endTimings","requestAnimationFrame","ret","doBeatCallback","ret2","promise","shouldStop","then","Promise","resolve","result","next","endMs","ev","max","debugInfo","offMs","gapMs","gapPx","endX","offPx","JOGGING_INTERVAL","animationJogger","performance","now","setTimeout","offsetPercent","units","setProgress","reset","reportNext","clearTimeout","currentMillisecond","percent","oldEvent","oldBeat","floor","timings","anticipation","callbackTimes","lastTop","timing","push","bottom","Parse","bookParser","tablatures","tunebook","numberOfTunes","abc","tunes","split","num","TuneBook","book","parsed","header","prototype","getTuneById","id","getTuneByTitle","title","parseOnly","numTunes","output","callback","renderEngine","isArray","testObject","propertyIsEnumerable","currentTune","startingTune","abcParser","div","getElementById","parse","startPos","getTune","tablature","preparePlugins","warnings","getWarnings","override","innerHTML","flattenTune","tuneObj","staves","j","lines","staff","k","voices","concat","measuresParser","lastChord","measureStartChord","fragStart","hasNotes","voice","elem","startChar","chord","el_type","frag","substring","endChar","measure","name","startEnding","endEnding","extractMeasures","arr","arr2","measures","hasPickup","getPickupLength","kk","kkk","Tune","EngraverController","wrap","resizeDivs","resizeOuter","window","innerWidth","hasOwnProperty","outer","ofs","offsetLeft","addEventListener","e","renderOne","tuneNumber","lineOffset","viewportHorizontal","scrollHorizontal","overflowX","overflowY","overflow","children","viewportVertical","engraver_controller","engraveABC","engraver","parent","parentNode","parserParams","engraverParams","renderParams","warnings_id","warning_id","highlight","clickListener","abcString","removeDiv","setAttribute","body","staffwidth","doLineWrapping","afterParsing","removeChild","widths","getMeasureWidths","calcLineWraps","reParse","revisedParams","explanation","sections","relativeMajor","key1sharp","acc","note","key2sharp","key3sharp","key4sharp","key5sharp","key6sharp","key7sharp","key1flat","key2flat","key3flat","key4flat","key5flat","key6flat","key7flat","keyAccidentals","newKey","JSON","stringify","modes","stepsFromC","keyReverse","createKeyReverse","allKeys","keyObj","toLowerCase","mode","match","maj","relativeMode","majorKey","group","regMode","thisMode","ind","indexOf","transposeKey","steps","fromC","parseCommon","spacing","flatten","delineTune","media","metaTextInfo","formatting","staffNum","voiceNum","lineNum","runningFonts","visualTranspose","copy","dest","src","prop","attrs","copyTopInfo","copyBottomInfo","getBeatLength","meter","getMeterFraction","multiplier","den","computePickupLength","barLength","pickupLength","v","tripletMultiplier","el","isSpacer","rest","startTriplet","duration","endTriplet","getBarLength","getTotalTime","totalTime","getTotalBeats","millisecondsPerMeasure","bpmOverride","beatsPerMeasure","getBeatsPerMeasure","minutesPerMeasure","beatLen","barLen","getMeter","value","getKeySignature","getElementFromChar","char","ii","addVerticalInfo","timingEvents","lastBarTop","lastBarBottom","lastEventTop","lastEventBottom","nextTop","nextBottom","makeSortedArray","hash","sort","a","b","diff","addElementToEvents","eventHash","voiceTimeMilliseconds","timeDivider","isTiedState","nextIsBar","hint","realDuration","durationClass","abcelem","es","elemset","isTiedToNext","startTie","startCharArray","endCharArray","x","w","midiPitches","cloneArray","midiGraceNotePitches","min","makeVoicesArray","voicesArr","tempos","staffgroups","staffs","firstStaff","middleC","absoluteY","STEP","lastStaff","isTabStaff","noteFound","tempoLocations","setupEvents","startingDelay","startingBpm","warp","time","maxVoiceTimeMilliseconds","voiceTime","startingRepeatElem","endingRepeatElem","tempoDone","thisMeasure","lastHash","barType","endRepeat","startRepeat","lastVoiceTimeMilliseconds","el2","element2","addEndPoints","addUsefulCallbackInfo","skipTies","index","staffGroup","lastEl","beatLength","statedBeatLength","measuresOfDelay","console","log","naturalBpm","beatsPerSecond","measureLength","setUpAudio","seq","percmap","midi","deline","findSelectableElement","selectables","getSelectableArray","inputLines","lineBreaks","outputLines","inMusicLine","currentMeter","currentKey","currentClef","currentVocalFont","currentGChordFont","currentTripletFont","currentAnnotationFont","inputLine","vskip","outputLine","s","inputStaff","outputStaff","objEqual","addMeterToVoices","addKeyToVoices","abbrevTitle","clef","addClefToVoices","vocalfont","addFontToVoices","gchordfont","tripletfont","annotationfont","outputVoice","inputVoice","cloneLine","replacer","unshift","font","input","inputValue","outputValue","keys2","CustomEvent","event","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EditArea","textareaid","textarea","initialText","isDragging","addSelectionListener","listener","onmousemove","fireSelectionChanged","addChangeListener","changelistener","onkeyup","fireChanged","onmousedown","onmouseup","onchange","getSelection","selectionStart","end","selectionEnd","setSelection","setSelectionRange","createTextRange","collapse","moveEnd","moveStart","select","focus","getString","setString","str","getElem","gatherAbcParams","abcjsParams","midi_options","parser_options","render_options","Editor","editarea","indicate_changed","canvas_id","paper_id","insertBefore","selectionChangeCallback","clientClickListener","bind","cursorControl","generate_midi","generateDownload","midi_download_id","downloadMidi","generateInline","midi_id","inlineMidi","warningsdiv","generate_warnings","onchangeCallback","currentAbc","bReentry","parseABC","modelChanged","addClassName","hasClassName","elementClassName","RegExp","test","removeClassName","strip","replace","setReadOnly","readOnly","readonlyClass","removeAttribute","redrawMidi","midiPause","downloadMidiEl","inlineMidiEl","engravingEl","dispatchEvent","userAction","synthControl","load","setTune","timerId","disable","error","message","join","updateSelection","paramChanged","synthParamChanged","t","selection","rangeHighlight","setDirtyStyle","isDirty","bIsPaused","wasDirty","setNotDirty","classes","analysis","drag","mouseEvent","shouldPause","visualObj","pauseMidi","rendererFactory","create","baseDuration","abcTune","commands","msPerMeasure","setGlobalInfo","tracks","startTrack","notePlacement","cmd","setText","text","pan","instrument","setChannel","setInstrument","channel","gapLengthInBeats","gap","pitch","volume","cents","addNotes","endTrack","getData","times","h","parseFloat","lastTime","events","distance","addRest","startNote","endNote","source","destination","assign","cloneHashOfHash","property","cloneHashOfArrayOfHash","startsWith","pattern","endsWith","d","lastIndexOf","last","parseDirective","ParseHeader","ParseMusic","Tokenizer","TuneBuilder","tuneBuilder","tokenizer","wordsContinuation","symbolContinuation","addPositioning","positioning","addFont","fonts","multilineVars","iChar","accidentals","root","origMeter","hasMainTitle","default_length","verticalPos","octave","next_note_duration","start_new_line","is_in_header","partForNextLine","tempoForNextLine","havent_set_length","macros","currBarNumber","barCounter","ignoredDecorations","score_is_present","inEnding","inTie","inTieChord","vocalPosition","dynamicPosition","chordPosition","ornamentPosition","volumePosition","openSlurs","freegchord","endingHoldOver","differentFont","defaultFonts","decoration","face","size","weight","addFormattingOptions","elType","measurefont","repeatfont","duplicateStartEndingHoldOvers","restoreStartEndingHoldOvers","addWarning","addWarningObject","warningObject","warningObjects","encode","warn","col_num","bad_char","clean_line","lineIndex","column","music","getWarningObjects","addWords","words","word_list","last_divider","addWord","word","syllable","translateString","divider","escNext","skip","to","inSlur","pitches","shift","lyric","addSymbols","parseLine","err","addDirective","getCurrentVoice","lineContinuation","parseMusic","parseHeader","regular","newline","startNewLine","symbols","appendLastMeasure","nextVoice","addHintMeasure","nextStaff","stave","nextStave","addHintMeasures","nextLine","strTune","switches","i2","substr","all","backslash","comment","padding","Array","pop","print","globalTranspose","setVisualTranspose","format","globalFormatting","header_only","stop_on_warning","wasInHeader","setRunningFont","cleanUp","barsperstaff","staffnonote","ph","pl","papersize","landscape","pagewidth","pageheight","hint_measures","wrapLines","barNumbers","directives","initialWhiteSpace","tuneStrings","pos","dir","arrDir","pure","initialize","tokenizer_","warn_","multilineVars_","tune_","tuneBuilder_","initializeFonts","historyfont","infofont","partsfont","textfont","wordsfont","composerfont","subtitlefont","tempofont","titlefont","footerfont","headerfont","voicefont","tablabelfont","tabnumberfont","tabgracefont","fontTypeCanHaveBox","fontTranslation","fontFace","getFontParameter","tokens","currentSetting","processNumberOnly","token","box","state","hyphenLast","currToken","psFont","getChangingFont","getGlobalFont","setScale","scratch","tok","isNaN","scale","drumNames","interpretPercMap","restOfString","sound","noteHead","getRequiredMeasurement","points","getMeasurement","used","oneParameterMeasurement","addMultilineVar","intt","addMultilineVarBool","addMultilineVarOneParamChoice","choices","choice","found","midiCmdParam0","midiCmdParam1String","midiCmdParam1Integer","midiCmdParam1Integer1OptionalInteger","midiCmdParam2Integer","midiCmdParam4Integer","midiCmdParam5Integer","midiCmdParam1String1Integer","midiCmdParamFraction","midiCmdParam1StringVariableIntegers","midiCmdParam1Integer1OptionalString","parseMidiCommand","midi_cmd","midi_params","drummap","p","hasBeginMusic","appendElement","parseFontChangeLine","textstr","textParts","setfont","textarr","whichFont","positionChoices","tokenize","stripComment","bagpipes","flatbeams","jazzchords","accentAbove","germanAlphabet","graceSlurs","lt","parseStretchLast","lineThickness","sl","stretchlast","titlecaps","titleleft","measurebox","voiceScale","currentVoice","floatt","changeVoiceScale","voiceColor","color","changeVoiceColor","addSpacing","addSeparator","spaceAbove","spaceBelow","lenLine","partsBox","setBarNumberImmediate","textBlock","addText","continueall","centerstr","addCentered","sfTokens","sfNum","addVoice","newStaff","bracket","brace","continueBar","numVoices","connectBarLines","openParen","openBracket","openBrace","justOpenParen","justOpenBracket","justOpenBrace","lastVoice","addContinueBar","ty","vc","continueId","pgNum","getInt","addNewPage","digits","subCmd","addMetaText","footerStr","getMeat","footerArr","footer","center","right","addMetaTextObj","formatHash","fontboxpadding","stafftopmargin","parseKeyVoice","setTitle","origSize","addSubtitle","setMeter","parseNum","parseFraction","totalLength","mv","calcTempo","relTempo","dur","resolveTempo","addUserDefinition","equals","before","after","legalChars","setDefaultLength","len","len_arr","n","tempoString","larghissimo","adagissimo","sostenuto","grave","largo","lento","larghetto","adagio","adagietto","andante","andantino","moderato","allegretto","allegro","animato","agitato","veloce","vivace","vivacissimo","allegrissimo","presto","prestissimo","setTempo","delaySet","preString","suppressBpm","postString","printTempo","suppress","msg","letter_to_inline_header","startLine","needsNewLine","ws","eatWhiteSpace","appendStartingElement","parseKey","foundClef","foundKey","fixKey","part","parseVoice","letter_to_body_header","metaTextHeaders","A","B","C","D","F","G","I","N","O","R","S","W","Z","field","restOfLine","addMetaTextArray","peekLine","toUpperCase","theReverser","transpose","standardKey","keyName","localTranspose","keySignature","clefLines","mid","calcMiddle","oct","fixClef","clefPos","deepCopyKey","E","c","f","g","addPosToKey","impliedNaturals","fixedKey","parseMiddle","normalizeAccidentals","accs","isInline","retPitch","getKeyPitch","retAcc","getSharpFlat","retMode","getMode","oldKey","keyCompensate","savedOrigKey","globalTransposeOrigKeySig","getKeyAccidentals2","explicitAccidentals","splice","getPitchFromTokens","stafflines","staffscale","setCurrentVoice","getToken","isNew","staffInfo","startStaff","addNextTokenToStaffInfo","attr","getVoiceToken","addNextTokenToVoiceInfo","getNextToken","addNextNoteTokenToVoiceInfo","noteToTransposition","oct2","stem","suppressChords","cue","vi","spacing_below_offset","subname","legalAccents","volumeDecorations","dynamicDecorations","accentPseudonyms","accentDynamicPseudonyms","nonDecorations","durations","rests","accMap","tripletQ","MusicParser","_tokenizer","_warn","_multilineVars","_tune","_tuneBuilder","_header","isInTie","overlayLevel","voiceIndex","startOfLine","isWhiteSpace","delayStartNewLine","tripletNotesLeft","retHeader","startI","retInlineHeader","letter_to_spacer","letter_to_chord","chordName","addedChord","ci","rel_position","skipWhiteSpace","force_end_beam_last","letter_to_accent","beambr","letter_to_grace","gracenotes","letter_to_bar","measureNotEmpty","bar","barFirstEndingNum","isFirstVoice","barNumber","letter_to_overlay","letter_to_open_slurs_and_triplets","consumed","startSlur","dottedSlur","triplet","tripletR","num_notes","chordStartChar","chordDuration","rememberEndBeam","done","accent","chordNote","getCoreNote","end_beam","endTie","setIsInTie","postChordDone","addEndBeam","endSlur","br2","getBrokenRhythm","fraction","getFraction","ch","core","accidental","midipitch","graceNotes","durationOfMeasure","succeeded","getBrackettedSubstring","getFloat","y","gra","acciaccatura","endBeam","macro","includes","findIndex","curr_pos","getBarLine","orig_bar_len","ending","retRep","getTokenOf","scoreTranspose","targetKey","st","currentVoiceName","canHaveBrokenRhythm","isComplete","dottedTie","durationSetByPreviousNote","grace_notes","getNumber","addTieToLastNote","X","z","dblflat","flat","natural","sharp","dblsharp","quarterflat","quartersharp","finished","skipAlpha","firstThree","getClef","bExplicitOnly","strOrig","needsClef","strClef","isMatch","explicit","colons","getKeyAccidental","accTranslation","isLetter","isNumber","alphaUntilWhiteSpace","int2","float2","close","charMap","charMap1","charMap2","out","iSave","getTitleNumber","regex","exec","foundNumber","thePatterns","thisPattern","theTitleNumber","trim","substInChord","maxErrorChars","_matchChar","matchChar","esc","allNotes","transposeChordName","keyIndex","newKeyMinor","localTransposeVerticalMovement","localTransposePreferFlats","baseKey","thisKeyIndex","recognized","newKeyName","transposedKey","newKeySig","charCodeAt","ceil","pitchToLetter","accidentalChange","origPitch","newPitch","origKeySig","origPitchLetter","origAccidental","currentAccidental","delta","newPitchLetter","newAccidental","calcAccidental","accidentals2","accidentals3","actual","pitchIndex","noteName","allPitches","sharpChords","flatChords","sharpChordsFree","flatChordsFree","preferFlats","freeGCchord","extra1","bass","extra2","voiceDefs","currSlur","closeLine","simplifyMetaText","anyDeleted","hasAny","containsNotes","filter","wrapMusicLines","keepThis","containsNotesStrict","fixTitles","workingClef","resolveOverlays","cleanUpSlursInLine","getNextMusicLine","potentialStartBeam","potentialEndBeam","vskipPending","getLastNote","hashParams","getDuration","endBeamLast","endBeamHere","pushNote","hashParams2","info","pushLine","subtitle","newpage","lineLength","separator","createLine","createStaff","createVoice","lastElement","isFirstLine","currLine","currStaff","isArrayOfStrings","notes","history","madeChanges","durationsPerLines","overlayVoice","hasOverlay","snip","durationThisBar","inOverlay","overlayDuration","snipStart","ov","direction","indexOfLastBar","findLastBar","firstMusicLine","hasATitle","addEndSlur","obj","chordPos","offNum","slurNum","addStartSlur","usedNums","nextNum","label","gg","ggg","permanentItems","barNumThisLine","cp","ss","vv","startElement","section","slice","startBeam","hp","mid2","setLineFont","isDifferent","thisStaff","head","linesBreakElements","findLineBreaks","addLineBreaks","lastKeySig","lastStem","currentBarNumber","action","ogLine","currVoice","lineBreakArray","lineBreakIndexes","lbai","lineCounter","lineStart","lbi","freeFormLineBreaks","lineBreakPoint","totals","totalThisLine","attemptedWidth","oldDistance","newDistance","clone","newArr","oneTry","measureWidths","idealWidths","accumulator","lineAccumulator","lineWidths","lastVariance","highestVariance","startIndex","otherTries","measureWidth","thisVariance","abs","varianceIsClose","newWidths","newBreaks","optimizeLineWidths","numLines","total","idealWidth","otherTry","variances","aveVariance","lineWidth","attempts","smallest","smallestIndex","failed","variance","fixedMeasureLineBreaks","preferredMeasuresPerLine","thisWidth","getRevisedTuneParams","staffWidth","minSpacing","minSpacingLimit","maxSpacing","lastLineLimit","accumulatedLineBreaks","explanations","usableWidth","minLineSize","allowableVariance","minWidth","ff","reason","changes","transposeOneTune","changeAllKeySigs","transposeVoices","count","segment","destinationKey","transposeVoice","createKeyAccidentals","setLetterDistance","keyRoot","letterDistance","letters","measureAccidentals","transposedMeasureAccidentals","prefersFlats","newChord","replaceChord","parseNote","transposePitch","upper","replaceNote","grace","newGrace","replaceGrace","octaves","major","newMajor","newMode","origDistFromC","newDistFromC","adj","keyAcc","newNote","courtesy","regPitch","regNote","regOptionalNote","regSpace","reg","currentAcc","calcAdjustment","noteLen","trailingLen","leadingLen","regPreBracket","regOpenBracket","regCloseBracket","endLen","regOpenBrace","regCloseBrace","regPreBrace","regPreNote","thisAccidental","keyAccidental","measureAccidental","ChordTrack","pitchesToPerc","barAccidentals","startingTempo","startingMeter","tempoChangeFactor","currentInstrument","currentTrack","lastNoteDurationPosition","currentTrackName","lastEventTime","chordTrack","drumInstrument","lastBarTime","doBeatAccents","stressBeat1","stressBeatDown","stressBeatUp","beatFraction","nextVolume","nextVolumeDelta","slurCount","drumTrack","drumTrackFinished","drumDefinition","drumBars","normalBreakBetweenNotes","slurredBreakBetweenNotes","staccatoBreakBetweenNotes","percmap_","midiOptions","bassprog","bassvol","chordprog","chordvol","gchord","chordsOff","preProcess","setTranspose","setLastBarTime","voiceOff","voicesOff","trackName","writeNote","setKeySignature","getBeatFraction","alignDrumToMeter","setTempoChangeFactor","barEnd","writeDrum","setRhythmHead","timeToRealTime","program","normalizeDrumDefinition","gChordOn","beats","paramChange","finish","detuneOctave","findOctaves","addTrack","totalDuration","durationRounded","ties","timeCounter","tempoMultiplier","thisDuration","tie","item","calcBeat","currTime","distanceFromStart","processVolume","beat","barBeat","findNoteModifications","velocity","thisBreakBetweenNotes","noteModification","doModifiedNotes","noteTime","numNotes","pp","runningDuration","shortestNote","processChord","graces","processGraceNotes","writeGraceNotes","rt","ms","currentTrackMilliseconds","currentTrackWholeNotes","ePitches","actualPitch","adjustPitch","adjustForMicroTone","endType","realDur","getRealDuration","extractOctave","extractNote","lowercase","companionDuration","graceDuration","midiGrace","gp","durationInMeasures","quarterToneFactor","description","on","totalPlay","bars","playCount","measuresPerBeat","factor","measureLen","detuneCents","track","topEvent","topNote","centsToFactor","setAttributes","elm","Midi","trackstrings","trackcount","noteOnAndChannel","noteOffAndChannel","toHex","divisions","timeSignature","encodeString","noteWarped","trackInstrument","silencelength","tracklength","number","ccPrefix","toString","HALF_STEP","loudness","toDurationHex","bend","to7BitHex","embed","noplayer","data","link","href","firstChild","controller","autoplay","loop","enablejavascript","cmdType","nameArray","hex","sharpCount","flatCount","sig","dens","clocks","encodeHex","lower","higher","res","bits","PERCUSSION_PROGRAM","abctune","midiTranspose","channelExplicitlySet","drumPattern","drum","drumIntro","drumOn","drumOffAfterIntro","drumOff","rhythmHeadThisBar","crescendoSize","startingMidi","globals","drumbars","drumon","nobeataccents","interpretTempo","defaultQpm","startVoice","inCrescendo","inDiminuendo","durationCounter","tempoChanges","currentVolume","startRepeatPlaceholder","skipEndingPlaceholder","startingDrumSet","setDynamics","volumes","dynamicType","voiceNumber","numNotesToDecoration","endDec","endingVolume","n2","endDec2","voiceName","getTrackTitle","cl","addKey","addMeter","intro","drumoff","noteEventsInBar","tripletDurationTotal","tripletDurationCount","noteElem","durationTotal","chordVoiceOffThisBar","interpretMeter","drumChange","addIfDifferent","tacet","param","octaveShift","insertTempoChanges","pickups","insertPoint","counter","changePositions","lastTempo","noChordVoice","removeNaturals","newMeter","abcjsAudioContext","pow","chordTrackFinished","chordChannel","currentChords","chordLastBar","gChordTacet","hasRhythmHead","bassInstrument","chordInstrument","bassOctaveShift","chordOctaveShift","boomVolume","chickVolume","overridePattern","parseGChord","isRhythmHead","chick","note2","resolveChords","chordTrackEmpty","findChord","breakSynonyms","interpretChord","basses","chordTranspose","unshiftedBass","bass2","chordNotes","remaining","fifth","explicitBass","bassAcc","bassShift","boom","boom2","modifier","intervals","chordIntervals","M","m","noteLength","isEmpty","endTime","thisMeasureLength","portionOfAMeasure","currentChordsExpanded","expandCurrentChords","rhythmPatterns","beatsPresent","firstBoom","minLength","isBoom","newBass","resolvePitch","oo","currentChord","numChordNotes","num8thNotes","chords","current","createNoteMap","map","nextNote","inst","loopImage","playImage","pauseImage","loadingImage","resetImage","Error","HTMLElement","ac","buildDom","attachListeners","isDisabled","add","remove","setWarp","resetAll","pushedButtons","button","pushPlay","startButton","pushLoop","loopButton","progressBackground","progressThumb","clientWidth","clock","totalSeconds","minutes","seconds","secondsFormatted","afterResume","isResumed","hasLoop","loopHandler","hasRestart","restartHandler","hasPlay","playHandler","playPromiseHandler","hasProgress","progressHandler","hasWarp","warpHandler","hasClock","html","repeatTitle","repeatAria","restartTitle","restartAria","playTitle","playAria","randomTitle","randomAria","warpTitle","warpAria","acResumerMiddleWare","playBtn","isPromise","needsInit","status","resume","response","doNext","getNote","downloadBuffer","placeNote","soundsCache","notSupportedMessage","originalSoundFontUrl","defaultSoundFontUrl","alternateSoundFontUrl","audioBufferPossible","directSource","startTimeSec","pausedTimeSec","audioBuffers","init","audioContext","debugCallback","_deviceCapable","reject","soundFontUrl","soundFontVolumeMultiplier","programOffsets","fadeLength","NaN","noteEnd","meterSize","flattened","sequenceCallback","callbackContext","onEnded","meterFraction","cached","errorNotes","pitchNumber","label2","batches","CHUNK","results","loaded","_loadBatch","batch","delay","promises","pending","oneResponse","which","newBatch","list","prime","fadeTimeSec","totalSamples","sampleRate","noteMapTracks","swing","addSwing","panDistances","setPan","uniqueSounds","noteMap","trackNumber","panDistance","allPromises","audioBuffer","createBuffer","key2","parts","resolveData","me","suspend","numTracks","panParam","panNumber","even","currLow","currHigh","resumePosition","_kickOffSound","seek","offset","elapsed","download","getAudioBuffer","getIsRunning","trackNum","createBufferSource","buffer","connect","onended","volumeIncrease","halfbeatLength","swingDuration","oldEventStart","URL","createObjectURL","bufferToWave","numOfChan","numberOfChannels","ArrayBuffer","view","DataView","channels","sample","setUint32","setUint16","getChannelData","setInt16","Blob","midiCreate","midiOutputType","decoded","Uint8Array","generateMidiDownloadLink","isFunction","functionToCheck","getType","call","midiParams","divClasses","downloadClass","preTextDownload","downloadLabel","filename","fileName","postTextDownload","svg","url","instrumentCache","xhr","XMLHttpRequest","noteUrl","open","responseType","onload","noteDecoded","maybePromise","decodeAudioData","onerror","send","notesInOrder","noteToMidi","midiToNote","pitchMap","f0","n0","s0","x0","f1","n1","s1","x1","f2","s2","x2","f3","n3","s3","x3","f4","n4","s4","x4","f5","n5","s5","x5","f6","n6","s6","x6","f7","n7","s7","x7","f8","n8","s8","x8","f9","n9","s9","x9","f10","n10","s10","x10","f11","n11","s11","x11","f12","n12","s12","x12","f13","n13","s13","x13","f14","n14","s14","x14","f15","n15","s15","x15","f16","n16","s16","x16","pitchObj","outputAudioBuffer","startArray","volumeMultiplier","ofsMs","noteEndSec","OfflineAC","OfflineAudioContext","webkitOfflineAudioContext","offlineCtx","noteBufferPromise","gainNode","createGain","createStereoPanner","panNode","setValueAtTime","gain","linearRampToValueAtTime","playbackRate","noteOff","fnResolve","oncomplete","renderedBuffer","copyToChannel","startRendering","toBuffer","fromBuffer","fromData","toData","midiGracePitches","appendNote","doPlay","AudioContext","webkitAudioContext","navigator","mozAudioContext","msAudioContext","aac","midiBuffer","currentTempo","control","isLooping","isStarted","isLoaded","isLoading","visualOptions","displayPlay","displayProgress","displayLoop","toggleLoop","displayRestart","restart","play","randomAccess","displayWarp","onWarp","audioParams","go","loadingResponse","subdivisions","onReady","notesStatus","destroy","runWhenReady","_play","sleep","fn","arg1","onStart","_randomAccess","background","getBoundingClientRect","offsetWidth","newWarp","wasPlaying","startPercent","onFinished","beatNumber","onBeat","onEvent","lineEvent","onLineEnd","getUrl","click","revokeObjectURL","starts","instrumentNumber","TabString","pluginTab","defaultTuning","isTabBig","tabSymbolOffset","abcTablatures","inited","plugins","register","plugin","setError","warning","returned","nbPlugins","tabs","args","tabName","abcSrc","pluginInstance","classz","instance","tabType","layoutTablatures","renderer","staffLineCount","nTabs","firstStaffOnly","curStaff","maxStaves","jj","tabPlugin","render","TabNote","tabNotes","buildCapo","capoTuning","tuning","capo","iii","curNote","jjj","emit","buildPatterns","strings","highestNote","stringNotes","buildSecond","first","sameString","jjjj","curPos","nextPos","noteToNumber","secondPos","handleChordNotes","retNotes","iiii","clefTranspose","checkKeyAccidentals","toNumber","stringNumber","secondPosition","firstSize","emitNoAccidentals","isFlat","noteEquiv","getAccidentalEquiv","isAltered","isDouble","isSharp","stringPitches","pitchAltered","quarter","StringPatterns","stringToPitch","startingPitch","linePitch","invalidNumber","notesToNumber","retGraces","replaceAll","tabInfos","tunePos","inError","StringTablature","lineSpace","verticalSize","pitch2","bypass","isPercussion","setRelative","child","relative","hasComma","hasQuote","isKeySharp","isKeyFlat","isLower","isQuoted","cloneNote","newTabNote","sameNoteAs","isLowerThan","curAccidentals","cloned","prevNote","fromNote","toNote","fromN","toN","from","tn","buildReturned","toIndex","tabRenderer","Plugin","tabSettings","nbLines","hideTabSymbol","semantics","staffIndex","AbcStringTab","AbsoluteElement","RelativeElement","isObject","constructor","cloneObject","cloneAbsolute","absSrc","cloneAbsoluteAndRelatives","buildTabAbsolute","absX","relX","tabIcon","tabYPos","icon","Ypos","tabAbsolute","tabRelative","lyricsDim","extra","TabAbsoluteElements","getInitialStaffSize","tabNameInfos","buildRelativeTabNote","def","isGrace","strNote","opt","tabNoteRelative","getXGrace","graceInRest","absElem","convertToNumber","tabPos","posNote","buildGraceRelativesForRest","absChild","tabVoice","mm","defGrace","graceX","curGrace","tabGraceRelative","build","staffAbsolute","keySig","tabVoiceIndex","staffSize","defNote","isClef","lastBar","bn","abselem","restGraces","heads","lyricDim","ll","dx","VoiceElement","initSpecialY","tempoHeightAbove","partHeightAbove","volumeHeightAbove","dynamicHeightAbove","endingHeightAbove","chordHeightAbove","lyricHeightAbove","lyricHeightBelow","chordHeightBelow","volumeHeightBelow","dynamicHeightBelow","getLyricHeight","maxLyricHeight","curAbs","specialY","buildTabName","stringSemantics","textSize","getTextSize","doDraw","calc","islastTabInStaff","getStaffNumbers","nbStaffs","getParentStaffIndex","linkStaffAndTabs","parentIndex","hasStaff","hasTab","isMultiVoiceSingleStaff","getNextTabPos","tabIndex","handledVoices","inProgress","nbVoices","getLastStaff","lastTab","checkVoiceKeySig","curVoice","elem0","absolutes","tabStaff","tabSize","firstVoice","lyricsHeight","padd","prevIndex","previousStaff","tabTop","staffGroupInfos","dy","nextTabPos","parentStaff","duplicate","nameHeight","BeamElem","BraceElem","createClef","createKeySignature","createNoteHead","createTimeSignature","Decoration","EndingElem","StaffGroupElement","TempoElement","TieElem","TripletElem","addChord","chartable","rhythm","nostem","harmonic","triangle","uflags","dflags","AbstractEngraver","isBagpipes","flatBeams","initialClef","slurs","slursbyvoice","tiesbyvoice","endingsbyvoice","scaleByVoice","colorByVoice","tripletmultiplier","abcline","accidentalSlot","accidentalshiftx","dotshiftx","hasVocals","minY","partstartelem","startlimitelem","stemdir","setStemHeight","heightInPixels","stemHeight","getCurrentVoiceId","pushCrossLineElems","popCrossLineElems","containsLyrics","createABCLine","l","staffgroup","tempoSet","restoreState","createABCStaff","abcstaff","updateFonts","barfrom","barto","headerPosition","baselineToCenter","addMeasureNumber","addChild","ts","staffLines","isSingleLineStaff","createABCVoice","setStaffLimits","setBottomStaff","continuing","getBeamGroup","addOther","voicetotal","voicenumber","slur","force","stemDir","dotted","setHint","setAveragePitch","minpitch","isFirstStaff","abselems","createABCElement","tempoElement","addFixedX","saveState","tiesSave","slursSave","slursbyvoiceSave","tiesbyvoiceSave","createBeam","createNote","isClosed","createBarLine","invisible","absKey","dim","abselem3","abselem2","addFixed","sortPitch","sum","averagepitch","maxpitch","elems","abselemset","beamelem","runningDirection","setStemDirection","tempStemDir","stemsUp","calcDir","addBeam","sorted","tmp","ledgerLines","minPitch","maxPitch","isRest","symbolWidth","additionalLedgers","addGraceNotes","notehead","roomtaken","gracescale","graceScaleStem","gracebeam","flag","mainNote","graceoffsets","gracepitch","headx","extrax","highestVert","addSlursAndTies","addExtra","dAcciaccatura","addRight","scalex","scaley","pseudoabselem","p1","p2","linewidth","getSymbolWidth","isInvisibleRest","anchor1","anchor2","addRestToAbsElement","dot","isMultiVoice","durlog","restpitch","roomTaken","roomTakenRight","mmWidth","addHead","numMeasures","addIfNotExist","addNoteToAbcElement","zeroDuration","noteSymbol","prev","curr","printer_shift","percHead","isTopWhenStemIsDown","isBottomWhenStemIsUp","hasStem","shouldExtendStem","printAccidentals","extraw","extraLeft","addLyric","lyricStr","ly","roomtakenright","tot","inc","durationForSpacing","absType","durationClassOveride","ret1","createDecoration","ret3","setCloseAnchor","middleNote","pitchelem","setEndAnchor","setRange","slurid","setStartX","addInternalNote","measureNumDim","vert","anchor","firstdots","firstthin","thick","secondthin","seconddots","setEndX","textWidth","minspacing","translateChord","noteheadWidth","isAnnotation","klass","chordString","chordWidth","chordHeight","realWidth","relPositionY","pos2","addTextIf","rows","marginLeft","marginTop","move","absElemType","inGroup","noMove","marginBottom","calcHeight","symbolHeightInPitches","clefOffsets","adjustspacing","isKeySig","symbol","fudge","thickness","newDotShiftX","shiftheadx","adjust","opts","xdelta","dotadjusty","symb","accSlotFound","accPlace","numWidth","denWidth","maxWidth","i3","DynamicDecoration","CrescendoElem","GlissandoElem","startDiminuendoX","startCrescendoX","minTop","minBottom","closeDecoration","yPos","deltaX","getSymbolAlign","yPos2","blank1","blank2","fixedY","above","below","volumeDecoration","compoundDecoration","highestPitch","lowestPitch","placement","stackedDecoration","incrementPlacement","getPlacement","textDecoration","textFudge","textHeight","symbolDecoration","symbolList","hasOne","leftDecoration","dynamicDecoration","diminuendo","crescendo","glissando","startGlissandoX","unhighlight","fixed","getFixedCoords","_addChild","half","setLimit","member","pushTop","pushBottom","setX","midpoint","firstElement","isflat","isgrace","forceup","forcedown","average","allrests","beams","beam","calcAverage","middleLine","numElements","richText","BottomText","isPrint","paddingLeft","shouldAddClasses","unalignedWords","extraText","defFont","space","addMultiLine","addSingleLine","preface","content","groupName","startGroup","endGroup","discography","transcription","endVoice","lastContinuedVoice","getWidth","isStartVoice","dec","FreeText","getFontAndAttr","maxHeight","leftSide","currentFont","centerVertically","getChordDim","margin","invertLane","lane","putChordInLane","getLane","largestY","row","phrases","thisWord","phrase","getFamily","Separator","staffnumber","setHeight","setWidth","Subtitle","tAnchor","tLeft","totalHeightInPitches","temposcale","tempoNote","internalNotes","startLimitElem","startLimitX","endLimitElem","endLimitX","calcTieDirection","referencePitch","calcSlurDirection","hasDownStem","calcX","lineStartX","lineEndX","startX","calcTieY","startY","endY","calcSlurY","beamInterferes","midPoint","hasBeam1","hasBeam2","isLastInBeam","isFirstInBeam","avoidCollisionAbove","maxInnerHeight","TopText","headerTextHeight","origin","composer","hasSimpleComposerLine","composerLine","ingroup","author","partOrder","middleElems","otherchildren","firstItem","adjustRange","pathClone","pathArray","pathScale","kx","ky","Glyphs","printSymbol","path","getPathForSymbol","getYCorr","germanNote","baseChord","bassNote","marker","drawTempo","drawRelativeElement","setClass","elementGroup","drawAbsolute","bartop","staffPos","isTempo","beginGroup","counters","getCurrent","overrideClasses","baseVal","isSelectable","notePositions","zero","printPath","roundNumber","drawBeam","pathString","slope","getSlope","xes","y1","getY","y2","draw","klasses","generate","stroke","fill","foregroundColor","calcY","startY2","endY2","currentX","sprintf","renderText","drawBrace","straightPath","xLeft","yTop","yBottom","xLineWidth","yOverlap","wCurve","hCurve","curvyPath","yHeight","curve","xCurve","yCurve","openGroup","closeGroup","wrapSvgEl","drawCrescendo","drawLine","y3","y4","printDebugBox","rectBeneath","drawStaffGroup","setPaperSize","nonMusic","Selectables","responsive","selectTypes","groupClasses","moveY","topText","incrLine","abcLine","lineNumber","addStaffPadding","staffSeparation","engraveStaffLine","bottomText","getElements","lastStaffGroup","thisStaffGroup","lastBottomLine","nextTopLine","naturalSeparation","separationInPixels","drawDynamics","drawEnding","linestartx","lineendx","noClass","drawGlissando","leftY","rightY","leftX","rightX","marginRight","leftYAdj","rightYAdj","numSquigglies","drawSquiggly","sqrt","xOfs","leftStart","leftEnd","Group","lastM","isInGroup","addPath","drawSeparator","absmove","absolutemoveY","printLine","firefox112","lineToBack","pathToBack","printStem","ycorr","groupClass","kernSymbols","lastSymbol","thisSymbol","lastSymbolWidth","printStaffLine","graphelem","hAnchor","tabFont","tabClass","stemWidth","scaleExistingElem","scaleX","scaleY","setAttributeOnElement","toFixed","absEl","svgEl","isNoteOrTabNumber","canSelect","selectable","tabindex","sel","isDraggable","maxwidth","ariaLabel","styles","insertStyles","parentStyles","setResponsiveWidth","setSize","setParentStyles","arguments","o","String","fromCharCode","toExponential","str_repeat","drawVoice","printStaff","colorIndex","staff1","showDebug","boxAllElements","dottedLine","originalTop","originalBottom","debugPrintGridItem","topLine","bottomLine","incrVoice","newMeasure","startx","printBrace","tabNameHeight","r","leftMargin","colors","positionY","chordLines","coords","relElem","endx","prepend","firstYLine","lastYLine","curpitch","descenderHeight","preWidth","charWidth","postWidth","charWidth2","alreadyInGroup","richTextLine","laneMargin","getBBox","deltaY","rect","drawTie","layout","fudgeY","drawArc","isTie","pitch1","norm","ux","uy","maxFlatten","controlx1","controly1","controlx2","controly2","pathString2","drawTriplet","hasBeam","drawBracket","xTextPos","yTextPos","bracketHeight","midX","gapWidth","leftEndX","leftEndY","rightStartX","rightStartY","staffbottom","saveColor","textEl","foundNote","justInitializedMeasureNumber","isInMeasure","startMeasure","isNonSpacerRest","incrNote","incrMeasure","Renderer","setupSelection","Classes","GetFontAndAttr","GetTextSize","oneSvgPerLine","selectionColor","dragColor","dragging","SPACE","timeBasedLayout","expandToWidest","add_classes","staffwidthScreen","staffwidthPrint","listeners","addSelectListener","setPaddingOverride","minPadding","selected","dragTarget","dragIndex","dragMouseStart","dragYStep","setLineThickness","abctunes","engraveTune","adjustNonScaledItems","origJazzChords","setupTune","constructTuneElements","needNewSection","foundNotStaffExtra","lastXPosition","newTune","hasPrintedTempo","hasSeenNonSubtitle","nlines","entry","nRows","thisRow","svgs","splitSvgIntoLines","paddingBottom","viewBox","getAttribute","wrappers","gapBetweenLines","wrapper","divStyles","duplicateSvg","fullTitle","viewBoxHeight","cloneNode","titleEl","innerText","svgNS","createElementNS","attributes","getDim","historyEl","measureTotalPerLine","noteNumber","measureTotal","fontOverrides","paddingPercent","fontHeight","addClass","removeClass","kls","FONTEM","FONTSIZE","TOPNOTE","STAVEHEIGHT","INDENT","findNumber","createAnalysis","classObj","closest","dataset","tagName","clickedName","parentClasses","clickedClasses","selectableElement","nodeValue","hist","keyboardDown","keyboardSelection","elementFocused","mouseDown","passive","mouseMove","mouseUp","getCoord","yOffset","clientHeight","svgClicked","offsetX","offsetY","layerX","layerY","dragMechanism","notifySelect","keyCode","preventDefault","handled","findElementInHistory","findElementByCoord","minDistance","closestIndex","horiz","hypotenuse","getBestMatchCoordinates","epsilon","getTarget","parentElement","getMousePosition","clickedOn","attachMissingTouchEventAttributes","touchEv","touches","pageX","pageY","_ev","addGlobalClass","lastTouchMove","yDist","clearSelection","removeGlobalClass","dragStep","dragMax","step","elStart","elEnd","getClassSet","oldClass","setClassSet","klassSet","getBarYAt","layoutBeam","calcDy","minStemHeight","minStem","calcYPos","xPos","calcXPos","createAdditionalBeams","createStems","getDurlog","calcSlant","leftAveragePitch","rightAveragePitch","numStems","slant","maxSlant","asc","starthead","endhead","firstAveragePitch","lastAveragePitch","barpos","barminpos","furthestHead","ovalDelta","bary","auxBeams","sy","single","auxBeamEndX","auxBeamEndY","starty","endy","getLeftEdgeOfStaff","voiceheaderw","addBraceSize","sizeW","setBraceLocation","setLocation","layoutInGrid","leftEdge","getTotalDuration","totalWidth","leftAlignPadding","afterFixedLeft","durationUnit","gridStart","align","grandchild","gridEnd","maxCount","layoutVoice","setUpperAndLowerElements","layoutStaffGroup","setXSpacing","isLastLine","debug","newspace","it","calcHorizontalSpacing","spacingUnits","minSpace","minspace","centerWholeRests","dumpGroup","stretchLast","targetWidth","lack","stretch","relSpace","constSpace","lastStaffBottom","incTop","vocal","hgt","setUpperAndLowerVoiceElements","thisStaffTop","forcedSpacingBetween","minSpacingInPitches","systemStaffSeparation","addedSpace","staffTopMargin","setUpperAndLowerAbsoluteElements","setUpperAndLowerCrescendoElements","setUpperAndLowerDynamicElements","setUpperAndLowerEndingElements","specialYResolved","setUpperAndLowerTempoElement","setUpperAndLowerRelativeElements","tempoPitch","renderSpacing","layoutVoiceElements","checkLastBarX","maxX","lastChild","maxChild","barX","spacingunits","currentduration","beginLayout","spacingunit","layoutEnded","getDurationIndex","currentvoices","othervoices","durationIndex","spacingduration","getNextX","getSpacingUnits","lastTopVoice","topVoice","isSameStaff","voicechildx","layoutOneItem","shiftRight","updateNextX","updateIndices","durationindex","voice1","voice2","layoutTriplet","isAbove","heightAtMidpoint","xAtMidpoint","VoiceElements","minx","nextx","er","pad","overlaps","firstChildNoteWidth","adjustedWidth","relativeChild","extraWidth","getExtraWidth","getMinWidth","moveDecorations","setLaneForChord","yAtNote","placeInLane","rightMost","xCoords","fits","absElems","rightMostAbove","rightMostBelow","setLane","numAnnotationsBelow","numLanesAbove","numLanesBelow","Svg","userAgent","clear","initVerticalSpace","setVerticalSpace","setPadding","paddingOverride","paddingtop","paddingbottom","paddingright","paddingleft","setPaddingVariable","paddingKey","formattingKey","printDefault","screenDefault","graceBefore","graceInside","graceAfter","lineSkipFactor","paragraphSkipFactor","slurHeight","staffsep","composerspace","partsspace","textspace","musicspace","titlespace","sysstaffsep","subtitlespace","topspace","vocalspace","wordsspace","em","createSvg","currentGroup","titleNode","createTextNode","cls","transform","textContent","dummySvg","constructHLine","constructVLine","ts2","dist","ts3","append","tspan","guessWidth","createDummySvg","ex","sizeCache","removeLater","setAttributeNS","moveElementToChild"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"abcjs-basic.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,OAAO,GAAGC,mBAAO,CAAC,+BAAW,CAAC;AAClC,IAAIC,SAAS,GAAGD,mBAAO,CAAC,2DAAyB,CAAC;AAClD,IAAIE,QAAQ,GAAGF,mBAAO,CAAC,yDAAwB,CAAC;AAChD,IAAIG,QAAQ,GAAGH,mBAAO,CAAC,yEAAgC,CAAC;AACxD,IAAII,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,GAAG,CAAC,CAAC;IACxC;EACD;AACD,CAAC;AAED6vG,GAAG,CAACplG,SAAS,CAAC2oG,kBAAkB,GAAG,UAAUnjG,MAAM,EAAE08D,KAAK,EAAE;EAC3D18D,MAAM,CAAC5N,WAAW,CAACsqE,KAAK,CAAC;AAC1B,CAAC;AAED,SAASolC,SAASA,CAAA,EAAG;EACpB,IAAI31C,GAAG,GAAGp6D,QAAQ,CAACm/F,eAAe,CAACD,KAAK,EAAE,KAAK,CAAC;EAChD9kC,GAAG,CAAC+2C,cAAc,CAAC,+BAA+B,EAAE,aAAa,EAAE,8BAA8B,CAAC;EAClG/2C,GAAG,CAACxrD,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAI;EACpCwrD,GAAG,CAACxrD,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAI;EAC7CwrD,GAAG,CAACxrD,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAI;EAC/C,OAAOwrD,GAAG;AACX;AAGAh7D,MAAM,CAACC,OAAO,GAAGwuG,GAAG;;;;;;;;;;ACxapB,IAAIxwG,OAAO,GAAG,OAAO;AAErB+B,MAAM,CAACC,OAAO,GAAGhC,OAAO;;;;;;UCFxB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://ABCJS/webpack/universalModuleDefinition","webpack://ABCJS/./index.js","webpack://ABCJS/./src/api/abc_animation.js","webpack://ABCJS/./src/api/abc_timing_callbacks.js","webpack://ABCJS/./src/api/abc_tunebook.js","webpack://ABCJS/./src/api/abc_tunebook_svg.js","webpack://ABCJS/./src/api/tune-metrics.js","webpack://ABCJS/./src/const/key-accidentals.js","webpack://ABCJS/./src/const/relative-major.js","webpack://ABCJS/./src/data/abc_tune.js","webpack://ABCJS/./src/data/deline-tune.js","webpack://ABCJS/./src/edit/abc_editarea.js","webpack://ABCJS/./src/edit/abc_editor.js","webpack://ABCJS/./src/midi/abc_midi_create.js","webpack://ABCJS/./src/parse/abc_common.js","webpack://ABCJS/./src/parse/abc_parse.js","webpack://ABCJS/./src/parse/abc_parse_book.js","webpack://ABCJS/./src/parse/abc_parse_directive.js","webpack://ABCJS/./src/parse/abc_parse_header.js","webpack://ABCJS/./src/parse/abc_parse_key_voice.js","webpack://ABCJS/./src/parse/abc_parse_music.js","webpack://ABCJS/./src/parse/abc_parse_settings.js","webpack://ABCJS/./src/parse/abc_tokenizer.js","webpack://ABCJS/./src/parse/abc_transpose.js","webpack://ABCJS/./src/parse/all-notes.js","webpack://ABCJS/./src/parse/transpose-chord.js","webpack://ABCJS/./src/parse/tune-builder.js","webpack://ABCJS/./src/parse/wrap_lines.js","webpack://ABCJS/./src/str/output.js","webpack://ABCJS/./src/synth/abc_midi_flattener.js","webpack://ABCJS/./src/synth/abc_midi_renderer.js","webpack://ABCJS/./src/synth/abc_midi_sequencer.js","webpack://ABCJS/./src/synth/active-audio-context.js","webpack://ABCJS/./src/synth/cents-to-factor.js","webpack://ABCJS/./src/synth/chord-track.js","webpack://ABCJS/./src/synth/create-note-map.js","webpack://ABCJS/./src/synth/create-synth-control.js","webpack://ABCJS/./src/synth/create-synth.js","webpack://ABCJS/./src/synth/download-buffer.js","webpack://ABCJS/./src/synth/get-midi-file.js","webpack://ABCJS/./src/synth/images/loading.svg.js","webpack://ABCJS/./src/synth/images/loop.svg.js","webpack://ABCJS/./src/synth/images/pause.svg.js","webpack://ABCJS/./src/synth/images/play.svg.js","webpack://ABCJS/./src/synth/images/reset.svg.js","webpack://ABCJS/./src/synth/instrument-index-to-name.js","webpack://ABCJS/./src/synth/load-note.js","webpack://ABCJS/./src/synth/note-to-midi.js","webpack://ABCJS/./src/synth/pitch-to-note-name.js","webpack://ABCJS/./src/synth/pitches-to-perc.js","webpack://ABCJS/./src/synth/place-note.js","webpack://ABCJS/./src/synth/play-event.js","webpack://ABCJS/./src/synth/register-audio-context.js","webpack://ABCJS/./src/synth/sounds-cache.js","webpack://ABCJS/./src/synth/supports-audio.js","webpack://ABCJS/./src/synth/synth-controller.js","webpack://ABCJS/./src/synth/synth-sequence.js","webpack://ABCJS/./src/tablatures/abc_tablatures.js","webpack://ABCJS/./src/tablatures/instruments/string-patterns.js","webpack://ABCJS/./src/tablatures/instruments/string-tablature.js","webpack://ABCJS/./src/tablatures/instruments/tab-note.js","webpack://ABCJS/./src/tablatures/instruments/tab-notes.js","webpack://ABCJS/./src/tablatures/instruments/tab-string.js","webpack://ABCJS/./src/tablatures/render/tab-absolute-elements.js","webpack://ABCJS/./src/tablatures/render/tab-renderer.js","webpack://ABCJS/./src/write/creation/abstract-engraver.js","webpack://ABCJS/./src/write/creation/add-chord.js","webpack://ABCJS/./src/write/creation/add-text-if.js","webpack://ABCJS/./src/write/creation/calc-height.js","webpack://ABCJS/./src/write/creation/create-clef.js","webpack://ABCJS/./src/write/creation/create-key-signature.js","webpack://ABCJS/./src/write/creation/create-note-head.js","webpack://ABCJS/./src/write/creation/create-time-signature.js","webpack://ABCJS/./src/write/creation/decoration.js","webpack://ABCJS/./src/write/creation/elements/absolute-element.js","webpack://ABCJS/./src/write/creation/elements/beam-element.js","webpack://ABCJS/./src/write/creation/elements/bottom-text.js","webpack://ABCJS/./src/write/creation/elements/brace-element.js","webpack://ABCJS/./src/write/creation/elements/crescendo-element.js","webpack://ABCJS/./src/write/creation/elements/dynamic-decoration.js","webpack://ABCJS/./src/write/creation/elements/ending-element.js","webpack://ABCJS/./src/write/creation/elements/free-text.js","webpack://ABCJS/./src/write/creation/elements/glissando-element.js","webpack://ABCJS/./src/write/creation/elements/relative-element.js","webpack://ABCJS/./src/write/creation/elements/rich-text.js","webpack://ABCJS/./src/write/creation/elements/separator.js","webpack://ABCJS/./src/write/creation/elements/staff-group-element.js","webpack://ABCJS/./src/write/creation/elements/subtitle.js","webpack://ABCJS/./src/write/creation/elements/tempo-element.js","webpack://ABCJS/./src/write/creation/elements/tie-element.js","webpack://ABCJS/./src/write/creation/elements/top-text.js","webpack://ABCJS/./src/write/creation/elements/triplet-element.js","webpack://ABCJS/./src/write/creation/elements/voice-element.js","webpack://ABCJS/./src/write/creation/glyphs.js","webpack://ABCJS/./src/write/creation/translate-chord.js","webpack://ABCJS/./src/write/draw/absolute.js","webpack://ABCJS/./src/write/draw/beam.js","webpack://ABCJS/./src/write/draw/brace.js","webpack://ABCJS/./src/write/draw/crescendo.js","webpack://ABCJS/./src/write/draw/debug-box.js","webpack://ABCJS/./src/write/draw/draw.js","webpack://ABCJS/./src/write/draw/dynamics.js","webpack://ABCJS/./src/write/draw/ending.js","webpack://ABCJS/./src/write/draw/glissando.js","webpack://ABCJS/./src/write/draw/group-elements.js","webpack://ABCJS/./src/write/draw/non-music.js","webpack://ABCJS/./src/write/draw/print-line.js","webpack://ABCJS/./src/write/draw/print-path.js","webpack://ABCJS/./src/write/draw/print-stem.js","webpack://ABCJS/./src/write/draw/print-symbol.js","webpack://ABCJS/./src/write/draw/relative.js","webpack://ABCJS/./src/write/draw/round-number.js","webpack://ABCJS/./src/write/draw/selectables.js","webpack://ABCJS/./src/write/draw/separator.js","webpack://ABCJS/./src/write/draw/set-paper-size.js","webpack://ABCJS/./src/write/draw/sprintf.js","webpack://ABCJS/./src/write/draw/staff-group.js","webpack://ABCJS/./src/write/draw/staff-line.js","webpack://ABCJS/./src/write/draw/staff.js","webpack://ABCJS/./src/write/draw/tempo.js","webpack://ABCJS/./src/write/draw/text.js","webpack://ABCJS/./src/write/draw/tie.js","webpack://ABCJS/./src/write/draw/triplet.js","webpack://ABCJS/./src/write/draw/voice.js","webpack://ABCJS/./src/write/engraver-controller.js","webpack://ABCJS/./src/write/helpers/classes.js","webpack://ABCJS/./src/write/helpers/get-font-and-attr.js","webpack://ABCJS/./src/write/helpers/get-text-size.js","webpack://ABCJS/./src/write/helpers/set-class.js","webpack://ABCJS/./src/write/helpers/spacing.js","webpack://ABCJS/./src/write/interactive/create-analysis.js","webpack://ABCJS/./src/write/interactive/find-selectable-element.js","webpack://ABCJS/./src/write/interactive/highlight.js","webpack://ABCJS/./src/write/interactive/selection.js","webpack://ABCJS/./src/write/interactive/unhighlight.js","webpack://ABCJS/./src/write/layout/beam.js","webpack://ABCJS/./src/write/layout/get-bar-y-at.js","webpack://ABCJS/./src/write/layout/get-left-edge-of-staff.js","webpack://ABCJS/./src/write/layout/layout-in-grid.js","webpack://ABCJS/./src/write/layout/layout.js","webpack://ABCJS/./src/write/layout/set-upper-and-lower-elements.js","webpack://ABCJS/./src/write/layout/staff-group.js","webpack://ABCJS/./src/write/layout/triplet.js","webpack://ABCJS/./src/write/layout/voice-elements.js","webpack://ABCJS/./src/write/layout/voice.js","webpack://ABCJS/./src/write/renderer.js","webpack://ABCJS/./src/write/svg.js","webpack://ABCJS/./version.js","webpack://ABCJS/webpack/bootstrap","webpack://ABCJS/webpack/before-startup","webpack://ABCJS/webpack/startup","webpack://ABCJS/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"abcjs\"] = factory();\n\telse\n\t\troot[\"ABCJS\"] = factory();\n})(this, function() {\nreturn ","/**!\nCopyright (c) 2009-2024 Paul Rosen and Gregory Dyke\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n **This text is from: http://opensource.org/licenses/MIT**\n!**/\nvar version = require('./version');\nvar animation = require('./src/api/abc_animation');\nvar tuneBook = require('./src/api/abc_tunebook');\nvar sequence = require('./src/synth/abc_midi_sequencer');\nvar strTranspose = require('./src/str/output');\n\nvar abcjs = {};\n\nabcjs.signature = \"abcjs-basic v\" + version;\n\nObject.keys(animation).forEach(function (key) {\n\tabcjs[key] = animation[key];\n});\n\nObject.keys(tuneBook).forEach(function (key) {\n\tabcjs[key] = tuneBook[key];\n});\n\nabcjs.renderAbc = require('./src/api/abc_tunebook_svg');\nabcjs.tuneMetrics = require('./src/api/tune-metrics');\nabcjs.TimingCallbacks = require('./src/api/abc_timing_callbacks');\n\nvar glyphs = require('./src/write/creation/glyphs');\nabcjs.setGlyph = glyphs.setSymbol;\nabcjs.strTranspose = strTranspose;\n\nvar CreateSynth = require('./src/synth/create-synth');\nvar instrumentIndexToName = require('./src/synth/instrument-index-to-name');\nvar pitchToNoteName = require('./src/synth/pitch-to-note-name');\nvar SynthSequence = require('./src/synth/synth-sequence');\nvar CreateSynthControl = require('./src/synth/create-synth-control');\nvar registerAudioContext = require('./src/synth/register-audio-context');\nvar activeAudioContext = require('./src/synth/active-audio-context');\nvar supportsAudio = require('./src/synth/supports-audio');\nvar playEvent = require('./src/synth/play-event');\nvar SynthController = require('./src/synth/synth-controller');\nvar getMidiFile = require('./src/synth/get-midi-file');\nvar midiRenderer = require('./src/synth/abc_midi_renderer');\n\nabcjs.synth = {\n\tCreateSynth: CreateSynth,\n\tinstrumentIndexToName: instrumentIndexToName,\n\tpitchToNoteName: pitchToNoteName,\n\tSynthController: SynthController,\n\tSynthSequence: SynthSequence,\n\tCreateSynthControl: CreateSynthControl,\n\tregisterAudioContext: registerAudioContext,\n\tactiveAudioContext: activeAudioContext,\n\tsupportsAudio: supportsAudio,\n\tplayEvent: playEvent,\n\tgetMidiFile: getMidiFile,\n\tsequence: sequence,\n\tmidiRenderer: midiRenderer,\n};\n\nabcjs['Editor'] = require('./src/edit/abc_editor');\nabcjs['EditArea'] = require('./src/edit/abc_editarea');\n\nmodule.exports = abcjs;\n","// abc_animation.js: handles animating the music in real time.\n\nvar TimingCallbacks = require('./abc_timing_callbacks');\n\nvar animation = {};\n\n(function() {\n\t\"use strict\";\n\n\tvar timer;\n\tvar cursor;\n\tanimation.startAnimation = function(paper, tune, options) {\n\t\t//options.bpm\n\t\t//options.showCursor\n\t\t//options.hideCurrentMeasure\n\t\t//options.hideFinishedMeasures\n\t\tif (timer) {\n\t\t\ttimer.stop();\n\t\t\ttimer = undefined;\n\t\t}\n\n\t\tif (options.showCursor) {\n\t\t\tcursor = paper.querySelector('.abcjs-cursor');\n\t\t\tif (!cursor) {\n\t\t\t\tcursor = document.createElement('DIV');\n\t\t\t\tcursor.className = 'abcjs-cursor cursor';\n\t\t\t\tcursor.style.position = 'absolute';\n\n\t\t\t\tpaper.appendChild(cursor);\n\t\t\t\tpaper.style.position = 'relative';\n\t\t\t}\n\t\t}\n\n\t\tfunction hideMeasures(elements) {\n\t\t\tfor (var i = 0; i < elements.length; i++) {\n\t\t\t\tvar element = elements[i];\n\t\t\t\tif (!element.classList.contains('abcjs-bar'))\n\t\t\t\t\telement.style.display = \"none\";\n\t\t\t}\n\t\t}\n\n\t\tvar lastMeasure;\n\t\tfunction disappearMeasuresAfter(selector) {\n\t\t\tif (lastMeasure) {\n\t\t\t\tvar elements = paper.querySelectorAll(lastMeasure);\n\t\t\t\thideMeasures(elements);\n\t\t\t}\n\t\t\tlastMeasure = selector;\n\t\t}\n\n\t\tfunction disappearMeasuresBefore(selector) {\n\t\t\tvar elements = paper.querySelectorAll(selector);\n\t\t\thideMeasures(elements);\n\t\t}\n\n\t\tfunction measureCallback(selector) {\n\t\t\tif (options.hideCurrentMeasure) {\n\t\t\t\tdisappearMeasuresBefore(selector);\n\t\t\t} else if (options.hideFinishedMeasures) {\n\t\t\t\tdisappearMeasuresAfter(selector);\n\t\t\t}\n\t\t}\n\n\t\tfunction getLineAndMeasure(element) {\n\t\t\treturn '.abcjs-l' + element.line + '.abcjs-m' + element.measureNumber;\n\t\t}\n\n\t\tfunction setCursor(range) {\n\t\t\tif (range) {\n\t\t\t\tif (range.measureStart) {\n\t\t\t\t\tvar selector = getLineAndMeasure(range);\n\t\t\t\t\tif (selector)\n\t\t\t\t\t\tmeasureCallback(selector);\n\t\t\t\t}\n\t\t\t\tif (cursor) {\n\t\t\t\t\tcursor.style.left = range.left + \"px\";\n\t\t\t\t\tcursor.style.top = range.top + \"px\";\n\t\t\t\t\tcursor.style.width = range.width + \"px\";\n\t\t\t\t\tcursor.style.height = range.height + \"px\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttimer.stop();\n\t\t\t\ttimer = undefined;\n\t\t\t}\n\t\t}\n\n\t\ttimer = new TimingCallbacks(tune, {\n\t\t\tqpm: options.bpm,\n\t\t\teventCallback: setCursor\n\t\t});\n\t\ttimer.start();\n\t};\n\n\tanimation.pauseAnimation = function(pause) {\n\t\tif (timer) {\n\t\t\tif (pause)\n\t\t\t\ttimer.pause();\n\t\t\telse\n\t\t\t\ttimer.start();\n\t\t}\n\t};\n\n\tanimation.stopAnimation = function() {\n\t\tif (timer) {\n\t\t\ttimer.stop();\n\t\t\ttimer = undefined;\n\t\t}\n\t};\n\n})();\n\nmodule.exports = animation;\n","var TimingCallbacks = function(target, params) {\n\tvar self = this;\n\tif (!params) params = {};\n\tself.qpm = params.qpm ? parseInt(params.qpm, 10) : null;\n\tif (!self.qpm) {\n\t\tvar tempo = target.metaText ? target.metaText.tempo : null;\n\t\tself.qpm = target.getBpm(tempo);\n\t}\n\tself.extraMeasuresAtBeginning = params.extraMeasuresAtBeginning ? parseInt(params.extraMeasuresAtBeginning, 10) : 0;\n\tself.beatCallback = params.beatCallback; // This is called for each beat.\n\tself.eventCallback = params.eventCallback; // This is called for each note or rest encountered.\n\tself.lineEndCallback = params.lineEndCallback; // This is called when the end of a line is approaching.\n\tself.lineEndAnticipation = params.lineEndAnticipation ? parseInt(params.lineEndAnticipation, 10) : 0; // How many milliseconds before the end should the call happen.\n\tself.beatSubdivisions = params.beatSubdivisions ? parseInt(params.beatSubdivisions, 10) : 1; // how many callbacks per beat is desired.\n\tself.joggerTimer = null;\n\n\tself.replaceTarget = function(newTarget) {\n\t\tself.noteTimings = newTarget.setTiming(self.qpm, self.extraMeasuresAtBeginning);\n\t\tif (newTarget.noteTimings.length === 0)\n\t\t\tself.noteTimings = newTarget.setTiming(0,0);\n\t\tif (self.lineEndCallback) {\n\t\t\tself.lineEndTimings = getLineEndTimings(newTarget.noteTimings, self.lineEndAnticipation);\n\t\t}\n\t\tself.startTime = null;\n\t\tself.currentBeat = 0;\n\t\tself.currentEvent = 0;\n\t\tself.currentLine = 0;\n\t\tself.currentTime = 0;\n\t\tself.isPaused = false;\n\t\tself.isRunning = false;\n\t\tself.pausedPercent = null;\n\t\tself.justUnpaused = false;\n\t\tself.newSeekPercent = 0;\n\t\tself.lastTimestamp = 0;\n\n\t\tif (self.noteTimings.length === 0)\n\t\t\treturn;\n\t\t// noteTimings contains an array of events sorted by time. Events that happen at the same time are in the same element of the array.\n\t\tself.millisecondsPerBeat = 1000 / (self.qpm / 60) / self.beatSubdivisions;\n\t\tself.lastMoment = self.noteTimings[self.noteTimings.length-1].milliseconds;\n\t\tself.totalBeats = Math.round(self.lastMoment / self.millisecondsPerBeat);\n\t};\n\n\tself.replaceTarget(target);\n\n\tself.doTiming = function (timestamp) {\n\t\t// This is called 60 times a second, that is, every 16 msecs.\n\t\t//console.log(\"doTiming\", timestamp, timestamp-self.lastTimestamp);\n\t\tif (self.lastTimestamp === timestamp)\n\t\t\treturn; // If there are multiple seeks or other calls, then we can easily get multiple callbacks for the same instant.\n\t\tself.lastTimestamp = timestamp;\n\t\tif (!self.startTime) {\n\t\t\tself.startTime = timestamp;\n\t\t}\n\n\t\tif (!self.isPaused && self.isRunning) {\n\t\t\tself.currentTime = timestamp - self.startTime;\n\t\t\tself.currentTime += 16; // Add a little slop because this function isn't called exactly.\n\t\t\twhile (self.noteTimings.length > self.currentEvent && self.noteTimings[self.currentEvent].milliseconds < self.currentTime) {\n\t\t\t\tif (self.eventCallback && self.noteTimings[self.currentEvent].type === 'event') {\n\t\t\t\t\tvar thisStartTime = self.startTime; // the event callback can call seek and change the position from beneath us.\n\t\t\t\t\tself.eventCallback(self.noteTimings[self.currentEvent]);\n\t\t\t\t\tif (thisStartTime !== self.startTime) {\n\t\t\t\t\t\tself.currentTime = timestamp - self.startTime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself.currentEvent++;\n\t\t\t}\n\t\t\tif (self.lineEndCallback && self.lineEndTimings.length > self.currentLine && self.lineEndTimings[self.currentLine].milliseconds < self.currentTime && self.currentEvent < self.noteTimings.length) {\n\t\t\t\tvar leftEvent = self.noteTimings[self.currentEvent].milliseconds === self.currentTime ? self.noteTimings[self.currentEvent] : self.noteTimings[self.currentEvent-1]\n\t\t\t\tself.lineEndCallback(self.lineEndTimings[self.currentLine], leftEvent, { line: self.currentLine, endTimings: self.lineEndTimings, currentTime: self.currentTime });\n\t\t\t\tself.currentLine++;\n\t\t\t}\n\t\t\tif (self.currentTime < self.lastMoment) {\n\t\t\t\trequestAnimationFrame(self.doTiming);\n\t\t\t\tif (self.currentBeat * self.millisecondsPerBeat < self.currentTime) {\n\t\t\t\t\tvar ret = self.doBeatCallback(timestamp);\n\t\t\t\t\tif (ret !== null)\n\t\t\t\t\t\tself.currentTime = ret;\n\t\t\t\t}\n\t\t\t} else if (self.currentBeat <= self.totalBeats) {\n\t\t\t\t// Because of timing issues (for instance, if the browser tab isn't active), the beat callbacks might not have happened when they are supposed to. To keep the client programs from having to deal with that, this will keep calling the loop until all of them have been sent.\n\t\t\t\tif (self.beatCallback) {\n\t\t\t\t\tvar ret2 = self.doBeatCallback(timestamp);\n\t\t\t\t\tif (ret2 !== null)\n\t\t\t\t\t\tself.currentTime = ret2;\n\t\t\t\t\trequestAnimationFrame(self.doTiming);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (self.currentTime >= self.lastMoment) {\n\t\t\t\tif (self.eventCallback) {\n\t\t\t\t\t// At the end, the event callback can return \"continue\" to keep from stopping.\n\t\t\t\t\t// The event callback can either be a promise or not.\n\t\t\t\t\tvar promise = self.eventCallback(null);\n\t\t\t\t\tself.shouldStop(promise).then(function(shouldStop) {\n\t\t\t\t\t\tif (shouldStop)\n\t\t\t\t\t\t\tself.stop();\n\t\t\t\t\t})\n\t\t\t\t} else\n\t\t\t\t\tself.stop();\n\t\t\t}\n\t\t}\n\t};\n\n\tself.shouldStop = function(promise) {\n\t\t// The return of the last event callback can be \"continue\" or a promise that returns \"continue\".\n\t\t// If it is then don't call stop. Any other value calls stop.\n\t\treturn new Promise(function (resolve) {\n\t\t\tif (!promise)\n\t\t\t\treturn resolve(true);\n\t\t\tif (promise === \"continue\")\n\t\t\t\treturn resolve(false);\n\t\t\tif (promise.then) {\n\t\t\t\tpromise.then(function (result) {\n\t\t\t\t\tresolve(result !== \"continue\");\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tself.doBeatCallback = function(timestamp) {\n\t\tif (self.beatCallback) {\n\t\t\tvar next = self.currentEvent;\n\t\t\twhile (next < self.noteTimings.length && self.noteTimings[next].left === null)\n\t\t\t\tnext++;\n\t\t\tvar endMs;\n\t\t\tvar ev;\n\t\t\tif (next < self.noteTimings.length) {\n\t\t\t\tendMs = self.noteTimings[next].milliseconds;\n\t\t\t\tnext = Math.max(0, self.currentEvent - 1);\n\t\t\t\twhile (next >= 0 && self.noteTimings[next].left === null)\n\t\t\t\t\tnext--;\n\n\t\t\t\tev = self.noteTimings[next];\n\t\t\t}\n\n\t\t\tvar position = {};\n\t\t\tvar debugInfo = {};\n\t\t\tif (ev) {\n\t\t\t\tposition.top = ev.top;\n\t\t\t\tposition.height = ev.height;\n\n\t\t\t\t// timestamp = the time passed in from the animation timer\n\t\t\t\t// self.startTime = the time that the tune was started (if there was seeking or pausing, it is adjusted to keep the math the same)\n\t\t\t\t// ev = the event that is either happening now or has most recently passed.\n\t\t\t\t// ev.milliseconds = the time that the current event starts (relative to self.startTime)\n\t\t\t\t// endMs = the time that the next event starts\n\t\t\t\t// ev.endX = the x coordinate that the next event happens (or the end of the line or repeat measure)\n\t\t\t\t// ev.left = the x coordinate of the current event\n\t\t\t\t//\n\t\t\t\t// The output is the X coordinate of the current cursor location. It is calculated with the ratio of the length of the event and the width of it.\n\t\t\t\tvar offMs = Math.max(0, timestamp-self.startTime-ev.milliseconds); // Offset in time from the last beat\n\t\t\t\tvar gapMs = endMs - ev.milliseconds; // Length of this event in time\n\t\t\t\tvar gapPx = ev.endX - ev.left; // The length in pixels\n\t\t\t\tvar offPx = gapMs ? offMs * gapPx / gapMs : 0;\n\t\t\t\tposition.left = ev.left + offPx;\n\t\t\t\t// See if this is before the first event - that is the case where there are \"prep beats\"\n\t\t\t\tif (self.currentEvent === 0 && ev.milliseconds > timestamp-self.startTime)\n\t\t\t\t\tposition.left = undefined\n\t\t\t\t\n\t\t\t\tdebugInfo = {\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tstartTime: self.startTime,\n\t\t\t\t\tev: ev,\n\t\t\t\t\tendMs: endMs,\n\t\t\t\t\toffMs: offMs,\n\t\t\t\t\toffPx: offPx,\n\t\t\t\t\tgapMs: gapMs,\n\t\t\t\t\tgapPx: gapPx\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tdebugInfo = {\n\t\t\t\t\ttimestamp: timestamp,\n\t\t\t\t\tstartTime: self.startTime,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar thisStartTime = self.startTime; // the beat callback can call seek and change the position from beneath us.\n\t\t\tself.beatCallback(\n\t\t\t\tself.currentBeat / self.beatSubdivisions,\n\t\t\t\tself.totalBeats / self.beatSubdivisions,\n\t\t\t\tself.lastMoment,\n\t\t\t\tposition,\n\t\t\t\tdebugInfo);\n\t\t\tif (thisStartTime !== self.startTime) {\n\t\t\t\treturn timestamp - self.startTime;\n\t\t\t} else\n\t\t\t\tself.currentBeat++;\n\t\t}\n\t\treturn null;\n\t};\n\n\t// In general music doesn't need a timer at 60 fps because notes don't happen that fast.\n\t// For instance, at 120 beats per minute, a sixteenth note takes 125ms. So just as a\n\t// compromise value between performance and jank this is set about half that.\n\tvar JOGGING_INTERVAL = 60;\n\n\tself.animationJogger = function() {\n\t\t// There are some cases where the animation timer doesn't work: for instance when\n\t\t// this isn't running in a visible tab and sometimes on mobile devices. We compensate\n\t\t// by having a backup timer using setTimeout. This won't be accurate so the performance\n\t\t// will be jerky, but without it the requestAnimationFrame might be skipped and so\n\t\t// not called again.\n\t\tif (self.isRunning) {\n\t\t\tself.doTiming(performance.now());\n\t\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t\t}\n\t};\n\n\tself.start = function(offsetPercent, units) {\n\t\tself.isRunning = true;\n\t\tif (self.isPaused) {\n\t\t\tself.isPaused = false;\n\t\t\tif (offsetPercent === undefined)\n\t\t\t\tself.justUnpaused = true;\n\t\t}\n\t\tif (offsetPercent) {\n\t\t\tself.setProgress(offsetPercent, units);\n\t\t} else if (offsetPercent === 0) {\n\t\t\tself.reset();\n\t\t} else if (self.pausedPercent !== null) {\n\t\t\tvar now = performance.now();\n\t\t\tself.currentTime = self.lastMoment * self.pausedPercent;\n\t\t\tself.startTime = now - self.currentTime;\n\t\t\tself.pausedPercent = null;\n\t\t\tself.reportNext = true;\n\t\t}\n\t\trequestAnimationFrame(self.doTiming);\n\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t};\n\tself.pause = function() {\n\t\tself.isPaused = true;\n\t\tvar now = performance.now();\n\t\tself.pausedPercent = (now - self.startTime) / self.lastMoment;\n\t\tself.isRunning = false;\n\t\tif (self.joggerTimer) {\n\t\t\tclearTimeout(self.joggerTimer);\n\t\t\tself.joggerTimer = null;\n\t\t}\n\t};\n\tself.currentMillisecond = function() {\n\t\treturn self.currentTime;\n\t};\n\tself.reset = function() {\n\t\tself.currentBeat = 0;\n\t\tself.currentEvent = 0;\n\t\tself.currentLine = 0;\n\t\tself.startTime = null;\n\t\tself.pausedPercent = null;\n\t};\n\tself.stop = function() {\n\t\tself.pause();\n\t\tself.reset();\n\t};\n\tself.setProgress = function(position, units) {\n\t\t// the effect of this function is to move startTime so that the callbacks happen correctly for the new seek.\n\t\tvar percent;\n\t\tswitch (units) {\n\t\t\tcase \"seconds\":\n\t\t\t\tself.currentTime = position * 1000;\n\t\t\t\tif (self.currentTime < 0) self.currentTime = 0;\n\t\t\t\tif (self.currentTime > self.lastMoment) self.currentTime = self.lastMoment;\n\t\t\t\tpercent = self.currentTime / self.lastMoment;\n\t\t\t\tbreak;\n\t\t\tcase \"beats\":\n\t\t\t\tself.currentTime = position * self.millisecondsPerBeat * self.beatSubdivisions;\n\t\t\t\tif (self.currentTime < 0) self.currentTime = 0;\n\t\t\t\tif (self.currentTime > self.lastMoment) self.currentTime = self.lastMoment;\n\t\t\t\tpercent = self.currentTime / self.lastMoment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// this is \"percent\" or any illegal value\n\t\t\t\t// this is passed a value between 0 and 1.\n\t\t\t\tpercent = position;\n\t\t\t\tif (percent < 0) percent = 0;\n\t\t\t\tif (percent > 1) percent = 1;\n\t\t\t\tself.currentTime = self.lastMoment * percent;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!self.isRunning)\n\t\t\tself.pausedPercent = percent;\n\n\t\tvar now = performance.now();\n\t\tself.startTime = now - self.currentTime;\n\n\t\tvar oldEvent = self.currentEvent;\n\t\tself.currentEvent = 0;\n\t\twhile (self.noteTimings.length > self.currentEvent && self.noteTimings[self.currentEvent].milliseconds < self.currentTime) {\n\t\t\tself.currentEvent++;\n\t\t}\n\n\t\tif (self.lineEndCallback) {\n\t\t\tself.currentLine = 0;\n\t\t\twhile (self.lineEndTimings.length > self.currentLine && self.lineEndTimings[self.currentLine].milliseconds + self.lineEndAnticipation < self.currentTime) {\n\t\t\t\tself.currentLine++;\n\t\t\t}\n\t\t}\n\n\t\tvar oldBeat = self.currentBeat;\n\t\tself.currentBeat = Math.floor(self.currentTime / self.millisecondsPerBeat);\n\t\tif (self.beatCallback && oldBeat !== self.currentBeat) // If the movement caused the beat to change, then immediately report it to the client.\n\t\t\tself.doBeatCallback(self.startTime+self.currentTime);\n\n\t\tif (self.eventCallback && self.currentEvent >= 0 && self.noteTimings[self.currentEvent].type === 'event')\n\t\t\tself.eventCallback(self.noteTimings[self.currentEvent]);\n\t\tif (self.lineEndCallback)\n\t\t\tself.lineEndCallback(self.lineEndTimings[self.currentLine], self.noteTimings[self.currentEvent], { line: self.currentLine, endTimings: self.lineEndTimings });\n\n\t\tself.joggerTimer = setTimeout(self.animationJogger, JOGGING_INTERVAL);\n\t};\n};\n\nfunction getLineEndTimings(timings, anticipation) {\n\t// Returns an array of milliseconds to call the lineEndCallback.\n\t// This figures out the timing of the beginning of each line and subtracts the anticipation from it.\n\tvar callbackTimes = [];\n\tvar lastTop = null;\n\tfor (var i = 0; i < timings.length; i++) {\n\t\tvar timing = timings[i];\n\t\tif (timing.type !== 'end' && timing.top !== lastTop) {\n\t\t\tcallbackTimes.push({ measureNumber: timing.measureNumber, milliseconds: timing.milliseconds-anticipation, top: timing.top, bottom: timing.top+timing.height });\n\t\t\tlastTop = timing.top;\n\t\t}\n\t}\n\treturn callbackTimes;\n}\n\nmodule.exports = TimingCallbacks;\n\n","// abc_tunebook.js: splits a string representing ABC Music Notation into individual tunes.\n\nvar Parse = require('../parse/abc_parse');\nvar bookParser = require('../parse/abc_parse_book');\nvar tablatures = require('../tablatures/abc_tablatures');\n\n\nvar tunebook = {};\n\n(function() {\n\t\"use strict\";\n\n\ttunebook.numberOfTunes = function(abc) {\n\t\tvar tunes = abc.split(\"\\nX:\");\n\t\tvar num = tunes.length;\n\t\tif (num === 0) num = 1;\n\t\treturn num;\n\t};\n\n\tvar TuneBook = tunebook.TuneBook = function(book) {\n\t\tvar parsed = bookParser(book);\n\t\tthis.header = parsed.header;\n\t\tthis.tunes = parsed.tunes;\n\t};\n\n\tTuneBook.prototype.getTuneById = function(id) {\n\t\tfor (var i = 0; i < this.tunes.length; i++) {\n\t\t\tif (this.tunes[i].id === ''+id)\n\t\t\t\treturn this.tunes[i];\n\t\t}\n\t\treturn null;\n\t};\n\n\tTuneBook.prototype.getTuneByTitle = function(title) {\n\t\tfor (var i = 0; i < this.tunes.length; i++) {\n\t\t\tif (this.tunes[i].title === title)\n\t\t\t\treturn this.tunes[i];\n\t\t}\n\t\treturn null;\n\t};\n\n\ttunebook.parseOnly = function(abc, params) {\n\t\tvar numTunes = tunebook.numberOfTunes(abc);\n\n\t\t// this just needs to be passed in because this tells the engine how many tunes to process.\n\t\tvar output = [];\n\t\tfor (var i = 0; i < numTunes; i++) {\n\t\t\toutput.push(1);\n\t\t}\n\t\tfunction callback() {\n\t\t\t// Don't need to do anything with the parsed tunes.\n\t\t}\n\t\treturn tunebook.renderEngine(callback, output, abc, params);\n\t};\n\n\ttunebook.renderEngine = function (callback, output, abc, params) {\n\t\tvar ret = [];\n\t\tvar isArray = function(testObject) {\n\t\t\treturn testObject && !(testObject.propertyIsEnumerable('length')) && typeof testObject === 'object' && typeof testObject.length === 'number';\n\t\t};\n\n\t\t// check and normalize input parameters\n\t\tif (output === undefined || abc === undefined)\n\t\t\treturn;\n\t\tif (!isArray(output))\n\t\t\toutput = [ output ];\n\t\tif (params === undefined)\n\t\t\tparams = {};\n\t\tvar currentTune = params.startingTune ? parseInt(params.startingTune, 10) : 0;\n\n\t\t// parse the abc string\n\t\tvar book = new TuneBook(abc);\n\t\tvar abcParser = new Parse();\n\n\t\t// output each tune, if it exists. Otherwise clear the div.\n\t\tfor (var i = 0; i < output.length; i++) {\n\t\t\tvar div = output[i];\n\t\t\tif (div === \"*\") {\n\t\t\t\t// This is for \"headless\" rendering: doing the work but not showing the svg.\n\t\t\t} else if (typeof(div) === \"string\")\n\t\t\t\tdiv = document.getElementById(div);\n\t\t\tif (div) {\n\t\t\t\tif (currentTune >= 0 && currentTune < book.tunes.length) {\n\t\t\t\t\tabcParser.parse(book.tunes[currentTune].abc, params, book.tunes[currentTune].startPos - book.header.length);\n\t\t\t\t\tvar tune = abcParser.getTune();\n\t\t\t\t\t//\n\t\t\t\t\t// Init tablatures plugins\n\t\t\t\t\t//\n\t\t\t\t\tif (params.tablature) {\n\t\t\t\t\t\ttune.tablatures = tablatures.preparePlugins(tune, currentTune, params);\n\t\t\t\t\t}\n\t\t\t\t\tvar warnings = abcParser.getWarnings();\n\t\t\t\t\tif (warnings)\n\t\t\t\t\t\ttune.warnings = warnings;\n\t\t\t\t\tvar override = callback(div, tune, i, book.tunes[currentTune].abc);\n\t\t\t\t\tret.push(override ? override : tune);\n\t\t\t\t} else {\n\t\t\t\t\tif (div['innerHTML'])\n\t\t\t\t\t\tdiv.innerHTML = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentTune++;\n\t\t}\n\t return ret;\n\t};\n\n\tfunction flattenTune(tuneObj) {\n\t\t// This removes the line breaks and removes the non-music lines.\n\t\tvar staves = [];\n\t\tfor (var j = 0; j < tuneObj.lines.length; j++) {\n\t\t\tvar line = tuneObj.lines[j];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var k = 0; k < line.staff.length; k++) {\n\t\t\t\t\tvar staff = line.staff[k];\n\t\t\t\t\tif (!staves[k])\n\t\t\t\t\t\tstaves[k] = staff;\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (var i = 0; i < staff.voices.length; i++) {\n\t\t\t\t\t\t\tif (staves[k].voices[i])\n\t\t\t\t\t\t\t\tstaves[k].voices[i] = staves[k].voices[i].concat(staff.voices[i]);\n\t\t\t\t\t\t\t// TODO-PER: If staves[k].voices[i] doesn't exist, that means a voice appeared in the middle of the tune. That isn't handled yet.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn staves;\n\t}\n\n\tfunction measuresParser(staff, tune) {\n\t\tvar voices = [];\n\t\tvar lastChord = null;\n\t\tvar measureStartChord = null;\n\t\tvar fragStart = null;\n\t\tvar hasNotes = false;\n\n\t\tfor (var i = 0; i < staff.voices.length; i++) {\n\t\t\tvar voice = staff.voices[i];\n\t\t\tvoices.push([]);\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar elem = voice[j];\n\t\t\t\tif (fragStart === null && elem.startChar >= 0) {\n\t\t\t\t\tfragStart = elem.startChar;\n\t\t\t\t\tif (elem.chord === undefined)\n\t\t\t\t\t\tmeasureStartChord = lastChord;\n\t\t\t\t\telse\n\t\t\t\t\t\tmeasureStartChord = null;\n\t\t\t\t}\n\t\t\t\tif (elem.chord)\n\t\t\t\t\tlastChord = elem;\n\t\t\t\tif (elem.el_type === 'bar') {\n\t\t\t\t\tif (hasNotes) {\n\t\t\t\t\t\tvar frag = tune.abc.substring(fragStart, elem.endChar);\n\t\t\t\t\t\tvar measure = {abc: frag};\n\t\t\t\t\t\tlastChord = measureStartChord && measureStartChord.chord && measureStartChord.chord.length > 0 ? measureStartChord.chord[0].name : null;\n\t\t\t\t\t\tif (lastChord)\n\t\t\t\t\t\t\tmeasure.lastChord = lastChord;\n\t\t\t\t\t\tif (elem.startEnding)\n\t\t\t\t\t\t\tmeasure.startEnding = elem.startEnding;\n\t\t\t\t\t\tif (elem.endEnding)\n\t\t\t\t\t\t\tmeasure.endEnding = elem.endEnding;\n\t\t\t\t\t\tvoices[i].push(measure);\n\t\t\t\t\t\tfragStart = null;\n\t\t\t\t\t\thasNotes = false;\n\t\t\t\t\t}\n\t\t\t\t} else if (elem.el_type === 'note') {\n\t\t\t\t\thasNotes = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn voices;\n\t}\n\n\ttunebook.extractMeasures = function(abc) {\n\t\tvar tunes = [];\n\t\tvar book = new TuneBook(abc);\n\t\tfor (var i = 0; i < book.tunes.length; i++) {\n\t\t\tvar tune = book.tunes[i];\n\t\t\tvar arr = tune.abc.split(\"K:\");\n\t\t\tvar arr2 = arr[1].split(\"\\n\");\n\t\t\tvar header = arr[0] + \"K:\" + arr2[0] + \"\\n\";\n\t\t\tvar lastChord = null;\n\t\t\tvar measureStartChord = null;\n\t\t\tvar fragStart = null;\n\t\t\tvar measures = [];\n\t\t\tvar hasNotes = false;\n\t\t\tvar tuneObj = tunebook.parseOnly(tune.abc)[0];\n\t\t\tvar hasPickup = tuneObj.getPickupLength() > 0;\n\t\t\t// var staves = flattenTune(tuneObj);\n\t\t\t// for (var s = 0; s < staves.length; s++) {\n\t\t\t// \tvar voices = measuresParser(staves[s], tune);\n\t\t\t// \tif (s === 0)\n\t\t\t// \t\tmeasures = voices;\n\t\t\t// \telse {\n\t\t\t// \t\tfor (var ss = 0; ss < voices.length; ss++) {\n\t\t\t// \t\t\tvar voice = voices[ss];\n\t\t\t// \t\t\tif (measures.length <= ss)\n\t\t\t// \t\t\t\tmeasures.push([]);\n\t\t\t// \t\t\tvar measureVoice = measures[ss];\n\t\t\t// \t\t\tfor (var sss = 0; sss < voice.length; sss++) {\n\t\t\t// \t\t\t\tif (measureVoice.length > sss)\n\t\t\t// \t\t\t\t\tmeasureVoice[sss].abc += \"\\n\" + voice[sss].abc;\n\t\t\t// \t\t\t\telse\n\t\t\t// \t\t\t\t\tmeasures.push(voice[sss]);\n\t\t\t// \t\t\t}\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// \tconsole.log(voices);\n\t\t\t// }\n\t\t\t// measures = measures[0];\n\n\t\t\tfor (var j = 0; j < tuneObj.lines.length; j++) {\n\t\t\t\tvar line = tuneObj.lines[j];\n\t\t\t\tif (line.staff) {\n\t\t\t\t\tfor (var k = 0; k < 1 /*line.staff.length*/; k++) {\n\t\t\t\t\t\tvar staff = line.staff[k];\n\t\t\t\t\t\tfor (var kk = 0; kk < 1 /*staff.voices.length*/; kk++) {\n\t\t\t\t\t\t\tvar voice = staff.voices[kk];\n\t\t\t\t\t\t\tfor (var kkk = 0; kkk < voice.length; kkk++) {\n\t\t\t\t\t\t\t\tvar elem = voice[kkk];\n\t\t\t\t\t\t\t\tif (fragStart === null && elem.startChar >= 0) {\n\t\t\t\t\t\t\t\t\tfragStart = elem.startChar;\n\t\t\t\t\t\t\t\t\tif (elem.chord === undefined)\n\t\t\t\t\t\t\t\t\t\tmeasureStartChord = lastChord;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tmeasureStartChord = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (elem.chord)\n\t\t\t\t\t\t\t\t\tlastChord = elem;\n\t\t\t\t\t\t\t\tif (elem.el_type === 'bar') {\n\t\t\t\t\t\t\t\t\tif (hasNotes) {\n\t\t\t\t\t\t\t\t\t\tvar frag = tune.abc.substring(fragStart, elem.endChar);\n\t\t\t\t\t\t\t\t\t\tvar measure = {abc: frag};\n\t\t\t\t\t\t\t\t\t\tlastChord = measureStartChord && measureStartChord.chord && measureStartChord.chord.length > 0 ? measureStartChord.chord[0].name : null;\n\t\t\t\t\t\t\t\t\t\tif (lastChord)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.lastChord = lastChord;\n\t\t\t\t\t\t\t\t\t\tif (elem.startEnding)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.startEnding = elem.startEnding;\n\t\t\t\t\t\t\t\t\t\tif (elem.endEnding)\n\t\t\t\t\t\t\t\t\t\t\tmeasure.endEnding = elem.endEnding;\n\t\t\t\t\t\t\t\t\t\tmeasures.push(measure);\n\t\t\t\t\t\t\t\t\t\tfragStart = null;\n\t\t\t\t\t\t\t\t\t\thasNotes = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (elem.el_type === 'note') {\n\t\t\t\t\t\t\t\t\thasNotes = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttunes.push({\n\t\t\t\theader: header,\n\t\t\t\tmeasures: measures,\n\t\t\t\thasPickup: hasPickup\n\t\t\t});\n\t\t}\n\t\treturn tunes;\n\t};\n})();\n\nmodule.exports = tunebook;\n","var tunebook = require('./abc_tunebook');\nvar Tune = require('../data/abc_tune');\n\nvar EngraverController = require('../write/engraver-controller');\nvar Parse = require('../parse/abc_parse');\nvar wrap = require('../parse/wrap_lines');\n\n\nvar resizeDivs = {};\nfunction resizeOuter() {\n var width = window.innerWidth;\n for (var id in resizeDivs) {\n if (resizeDivs.hasOwnProperty(id)) {\n var outer = resizeDivs[id];\n var ofs = outer.offsetLeft;\n width -= ofs * 2;\n outer.style.width = width + \"px\";\n }\n }\n}\n\ntry {\n window.addEventListener(\"resize\", resizeOuter);\n window.addEventListener(\"orientationChange\", resizeOuter);\n} catch(e) {\n // if we aren't in a browser, this code will crash, but it is not needed then either.\n}\n\nfunction renderOne(div, tune, params, tuneNumber, lineOffset) {\n if (params.viewportHorizontal) {\n // Create an inner div that holds the music, so that the passed in div will be the viewport.\n div.innerHTML = '
';\n if (params.scrollHorizontal) {\n div.style.overflowX = \"auto\";\n div.style.overflowY = \"hidden\";\n } else\n div.style.overflow = \"hidden\";\n resizeDivs[div.id] = div; // We use a hash on the element's id so that multiple calls won't keep adding to the list.\n div = div.children[0]; // The music should be rendered in the inner div.\n }\n else if (params.viewportVertical) {\n // Create an inner div that holds the music, so that the passed in div will be the viewport.\n div.innerHTML = '
';\n div.style.overflowX = \"hidden\";\n div.style.overflowY = \"auto\";\n div = div.children[0]; // The music should be rendered in the inner div.\n }\n else\n\t div.innerHTML = \"\";\n var engraver_controller = new EngraverController(div, params);\n engraver_controller.engraveABC(tune, tuneNumber, lineOffset);\n tune.engraver = engraver_controller;\n if (params.viewportVertical || params.viewportHorizontal) {\n // If we added a wrapper around the div, then we need to size the wrapper, too.\n var parent = div.parentNode;\n parent.style.width = div.style.width;\n }\n}\n\n// A quick way to render a tune from javascript when interactivity is not required.\n// This is used when a javascript routine has some abc text that it wants to render\n// in a div or collection of divs. One tune or many can be rendered.\n//\n// parameters:\n// output: an array of divs that the individual tunes are rendered to.\n// If the number of tunes exceeds the number of divs in the array, then\n// only the first tunes are rendered. If the number of divs exceeds the number\n// of tunes, then the unused divs are cleared. The divs can be passed as either\n// elements or strings of ids. If ids are passed, then the div MUST exist already.\n// (if a single element is passed, then it is an implied array of length one.)\n// (if a null is passed for an element, or the element doesn't exist, then that tune is skipped.)\n// abc: text representing a tune or an entire tune book in ABC notation.\n// renderParams: hash of:\n// startingTune: an index, starting at zero, representing which tune to start rendering at.\n// (If this element is not present, then rendering starts at zero.)\n// width: 800 by default. The width in pixels of the output paper\nvar renderAbc = function(output, abc, parserParams, engraverParams, renderParams) {\n // Note: all parameters have been condensed into the first ones. It doesn't hurt anything to allow the old format, so just copy them here.\n var params = {};\n var key;\n if (parserParams) {\n for (key in parserParams) {\n if (parserParams.hasOwnProperty(key)) {\n params[key] = parserParams[key];\n }\n }\n if (params.warnings_id && params.tablature) {\n params.tablature.warning_id = params.warnings_id;\n }\n }\n if (engraverParams) {\n for (key in engraverParams) {\n if (engraverParams.hasOwnProperty(key)) {\n\t // There is a conflict with the name of the parameter \"listener\". If it is in the second parameter, then it is for click.\n\t if (key === \"listener\") {\n\t \tif (engraverParams[key].highlight)\n\t\t params.clickListener = engraverParams[key].highlight;\n\t } else\n params[key] = engraverParams[key];\n }\n }\n }\n if (renderParams) {\n for (key in renderParams) {\n if (renderParams.hasOwnProperty(key)) {\n params[key] = renderParams[key];\n }\n }\n }\n\n function callback(div, tune, tuneNumber, abcString) {\n var removeDiv = false;\n if (div === \"*\") {\n removeDiv = true;\n div = document.createElement(\"div\");\n div.setAttribute(\"style\", \"visibility: hidden;\");\n document.body.appendChild(div);\n }\n if (!removeDiv && params.wrap && params.staffwidth) {\n tune = doLineWrapping(div, tune, tuneNumber, abcString, params);\n\t return tune;\n }\n if (params.afterParsing)\n params.afterParsing(tune, tuneNumber, abcString);\n renderOne(div, tune, params, tuneNumber, 0);\n if (removeDiv)\n div.parentNode.removeChild(div);\n return null;\n }\n\n return tunebook.renderEngine(callback, output, abc, params);\n};\n\nfunction doLineWrapping(div, tune, tuneNumber, abcString, params) {\n\tvar engraver_controller = new EngraverController(div, params);\n\tvar widths = engraver_controller.getMeasureWidths(tune);\n\n\tvar ret = wrap.calcLineWraps(tune, widths, params);\n\tif (ret.reParse) {\n var abcParser = new Parse();\n abcParser.parse(abcString, ret.revisedParams);\n tune = abcParser.getTune();\n var warnings = abcParser.getWarnings();\n if (warnings)\n tune.warnings = warnings;\n }\n if (params.afterParsing)\n params.afterParsing(tune, tuneNumber, abcString);\n renderOne(div, tune, ret.revisedParams, tuneNumber, 0);\n\ttune.explanation = ret.explanation;\n\treturn tune;\n}\n\nmodule.exports = renderAbc;\n","var tunebook = require('./abc_tunebook');\nvar EngraverController = require('../write/engraver-controller');\n\nvar tuneMetrics = function(abc, params) {\n function callback(div, tune, tuneNumber, abcString) {\n\t\tdiv = document.createElement(\"div\");\n\t\tdiv.setAttribute(\"style\", \"visibility: hidden;\");\n\t\tdocument.body.appendChild(div);\n\t\tvar engraver_controller = new EngraverController(div, params);\n\t\tvar widths = engraver_controller.getMeasureWidths(tune);\n div.parentNode.removeChild(div);\n return {sections: widths};\n }\n\n return tunebook.renderEngine(callback, \"*\", abc, params);\n};\n\nmodule.exports = tuneMetrics;\n","var { relativeMajor } = require(\"./relative-major\");\n\nvar key1sharp = { acc: 'sharp', note: 'f' };\nvar key2sharp = { acc: 'sharp', note: 'c' };\nvar key3sharp = { acc: 'sharp', note: 'g' };\nvar key4sharp = { acc: 'sharp', note: 'd' };\nvar key5sharp = { acc: 'sharp', note: 'A' };\nvar key6sharp = { acc: 'sharp', note: 'e' };\nvar key7sharp = { acc: 'sharp', note: 'B' };\nvar key1flat = { acc: 'flat', note: 'B' };\nvar key2flat = { acc: 'flat', note: 'e' };\nvar key3flat = { acc: 'flat', note: 'A' };\nvar key4flat = { acc: 'flat', note: 'd' };\nvar key5flat = { acc: 'flat', note: 'G' };\nvar key6flat = { acc: 'flat', note: 'c' };\nvar key7flat = { acc: 'flat', note: 'F' };\n\nvar keys = {\n\t'C#': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp, key6sharp, key7sharp],\n\t'F#': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp, key6sharp],\n\t'B': [key1sharp, key2sharp, key3sharp, key4sharp, key5sharp],\n\t'E': [key1sharp, key2sharp, key3sharp, key4sharp],\n\t'A': [key1sharp, key2sharp, key3sharp],\n\t'D': [key1sharp, key2sharp],\n\t'G': [key1sharp],\n\t'C': [],\n\t'F': [key1flat],\n\t'Bb': [key1flat, key2flat],\n\t'Eb': [key1flat, key2flat, key3flat],\n\t'Cm': [key1flat, key2flat, key3flat],\n\t'Ab': [key1flat, key2flat, key3flat, key4flat],\n\t'Db': [key1flat, key2flat, key3flat, key4flat, key5flat],\n\t'Gb': [key1flat, key2flat, key3flat, key4flat, key5flat, key6flat],\n\t'Cb': [key1flat, key2flat, key3flat, key4flat, key5flat, key6flat, key7flat],\n\n\t// The following are not in the 2.0 spec, but seem normal enough.\n\t// TODO-PER: These SOUND the same as what's written, but they aren't right\n\t'A#': [key1flat, key2flat],\n\t'B#': [],\n\t'D#': [key1flat, key2flat, key3flat],\n\t'E#': [key1flat],\n\t'G#': [key1flat, key2flat, key3flat, key4flat],\n\t'none': [],\n};\n\nfunction keyAccidentals(key) {\n\tvar newKey = keys[relativeMajor(key)]\n\tif (!newKey) // If we don't recognize the key then there is no change\n\t\treturn null\n\treturn JSON.parse(JSON.stringify(newKey))\n};\n\nmodule.exports = keyAccidentals;\n","// All these keys have the same number of accidentals\nvar keys = {\n\t'C': { modes: ['CMaj', 'Amin', 'Am', 'GMix', 'DDor', 'EPhr', 'FLyd', 'BLoc'], stepsFromC: 0 },\n\t'Db': { modes: ['DbMaj', 'Bbmin', 'Bbm', 'AbMix', 'EbDor', 'FPhr', 'GbLyd', 'CLoc'], stepsFromC: 1 },\n\t'D': { modes: ['DMaj', 'Bmin', 'Bm', 'AMix', 'EDor', 'F#Phr', 'GLyd', 'C#Loc'], stepsFromC: 2 },\n\t'Eb': { modes: ['EbMaj', 'Cmin', 'Cm', 'BbMix', 'FDor', 'GPhr', 'AbLyd', 'DLoc'], stepsFromC: 3 },\n\t'E': { modes: ['EMaj', 'C#min', 'C#m', 'BMix', 'F#Dor', 'G#Phr', 'ALyd', 'D#Loc'], stepsFromC: 4 },\n\t'F': { modes: ['FMaj', 'Dmin', 'Dm', 'CMix', 'GDor', 'APhr', 'BbLyd', 'ELoc'], stepsFromC: 5 },\n\t'Gb': { modes: ['GbMaj', 'Ebmin', 'Ebm', 'DbMix', 'AbDor', 'BbPhr', 'CbLyd', 'FLoc'], stepsFromC: 6 },\n\t'G': { modes: ['GMaj', 'Emin', 'Em', 'DMix', 'ADor', 'BPhr', 'CLyd', 'F#Loc'], stepsFromC: 7 },\n\t'Ab': { modes: ['AbMaj', 'Fmin', 'Fm', 'EbMix', 'BbDor', 'CPhr', 'DbLyd', 'GLoc'], stepsFromC: 8 },\n\t'A': { modes: ['AMaj', 'F#min', 'F#m', 'EMix', 'BDor', 'C#Phr', 'DLyd', 'G#Loc'], stepsFromC: 9 },\n\t'Bb': { modes: ['BbMaj', 'Gmin', 'Gm', 'FMix', 'CDor', 'DPhr', 'EbLyd', 'ALoc'], stepsFromC: 10 },\n\t'B': { modes: ['BMaj', 'G#min', 'G#m', 'F#Mix', 'C#Dor', 'D#Phr', 'ELyd', 'A#Loc'], stepsFromC: 11 },\n\t// Enharmonic keys\n\t'C#': { modes: ['C#Maj', 'A#min', 'A#m', 'G#Mix', 'D#Dor', 'E#Phr', 'F#Lyd', 'B#Loc'], stepsFromC: 1 },\n\t'F#': { modes: ['F#Maj', 'D#min', 'D#m', 'C#Mix', 'G#Dor', 'A#Phr', 'BLyd', 'E#Loc'], stepsFromC: 6 },\n\t'Cb': { modes: ['CbMaj', 'Abmin', 'Abm', 'GbMix', 'DbDor', 'EbPhr', 'FbLyd', 'BbLoc'], stepsFromC: 11 },\n}\n\nvar keyReverse = null\n\nfunction createKeyReverse() {\n\tkeyReverse = {}\n\tvar allKeys = Object.keys(keys)\n\tfor (var i = 0 ; i < allKeys.length; i++) {\n\t\tvar keyObj = keys[allKeys[i]]\n\t\tkeyReverse[allKeys[i].toLowerCase()] = allKeys[i];\n\t\tfor (var j = 0; j < keyObj.modes.length; j++) {\n\t\t\tvar mode = keyObj.modes[j].toLowerCase()\n\t\t\tkeyReverse[mode] = allKeys[i];\n\t\t}\n\t}\n}\n\nfunction relativeMajor(key) {\n\t// Translate a key to its relative major. If it doesn't exist, do the best we can\n\t// by just returning the original key.\n\t// There are alternate spellings of these - so the search needs to be case insensitive.\n\t// To make this efficient, the first time this is called the \"keys\" object is reversed so this search is fast in the future\n\tif (!keyReverse) {\n\t\tcreateKeyReverse()\n\t}\n\t// get the key portion itself - there might be other stuff, like extra sharps and flats, or the mode written out.\n\tvar mode = key.toLowerCase().match(/([a-g][b#]?)(maj|min|mix|dor|phr|lyd|loc|m)?/)\n\tif (!mode || !mode[2])\n\t\treturn key;\n\tmode = mode[1] + mode[2]\n\tvar maj = keyReverse[mode]\n\tif (maj)\n\t\treturn maj;\n\treturn key;\n}\n\nfunction relativeMode(majorKey, mode) {\n\t// The reverse of the relativeMajor. Translate it back to the original mode.\n\t// If it isn't a recognized mode or it is already major, then just return the major key.\n\tvar group = keys[majorKey]\n\tif (!group)\n\t\treturn majorKey;\n\tif (mode === '')\n\t\treturn majorKey;\n\tvar match = mode.toLowerCase().match(/^(maj|min|mix|dor|phr|lyd|loc|m)/)\t\n\tif (!match)\n\t\treturn majorKey\n\tvar regMode = match[1]\t\n\tfor (var i = 0; i < group.modes.length; i++) {\n\t\tvar thisMode = group.modes[i]\n\t\tvar ind = thisMode.toLowerCase().indexOf(regMode)\n\t\tif (ind !== -1 && ind === thisMode.length - regMode.length)\n\t\t\treturn thisMode.substring(0, thisMode.length - regMode.length)\n\t}\n\treturn majorKey;\n}\n\nfunction transposeKey(key, steps) {\n\t// This takes a major key and adds the desired steps.\n\t// It assigns each key a number that is the number of steps from C so that there can just be arithmetic.\n\tvar match = keys[key]\n\tif (!match)\n\t\treturn key;\n\twhile (steps < 0) steps += 12;\n\tvar fromC = (match.stepsFromC + steps) % 12;\n\tfor (var i = 0; i < Object.keys(keys).length; i++) {\n\t\tvar k = Object.keys(keys)[i]\n\t\tif (keys[k].stepsFromC === fromC)\n\t\t\treturn k;\n\t}\n\treturn key;\n}\n\nmodule.exports = {relativeMajor: relativeMajor, relativeMode: relativeMode, transposeKey: transposeKey};\n","// abc_tune.js: a computer usable internal structure representing one tune.\n\nvar parseCommon = require('../parse/abc_common');\nvar spacing = require('../write/helpers/spacing');\nvar sequence = require('../synth/abc_midi_sequencer');\nvar flatten = require('../synth/abc_midi_flattener');\nvar delineTune = require(\"./deline-tune\");\n\n/**\n * This is the data for a single ABC tune. It is created and populated by the window.ABCJS.parse.Parse class.\n * Also known as the ABCJS Abstract Syntax Tree\n * @alternateClassName ABCJS.Tune\n */\nvar Tune = function() {\n\tthis.reset = function () {\n\t\tthis.version = \"1.1.0\";\n\t\tthis.media = \"screen\";\n\t\tthis.metaText = {};\n\t\tthis.metaTextInfo = {};\n\t\tthis.formatting = {};\n\t\tthis.lines = [];\n\t\tthis.staffNum = 0;\n\t\tthis.voiceNum = 0;\n\t\tthis.lineNum = 0;\n\t\tthis.runningFonts = {};\n\t\tdelete this.visualTranspose;\n\t};\n\tthis.reset();\n\n\tfunction copy(dest, src, prop, attrs) {\n\t\tfor (var i = 0; i < attrs.length; i++)\n\t\t\tdest[prop][attrs[i]] = src[prop][attrs[i]];\n\t}\n\n\tthis.copyTopInfo = function(src) {\n\t\tvar attrs = ['tempo', 'title', 'header', 'rhythm', 'origin', 'composer', 'author', 'partOrder'];\n\t\tcopy(this, src, \"metaText\", attrs);\n\t\tcopy(this, src, \"metaTextInfo\", attrs);\n\t};\n\n\tthis.copyBottomInfo = function(src) {\n\t\tvar attrs = ['unalignedWords',\n\t\t\t'book',\n\t\t\t'source',\n\t\t\t'discography',\n\t\t\t'notes',\n\t\t\t'transcription',\n\t\t\t'history',\n\t\t\t'abc-copyright',\n\t\t\t'abc-creator',\n\t\t\t'abc-edited-by',\n\t\t\t'footer']\n\t\tcopy(this, src, \"metaText\", attrs);\n\t\tcopy(this, src, \"metaTextInfo\", attrs);\n\t};\n\n\t// The structure consists of a hash with the following two items:\n\t// metaText: a hash of {key, value}, where key is one of: title, author, rhythm, source, transcription, unalignedWords, etc...\n\t// tempo: { noteLength: number (e.g. .125), bpm: number }\n\t// lines: an array of elements, or one of the following:\n\t//\n\t// STAFF: array of elements\n\t// SUBTITLE: string\n\t//\n\t// TODO: actually, the start and end char should modify each part of the note type\n\t// The elements all have a type field and a start and end char\n\t// field. The rest of the fields depend on the type and are listed below:\n\t// REST: duration=1,2,4,8; chord: string\n\t// NOTE: accidental=none,dbl_flat,flat,natural,sharp,dbl_sharp\n\t//\t\tpitch: \"C\" is 0. The numbers refer to the pitch letter.\n\t//\t\tduration: .5 (sixteenth), .75 (dotted sixteenth), 1 (eighth), 1.5 (dotted eighth)\n\t//\t\t\t2 (quarter), 3 (dotted quarter), 4 (half), 6 (dotted half) 8 (whole)\n\t//\t\tchord: { name:chord, position: one of 'default', 'above', 'below' }\n\t//\t\tend_beam = true or undefined if this is the last note in a beam.\n\t//\t\tlyric: array of { syllable: xxx, divider: one of \" -_\" }\n\t//\t\tstartTie = true|undefined\n\t//\t\tendTie = true|undefined\n\t//\t\tstartTriplet = num <- that is the number to print\n\t//\t\tendTriplet = true|undefined (the last note of the triplet)\n\t// TODO: actually, decoration should be an array.\n\t//\t\tdecoration: upbow, downbow, accent\n\t// BAR: type=bar_thin, bar_thin_thick, bar_thin_thin, bar_thick_thin, bar_right_repeat, bar_left_repeat, bar_double_repeat\n\t//\tnumber: 1 or 2: if it is the start of a first or second ending\n\t// CLEF: type=treble,bass\n\t// KEY-SIG:\n\t//\t\taccidentals[]: { acc:sharp|dblsharp|natural|flat|dblflat, note:a|b|c|d|e|f|g }\n\t// METER: type: common_time,cut_time,specified\n\t//\t\tif specified, { num: 99, den: 99 }\n\n\tthis.getBeatLength = function() {\n\t\t// This returns a fraction: for instance 1/4 for a quarter\n\t\t// There are two types of meters: compound and regular. Compound meter has 3 beats counted as one.\n\t\tvar meter = this.getMeterFraction();\n\t\tvar multiplier = 1;\n\t\tif (meter.num === 6 || meter.num === 9 || meter.num === 12)\n\t\t\tmultiplier = 3;\n\t\telse if (meter.num === 3 && meter.den === 8)\n\t\t\tmultiplier = 3;\n\n\t\treturn multiplier / meter.den;\n\t};\n\n\tfunction computePickupLength(lines, barLength) {\n\t\tvar pickupLength = 0;\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\tif (lines[i].staff) {\n\t\t\t\tfor (var j = 0; j < lines[i].staff.length; j++) {\n\t\t\t\t\tfor (var v = 0; v < lines[i].staff[j].voices.length; v++) {\n\t\t\t\t\t\tvar voice = lines[i].staff[j].voices[v];\n\t\t\t\t\t\tvar tripletMultiplier = 1;\n\t\t\t\t\t\tfor (var el = 0; el < voice.length; el++) {\n\t\t\t\t\t\t\tvar isSpacer = voice[el].rest && voice[el].rest.type === \"spacer\";\n\t\t\t\t\t\t\tif (voice[el].startTriplet)\n\t\t\t\t\t\t\t\ttripletMultiplier = voice[el].tripletMultiplier;\n\t\t\t\t\t\t\tif (voice[el].duration && !isSpacer && voice[el].el_type !== \"tempo\")\n\t\t\t\t\t\t\t\tpickupLength += voice[el].duration * tripletMultiplier;\n\t\t\t\t\t\t\tif (voice[el].endTriplet)\n\t\t\t\t\t\t\t\ttripletMultiplier = 1;\n\t\t\t\t\t\t\tif (pickupLength >= barLength)\n\t\t\t\t\t\t\t\tpickupLength -= barLength;\n\t\t\t\t\t\t\tif (voice[el].el_type === 'bar')\n\t\t\t\t\t\t\t\treturn pickupLength;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn pickupLength;\n\t}\n\tthis.getPickupLength = function() {\n\t\tvar barLength = this.getBarLength();\n\t\tvar pickupLength = computePickupLength(this.lines, barLength);\n\n\t\t// If computed pickup length is very close to 0 or the bar length, we assume\n\t\t// that we actually have a full bar and hence no pickup.\n\t\treturn (pickupLength < 1e-8 || barLength-pickupLength < 1e-8) ? 0 : pickupLength;\n\t};\n\n\tthis.getBarLength = function() {\n\t\tvar meter = this.getMeterFraction();\n\t\treturn meter.num / meter.den;\n\t};\n\n\tthis.getTotalTime = function() {\n\t\treturn this.totalTime;\n\t};\n\n\tthis.getTotalBeats = function() {\n\t\treturn this.totalBeats;\n\t};\n\n\tthis.millisecondsPerMeasure = function(bpmOverride) {\n\t\tvar bpm;\n\t\tif (bpmOverride) {\n\t\t\tbpm = bpmOverride;\n\t\t} else {\n\t\t\tvar tempo = this.metaText ? this.metaText.tempo : null;\n\t\t\tbpm = this.getBpm(tempo);\n\t\t}\n\t\tif (bpm <= 0)\n\t\t\tbpm = 1; // I don't think this can happen, but we don't want a possibility of dividing by zero.\n\n\t\tvar beatsPerMeasure = this.getBeatsPerMeasure();\n\n\t\tvar minutesPerMeasure = beatsPerMeasure / bpm;\n\t\treturn minutesPerMeasure * 60000;\n\t};\n\n\tthis.getBeatsPerMeasure = function() {\n\t\tvar beatLen = this.getBeatLength();\n\t\tvar barLen = this.getBarLength();\n\t\treturn barLen / beatLen;\n\t};\n\n\tthis.getMeter = function() {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tvar meter = line.staff[j].meter;\n\t\t\t\t\tif (meter) {\n\t\t\t\t\t\treturn meter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { type: \"common_time\" };\n\t};\n\n\tthis.getMeterFraction = function() {\n\t\tvar meter = this.getMeter();\n\t\tvar num = 4;\n\t\tvar den = 4;\n\t\tif (meter) {\n\t\t\tif (meter.type === 'specified') {\n\t\t\t\tnum = parseInt(meter.value[0].num, 10);\n\t\t\t\tden = parseInt(meter.value[0].den,10);\n\t\t\t} else if (meter.type === 'cut_time') {\n\t\t\t\tnum = 2;\n\t\t\t\tden = 2;\n\t\t\t} else if (meter.type === 'common_time') {\n\t\t\t\tnum = 4;\n\t\t\t\tden = 4;\n\t\t\t}\n\t\t}\n\t\tthis.meter = { num: num, den: den };\n\t\treturn this.meter; // TODO-PER: is this saved value used anywhere? A get function shouldn't change state.\n\t};\n\n\tthis.getKeySignature = function() {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tif (line.staff[j].key)\n\t\t\t\t\t\treturn line.staff[j].key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { };\n\t};\n\n\tthis.getElementFromChar = function(char) {\n\t\tfor (var i = 0; i < this.lines.length; i++) {\n\t\t\tvar line = this.lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\t\tvar staff = line.staff[j];\n\t\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\t\tfor (var ii = 0; ii < voice.length; ii++) {\n\t\t\t\t\t\t\tvar elem = voice[ii];\n\t\t\t\t\t\t\tif (elem.startChar && elem.endChar &&\n\t\t\t\t\t\t\t\telem.startChar <= char && elem.endChar > char)\n\t\t\t\t\t\t\t\treturn elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tfunction addVerticalInfo(timingEvents) {\n\t\t// Add vertical info to the bar events: put the next event's top, and the event after the next measure's top.\n\t\tvar lastBarTop;\n\t\tvar lastBarBottom;\n\t\tvar lastEventTop;\n\t\tvar lastEventBottom;\n\t\tfor (var e = timingEvents.length - 1; e >= 0; e--) {\n\t\t\tvar ev = timingEvents[e];\n\t\t\tif (ev.type === 'bar') {\n\t\t\t\tev.top = lastEventTop;\n\t\t\t\tev.nextTop = lastBarTop;\n\t\t\t\tlastBarTop = lastEventTop;\n\n\t\t\t\tev.bottom = lastEventBottom;\n\t\t\t\tev.nextBottom = lastBarBottom;\n\t\t\t\tlastBarBottom = lastEventBottom;\n\t\t\t} else if (ev.type === 'event') {\n\t\t\t\tlastEventTop = ev.top;\n\t\t\t\tlastEventBottom = ev.top + ev.height;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction makeSortedArray(hash) {\n\t\tvar arr = [];\n\t\tfor (var k in hash) {\n\t\t\tif (hash.hasOwnProperty(k))\n\t\t\t\tarr.push(hash[k]);\n\t\t}\n\t\tarr = arr.sort(function (a, b) {\n\t\t\tvar diff = a.milliseconds - b.milliseconds;\n\t\t\t// if the events have the same time, make sure a bar comes before a note\n\t\t\tif (diff !== 0) {\n\t\t\t\treturn diff;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn a.type === \"bar\" ? -1 : 1;\n\t\t\t}\n\t\t});\n\t\treturn arr;\n\t}\n\n\tthis.addElementToEvents = function(eventHash, element, voiceTimeMilliseconds, top, height, line, measureNumber, timeDivider, isTiedState, nextIsBar) {\n\t\tif (element.hint)\n\t\t\treturn { isTiedState: undefined, duration: 0 };\n\t\tvar realDuration = element.durationClass ? element.durationClass : element.duration;\n\t\tif (element.abcelem.rest && element.abcelem.rest.type === \"spacer\")\n\t\t\trealDuration = 0;\n\t\tif (realDuration > 0) {\n\t\t\tvar es = [];\n\t\t\t// If there is an invisible rest, then there are not elements, so don't push a null one.\n\t\t\tfor (var i = 0; i < element.elemset.length; i++) {\n\t\t\t\tif (element.elemset[i] !== null)\n\t\t\t\t\tes.push(element.elemset[i]);\n\t\t\t}\n\t\t\tvar isTiedToNext = element.startTie;\n\t\t\tif (isTiedState !== undefined) {\n\t\t\t\teventHash[\"event\" + isTiedState].elements.push(es); // Add the tied note to the first note that it is tied to\n\t\t\t\tif (nextIsBar) {\n\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds]) {\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds] = {\n\t\t\t\t\t\t\ttype: \"event\",\n\t\t\t\t\t\t\tmilliseconds: voiceTimeMilliseconds,\n\t\t\t\t\t\t\tline: line,\n\t\t\t\t\t\t\tmeasureNumber: measureNumber,\n\t\t\t\t\t\t\ttop: top,\n\t\t\t\t\t\t\theight: height,\n\t\t\t\t\t\t\tleft: null,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\telements: [],\n\t\t\t\t\t\t\tstartChar: null,\n\t\t\t\t\t\t\tendChar: null,\n\t\t\t\t\t\t\tstartCharArray: [],\n\t\t\t\t\t\t\tendCharArray: []\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].measureStart = true;\n\t\t\t\t\tnextIsBar = false;\n\t\t\t\t}\n\t\t\t\tif (!isTiedToNext)\n\t\t\t\t\tisTiedState = undefined;\n\t\t\t} else {\n\t\t\t\t// the last note wasn't tied.\n\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds]) {\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds] = {\n\t\t\t\t\t\ttype: \"event\",\n\t\t\t\t\t\tmilliseconds: voiceTimeMilliseconds,\n\t\t\t\t\t\tline: line,\n\t\t\t\t\t\tmeasureNumber: measureNumber,\n\t\t\t\t\t\ttop: top,\n\t\t\t\t\t\theight: height,\n\t\t\t\t\t\tleft: element.x,\n\t\t\t\t\t\twidth: element.w,\n\t\t\t\t\t\telements: [es],\n\t\t\t\t\t\tstartChar: element.abcelem.startChar,\n\t\t\t\t\t\tendChar: element.abcelem.endChar,\n\t\t\t\t\t\tstartCharArray: [element.abcelem.startChar],\n\t\t\t\t\t\tendCharArray: [element.abcelem.endChar],\n\t\t\t\t\t\tmidiPitches: element.abcelem.midiPitches ? parseCommon.cloneArray(element.abcelem.midiPitches) : []\n\t\t\t\t\t};\n\t\t\t\t\tif (element.abcelem.midiGraceNotePitches)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches = parseCommon.cloneArray(element.abcelem.midiGraceNotePitches);\n\t\t\t\t} else {\n\t\t\t\t\t// If there is more than one voice then two notes can fall at the same time. Usually they would be lined up in the same place, but if it is a whole rest, then it is placed funny. In any case, the left most element wins.\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].left)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].left = Math.min(eventHash[\"event\" + voiceTimeMilliseconds].left, element.x);\n\t\t\t\t\telse\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].left = element.x;\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].elements.push(es);\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].startCharArray.push(element.abcelem.startChar);\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].endCharArray.push(element.abcelem.endChar);\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].startChar === null)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].startChar =element.abcelem.startChar;\n\t\t\t\t\tif (eventHash[\"event\" + voiceTimeMilliseconds].endChar === null)\n\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].endChar =element.abcelem.endChar;\n\t\t\t\t\tif (element.abcelem.midiPitches && element.abcelem.midiPitches.length) {\n\t\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds].midiPitches)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiPitches = [];\n\t\t\t\t\t\tfor (var i = 0; i < element.abcelem.midiPitches.length; i++)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiPitches.push(element.abcelem.midiPitches[i]);\n\t\t\t\t\t}\n\t\t\t\t\tif (element.abcelem.midiGraceNotePitches && element.abcelem.midiGraceNotePitches.length) {\n\t\t\t\t\t\tif (!eventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches = [];\n\t\t\t\t\t\tfor (var j = 0; j < element.abcelem.midiGraceNotePitches.length; j++)\n\t\t\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].midiGraceNotePitches.push(element.abcelem.midiGraceNotePitches[j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (nextIsBar) {\n\t\t\t\t\teventHash[\"event\" + voiceTimeMilliseconds].measureStart = true;\n\t\t\t\t\tnextIsBar = false;\n\t\t\t\t}\n\t\t\t\t// TODO-PER: There doesn't seem to be a harm in letting ties be two different notes and it fixes a bug when a tie goes to a new line. If there aren't other problems with this change, then the variable can be removed completely. \n\t\t\t\t// if (isTiedToNext)\n\t\t\t\t// \tisTiedState = voiceTimeMilliseconds;\n\t\t\t}\n\t\t}\n\t\treturn { isTiedState: isTiedState, duration: realDuration / timeDivider, nextIsBar: nextIsBar || element.type === 'bar' };\n\t};\n\n\tthis.makeVoicesArray = function() {\n\t\t// First make a new array that is arranged by voice so that the repeats that span different lines are handled correctly.\n\t\tvar voicesArr = [];\n\t\tvar measureNumber = [];\n\t\tvar tempos = {};\n\t\tfor (var line = 0; line < this.engraver.staffgroups.length; line++) {\n\t\t\tvar group = this.engraver.staffgroups[line];\n\t\t\tif (group && group.staffs && group.staffs.length > 0) {\n\t\t\t\tvar firstStaff = group.staffs[0];\n\t\t\t\tvar middleC = firstStaff.absoluteY;\n\t\t\t\tvar top = middleC - firstStaff.top * spacing.STEP;\n\t\t\t\tvar lastStaff = group.staffs[group.staffs.length - 1];\n\t\t\t\tmiddleC = lastStaff.absoluteY;\n\t\t\t\tvar bottom = middleC - lastStaff.bottom * spacing.STEP;\n\t\t\t\tvar height = bottom - top;\n\n\t\t\t\tvar voices = group.voices;\n\t\t\t\tfor (var v = 0; v < voices.length; v++) {\n\t\t\t\t\tif (voices[v].staff && voices[v].staff.isTabStaff)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tvar noteFound = false;\n\t\t\t\t\tif (!voicesArr[v])\n\t\t\t\t\t\tvoicesArr[v] = [];\n\t\t\t\t\tif (measureNumber[v] === undefined)\n\t\t\t\t\t\tmeasureNumber[v] = 0;\n\t\t\t\t\tvar elements = voices[v].children;\n\t\t\t\t\tfor (var elem = 0; elem < elements.length; elem++) {\n\t\t\t\t\t\tif (elements[elem].type === \"tempo\")\n\t\t\t\t\t\t\ttempos[measureNumber[v]] = this.getBpm(elements[elem].abcelem);\n\t\t\t\t\t\tvoicesArr[v].push({top: top, height: height, line: group.line, measureNumber: measureNumber[v], elem: elements[elem]});\n\t\t\t\t\t\tif (elements[elem].type === 'bar' && noteFound) // Count the measures by counting the bar lines, but skip a bar line that appears at the left of the music, before any notes.\n\t\t\t\t\t\t\tmeasureNumber[v]++;\n\t\t\t\t\t\tif (elements[elem].type === 'note' || elements[elem].type === 'rest')\n\t\t\t\t\t\t\tnoteFound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.tempoLocations = tempos; // This should be passed back, but the function is accessible publicly so that would break the interface.\n\t\treturn voicesArr;\n\t};\n\n\tthis.setupEvents = function(startingDelay, timeDivider, startingBpm, warp) {\n\t\tif (!warp) warp = 1;\n\t\tvar timingEvents = [];\n\n\t\tvar eventHash = {};\n\t\t// The time is the number of seconds from the beginning of the piece.\n\t\t// The units we are scanning are in notation units (i.e. 0.25 is a quarter note)\n\t\tvar time = startingDelay;\n\t\tvar isTiedState;\n\t\tvar nextIsBar = true;\n\t\tvar voices = this.makeVoicesArray();\n\t\tvar maxVoiceTimeMilliseconds = 0;\n\t\tfor (var v = 0; v < voices.length; v++) {\n\t\t\tvar voiceTime = time;\n\t\t\tvar voiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\tvar startingRepeatElem = 0;\n\t\t\tvar endingRepeatElem = -1;\n\t\t\tvar elements = voices[v];\n\t\t\tvar bpm = startingBpm;\n\t\t\ttimeDivider = this.getBeatLength() * bpm / 60;\n\t\t\tvar tempoDone = -1;\n\t\t\tfor (var elem = 0; elem < elements.length; elem++) {\n\t\t\t\tvar thisMeasure = elements[elem].measureNumber;\n\t\t\t\tif (tempoDone !== thisMeasure && this.tempoLocations[thisMeasure]) {\n\t\t\t\t\tbpm = this.tempoLocations[thisMeasure];\n\t\t\t\t\ttimeDivider = warp * this.getBeatLength() * bpm / 60;\n\t\t\t\t\ttempoDone = thisMeasure;\n\t\t\t\t}\n\t\t\t\tvar element = elements[elem].elem;\n\t\t\t\tvar ret = this.addElementToEvents(eventHash, element, voiceTimeMilliseconds, elements[elem].top, elements[elem].height, elements[elem].line, elements[elem].measureNumber, timeDivider, isTiedState, nextIsBar);\n\t\t\t\tisTiedState = ret.isTiedState;\n\t\t\t\tnextIsBar = ret.nextIsBar;\n\t\t\t\tvoiceTime += ret.duration;\n\t\t\t\tvar lastHash;\n\t\t\t\tif (element.duration > 0 && eventHash[\"event\" + voiceTimeMilliseconds]) // This won't exist if this is the end of a tie.\n\t\t\t\t\tlastHash = \"event\" + voiceTimeMilliseconds;\n\t\t\t\tvoiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\t\tif (element.type === 'bar') {\n\t\t\t\t\tvar barType = element.abcelem.type;\n\t\t\t\t\tvar endRepeat = (barType === \"bar_right_repeat\" || barType === \"bar_dbl_repeat\");\n\t\t\t\t\tvar startEnding = (element.abcelem.startEnding === '1');\n\t\t\t\t\tvar startRepeat = (barType === \"bar_left_repeat\" || barType === \"bar_dbl_repeat\" || barType === \"bar_right_repeat\");\n\t\t\t\t\tif (endRepeat) {\n\t\t\t\t\t\t// Force the end of the previous note to the position of the measure - the cursor won't go past the end repeat\n\t\t\t\t\t\tif (elem > 0) {\n\t\t\t\t\t\t\teventHash[lastHash].endX = element.x;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (endingRepeatElem === -1)\n\t\t\t\t\t\t\tendingRepeatElem = elem;\n\t\t\t\t\t\tvar lastVoiceTimeMilliseconds = 0;\n\t\t\t\t\t\ttempoDone = -1;\n\t\t\t\t\t\tfor (var el2 = startingRepeatElem; el2 < endingRepeatElem; el2++) {\n\t\t\t\t\t\t\tthisMeasure = elements[el2].measureNumber;\n\t\t\t\t\t\t\tif (tempoDone !== thisMeasure && this.tempoLocations[thisMeasure]) {\n\t\t\t\t\t\t\t\tbpm = this.tempoLocations[thisMeasure];\n\t\t\t\t\t\t\t\ttimeDivider = warp * this.getBeatLength() * bpm / 60;\n\t\t\t\t\t\t\t\ttempoDone = thisMeasure;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar element2 = elements[el2].elem;\n\t\t\t\t\t\t\tret = this.addElementToEvents(eventHash, element2, voiceTimeMilliseconds, elements[el2].top, elements[el2].height, elements[el2].line, elements[el2].measureNumber, timeDivider, isTiedState, nextIsBar);\n\t\t\t\t\t\t\tisTiedState = ret.isTiedState;\n\t\t\t\t\t\t\tnextIsBar = ret.nextIsBar;\n\t\t\t\t\t\t\tvoiceTime += ret.duration;\n\t\t\t\t\t\t\tlastVoiceTimeMilliseconds = voiceTimeMilliseconds;\n\t\t\t\t\t\t\tvoiceTimeMilliseconds = Math.round(voiceTime * 1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (eventHash[\"event\" + lastVoiceTimeMilliseconds]) // This won't exist if it is the beginning of the next line. That's ok because we will just count the end of the last line as the end.\n\t\t\t\t\t\t\teventHash[\"event\" + lastVoiceTimeMilliseconds].endX = elements[endingRepeatElem].elem.x;\n\t\t\t\t\t\tnextIsBar = true;\n\t\t\t\t\t\tendingRepeatElem = -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startEnding)\n\t\t\t\t\t\tendingRepeatElem = elem;\n\t\t\t\t\tif (startRepeat)\n\t\t\t\t\t\tstartingRepeatElem = elem;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmaxVoiceTimeMilliseconds = Math.max(maxVoiceTimeMilliseconds, voiceTimeMilliseconds)\n\t\t}\n\t\t// now we have all the events, but if there are multiple voices then there may be events out of order or duplicated, so normalize it.\n\t\ttimingEvents = makeSortedArray(eventHash);\n\t\taddVerticalInfo(timingEvents);\n\t\taddEndPoints(this.lines, timingEvents)\n\t\ttimingEvents.push({ type: \"end\", milliseconds: maxVoiceTimeMilliseconds });\n\t\tthis.addUsefulCallbackInfo(timingEvents, bpm*warp);\n\t\treturn timingEvents;\n\t};\n\n\tthis.addUsefulCallbackInfo = function(timingEvents, bpm) {\n\t\tvar millisecondsPerMeasure = this.millisecondsPerMeasure(bpm);\n\t\tfor (var i = 0; i < timingEvents.length; i++) {\n\t\t\tvar ev = timingEvents[i];\n\t\t\tev.millisecondsPerMeasure = millisecondsPerMeasure;\n\t\t}\n\t};\n\n\tfunction skipTies(elements, index) {\n\t\twhile (index < elements.length && elements[index].left === null)\n\t\t\tindex++;\n\t\treturn elements[index];\n\t}\n\tfunction addEndPoints(lines, elements) {\n\t\tif (elements.length < 1)\n\t\t\treturn;\n\t\tfor (var i = 0; i < elements.length-1; i++) {\n\t\t\tvar el = elements[i];\n\t\t\tvar next = skipTies(elements, i+1);\n\t\t\tif (el.left !== null) {\n\t\t\t\t// If there is no left element that is because this is a tie so it should be skipped.\n\t\t\t\tvar endX = (next && el.top === next.top) ? next.left : lines[el.line].staffGroup.w;\n\t\t\t\t// If this is already set, it is because the notes aren't sequential here, like the next thing is a repeat bar line.\n\t\t\t\t// In that case, the right-most position is passed in. There could still be an intervening note in another voice, so always look for the closest position.\n\t\t\t\t// If there is a repeat that stays on the same line, the endX set above won't be right because the next note will be before. In that case, use the endX that was calculated.\n\t\t\t\tif (el.endX !== undefined) {\n\t\t\t\t\tif (endX > el.left)\n\t\t\t\t\t\tel.endX = Math.min(el.endX, endX);\n\t\t\t\t} else\n\t\t\t\t\tel.endX = endX;\n\t\t\t}\n\t\t}\n\t\tvar lastEl = elements[elements.length-1];\n\t\tlastEl.endX = lines[lastEl.line].staffGroup.w;\n\t}\n\n\tthis.getBpm = function(tempo) {\n\t\tvar bpm;\n\t\tif (!tempo)\n\t\t\ttempo = this.metaText ? this.metaText.tempo : null;\n\t\tif (tempo) {\n\t\t\tbpm = tempo.bpm;\n\t\t\tvar beatLength = this.getBeatLength();\n\t\t\tvar statedBeatLength = tempo.duration && tempo.duration.length > 0 ? tempo.duration[0] : beatLength;\n\t\t\tbpm = bpm * statedBeatLength / beatLength;\n\t\t}\n\t\tif (!bpm) {\n\t\t\tbpm = 180;\n\t\t\t// Compensate for compound meter, where the beat isn't a beat.\n\t\t\tvar meter = this.getMeterFraction();\n\t\t\tif (meter && meter.num !== 3 && (meter.num % 3 === 0)) {\n\t\t\t\tbpm = 120;\n\t\t\t}\n\t\t}\n\t\treturn bpm;\n\t};\n\n\tthis.setTiming = function (bpm, measuresOfDelay) {\n\t\tmeasuresOfDelay = measuresOfDelay || 0;\n\t\tif (!this.engraver || !this.engraver.staffgroups) {\n\t\t\tconsole.log(\"setTiming cannot be called before the tune is drawn.\");\n\t\t\tthis.noteTimings = [];\n\t\t\treturn this.noteTimings;\n\t\t}\n\n\t\tvar tempo = this.metaText ? this.metaText.tempo : null;\n\t\tvar naturalBpm = this.getBpm(tempo);\n\t\tvar warp = 1;\n\t\tif (bpm) {\n\t\t\tif (tempo)\n\t\t\t\twarp = bpm / naturalBpm;\n\t\t} else\n\t\t\tbpm = naturalBpm;\n\n\t\t// Calculate the basic midi data. We only care about the qpm variable here.\n\t\t//this.setUpAudio({qpm: bpm});\n\n\t\tvar beatLength = this.getBeatLength();\n\t\tvar beatsPerSecond = bpm / 60;\n\n\t\tvar measureLength = this.getBarLength();\n\n\t\tvar startingDelay = measureLength / beatLength * measuresOfDelay / beatsPerSecond;\n\t\tif (startingDelay)\n\t\t\tstartingDelay -= this.getPickupLength() / beatLength / beatsPerSecond;\n\t\tvar timeDivider = beatLength * beatsPerSecond;\n\n\t\tthis.noteTimings = this.setupEvents(startingDelay, timeDivider, bpm, warp);\n\t\tif (this.noteTimings.length > 0) {\n\t\t\tthis.totalTime = this.noteTimings[this.noteTimings.length - 1].milliseconds / 1000;\n\t\t\tthis.totalBeats = this.totalTime * beatsPerSecond;\n\t\t} else {\n\t\t\tthis.totalTime = undefined;\n\t\t\tthis.totalBeats = undefined;\n\t\t}\n\t\treturn this.noteTimings;\n\t};\n\n\tthis.setUpAudio = function(options) {\n\t\tif (!options) options = {};\n\t\tvar seq = sequence(this, options);\n\t\treturn flatten(seq, options, this.formatting.percmap, this.formatting.midi);\n\t};\n\tthis.deline = function(options) {\n\t\treturn delineTune(this.lines, options);\n\t}\n\tthis.findSelectableElement = function(target) {\n\t\tif (this.engraver && this.engraver.selectables)\n\t\t\treturn this.engraver.findSelectableElement(target)\n\t\treturn null\n\t}\n\tthis.getSelectableArray = function() {\n\t\tif (this.engraver && this.engraver.selectables)\n\t\t\treturn this.engraver.selectables\n\t\treturn []\n\t}\n};\n\nmodule.exports = Tune;\n","function delineTune(inputLines, options) {\n\tif (!options) options = {};\n\tvar lineBreaks = !!options.lineBreaks;\n\tvar outputLines = [];\n\tvar inMusicLine = false;\n\tvar currentMeter = [];\n\tvar currentKey = [];\n\tvar currentClef = [];\n\tvar currentVocalFont = [];\n\tvar currentGChordFont = [];\n\tvar currentTripletFont = [];\n\tvar currentAnnotationFont = [];\n\tfor (var i = 0; i < inputLines.length; i++) {\n\t\tvar inputLine = inputLines[i];\n\t\tif (inputLine.staff) {\n\t\t\tif (inMusicLine && !inputLine.vskip) {\n\t\t\t\tvar outputLine = outputLines[outputLines.length-1];\n\t\t\t\t//findMismatchKeys(inputLine, outputLine, [\"staff\", \"staffGroup\"], \"line\", i)\n\t\t\t\tfor (var s = 0; s < outputLine.staff.length; s++) {\n\t\t\t\t\tvar inputStaff = inputLine.staff[s];\n\t\t\t\t\tvar outputStaff = outputLine.staff[s];\n\t\t\t\t\tif (inputStaff) {\n\t\t\t\t\t\tif (!objEqual(inputStaff.meter, currentMeter[s])) {\n\t\t\t\t\t\t\t// The meter changed for this line, otherwise it wouldn't have been set\n\t\t\t\t\t\t\taddMeterToVoices(inputStaff.meter, inputStaff.voices)\n\t\t\t\t\t\t\tcurrentMeter[s] = inputStaff.meter;\n\t\t\t\t\t\t\tdelete inputStaff.meter;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.key, currentKey[s])) {\n\t\t\t\t\t\t\taddKeyToVoices(inputStaff.key, inputStaff.voices);\n\t\t\t\t\t\t\tcurrentKey[s] = inputStaff.key;\n\t\t\t\t\t\t\tdelete inputStaff.key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (inputStaff.title)\n\t\t\t\t\t\t\toutputStaff.abbrevTitle = inputStaff.title;\n\t\t\t\t\t\tif (!objEqual(inputStaff.clef, currentClef[s])) {\n\t\t\t\t\t\t\taddClefToVoices(inputStaff.clef, inputStaff.voices);\n\t\t\t\t\t\t\tcurrentClef[s] = inputStaff.clef;\n\t\t\t\t\t\t\tdelete inputStaff.clef;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.vocalfont, currentVocalFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.vocalfont, inputStaff.voices, 'vocalfont')\n\t\t\t\t\t\t\tcurrentVocalFont[s] = inputStaff.vocalfont;\n\t\t\t\t\t\t\tdelete inputStaff.vocalfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.gchordfont, currentGChordFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.gchordfont, inputStaff.voices, 'gchordfont')\n\t\t\t\t\t\t\tcurrentGChordFont[s] = inputStaff.gchordfont;\n\t\t\t\t\t\t\tdelete inputStaff.gchordfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.tripletfont, currentTripletFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.tripletfont, inputStaff.voices, 'tripletfont')\n\t\t\t\t\t\t\tcurrentTripletFont[s] = inputStaff.tripletfont;\n\t\t\t\t\t\t\tdelete inputStaff.tripletfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!objEqual(inputStaff.annotationfont, currentAnnotationFont[s])) {\n\t\t\t\t\t\t\taddFontToVoices(inputStaff.annotationfont, inputStaff.voices, 'annotationfont')\n\t\t\t\t\t\t\tcurrentAnnotationFont[s] = inputStaff.annotationfont;\n\t\t\t\t\t\t\tdelete inputStaff.annotationfont;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//findMismatchKeys(inputStaff, outputStaff, [\"voices\", \"title\", \"abbrevTitle\", \"barNumber\", \"meter\", \"key\", \"clef\", \"vocalfont\", \"gchordfont\", \"tripletfont\", \"annotationfont\"], \"staff\", i + ' ' + s)\n\t\t\t\t\tif (inputStaff) {\n\t\t\t\t\t\tfor (var v = 0; v < outputStaff.voices.length; v++) {\n\t\t\t\t\t\t\tvar outputVoice = outputStaff.voices[v];\n\t\t\t\t\t\t\tvar inputVoice = inputStaff.voices[v];\n\t\t\t\t\t\t\tif (lineBreaks)\n\t\t\t\t\t\t\t\toutputVoice.push({el_type: \"break\"});\n\t\t\t\t\t\t\tif (inputVoice)\n\t\t\t\t\t\t\t\toutputStaff.voices[v] = outputVoice.concat(inputVoice)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var ii = 0; ii < inputLine.staff.length; ii++) {\n\t\t\t\t\tcurrentKey[ii] = inputLine.staff[ii].key;\n\t\t\t\t\tcurrentMeter[ii] = inputLine.staff[ii].meter;\n\t\t\t\t\tcurrentClef[ii] = inputLine.staff[ii].clef;\n\t\t\t\t}\n\t\t\t\t// copy this because we are going to change it and we don't want to change the original.\n\t\t\t\toutputLines.push(cloneLine(inputLine));\n\t\t\t}\n\t\t\tinMusicLine = true;\n\t\t} else {\n\t\t\tinMusicLine = false;\n\t\t\toutputLines.push(inputLine);\n\t\t}\n\t}\n\treturn outputLines;\n}\n// function findMismatchKeys(input, output, ignore, context, context2) {\n// \tif (!input) {\n// \t\treturn;\n// \t}\n// \tvar outputKeys = Object.keys(output);\n// \tvar inputKeys = Object.keys(input);\n// \tfor (var ii = 0; ii < ignore.length; ii++) {\n// \t\tif (outputKeys.indexOf(ignore[ii]) >= 0) {\n// \t\t\toutputKeys.splice(outputKeys.indexOf(ignore[ii]), 1);\n// \t\t}\n// \t\tif (inputKeys.indexOf(ignore[ii]) >= 0) {\n// \t\t\tinputKeys.splice(inputKeys.indexOf(ignore[ii]), 1);\n// \t\t}\n// \t}\n// \tif (inputKeys.join(\",\") !== outputKeys.join(\",\")) {\n// \t\tconsole.log(\"keys mismatch \"+context + ' ' + context2, input, output);\n// \t}\n// \tfor (var k = 0; k < inputKeys.length; k++) {\n// \t\tvar key = inputKeys[k];\n// \t\tif (ignore.indexOf(key) < 0) {\n// \t\t\tvar inputValue = JSON.stringify(input[key], replacer);\n// \t\t\tvar outputValue = JSON.stringify(output[key], replacer);\n// \t\t\tif (inputValue !== outputValue)\n// \t\t\t\tconsole.log(\"value mismatch \"+context + ' ' + context2 + ' ' + key, inputValue, outputValue)\n// \t\t}\n// \t}\n// }\nfunction replacer(key, value) {\n\t// Filtering out properties\n\tif (key === 'abselem') {\n\t\treturn 'abselem';\n\t}\n\treturn value;\n}\n\nfunction addMeterToVoices(meter, voices) {\n\tmeter.el_type = \"meter\";\n\tmeter.startChar = -1;\n\tmeter.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(meter);\n\t}\n}\n\nfunction addKeyToVoices(key, voices) {\n\tkey.el_type = \"key\";\n\tkey.startChar = -1;\n\tkey.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(key);\n\t}\n}\n\nfunction addClefToVoices(clef, voices) {\n\tclef.el_type = \"clef\";\n\tclef.startChar = -1;\n\tclef.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(clef);\n\t}\n}\n\nfunction addFontToVoices(font, voices, type) {\n\tfont.el_type = \"font\";\n\tfont.type = type;\n\tfont.startChar = -1;\n\tfont.endChar = -1;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvoices[i].unshift(font);\n\t}\n}\n\nfunction objEqual(input, output) {\n\tif (!input)\n\t\treturn true; // the default is whatever the old output is.\n\tvar inputValue = JSON.stringify(input, replacer);\n\tvar outputValue = JSON.stringify(output, replacer);\n\treturn inputValue === outputValue;\n}\n\nfunction cloneLine(line) {\n\tvar output = {};\n\tvar keys = Object.keys(line);\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tif (keys[i] !== \"staff\")\n\t\t\toutput[keys[i]] = line[keys[i]];\n\t\telse {\n\t\t\toutput.staff = [];\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = {};\n\t\t\t\tvar keys2 = Object.keys(line.staff[j]);\n\t\t\t\tfor (var k = 0; k < keys2.length; k++) {\n\t\t\t\t\tif (keys2[k] !== \"voices\")\n\t\t\t\t\t\tstaff[keys2[k]] = line.staff[j][keys2[k]];\n\t\t\t\t\telse {\n\t\t\t\t\t\tstaff.voices = [];\n\t\t\t\t\t\tfor (var v = 0; v < line.staff[j].voices.length; v++) {\n\t\t\t\t\t\t\tstaff.voices.push([].concat(line.staff[j].voices[v]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toutput.staff.push(staff)\n\t\t\t}\n\t\t}\n\t}\n\treturn output;\n}\n\nmodule.exports = delineTune;\n","// abc_editor.js\n\n// window.ABCJS.Editor is the interface class for the area that contains the ABC text. It is responsible for\n// holding the text of the tune and calling the parser and the rendering engines.\n//\n// EditArea is an example of using a textarea as the control that is shown to the user. As long as\n// the same interface is used, window.ABCJS.Editor can use a different type of object.\n//\n// EditArea:\n// - constructor(textareaid)\n//\t\tThis contains the id of a textarea control that will be used.\n// - addSelectionListener(listener)\n//\t\tA callback class that contains the entry point fireSelectionChanged()\n// - addChangeListener(listener)\n//\t\tA callback class that contains the entry point fireChanged()\n// - getSelection()\n//\t\treturns the object { start: , end: } with the current selection in characters\n// - setSelection(start, end)\n//\t\tstart and end are the character positions that should be selected.\n// - getString()\n//\t\treturns the ABC text that is currently displayed.\n// - setString(str)\n//\t\tsets the ABC text that is currently displayed, and resets the initialText variable\n// - getElem()\n//\t\treturns the textarea element\n// - string initialText\n//\t\tContains the starting text. This can be compared against the current text to see if anything changed.\n//\n\n// Polyfill for CustomEvent for old IE versions\ntry {\n\tif (typeof window.CustomEvent !== \"function\") {\n\t\tvar CustomEvent = function (event, params) {\n\t\t\tparams = params || {bubbles: false, cancelable: false, detail: undefined};\n\t\t\tvar evt = document.createEvent('CustomEvent');\n\t\t\tevt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n\t\t\treturn evt;\n\t\t};\n\t\tCustomEvent.prototype = window.Event.prototype;\n\t\twindow.CustomEvent = CustomEvent;\n\t}\n} catch (e) {\n\t// if we aren't in a browser, this code will crash, but it is not needed then either.\n}\n\nvar EditArea = function(textareaid) {\n if (typeof textareaid === \"string\")\n this.textarea = document.getElementById(textareaid);\n else\n this.textarea = textareaid;\n this.initialText = this.textarea.value;\n this.isDragging = false;\n}\n\nEditArea.prototype.addSelectionListener = function(listener) {\n this.textarea.onmousemove = function(ev) {\n\t if (this.isDragging)\n\t listener.fireSelectionChanged();\n };\n};\n\nEditArea.prototype.addChangeListener = function(listener) {\n this.changelistener = listener;\n this.textarea.onkeyup = function() {\n listener.fireChanged();\n };\n this.textarea.onmousedown = function() {\n\tthis.isDragging = true;\n listener.fireSelectionChanged();\n };\n this.textarea.onmouseup = function() {\n\tthis.isDragging = false;\n listener.fireChanged();\n };\n this.textarea.onchange = function() {\n listener.fireChanged();\n };\n};\n\n//TODO won't work under IE?\nEditArea.prototype.getSelection = function() {\n return {start: this.textarea.selectionStart, end: this.textarea.selectionEnd};\n};\n\nEditArea.prototype.setSelection = function(start, end) {\n\tif(this.textarea.setSelectionRange)\n\t this.textarea.setSelectionRange(start, end);\n\telse if(this.textarea.createTextRange) {\n\t\t// For IE8\n\t var e = this.textarea.createTextRange();\n\t e.collapse(true);\n\t e.moveEnd('character', end);\n\t e.moveStart('character', start);\n\t e.select();\n\t}\n this.textarea.focus();\n};\n\nEditArea.prototype.getString = function() {\n return this.textarea.value;\n};\n\nEditArea.prototype.setString = function(str) {\n this.textarea.value = str;\n this.initialText = this.getString();\n if (this.changelistener) {\n this.changelistener.fireChanged();\n }\n};\n\nEditArea.prototype.getElem = function() {\n return this.textarea;\n};\n\nmodule.exports = EditArea;\n","// window.ABCJS.Editor:\n//\n// constructor(editarea, params)\n//\t\tif editarea is a string, then it is an HTML id of a textarea control.\n//\t\tOtherwise, it should be an instantiation of an object that expresses the EditArea interface.\n//\n//\t\tparams is a hash of:\n//\t\tcanvas_id: or paper_id: HTML id to draw in. If not present, then the drawing happens just below the editor.\n//\t\tgenerate_midi: if present, then midi is generated.\n//\t\tmidi_id: if present, the HTML id to place the midi control. Otherwise it is placed in the same div as the paper.\n//\t\tmidi_download_id: if present, the HTML id to place the midi download link. Otherwise it is placed in the same div as the paper.\n//\t\tgenerate_warnings: if present, then parser warnings are displayed on the page.\n//\t\twarnings_id: if present, the HTML id to place the warnings. Otherwise they are placed in the same div as the paper.\n//\t\tonchange: if present, the callback function to call whenever there has been a change.\n//\t\tgui: if present, the paper can send changes back to the editor (presumably because the user changed something directly.)\n//\t\tparser_options: options to send to the parser engine.\n//\t\tmidi_options: options to send to the midi engine.\n//\t\trender_options: options to send to the render engine.\n//\t\tindicate_changed: the dirty flag is set if this is true.\n//\n// - setReadOnly(bool)\n//\t\tadds or removes the class abc_textarea_readonly, and adds or removes the attribute readonly=yes\n// - setDirtyStyle(bool)\n//\t\tadds or removes the class abc_textarea_dirty\n// - modelChanged()\n//\t\tCalled when the model has been changed to trigger re-rendering\n// - parseABC()\n//\t\tCalled internally by fireChanged()\n//\t\treturns true if there has been a change since last call.\n// - updateSelection()\n//\t\tCalled when the user has changed the selection. This calls the engraver to show the selection.\n// - fireSelectionChanged()\n//\t\tCalled by the textarea object when the user has changed the selection.\n// - paramChanged(engraverparams)\n//\t\tCalled to signal that the engraver params have changed, so re-rendering should occur.\n// - fireChanged()\n//\t\tCalled by the textarea object when the user has changed something.\n// - setNotDirty()\n//\t\tCalled by the client app to reset the dirty flag\n// - isDirty()\n//\t\tReturns true or false, whether the textarea contains the same text that it started with.\n// - highlight(abcelem)\n//\t\tCalled by the engraver to highlight an area.\n// - pause(bool)\n//\t\tStops the automatic rendering when the user is typing.\n//\nvar parseCommon = require('../parse/abc_common');\nvar SynthController = require('../synth/synth-controller');\nvar supportsAudio = require('../synth/supports-audio');\nvar renderAbc = require('../api/abc_tunebook_svg');\nvar EditArea = require('./abc_editarea');\n\nfunction gatherAbcParams(params) {\n\t// There used to be a bunch of ways parameters can be passed in. This just simplifies it.\n\tvar abcjsParams = {};\n\tvar key;\n\tif (params.abcjsParams) {\n\t\tfor (key in params.abcjsParams) {\n\t\t\tif (params.abcjsParams.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.abcjsParams[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.midi_options) {\n\t\tfor (key in params.midi_options) {\n\t\t\tif (params.midi_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.midi_options[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.parser_options) {\n\t\tfor (key in params.parser_options) {\n\t\t\tif (params.parser_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.parser_options[key];\n\t\t\t}\n\t\t}\n\t}\n\tif (params.render_options) {\n\t\tfor (key in params.render_options) {\n\t\t\tif (params.render_options.hasOwnProperty(key)) {\n\t\t\t\tabcjsParams[key] = params.render_options[key];\n\t\t\t}\n\t\t}\n\t}\n\t/*\n\tif (params.tablature_options) {\n\t\tabcjsParams['tablatures'] = params.tablature_options;\n\t}\n\t*/\n\tif (abcjsParams.tablature) {\n\t\tif (params.warnings_id) {\n\t\t\t// store for plugin error handling\n\t\t\tabcjsParams.tablature.warnings_id = params.warnings_id;\n\t\t}\n\t}\n\treturn abcjsParams;\n}\n\nvar Editor = function(editarea, params) {\n\t// Copy all the options that will be passed through\n\tthis.abcjsParams = gatherAbcParams(params);\n\n\tif (params.indicate_changed)\n\t\tthis.indicate_changed = true;\n if (typeof editarea === \"string\") {\n this.editarea = new EditArea(editarea);\n } else {\n this.editarea = editarea;\n }\n this.editarea.addSelectionListener(this);\n this.editarea.addChangeListener(this);\n\n if (params.canvas_id) {\n this.div = params.canvas_id;\n } else if (params.paper_id) {\n this.div = params.paper_id;\n } else {\n this.div = document.createElement(\"DIV\");\n this.editarea.getElem().parentNode.insertBefore(this.div, this.editarea.getElem());\n }\n if (typeof this.div === 'string')\n\t this.div = document.getElementById(this.div);\n\n if (params.selectionChangeCallback) {\n \tthis.selectionChangeCallback = params.selectionChangeCallback;\n }\n\n this.clientClickListener = this.abcjsParams.clickListener;\n this.abcjsParams.clickListener = this.highlight.bind(this);\n\n if (params.synth) {\n \tif (supportsAudio()) {\n\t this.synth = {\n\t\t el: params.synth.el,\n\t\t cursorControl: params.synth.cursorControl,\n\t\t options: params.synth.options\n\t };\n }\n }\n\t// If the user wants midi, then store the elements that it will be written to. The element could either be passed in as an id,\n\t// an element, or nothing. If nothing is passed in, then just put the midi on top of the generated music.\n\tif (params.generate_midi) {\n\t \tthis.generate_midi = params.generate_midi;\n\t\tif (this.abcjsParams.generateDownload) {\n\t\t\tif (typeof params.midi_download_id === 'string')\n\t\t\t\tthis.downloadMidi = document.getElementById(params.midi_download_id);\n\t\t\telse if (params.midi_download_id) // assume, if the var is not a string it is an element. If not, it will crash soon enough.\n\t\t\t\tthis.downloadMidi = params.midi_download_id;\n\t\t}\n\t\tif (this.abcjsParams.generateInline !== false) { // The default for this is true, so undefined is also true.\n\t\t\tif (typeof params.midi_id === 'string')\n\t\t\t\tthis.inlineMidi = document.getElementById(params.midi_id);\n\t\t\telse if (params.midi_id) // assume, if the var is not a string it is an element. If not, it will crash soon enough.\n\t\t\t\tthis.inlineMidi = params.midi_id;\n\t\t}\n\t}\n\n if (params.warnings_id) {\n \tif (typeof(params.warnings_id) === \"string\")\n this.warningsdiv = document.getElementById(params.warnings_id);\n \telse\n\t\tthis.warningsdiv = params.warnings_id;\n } else if (params.generate_warnings) {\n\t this.warningsdiv = document.createElement(\"div\");\n\t this.div.parentNode.insertBefore(this.warningsdiv, this.div);\n }\n\n this.onchangeCallback = params.onchange;\n\n this.currentAbc = \"\";\n this.tunes = [];\n this.bReentry = false;\n this.parseABC();\n this.modelChanged();\n\n this.addClassName = function(element, className) {\n var hasClassName = function(element, className) {\n var elementClassName = element.className;\n return (elementClassName.length > 0 && (elementClassName === className ||\n new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n };\n\n if (!hasClassName(element, className))\n element.className += (element.className ? ' ' : '') + className;\n return element;\n };\n\n this.removeClassName = function(element, className) {\n element.className = parseCommon.strip(element.className.replace(\n new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' '));\n return element;\n };\n\n this.setReadOnly = function(readOnly) {\n\t var readonlyClass = 'abc_textarea_readonly';\n\t var el = this.editarea.getElem();\n if (readOnly) {\n el.setAttribute('readonly', 'yes');\n\t this.addClassName(el, readonlyClass);\n\t} else {\n el.removeAttribute('readonly');\n\t this.removeClassName(el, readonlyClass);\n }\n };\n};\n\nEditor.prototype.redrawMidi = function() {\n\tif (this.generate_midi && !this.midiPause) {\n\t\tvar event = new window.CustomEvent(\"generateMidi\", {\n\t\t\tdetail: {\n\t\t\t\ttunes: this.tunes,\n\t\t\t\tabcjsParams: this.abcjsParams,\n\t\t\t\tdownloadMidiEl: this.downloadMidi,\n\t\t\t\tinlineMidiEl: this.inlineMidi,\n\t\t\t\tengravingEl: this.div\n\t\t\t}\n\t\t});\n\t\twindow.dispatchEvent(event);\n\t}\n\tif (this.synth) {\n\t\tvar userAction = this.synth.synthControl; // Can't really tell if there was a user action before drawing, but we assume that if the synthControl was created already there was a user action.\n\t\tif (!this.synth.synthControl) {\n\t\t\tthis.synth.synthControl = new SynthController();\n\t\t\tthis.synth.synthControl.load(this.synth.el, this.synth.cursorControl, this.synth.options);\n\t\t}\n\t\tthis.synth.synthControl.setTune(this.tunes[0], userAction, this.synth.options);\n\t}\n};\n\nEditor.prototype.modelChanged = function() {\n if (this.bReentry)\n return; // TODO is this likely? maybe, if we rewrite abc immediately w/ abc2abc\n\tthis.bReentry = true;\n\ttry {\n\t\tthis.timerId = null;\n\t\tif (this.synth && this.synth.synthControl)\n\t\t\tthis.synth.synthControl.disable(true);\n\n\t\tthis.tunes = renderAbc(this.div, this.currentAbc, this.abcjsParams);\n\t\tif (this.tunes.length > 0) {\n\t\t\tthis.warnings = this.tunes[0].warnings;\n\t\t}\n\t\tthis.redrawMidi();\n\t} catch(error) {\n\t\tconsole.error(\"ABCJS error: \", error);\n\t\tif (!this.warnings)\n\t\t\tthis.warnings = [];\n\t\tthis.warnings.push(error.message);\n\t}\n\n if (this.warningsdiv) {\n this.warningsdiv.innerHTML = (this.warnings) ? this.warnings.join(\"
\") : \"No errors\";\n }\n this.updateSelection();\n this.bReentry = false;\n};\n\n// Call this to reparse in response to the client changing the parameters on the fly\nEditor.prototype.paramChanged = function(engraverParams) {\n\tif (engraverParams) {\n\t\tfor (var key in engraverParams) {\n\t\t\tif (engraverParams.hasOwnProperty(key)) {\n\t\t\t\tthis.abcjsParams[key] = engraverParams[key];\n\t\t\t}\n\t\t}\n\t}\n\tthis.currentAbc = \"\";\n\tthis.fireChanged();\n};\n\nEditor.prototype.synthParamChanged = function(options) {\n\tif (!this.synth)\n\t\treturn;\n\tthis.synth.options = {};\n\tif (options) {\n\t\tfor (var key in options) {\n\t\t\tif (options.hasOwnProperty(key)) {\n\t\t\t\tthis.synth.options[key] = options[key];\n\t\t\t}\n\t\t}\n\t}\n\tthis.currentAbc = \"\";\n\tthis.fireChanged();\n};\n\n// return true if the model has changed\nEditor.prototype.parseABC = function() {\n var t = this.editarea.getString();\n if (t===this.currentAbc) {\n this.updateSelection();\n return false;\n }\n\n this.currentAbc = t;\n return true;\n};\n\nEditor.prototype.updateSelection = function() {\n var selection = this.editarea.getSelection();\n try {\n \tif (this.tunes.length > 0 && this.tunes[0].engraver)\n\t this.tunes[0].engraver.rangeHighlight(selection.start, selection.end);\n } catch (e) {} // maybe printer isn't defined yet?\n\tif (this.selectionChangeCallback)\n\t\tthis.selectionChangeCallback(selection.start, selection.end);\n};\n\n// Called when the textarea's selection is in the process of changing (after mouse down, dragging, or keyboard arrows)\nEditor.prototype.fireSelectionChanged = function() {\n this.updateSelection();\n};\n\nEditor.prototype.setDirtyStyle = function(isDirty) {\n\tif (this.indicate_changed === undefined)\n\t\treturn;\n var addClassName = function(element, className) {\n var hasClassName = function(element, className) {\n var elementClassName = element.className;\n return (elementClassName.length > 0 && (elementClassName === className ||\n new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\").test(elementClassName)));\n };\n\n if (!hasClassName(element, className))\n element.className += (element.className ? ' ' : '') + className;\n return element;\n };\n\n var removeClassName = function(element, className) {\n element.className = parseCommon.strip(element.className.replace(\n new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\"), ' '));\n return element;\n };\n\n\tvar readonlyClass = 'abc_textarea_dirty';\n\tvar el = this.editarea.getElem();\n\tif (isDirty) {\n\t\taddClassName(el, readonlyClass);\n\t} else {\n\t\tremoveClassName(el, readonlyClass);\n }\n};\n\n// call when the textarea alerts us that the abc text is changed and needs re-parsing\nEditor.prototype.fireChanged = function() {\n if (this.bIsPaused)\n return;\n if (this.parseABC()) {\n var self = this;\n if (this.timerId)\t// If the user is still typing, cancel the update\n clearTimeout(this.timerId);\n this.timerId = setTimeout(function () {\n self.modelChanged();\n }, 300);\t// Is this a good compromise between responsiveness and not redrawing too much?\n\t var isDirty = this.isDirty();\n\t if (this.wasDirty !== isDirty) {\n\t\t this.wasDirty = isDirty;\n\t\t this.setDirtyStyle(isDirty);\n\t }\n\t if (this.onchangeCallback)\n\t\t this.onchangeCallback(this);\n\t }\n};\n\nEditor.prototype.setNotDirty = function() {\n\tthis.editarea.initialText = this.editarea.getString();\n\tthis.wasDirty = false;\n\tthis.setDirtyStyle(false);\n};\n\nEditor.prototype.isDirty = function() {\n\tif (this.indicate_changed === undefined)\n\t\treturn false;\n\treturn this.editarea.initialText !== this.editarea.getString();\n};\n\nEditor.prototype.highlight = function(abcelem, tuneNumber, classes, analysis, drag, mouseEvent) {\n\t// TODO-PER: The marker appears to get off by one for each tune parsed. I'm not sure why, but adding the tuneNumber in corrects it for the time being.\n//\tvar offset = (tuneNumber !== undefined) ? this.startPos[tuneNumber] + tuneNumber : 0;\n\n this.editarea.setSelection(abcelem.startChar, abcelem.endChar);\n\tif (this.selectionChangeCallback)\n\t\tthis.selectionChangeCallback(abcelem.startChar, abcelem.endChar);\n\tif (this.clientClickListener)\n\t\tthis.clientClickListener(abcelem, tuneNumber, classes, analysis, drag, mouseEvent);\n};\n\nEditor.prototype.pause = function(shouldPause) {\n\tthis.bIsPaused = shouldPause;\n\tif (!shouldPause)\n\t\tthis.fireChanged();\n};\n\nEditor.prototype.millisecondsPerMeasure = function() {\n\tif (!this.synth || !this.synth.synthControl || !this.synth.synthControl.visualObj)\n\t\treturn 0;\n\treturn this.synth.synthControl.visualObj.millisecondsPerMeasure();\n};\n\nEditor.prototype.pauseMidi = function(shouldPause) {\n\tthis.midiPause = shouldPause;\n\tif (!shouldPause)\n\t\tthis.redrawMidi();\n};\n\nmodule.exports = Editor;\n","// abc_midi_create.js: Turn a linear series of events into a midi file.\n\nvar rendererFactory = require('../synth/abc_midi_renderer');\n\nvar create;\n\n(function() {\n\t\"use strict\";\n\n\tvar baseDuration = 480*4; // nice and divisible, equals 1 whole note\n\n\tcreate = function create(abcTune, options) {\n\t\tif (options === undefined) options = {};\n\t\tvar commands = abcTune.setUpAudio(options);\n\t\tvar midi = rendererFactory();\n\t\tvar title = abcTune.metaText ? abcTune.metaText.title : undefined;\n\t\tif (title && title.length > 128) title = title.substring(0, 124) + '...';\n\t\tvar key = abcTune.getKeySignature();\n\t\tvar time = abcTune.getMeterFraction();\n\n\t\t// MAE 7 July 2024 - Fix for */8 meter tempos\n\t\tvar tempo = commands.tempo;\n\n\t\tvar beatsPerSecond = tempo / 60;\n\n\t\t// Fix tempo for */8 meters\n\t\tif (time.den == 8){\n\n\t\t\t// Compute the tempo based on the actual milliseconds per measure, scaled by the number of eight notes and halved to get tempo in bpm.\n\t\t\tvar msPerMeasure = abcTune.millisecondsPerMeasure();\n\t\t\t\n\t\t\ttempo = (60000 / (msPerMeasure/time.num)) / 2;\n\t\t\t\n\t\t\tbeatsPerSecond = tempo/60;\n\n\t\t}\n\n\t\t//var beatLength = abcTune.getBeatLength();\n\t\tmidi.setGlobalInfo(tempo, title, key, time);\n\t\t\n\t\tfor (var i = 0; i < commands.tracks.length; i++) {\n\t\t\tmidi.startTrack();\n\t\t\tvar notePlacement = {};\n\t\t\tfor (var j = 0; j < commands.tracks[i].length; j++) {\n\t\t\t\tvar event = commands.tracks[i][j];\n\t\t\t\tswitch (event.cmd) {\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\tmidi.setText(event.type, event.text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'program':\n\t\t\t\t\t\tvar pan = 0;\n\t\t\t\t\t\tif (options.pan && options.pan.length > i)\n\t\t\t\t\t\t\tpan = options.pan[i];\n\t\t\t\t\t\tif (event.instrument === 128) {\n\t\t\t\t\t\t\t// If we're using the percussion voice, change to Channel 10\n\t\t\t\t\t\t\tmidi.setChannel(9, pan);\n\t\t\t\t\t\t\tmidi.setInstrument(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmidi.setChannel(event.channel, pan);\n\t\t\t\t\t\t\tmidi.setInstrument(event.instrument);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'note':\n\t\t\t\t\t\tvar gapLengthInBeats = event.gap * beatsPerSecond;\n\t\t\t\t\t\tvar start = event.start;\n\t\t\t\t\t\t// The staccato and legato are indicated by event.gap.\n\t\t\t\t\t\t// event.gap is in seconds but the durations are in whole notes.\n\t\t\t\t\t\tvar end = start + event.duration - gapLengthInBeats;\n\t\t\t\t\t\tif (!notePlacement[start])\n\t\t\t\t\t\t\tnotePlacement[start] = [];\n\t\t\t\t\t\tnotePlacement[start].push({ pitch: event.pitch, volume: event.volume, cents: event.cents });\n\t\t\t\t\t\tif (!notePlacement[end])\n\t\t\t\t\t\t\tnotePlacement[end] = [];\n\t\t\t\t\t\tnotePlacement[end].push({ pitch: event.pitch, volume: 0 });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.log(\"MIDI create Unknown: \" + event.cmd);\n\t\t\t\t}\n\t\t\t}\n\t\t\taddNotes(midi, notePlacement, baseDuration);\n\t\t\tmidi.endTrack();\n\t\t}\n\n\t\treturn midi.getData();\n\t};\n\n\tfunction addNotes(midi, notePlacement, baseDuration) {\n\t\tvar times = Object.keys(notePlacement);\n\t\tfor (var h = 0; h < times.length; h++)\n\t\t\ttimes[h] = parseFloat(times[h]);\n\t\ttimes.sort(function(a,b) {\n\t\t\treturn a - b;\n\t\t});\n\t\tvar lastTime = 0;\n\t\tfor (var i = 0; i < times.length; i++) {\n\t\t\tvar events = notePlacement[times[i]];\n\t\t\tif (times[i] > lastTime) {\n\t\t\t\tvar distance = (times[i] - lastTime) * baseDuration;\n\t\t\t\tmidi.addRest(distance);\n\t\t\t\tlastTime = times[i];\n\t\t\t}\n\t\t\tfor (var j = 0; j < events.length; j++) {\n\t\t\t\tvar event = events[j];\n\t\t\t\tif (event.volume) {\n\t\t\t\t\tmidi.startNote(event.pitch, event.volume, event.cents);\n\t\t\t\t} else {\n\t\t\t\t\tmidi.endNote(event.pitch);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n})();\n\nmodule.exports = create;\n","// abc_common.js: Some common utility functions.\n\nvar parseCommon = {};\n\nparseCommon.cloneArray = function(source) {\n\tvar destination = [];\n\tfor (var i = 0; i < source.length; i++) {\n\t\tdestination.push(Object.assign({},source[i]));\n\t}\n\treturn destination;\n};\n\nparseCommon.cloneHashOfHash = function(source) {\n\tvar destination = {};\n\tfor (var property in source)\n\t\tif (source.hasOwnProperty(property))\n\t\t\tdestination[property] = Object.assign({},source[property]);\n\treturn destination;\n};\n\nparseCommon.cloneHashOfArrayOfHash = function(source) {\n\tvar destination = {};\n\tfor (var property in source)\n\t\tif (source.hasOwnProperty(property))\n\t\t\tdestination[property] = parseCommon.cloneArray(source[property]);\n\treturn destination;\n};\n\nparseCommon.strip = function(str) {\n\treturn str.replace(/^\\s+/, '').replace(/\\s+$/, '');\n};\n\nparseCommon.startsWith = function(str, pattern) {\n\treturn str.indexOf(pattern) === 0;\n};\n\nparseCommon.endsWith = function(str, pattern) {\n\tvar d = str.length - pattern.length;\n\treturn d >= 0 && str.lastIndexOf(pattern) === d;\n};\n\nparseCommon.last = function(arr) {\n\tif (arr.length === 0)\n\t\treturn null;\n\treturn arr[arr.length-1];\n};\n\n\nmodule.exports = parseCommon;\n","// abc_parse.js: parses a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = require('./abc_common');\nvar parseDirective = require('./abc_parse_directive');\nvar ParseHeader = require('./abc_parse_header');\nvar ParseMusic = require('./abc_parse_music');\nvar Tokenizer = require('./abc_tokenizer');\nvar wrap = require('./wrap_lines');\n\nvar Tune = require('../data/abc_tune');\nvar TuneBuilder = require('../parse/tune-builder');\n\nvar Parse = function() {\n\t\"use strict\";\n\tvar tune = new Tune();\n\tvar tuneBuilder = new TuneBuilder(tune);\n\tvar tokenizer;\n\tvar wordsContinuation = '';\n\tvar symbolContinuation = '';\n\n\tthis.getTune = function() {\n\t\tvar t = {\n\t\t\tformatting: tune.formatting,\n\t\t\tlines: tune.lines,\n\t\t\tmedia: tune.media,\n\t\t\tmetaText: tune.metaText,\n\t\t\tmetaTextInfo: tune.metaTextInfo,\n\t\t\tversion: tune.version,\n\n\t\t\taddElementToEvents: tune.addElementToEvents,\n\t\t\taddUsefulCallbackInfo: tune.addUsefulCallbackInfo,\n\t\t\tgetTotalTime: tune.getTotalTime,\n\t\t\tgetTotalBeats: tune.getTotalBeats,\n\t\t\tgetBarLength: tune.getBarLength,\n\t\t\tgetBeatLength: tune.getBeatLength,\n\t\t\tgetBeatsPerMeasure: tune.getBeatsPerMeasure,\n\t\t\tgetBpm: tune.getBpm,\n\t\t\tgetMeter: tune.getMeter,\n\t\t\tgetMeterFraction: tune.getMeterFraction,\n\t\t\tgetPickupLength: tune.getPickupLength,\n\t\t\tgetKeySignature: tune.getKeySignature,\n\t\t\tgetElementFromChar: tune.getElementFromChar,\n\t\t\tmakeVoicesArray: tune.makeVoicesArray,\n\t\t\tmillisecondsPerMeasure: tune.millisecondsPerMeasure,\n\t\t\tsetupEvents: tune.setupEvents,\n\t\t\tsetTiming: tune.setTiming,\n\t\t\tsetUpAudio: tune.setUpAudio,\n\t\t\tdeline: tune.deline,\n\t\t\tfindSelectableElement: tune.findSelectableElement,\n\t\t\tgetSelectableArray: tune.getSelectableArray,\n\t\t};\n\t\tif (tune.lineBreaks)\n\t\t\tt.lineBreaks = tune.lineBreaks;\n\t\tif (tune.visualTranspose)\n\t\t\tt.visualTranspose = tune.visualTranspose;\n\t\treturn t;\n\t};\n\n\tfunction addPositioning(el, type, value) {\n\t\tif (!el.positioning) el.positioning = {};\n\t\tel.positioning[type] = value;\n\t}\n\n\tfunction addFont(el, type, value) {\n\t\tif (!el.fonts) el.fonts = {};\n\t\tel.fonts[type] = value;\n\t}\n\n\tvar multilineVars = {\n\t\treset: function() {\n\t\t\tfor (var property in this) {\n\t\t\t\tif (this.hasOwnProperty(property) && typeof this[property] !== \"function\") {\n\t\t\t\t\tdelete this[property];\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.iChar = 0;\n\t\t\tthis.key = {accidentals: [], root: 'none', acc: '', mode: '' };\n\t\t\tthis.meter = null; // if no meter is specified, free meter is assumed\n\t\t\tthis.origMeter = null;\t// this is for new voices that are created after we set the meter.\n\t\t\tthis.hasMainTitle = false;\n\t\t\tthis.default_length = 0.125;\n\t\t\tthis.clef = { type: 'treble', verticalPos: 0 };\n\t\t\tthis.octave = 0;\n\t\t\tthis.next_note_duration = 0;\n\t\t\tthis.start_new_line = true;\n\t\t\tthis.is_in_header = true;\n\t\t\tthis.partForNextLine = {};\n\t\t\tthis.tempoForNextLine = [];\n\t\t\tthis.havent_set_length = true;\n\t\t\tthis.voices = {};\n\t\t\tthis.staves = [];\n\t\t\tthis.macros = {};\n\t\t\tthis.currBarNumber = 1;\n\t\t\tthis.barCounter = {};\n\t\t\tthis.ignoredDecorations = [];\n\t\t\tthis.score_is_present = false;\t// Can't have original V: lines when there is the score directive\n\t\t\tthis.inEnding = false;\n\t\t\tthis.inTie = [];\n\t\t\tthis.inTieChord = {};\n\t\t\tthis.vocalPosition = \"auto\";\n\t\t\tthis.dynamicPosition = \"auto\";\n\t\t\tthis.chordPosition = \"auto\";\n\t\t\tthis.ornamentPosition = \"auto\";\n\t\t\tthis.volumePosition = \"auto\";\n\t\t\tthis.openSlurs = [];\n\t\t\tthis.freegchord = false;\n\t\t\tthis.endingHoldOver = {};\n\t\t},\n\t\tdifferentFont: function(type, defaultFonts) {\n\t\t\tif (this[type].decoration !== defaultFonts[type].decoration) return true;\n\t\t\tif (this[type].face !== defaultFonts[type].face) return true;\n\t\t\tif (this[type].size !== defaultFonts[type].size) return true;\n\t\t\tif (this[type].style !== defaultFonts[type].style) return true;\n\t\t\tif (this[type].weight !== defaultFonts[type].weight) return true;\n\t\t\treturn false;\n\t\t},\n\t\taddFormattingOptions: function(el, defaultFonts, elType) {\n\t\t\tif (elType === 'note') {\n\t\t\t\tif (this.vocalPosition !== 'auto') addPositioning(el, 'vocalPosition', this.vocalPosition);\n\t\t\t\tif (this.dynamicPosition !== 'auto') addPositioning(el, 'dynamicPosition', this.dynamicPosition);\n\t\t\t\tif (this.chordPosition !== 'auto') addPositioning(el, 'chordPosition', this.chordPosition);\n\t\t\t\tif (this.ornamentPosition !== 'auto') addPositioning(el, 'ornamentPosition', this.ornamentPosition);\n\t\t\t\tif (this.volumePosition !== 'auto') addPositioning(el, 'volumePosition', this.volumePosition);\n\t\t\t\tif (this.differentFont(\"annotationfont\", defaultFonts)) addFont(el, 'annotationfont', this.annotationfont);\n\t\t\t\tif (this.differentFont(\"gchordfont\", defaultFonts)) addFont(el, 'gchordfont', this.gchordfont);\n\t\t\t\tif (this.differentFont(\"vocalfont\", defaultFonts)) addFont(el, 'vocalfont', this.vocalfont);\n\t\t\t\tif (this.differentFont(\"tripletfont\", defaultFonts)) addFont(el, 'tripletfont', this.tripletfont);\n\t\t\t} else if (elType === 'bar') {\n\t\t\t\tif (this.dynamicPosition !== 'auto') addPositioning(el, 'dynamicPosition', this.dynamicPosition);\n\t\t\t\tif (this.chordPosition !== 'auto') addPositioning(el, 'chordPosition', this.chordPosition);\n\t\t\t\tif (this.ornamentPosition !== 'auto') addPositioning(el, 'ornamentPosition', this.ornamentPosition);\n\t\t\t\tif (this.volumePosition !== 'auto') addPositioning(el, 'volumePosition', this.volumePosition);\n\t\t\t\tif (this.differentFont(\"measurefont\", defaultFonts)) addFont(el, 'measurefont', this.measurefont);\n\t\t\t\tif (this.differentFont(\"repeatfont\", defaultFonts)) addFont(el, 'repeatfont', this.repeatfont);\n\t\t\t}\n\t\t},\n\t\tduplicateStartEndingHoldOvers: function() {\n\t\t\tthis.endingHoldOver = {\n\t\t\t\tinTie: [],\n\t\t\t\tinTieChord: {}\n\t\t\t};\n\t\t\tfor (var i = 0; i < this.inTie.length; i++) {\n\t\t\t\tthis.endingHoldOver.inTie.push([]);\n\t\t\t\tif (this.inTie[i]) { // if a voice is suppressed there might be a gap in the array.\n\t\t\t\t\tfor (var j = 0; j < this.inTie[i].length; j++) {\n\t\t\t\t\t\tthis.endingHoldOver.inTie[i].push(this.inTie[i][j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in this.inTieChord) {\n\t\t\t\tif (this.inTieChord.hasOwnProperty(key))\n\t\t\t\t\tthis.endingHoldOver.inTieChord[key] = this.inTieChord[key];\n\t\t\t}\n\t\t},\n\t\trestoreStartEndingHoldOvers: function() {\n\t\t\tif (!this.endingHoldOver.inTie)\n\t\t\t\treturn;\n\t\t\tthis.inTie = [];\n\t\t\tthis.inTieChord = {};\n\t\t\tfor (var i = 0; i < this.endingHoldOver.inTie.length; i++) {\n\t\t\t\tthis.inTie.push([]);\n\t\t\t\tfor (var j = 0; j < this.endingHoldOver.inTie[i].length; j++) {\n\t\t\t\t\tthis.inTie[i].push(this.endingHoldOver.inTie[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in this.endingHoldOver.inTieChord) {\n\t\t\t\tif (this.endingHoldOver.inTieChord.hasOwnProperty(key))\n\t\t\t\t\tthis.inTieChord[key] = this.endingHoldOver.inTieChord[key];\n\t\t\t}\n\t\t},\n\t};\n\n\tvar addWarning = function(str) {\n\t\tif (!multilineVars.warnings)\n\t\t\tmultilineVars.warnings = [];\n\t\tmultilineVars.warnings.push(str);\n\t};\n\n\tvar addWarningObject = function(warningObject) {\n\t\tif (!multilineVars.warningObjects)\n\t\t\tmultilineVars.warningObjects = [];\n\t\tmultilineVars.warningObjects.push(warningObject);\n\t};\n\n\tvar encode = function(str) {\n\t\tvar ret = str.replace(/\\x12/g, ' ');\n\t\tret = ret.replace(/&/g, '&');\n\t\tret = ret.replace(//g, '>');\n\t};\n\n\tvar warn = function(str, line, col_num) {\n\t\tif (!line) line = \" \";\n\t\tvar bad_char = line[col_num];\n\t\tif (bad_char === ' ' || !bad_char)\n\t\t\tbad_char = \"SPACE\";\n\t\tvar clean_line = encode(line.substring(col_num - 64, col_num)) + '' + bad_char + '' + encode(line.substring(col_num + 1).substring(0,64));\n\t\taddWarning(\"Music Line:\" + tokenizer.lineIndex + \":\" + (col_num+1) + ': ' + str + \": \" + clean_line);\n\t\taddWarningObject({message:str, line:line, startChar: multilineVars.iChar + col_num, column: col_num});\n\t};\n\n\tvar header;\n\tvar music;\n\n\tthis.getWarnings = function() {\n\t\treturn multilineVars.warnings;\n\t};\n\tthis.getWarningObjects = function() {\n\t\treturn multilineVars.warningObjects;\n\t};\n\n\tvar addWords = function(line, words) {\n\t\tif (words.indexOf('\\x12') >= 0) {\n\t\t\twordsContinuation += words\n\t\t\treturn\n\t\t}\n\t\twords = wordsContinuation + words\n\t\twordsContinuation = ''\n\n\t\tif (!line) { warn(\"Can't add words before the first line of music\", line, 0); return; }\n\t\twords = parseCommon.strip(words);\n\t\tif (words[words.length-1] !== '-')\n\t\t\twords = words + ' ';\t// Just makes it easier to parse below, since every word has a divider after it.\n\t\tvar word_list = [];\n\t\t// first make a list of words from the string we are passed. A word is divided on either a space or dash.\n\t\tvar last_divider = 0;\n\t\tvar replace = false;\n\t\tvar addWord = function(i) {\n\t\t\tvar word = parseCommon.strip(words.substring(last_divider, i));\n\t\t\tword = word.replace(/\\\\([-_*|~])/g, '$1')\n\t\t\tlast_divider = i+1;\n\t\t\tif (word.length > 0) {\n\t\t\t\tif (replace)\n\t\t\t\t\tword = word.replace(/~/g, ' ');\n\t\t\t\tvar div = words[i];\n\t\t\t\tif (div !== '_' && div !== '-')\n\t\t\t\t\tdiv = ' ';\n\t\t\t\tword_list.push({syllable: tokenizer.translateString(word), divider: div});\n\t\t\t\treplace = false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tvar escNext = false;\n\t\tfor (var i = 0; i < words.length; i++) {\n\t\t\tswitch (words[i]) {\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\x12':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tif (!escNext && !addWord(i) && word_list.length > 0) {\n\t\t\t\t\t\tparseCommon.last(word_list).divider = '-';\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'slur'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '|':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\taddWord(i);\n\t\t\t\t\t\tword_list.push({skip: true, to: 'bar'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '~':\n\t\t\t\t\tif (!escNext) {\n\t\t\t\t\t\treplace = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tescNext = words[i] === '\\\\'\n\t\t}\n\n\t\tvar inSlur = false;\n\t\tline.forEach(function(el) {\n\t\t\tif (word_list.length !== 0) {\n\t\t\t\tif (word_list[0].skip) {\n\t\t\t\t\tswitch (word_list[0].to) {\n\t\t\t\t\t\tcase 'next': if (el.el_type === 'note' && el.pitches !== null && !inSlur) word_list.shift(); break;\n\t\t\t\t\t\tcase 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break;\n\t\t\t\t\t\tcase 'bar': if (el.el_type === 'bar') word_list.shift(); break;\n\t\t\t\t\t}\n\t\t\t\t\tif (el.el_type !== 'bar') {\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [{syllable: \"\", divider: \" \"}];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push({syllable: \"\", divider: \" \"});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (el.el_type === 'note' && el.rest === undefined && !inSlur) {\n\t\t\t\t\t\tvar lyric = word_list.shift();\n\t\t\t\t\t\tif (lyric.syllable)\n\t\t\t\t\t\t\tlyric.syllable = lyric.syllable.replace(/ +/g,'\\xA0');\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [ lyric ];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push(lyric);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tvar addSymbols = function(line, words) {\n\t\tif (words.indexOf('\\x12') >= 0) {\n\t\t\tsymbolContinuation += words\n\t\t\treturn\n\t\t}\n\t\twords = symbolContinuation + words\n\t\tsymbolContinuation = ''\n\n\t\t// TODO-PER: Currently copied from w: line. This needs to be read as symbols instead.\n\t\tif (!line) { warn(\"Can't add symbols before the first line of music\", line, 0); return; }\n\t\twords = parseCommon.strip(words);\n\t\tif (words[words.length-1] !== '-')\n\t\t\twords = words + ' ';\t// Just makes it easier to parse below, since every word has a divider after it.\n\t\tvar word_list = [];\n\t\t// first make a list of words from the string we are passed. A word is divided on either a space or dash.\n\t\tvar last_divider = 0;\n\t\tvar replace = false;\n\t\tvar addWord = function(i) {\n\t\t\tvar word = parseCommon.strip(words.substring(last_divider, i));\n\t\t\tlast_divider = i+1;\n\t\t\tif (word.length > 0) {\n\t\t\t\tif (replace)\n\t\t\t\t\tword = word.replace(/~/g, ' ');\n\t\t\t\tvar div = words[i];\n\t\t\t\tif (div !== '_' && div !== '-')\n\t\t\t\t\tdiv = ' ';\n\t\t\t\tword_list.push({syllable: tokenizer.translateString(word), divider: div});\n\t\t\t\treplace = false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tfor (var i = 0; i < words.length; i++) {\n\t\t\tswitch (words[i]) {\n\t\t\t\tcase ' ':\n\t\t\t\tcase '\\x12':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tif (!addWord(i) && word_list.length > 0) {\n\t\t\t\t\t\tparseCommon.last(word_list).divider = '-';\n\t\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '_':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'slur'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'next'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '|':\n\t\t\t\t\taddWord(i);\n\t\t\t\t\tword_list.push({skip: true, to: 'bar'});\n\t\t\t\t\tbreak;\n\t\t\t\tcase '~':\n\t\t\t\t\treplace = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tvar inSlur = false;\n\t\tline.forEach(function(el) {\n\t\t\tif (word_list.length !== 0) {\n\t\t\t\tif (word_list[0].skip) {\n\t\t\t\t\tswitch (word_list[0].to) {\n\t\t\t\t\t\tcase 'next': if (el.el_type === 'note' && el.pitches !== null && !inSlur) word_list.shift(); break;\n\t\t\t\t\t\tcase 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break;\n\t\t\t\t\t\tcase 'bar': if (el.el_type === 'bar') word_list.shift(); break;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (el.el_type === 'note' && el.rest === undefined && !inSlur) {\n\t\t\t\t\t\tvar lyric = word_list.shift();\n\t\t\t\t\t\tif (el.lyric === undefined)\n\t\t\t\t\t\t\tel.lyric = [ lyric ];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.lyric.push(lyric);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\tvar parseLine = function(line) {\n\t\tif (parseCommon.startsWith(line, '%%')) {\n\t\t\tvar err = parseDirective.addDirective(line.substring(2));\n\t\t\tif (err) warn(err, line, 2);\n\t\t\treturn;\n\t\t}\n\n\t\tvar i = line.indexOf('%');\n\t\tif (i >= 0)\n\t\t\tline = line.substring(0, i);\n\t\tline = line.replace(/\\s+$/, '');\n\n\t\tif (line.length === 0)\n\t\t\treturn;\n\n\t\tif (wordsContinuation) {\n\t\t\taddWords(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\t\treturn\n\t\t}\n\t\tif (symbolContinuation) {\n\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\t\treturn\n\t\t}\n\t\tif (line.length < 2 || line[1] !== ':' || music.lineContinuation) {\n\t\t\tmusic.parseMusic(line);\n\t\t\treturn\n\t\t}\n\n\t\tvar ret = header.parseHeader(line);\n\t\tif (ret.regular)\n\t\t\tmusic.parseMusic(line);\n\t\tif (ret.newline)\n\t\t\tmusic.startNewLine();\n\t\tif (ret.words)\n\t\t\taddWords(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t\tif (ret.symbols)\n\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), line.substring(2));\n\t};\n\n\tfunction appendLastMeasure(voice, nextVoice) {\n\t\tvoice.push({\n\t\t\tel_type: 'hint'\n\t\t});\n\t\tfor (var i = 0; i < nextVoice.length; i++) {\n\t\t\tvar element = nextVoice[i];\n\t\t\tvar hint = Object.assign({},element);\n\t\t\tvoice.push(hint);\n\t\t\tif (element.el_type === 'bar')\n\t\t\t\t\treturn;\n\t\t}\n\t}\n\n\tfunction addHintMeasure(staff, nextStaff) {\n\t\tfor (var i = 0; i < staff.length; i++) {\n\t\t\tvar stave = staff[i];\n\t\t\tvar nextStave = nextStaff[i];\n\t\t\tif (nextStave) { // Be sure there is the same number of staves on the next line.\n\t\t\t\tfor (var j = 0; j < nextStave.voices.length; j++) {\n\t\t\t\t\tvar nextVoice = nextStave.voices[j];\n\t\t\t\t\tvar voice = stave.voices[j];\n\t\t\t\t\tif (voice) { // Be sure there are the same number of voices on the previous line.\n\t\t\t\t\t\tappendLastMeasure(voice, nextVoice);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction addHintMeasures() {\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tvar line = tune.lines[i].staff;\n\t\t\tif (line) {\n\t\t\t\tvar j = i+1;\n\t\t\t\twhile (j < tune.lines.length && tune.lines[j].staff === undefined)\n\t\t\t\t\tj++;\n\t\t\t\tif (j < tune.lines.length) {\n\t\t\t\t\tvar nextLine = tune.lines[j].staff;\n\t\t\t\t\taddHintMeasure(line, nextLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.parse = function(strTune, switches, startPos) {\n\t\t// the switches are optional and cause a difference in the way the tune is parsed.\n\t\t// switches.header_only : stop parsing when the header is finished\n\t\t// switches.stop_on_warning : stop at the first warning encountered.\n\t\t// switches.print: format for the page instead of the browser.\n\t\t// switches.format: a hash of the desired formatting commands.\n\t\t// switches.hint_measures: put the next measure at the end of the current line.\n\t\t// switches.transpose: change the key signature, chords, and notes by a number of half-steps.\n\t\tif (!switches) switches = {};\n\t\tif (!startPos) startPos = 0;\n\t\ttune.reset();\n\n\t\t// Take care of whatever line endings come our way\n\t\t// Tack on newline temporarily to make the last line continuation work\n\t\tstrTune = strTune.replace(/\\r\\n?/g, '\\n') + '\\n';\n\n\t\t// get rid of latex commands. If a line starts with a backslash, then it is replaced by spaces to keep the character count the same.\n\t\tvar arr = strTune.split(\"\\n\\\\\");\n\t\tif (arr.length > 1) {\n\t\t\tfor (var i2 = 1; i2 < arr.length; i2++) {\n\t\t\t\twhile (arr[i2].length > 0 && arr[i2][0] !== \"\\n\") {\n\t\t\t\t\tarr[i2] = arr[i2].substr(1);\n\t\t\t\t\tarr[i2-1] += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tstrTune = arr.join(\" \"); //. the split removed two characters, so this puts them back\n\t\t}\n\t\t// take care of line continuations right away, but keep the same number of characters\n\t\tstrTune = strTune.replace(/\\\\([ \\t]*)(%.*)*\\n/g, function(all, backslash, comment){\n\t\t\tvar padding = comment ? Array(comment.length +1).join(' ') : \"\";\n\t\t\treturn backslash + \"\\x12\" + padding + '\\n';\n\t\t});\n\t\tvar lines = strTune.split('\\n')\n\t\tif (parseCommon.last(lines).length === 0)\t// remove the blank line we added above.\n\t\t\tlines.pop();\n\t\ttokenizer = new Tokenizer(lines, multilineVars);\n\t\theader = new ParseHeader(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t\tmusic = new ParseMusic(tokenizer, warn, multilineVars, tune, tuneBuilder, header);\n\n\t\tif (switches.print)\n\t\t\ttune.media = 'print';\n\t\tmultilineVars.reset();\n\t\tmultilineVars.iChar = startPos;\n\t\tif (switches.visualTranspose) {\n\t\t\tmultilineVars.globalTranspose = parseInt(switches.visualTranspose);\n\t\t\tif (multilineVars.globalTranspose === 0)\n\t\t\t\tmultilineVars.globalTranspose = undefined;\n\t\t\telse\n\t\t\t\ttuneBuilder.setVisualTranspose(switches.visualTranspose);\n\t\t} else\n\t\t\tmultilineVars.globalTranspose = undefined;\n\t\tif (switches.lineBreaks) {\n\t\t\t// The line break numbers are 0-based and they reflect the last measure of the current line.\n\t\t\tmultilineVars.lineBreaks = switches.lineBreaks;\n\t\t\t//multilineVars.continueall = true;\n\t\t}\n\t\theader.reset(tokenizer, warn, multilineVars, tune);\n\n\t\ttry {\n\t\t\tif (switches.format) {\n\t\t\t\tparseDirective.globalFormatting(switches.format);\n\t\t\t}\n\t\t\tvar line = tokenizer.nextLine();\n\t\t\twhile (line) {\n\t\t\t\tif (switches.header_only && multilineVars.is_in_header === false)\n\t\t\t\t\tthrow \"normal_abort\";\n\t\t\t\tif (switches.stop_on_warning && multilineVars.warnings)\n\t\t\t\t\tthrow \"normal_abort\";\n\n\t\t\t\tvar wasInHeader = multilineVars.is_in_header;\n\t\t\t\tparseLine(line);\n\t\t\t\tif (wasInHeader && !multilineVars.is_in_header) {\n\t\t\t\t\ttuneBuilder.setRunningFont(\"annotationfont\", multilineVars.annotationfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"gchordfont\", multilineVars.gchordfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"tripletfont\", multilineVars.tripletfont);\n\t\t\t\t\ttuneBuilder.setRunningFont(\"vocalfont\", multilineVars.vocalfont);\n\t\t\t\t}\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t}\n\n\t\t\tif (wordsContinuation) {\n\t\t\t\taddWords(tuneBuilder.getCurrentVoice(), '');\n\t\t\t}\n\t\t\tif (symbolContinuation) {\n\t\t\t\taddSymbols(tuneBuilder.getCurrentVoice(), '');\n\t\t\t}\n\t\t\tmultilineVars.openSlurs = tuneBuilder.cleanUp(multilineVars.barsperstaff, multilineVars.staffnonote, multilineVars.openSlurs);\n\n\t\t} catch (err) {\n\t\t\tif (err !== \"normal_abort\")\n\t\t\t\tthrow err;\n\t\t}\n\n\t\tvar ph = 11*72;\n\t\tvar pl = 8.5*72;\n\t\tswitch (multilineVars.papersize) {\n\t\t\t//case \"letter\": ph = 11*72; pl = 8.5*72; break;\n\t\t\tcase \"legal\": ph = 14*72; pl = 8.5*72; break;\n\t\t\tcase \"A4\": ph = 11.7*72; pl = 8.3*72; break;\n\t\t}\n\t\tif (multilineVars.landscape) {\n\t\t\tvar x = ph;\n\t\t\tph = pl;\n\t\t\tpl = x;\n\t\t}\n\t\tif (!tune.formatting.pagewidth)\n\t\t\ttune.formatting.pagewidth = pl;\n\t\tif (!tune.formatting.pageheight)\n\t\t\ttune.formatting.pageheight = ph;\n\n\t\tif (switches.hint_measures) {\n\t\t\taddHintMeasures();\n\t\t}\n\n\t\twrap.wrapLines(tune, multilineVars.lineBreaks, multilineVars.barNumbers);\n\t};\n};\n\nmodule.exports = Parse;\n","// abc_parse_book.js: parses a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = require('./abc_common');\n\nvar bookParser = function(book) {\n\t\"use strict\";\n\n\tvar directives = \"\";\n\tvar initialWhiteSpace = book.match(/(\\s*)/)\n\tbook = parseCommon.strip(book);\n\tvar tuneStrings = book.split(\"\\nX:\");\n\t// Put back the X: that we lost when splitting the tunes.\n\tfor (var i = 1; i < tuneStrings.length; i++)\n\t\ttuneStrings[i] = \"X:\" + tuneStrings[i];\n\t// Keep track of the character position each tune starts with. If the string starts with white space, count that, too.\n\tvar pos = initialWhiteSpace ? initialWhiteSpace[0].length : 0;\n\tvar tunes = [];\n\ttuneStrings.forEach(function(tune) {\n\t\ttunes.push({ abc: tune, startPos: pos});\n\t\tpos += tune.length + 1; // We also lost a newline when splitting, so count that.\n\t});\n\tif (tunes.length > 1 && !parseCommon.startsWith(tunes[0].abc, 'X:')) {\t// If there is only one tune, the X: might be missing, otherwise assume the top of the file is \"intertune\"\n\t\t// There could be file-wide directives in this, if so, we need to insert it into each tune. We can probably get away with\n\t\t// just looking for file-wide directives here (before the first tune) and inserting them at the bottom of each tune, since\n\t\t// the tune is parsed all at once. The directives will be seen before the engraver begins processing.\n\t\tvar dir = tunes.shift();\n\t\tvar arrDir = dir.abc.split('\\n');\n\t\tarrDir.forEach(function(line) {\n\t\t\tif (parseCommon.startsWith(line, '%%'))\n\t\t\t\tdirectives += line + '\\n';\n\t\t});\n\t}\n\tvar header = directives;\n\n\t// Now, the tune ends at a blank line, so truncate it if needed. There may be \"intertune\" stuff.\n\ttunes.forEach(function(tune) {\n\t\tvar end = tune.abc.indexOf('\\n\\n');\n\t\tif (end > 0)\n\t\t\ttune.abc = tune.abc.substring(0, end);\n\t\ttune.pure = tune.abc;\n\t\ttune.abc = directives + tune.abc;\n\n\t\t// for the user's convenience, parse and store the title separately. The title is between the first T: and the next \\n\n\t\ttune.title = \"\";\n\t\tvar title = tune.pure.split(\"T:\");\n\t\tif (title.length > 1) {\n\t\t\ttitle = title[1].split(\"\\n\");\n\t\t\ttune.title = parseCommon.strip(title[0]);\n\t\t}\n\n\t\t// for the user's convenience, parse and store the id separately. The id is between the first X: and the next \\n\n\t\tvar id = tune.pure.substring(2, tune.pure.indexOf(\"\\n\"));\n\t\ttune.id = parseCommon.strip(id);\n\t});\n\n\treturn {\n\t\theader: header,\n\t\ttunes: tunes\n\t};\n};\n\nmodule.exports = bookParser;\n\n","var parseCommon = require('./abc_common');\n\nvar parseDirective = {};\n\n(function() {\n\t\"use strict\";\n\tvar tokenizer;\n\tvar warn;\n\tvar multilineVars;\n\tvar tune;\n\tvar tuneBuilder;\n\tparseDirective.initialize = function(tokenizer_, warn_, multilineVars_, tune_, tuneBuilder_) {\n\t\ttokenizer = tokenizer_;\n\t\twarn = warn_;\n\t\tmultilineVars = multilineVars_;\n\t\ttune = tune_;\n\t\ttuneBuilder = tuneBuilder_;\n\t\tinitializeFonts();\n\t};\n\n\tfunction initializeFonts() {\n\t\tmultilineVars.annotationfont = { face: \"Helvetica\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.gchordfont = { face: \"Helvetica\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.historyfont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.infofont = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\tmultilineVars.measurefont = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\tmultilineVars.partsfont = { face: \"\\\"Times New Roman\\\"\", size: 15, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.repeatfont = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.textfont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.tripletfont = {face: \"Times\", size: 11, weight: \"normal\", style: \"italic\", decoration: \"none\"};\n\t\tmultilineVars.vocalfont = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\tmultilineVars.wordsfont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\n\t\t// These fonts are global for the entire tune.\n\t\ttune.formatting.composerfont = { face: \"\\\"Times New Roman\\\"\", size: 14, weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\ttune.formatting.subtitlefont = { face: \"\\\"Times New Roman\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tempofont = { face: \"\\\"Times New Roman\\\"\", size: 15, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.titlefont = { face: \"\\\"Times New Roman\\\"\", size: 20, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.footerfont = { face: \"\\\"Times New Roman\\\"\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.headerfont = { face: \"\\\"Times New Roman\\\"\", size: 12, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.voicefont = { face: \"\\\"Times New Roman\\\"\", size: 13, weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tablabelfont = { face: \"\\\"Trebuchet MS\\\"\", size: 16, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tabnumberfont = { face: \"\\\"Arial\\\"\", size: 11, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\ttune.formatting.tabgracefont = { face: \"\\\"Arial\\\"\", size: 8, weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\n\t\t// these are the default fonts for these element types. In the printer, these fonts might change as the tune progresses.\n\t\ttune.formatting.annotationfont = multilineVars.annotationfont;\n\t\ttune.formatting.gchordfont = multilineVars.gchordfont;\n\t\ttune.formatting.historyfont = multilineVars.historyfont;\n\t\ttune.formatting.infofont = multilineVars.infofont;\n\t\ttune.formatting.measurefont = multilineVars.measurefont;\n\t\ttune.formatting.partsfont = multilineVars.partsfont;\n\t\ttune.formatting.repeatfont = multilineVars.repeatfont;\n\t\ttune.formatting.textfont = multilineVars.textfont;\n\t\ttune.formatting.tripletfont = multilineVars.tripletfont;\n\t\ttune.formatting.vocalfont = multilineVars.vocalfont;\n\t\ttune.formatting.wordsfont = multilineVars.wordsfont;\n\t}\n\n\tvar fontTypeCanHaveBox = { gchordfont: true, measurefont: true, partsfont: true, annotationfont: true, composerfont: true, historyfont: true, infofont: true, subtitlefont: true, textfont: true, titlefont: true, voicefont: true };\n\n\tvar fontTranslation = function(fontFace) {\n\t\t// This translates Postscript fonts for a web alternative.\n\t\t// Note that the postscript fonts contain italic and bold info in them, so what is returned is a hash.\n\n\t\tswitch (fontFace) {\n\t\t\tcase \"Arial-Italic\":\n\t\t\t\treturn { face: \"Arial\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Arial-Bold\":\n\t\t\t\treturn { face: \"Arial\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-Demi\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-DemiItalic\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Bookman-Light\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Bookman-LightItalic\":\n\t\t\t\treturn { face: \"Bookman,serif\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Courier\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Courier-Oblique\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Courier-Bold\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Courier-BoldOblique\":\n\t\t\t\treturn { face: \"\\\"Courier New\\\"\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-Book\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-BookOblique\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-Demi\":\n\t\t\tcase \"Avant-Garde-Demi\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"AvantGarde-DemiOblique\":\n\t\t\t\treturn { face: \"AvantGarde,Arial\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Oblique\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Bold\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-BoldOblique\":\n\t\t\t\treturn { face: \"Helvetica\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-Oblique\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-Bold\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Helvetica-Narrow-BoldOblique\":\n\t\t\t\treturn { face: \"\\\"Helvetica Narrow\\\",Helvetica\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Roman\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Italic\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Palatino-Bold\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Palatino-BoldItalic\":\n\t\t\t\treturn { face: \"Palatino\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Roman\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Italic\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-Bold\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"NewCenturySchlbk-BoldItalic\":\n\t\t\t\treturn { face: \"\\\"New Century\\\",serif\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Times\":\n\t\t\tcase \"Times-Roman\":\n\t\t\tcase \"Times-Narrow\":\n\t\t\tcase \"Times-Courier\":\n\t\t\tcase \"Times-New-Roman\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Times-Italic\":\n\t\t\tcase \"Times-Italics\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"Times-Bold\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"bold\", style: \"normal\", decoration: \"none\" };\n\t\t\tcase \"Times-BoldItalic\":\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"bold\", style: \"italic\", decoration: \"none\" };\n\t\t\tcase \"ZapfChancery-MediumItalic\":\n\t\t\t\treturn { face: \"\\\"Zapf Chancery\\\",cursive,serif\", weight: \"normal\", style: \"normal\", decoration: \"none\" };\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\tvar getFontParameter = function(tokens, currentSetting, str, position, cmd) {\n\t\t// Every font parameter has the following format:\n\t\t// \n\t\t// Where:\n\t\t// face: either a standard web font name, or a postscript font, enumerated in fontTranslation. This could also be an * or be missing if the face shouldn't change.\n\t\t// utf8: This is optional, and specifies utf8. That's all that is supported so the field is just silently ignored.\n\t\t// size: The size, in pixels. This may be omitted if the size is not changing.\n\t\t// modifiers: zero or more of \"bold\", \"italic\", \"underline\"\n\t\t// box: Only applies to the measure numbers, gchords, and the parts. If present, then a box is drawn around the characters.\n\t\t// If face is present, then all the modifiers are cleared. If face is absent, then the modifiers are illegal.\n\t\t// The face can be a single word, a set of words separated by hyphens, or a quoted string.\n\t\t//\n\t\t// So, in practicality, there are three types of font definitions: a number only, an asterisk and a number only, or the full definition (with an optional size).\n\t\tfunction processNumberOnly() {\n\t\t\tvar size = parseInt(tokens[0].token);\n\t\t\ttokens.shift();\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Can't set just the size of the font since there is no default value.\", str, position);\n\t\t\t\treturn { face: \"\\\"Times New Roman\\\"\", weight: \"normal\", style: \"normal\", decoration: \"none\", size: size};\n\t\t\t}\n\t\t\tif (tokens.length === 0) {\n\t\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size};\n\t\t\t}\n\t\t\tif (tokens.length === 1 && tokens[0].token === \"box\" && fontTypeCanHaveBox[cmd])\n\t\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size, box: true};\n\t\t\twarn(\"Extra parameters in font definition.\", str, position);\n\t\t\treturn { face: currentSetting.face, weight: currentSetting.weight, style: currentSetting.style, decoration: currentSetting.decoration, size: size};\n\t\t}\n\n\t\t// format 1: asterisk and number only\n\t\tif (tokens[0].token === '*') {\n\t\t\ttokens.shift();\n\t\t\tif (tokens[0].type === 'number')\n\t\t\t\treturn processNumberOnly();\n\t\t\telse {\n\t\t\t\twarn(\"Expected font size number after *.\", str, position);\n\t\t\t}\n\t\t}\n\n\t\t// format 2: number only\n\t\tif (tokens[0].type === 'number') {\n\t\t\treturn processNumberOnly();\n\t\t}\n\n\t\t// format 3: whole definition\n\t\tvar face = [];\n\t\tvar size;\n\t\tvar weight = \"normal\";\n\t\tvar style = \"normal\";\n\t\tvar decoration = \"none\";\n\t\tvar box = false;\n\t\tvar state = 'face';\n\t\tvar hyphenLast = false;\n\t\twhile (tokens.length) {\n\t\t\tvar currToken = tokens.shift();\n\t\t\tvar word = currToken.token.toLowerCase();\n\t\t\tswitch (state) {\n\t\t\t\tcase 'face':\n\t\t\t\t\tif (hyphenLast || (word !== 'utf' && currToken.type !== 'number' && word !== \"bold\" && word !== \"italic\" && word !== \"underline\" && word !== \"box\")) {\n\t\t\t\t\t\tif (face.length > 0 && currToken.token === '-') {\n\t\t\t\t\t\t\thyphenLast = true;\n\t\t\t\t\t\t\tface[face.length-1] = face[face.length-1] + currToken.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (hyphenLast) {\n\t\t\t\t\t\t\t\thyphenLast = false;\n\t\t\t\t\t\t\t\tface[face.length-1] = face[face.length-1] + currToken.token;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\tface.push(currToken.token);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (currToken.type === 'number') {\n\t\t\t\t\t\t\tif (size) {\n\t\t\t\t\t\t\t\twarn(\"Font size specified twice in font definition.\", str, position);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsize = currToken.token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstate = 'modifier';\n\t\t\t\t\t\t} else if (word === \"bold\")\n\t\t\t\t\t\t\tweight = \"bold\";\n\t\t\t\t\t\telse if (word === \"italic\")\n\t\t\t\t\t\t\tstyle = \"italic\";\n\t\t\t\t\t\telse if (word === \"underline\")\n\t\t\t\t\t\t\tdecoration = \"underline\";\n\t\t\t\t\t\telse if (word === \"box\") {\n\t\t\t\t\t\t\tif (fontTypeCanHaveBox[cmd])\n\t\t\t\t\t\t\t\tbox = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\twarn(\"This font style doesn't support \\\"box\\\"\", str, position);\n\t\t\t\t\t\t\tstate = \"finished\";\n\t\t\t\t\t\t} else if (word === \"utf\") {\n\t\t\t\t\t\t\tcurrToken = tokens.shift(); // this gets rid of the \"8\" after \"utf\"\n\t\t\t\t\t\t\tstate = \"size\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\twarn(\"Unknown parameter \" + currToken.token + \" in font definition.\", str, position);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"size\":\n\t\t\t\t\tif (currToken.type === 'number') {\n\t\t\t\t\t\tif (size) {\n\t\t\t\t\t\t\twarn(\"Font size specified twice in font definition.\", str, position);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsize = currToken.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twarn(\"Expected font size in font definition.\", str, position);\n\t\t\t\t\t}\n\t\t\t\t\tstate = 'modifier';\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"modifier\":\n\t\t\t\t\tif (word === \"bold\")\n\t\t\t\t\t\tweight = \"bold\";\n\t\t\t\t\telse if (word === \"italic\")\n\t\t\t\t\t\tstyle = \"italic\";\n\t\t\t\t\telse if (word === \"underline\")\n\t\t\t\t\t\tdecoration = \"underline\";\n\t\t\t\t\telse if (word === \"box\") {\n\t\t\t\t\t\tif (fontTypeCanHaveBox[cmd])\n\t\t\t\t\t\t\tbox = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"This font style doesn't support \\\"box\\\"\", str, position);\n\t\t\t\t\t\tstate = \"finished\";\n\t\t\t\t\t} else\n\t\t\t\t\t\twarn(\"Unknown parameter \" + currToken.token + \" in font definition.\", str, position);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"finished\":\n\t\t\t\t\twarn(\"Extra characters found after \\\"box\\\" in font definition.\", str, position);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size === undefined) {\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Must specify the size of the font since there is no default value.\", str, position);\n\t\t\t\tsize = 12;\n\t\t\t} else\n\t\t\t\tsize = currentSetting.size;\n\t\t} else\n\t\t\tsize = parseFloat(size);\n\n\t\tface = face.join(' ');\n\t\tif (face === '') {\n\t\t\tif (!currentSetting) {\n\t\t\t\twarn(\"Must specify the name of the font since there is no default value.\", str, position);\n\t\t\t\tface = \"sans-serif\";\n\t\t\t} else\n\t\t\t\tface = currentSetting.face;\n\t\t}\n\t\tvar psFont = fontTranslation(face);\n\t\tvar font = {};\n\t\tif (psFont) {\n\t\t\tfont.face = psFont.face;\n\t\t\tfont.weight = psFont.weight;\n\t\t\tfont.style = psFont.style;\n\t\t\tfont.decoration = psFont.decoration;\n\t\t\tfont.size = size;\n\t\t\tif (box)\n\t\t\t\tfont.box = true;\n\t\t\treturn font;\n\t\t}\n\t\tfont.face = face;\n\t\tfont.weight = weight;\n\t\tfont.style = style;\n\t\tfont.decoration = decoration;\n\t\tfont.size = size;\n\t\tif (box)\n\t\t\tfont.box = true;\n\t\treturn font;\n\t};\n\n\tvar getChangingFont = function(cmd, tokens, str) {\n\t\tif (tokens.length === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a font as a parameter.\";\n\t\tmultilineVars[cmd] = getFontParameter(tokens, multilineVars[cmd], str, 0, cmd);\n\t\tif (multilineVars.is_in_header) // If the font appears in the header, then it becomes the default font.\n\t\t\ttune.formatting[cmd] = multilineVars[cmd];\n\t\treturn null;\n\t};\n\tvar getGlobalFont = function(cmd, tokens, str) {\n\t\tif (tokens.length === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a font as a parameter.\";\n\t\ttune.formatting[cmd] = getFontParameter(tokens, tune.formatting[cmd], str, 0, cmd);\n\t\treturn null;\n\t};\n\n\tvar setScale = function(cmd, tokens) {\n\t\tvar scratch = \"\";\n\t\ttokens.forEach(function(tok) {\n\t\t\tscratch += tok.token;\n\t\t});\n\t\tvar num = parseFloat(scratch);\n\t\tif (isNaN(num) || num === 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\";\n\t\ttune.formatting.scale = num;\n\n\t};\n\t// starts at 35\n\tvar drumNames = [\n\t\t\"acoustic-bass-drum\",\n\t\t\"bass-drum-1\",\n\t\t\"side-stick\",\n\t\t\"acoustic-snare\",\n\t\t\"hand-clap\",\n\t\t\"electric-snare\",\n\t\t\"low-floor-tom\",\n\t\t\"closed-hi-hat\",\n\t\t\"high-floor-tom\",\n\t\t\"pedal-hi-hat\",\n\t\t\"low-tom\",\n\t\t\"open-hi-hat\",\n\t\t\"low-mid-tom\",\n\t\t\"hi-mid-tom\",\n\t\t\"crash-cymbal-1\",\n\t\t\"high-tom\",\n\t\t\"ride-cymbal-1\",\n\t\t\"chinese-cymbal\",\n\t\t\"ride-bell\",\n\t\t\"tambourine\",\n\t\t\"splash-cymbal\",\n\t\t\"cowbell\",\n\t\t\"crash-cymbal-2\",\n\t\t\"vibraslap\",\n\t\t\"ride-cymbal-2\",\n\t\t\"hi-bongo\",\n\t\t\"low-bongo\",\n\t\t\"mute-hi-conga\",\n\t\t\"open-hi-conga\",\n\t\t\"low-conga\",\n\t\t\"high-timbale\",\n\t\t\"low-timbale\",\n\t\t\"high-agogo\",\n\t\t\"low-agogo\",\n\t\t\"cabasa\",\n\t\t\"maracas\",\n\t\t\"short-whistle\",\n\t\t\"long-whistle\",\n\t\t\"short-guiro\",\n\t\t\"long-guiro\",\n\t\t\"claves\",\n\t\t\"hi-wood-block\",\n\t\t\"low-wood-block\",\n\t\t\"mute-cuica\",\n\t\t\"open-cuica\",\n\t\t\"mute-triangle\",\n\t\t\"open-triangle\",\n\t];\n\n\tvar interpretPercMap = function(restOfString) {\n\t\tvar tokens = restOfString.split(/\\s+/); // Allow multiple spaces.\n\t\tif (tokens.length !== 2 && tokens.length !== 3)\n\t\t\treturn { error: 'Expected parameters \"abc-note\", \"drum-sound\", and optionally \"note-head\"'};\n\t\tvar key = tokens[0];\n\t\t// The percussion sound can either be a MIDI number or a drum name. If it is not a number then check for a name.\n\t\tvar pitch = parseInt(tokens[1], 10);\n\t\tif ((isNaN(pitch) || pitch < 35 || pitch > 81) && tokens[1]) {\n\t\t\tpitch = drumNames.indexOf(tokens[1].toLowerCase()) + 35;\n\t\t}\n\t\tif ((isNaN(pitch) || pitch < 35 || pitch > 81))\n\t\t\treturn { error: 'Expected drum name, received \"' + tokens[1] + '\"' };\n\t\tvar value = { sound: pitch };\n\t\tif (tokens.length === 3)\n\t\t\tvalue.noteHead = tokens[2];\n\t\treturn { key: key, value: value };\n\t};\n\n\tvar getRequiredMeasurement = function(cmd, tokens) {\n\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\treturn { error: \"Directive \\\"\" + cmd + \"\\\" requires a measurement as a parameter.\"};\n\t\treturn points.value;\n\t};\n\tvar oneParameterMeasurement = function(cmd, tokens) {\n\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a measurement as a parameter.\";\n\t\ttune.formatting[cmd] = points.value;\n\t\treturn null;\n\t};\n\n\tvar addMultilineVar = function(key, cmd, tokens, min, max) {\n\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\";\n\t\tvar i = tokens[0].intt;\n\t\tif (min !== undefined && i < min)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number greater than or equal to \" + min + \" as a parameter.\";\n\t\tif (max !== undefined && i > max)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires a number less than or equal to \" + max + \" as a parameter.\";\n\t\tmultilineVars[key] = i;\n\t\treturn null;\n\t};\n\n\tvar addMultilineVarBool = function(key, cmd, tokens) {\n\t\tif (tokens.length === 1 && (tokens[0].token === 'true' || tokens[0].token === 'false')) {\n\t\t\tmultilineVars[key] = tokens[0].token === 'true';\n\t\t\treturn null;\n\t\t}\n\t\tvar str = addMultilineVar(key, cmd, tokens, 0, 1);\n\t\tif (str !== null) return str;\n\t\tmultilineVars[key] = (multilineVars[key] === 1);\n\t\treturn null;\n\t};\n\n\tvar addMultilineVarOneParamChoice = function(key, cmd, tokens, choices) {\n\t\tif (tokens.length !== 1)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires one of [ \" + choices.join(\", \") + \" ] as a parameter.\";\n\t\tvar choice = tokens[0].token;\n\t\tvar found = false;\n\t\tfor (var i = 0; !found && i < choices.length; i++) {\n\t\t\tif (choices[i] === choice)\n\t\t\t\tfound = true;\n\t\t}\n\t\tif (!found)\n\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires one of [ \" + choices.join(\", \") + \" ] as a parameter.\";\n\t\tmultilineVars[key] = choice;\n\t\treturn null;\n\t};\n\n\tvar midiCmdParam0 = [\n\t\t\"nobarlines\",\n\t\t\"barlines\",\n\t\t\"beataccents\",\n\t\t\"nobeataccents\",\n\t\t\"droneon\",\n\t\t\"droneoff\",\n\t\t\"drumon\",\n\t\t\"drumoff\",\n\t\t\"fermatafixed\",\n\t\t\"fermataproportional\",\n\t\t\"gchordon\",\n\t\t\"gchordoff\",\n\t\t\"controlcombo\",\n\t\t\"temperamentnormal\",\n\t\t\"noportamento\"\n\t];\n\tvar midiCmdParam1String = [\n\t\t\"gchord\",\n\t\t\"ptstress\",\n\t\t\"beatstring\"\n\t];\n\tvar midiCmdParam1Integer = [\n\t\t\"bassvol\",\n\t\t\"chordvol\",\n\t\t\"c\",\n\t\t\"channel\",\n\t\t\"beatmod\",\n\t\t\"deltaloudness\",\n\t\t\"drumbars\",\n\t\t\"gracedivider\",\n\t\t\"makechordchannels\",\n\t\t\"randomchordattack\",\n\t\t\"chordattack\",\n\t\t\"stressmodel\",\n\t\t\"transpose\",\n\t\t\"rtranspose\",\n\t\t\"vol\",\n\t\t\"volinc\",\n\t\t\"gchordbars\"\t\n\t];\n\tvar midiCmdParam1Integer1OptionalInteger = [\n\t\t\"program\"\n\t];\n\tvar midiCmdParam2Integer = [\n\t\t\"ratio\",\n\t\t\"snt\",\n\t\t\"bendvelocity\",\n\t\t\"pitchbend\",\n\t\t\"control\",\n\t\t\"temperamentlinear\"\n\t];\n\tvar midiCmdParam4Integer = [\n\t\t\"beat\"\n\t];\n\tvar midiCmdParam5Integer = [\n\t\t\"drone\"\n\t];\n\tvar midiCmdParam1String1Integer = [\n\t\t\"portamento\"\n\t];\n\tvar midiCmdParamFraction = [\n\t\t\"expand\",\n\t\t\"grace\",\n\t\t\"trim\"\n\t];\n\tvar midiCmdParam1StringVariableIntegers = [\n\t\t\"drum\",\n\t\t\"chordname\"\n\t];\n \tvar midiCmdParam1Integer1OptionalString = [\n \t\t\"bassprog\", \"chordprog\"\n \t];\n\n\n\tvar parseMidiCommand = function(midi, tune, restOfString) {\n\t\tvar midi_cmd = midi.shift().token;\n\t\tvar midi_params = [];\n\t\tif (midiCmdParam0.indexOf(midi_cmd) >= 0) {\n\t\t\t// NO PARAMETERS\n\t\t\tif (midi.length !== 0)\n\t\t\t\twarn(\"Unexpected parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t} else if (midiCmdParam1String.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING PARAMETER\n\t\t\tif (midi.length !== 1)\n\t\t\t\twarn(\"Expected one parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse\n\t\t\t\tmidi_params.push(midi[0].token);\n\t\t} else if (midiCmdParam1Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER\n\t\t\tif (midi.length !== 1)\n\t\t\t\twarn(\"Expected one parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t} else if (midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER, ONE OPTIONAL PARAMETER\n\t\t\tif (midi.length !== 1 && midi.length !== 2)\n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 2 && midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tif (midi.length === 2)\n\t\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam2Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// TWO INT PARAMETERS\n\t\t\tif (midi.length !== 2)\n\t\t\t\twarn(\"Expected two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected two integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1String1Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING PARAMETER, ONE INT PARAMETER\n\t\t\tif (midi.length !== 2)\n\t\t\t\twarn(\"Expected two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"alpha\" || midi[1].type !== \"number\")\n\t\t\t\twarn(\"Expected one string and one integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].token);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t}\n\t\t} else if (midi_cmd === 'drummap') {\n\t\t\t// BUILD AN OBJECT OF ABC NOTE => MIDI NOTE\n\t\t\tif (midi.length === 2 && midi[0].type === 'alpha' && midi[1].type === 'number') {\n\t\t\t\tif (!tune.formatting) tune.formatting = {};\n\t\t\t\tif (!tune.formatting.midi) tune.formatting.midi = {};\n\t\t\t\tif (!tune.formatting.midi.drummap) tune.formatting.midi.drummap = {};\n\t\t\t\ttune.formatting.midi.drummap[midi[0].token] = midi[1].intt;\n\t\t\t\tmidi_params = tune.formatting.midi.drummap;\n\t\t\t} else if (midi.length === 3 && midi[0].type === 'punct' && midi[1].type === 'alpha' && midi[2].type === 'number') {\n\t\t\t\tif (!tune.formatting) tune.formatting = {};\n\t\t\t\tif (!tune.formatting.midi) tune.formatting.midi = {};\n\t\t\t\tif (!tune.formatting.midi.drummap) tune.formatting.midi.drummap = {};\n\t\t\t\ttune.formatting.midi.drummap[midi[0].token+midi[1].token] = midi[2].intt;\n\t\t\t\tmidi_params = tune.formatting.midi.drummap;\n\t\t\t} else {\n\t\t\t\twarn(\"Expected one note name and one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t}\n\t\t} else if (midiCmdParamFraction.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE FRACTION PARAMETER\n\t\t\tif (midi.length !== 3)\n\t\t\t\twarn(\"Expected fraction parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].token !== \"/\" || midi[2].type !== \"number\")\n\t\t\t\twarn(\"Expected fraction parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam4Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// FOUR INT PARAMETERS\n\t\t\tif (midi.length !== 4)\n\t\t\t\twarn(\"Expected four parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\" || midi[2].type !== \"number\" || midi[3].type !== \"number\")\n\t\t\t\twarn(\"Expected four integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam5Integer.indexOf(midi_cmd) >= 0) {\n\t\t\t// FIVE INT PARAMETERS\n\t\t\tif (midi.length !== 5)\n\t\t\t\twarn(\"Expected five parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\" || midi[1].type !== \"number\" || midi[2].type !== \"number\" || midi[3].type !== \"number\" || midi[4].type !== \"number\")\n\t\t\t\twarn(\"Expected five integer parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tmidi_params.push(midi[1].intt);\n\t\t\t\tmidi_params.push(midi[2].intt);\n\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t\tmidi_params.push(midi[4].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1Integer1OptionalInteger.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE INT PARAMETER, ONE OPTIONAL OCTAVE PARAMETER\n\t\t\tif (midi.length !== 1 || midi.length !== 4)\n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\")\n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 4) {\n\t\t\t\tif (midi[1].token !== \"octave\")\n\t\t\t\t\twarn(\"Expected octave parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\tif (midi[2].token !== \"=\")\n\t\t\t\t\twarn(\"Expected octave parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\tif (midi[3].type !== \"number\")\n\t\t\t\t\twarn(\"Expected integer parameter for octave in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t} else {\n\t\t\t\tmidi_params.push(midi[0].intt);\n\t\t\t\tif (midi.length === 4)\n\t\t\t\t\tmidi_params.push(midi[3].intt);\n\t\t\t}\n\t\t} else if (midiCmdParam1StringVariableIntegers.indexOf(midi_cmd) >= 0) {\n\t\t\t// ONE STRING, VARIABLE INT PARAMETERS\n\t\t\tif (midi.length < 2)\n\t\t\t\twarn(\"Expected string parameter and at least one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"alpha\")\n\t\t\t\twarn(\"Expected string parameter and at least one integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t\t\t\tvar p = midi.shift();\n\t\t\t\tmidi_params.push(p.token);\n\t\t\t\twhile (midi.length > 0) {\n\t\t\t\t\tp = midi.shift();\n\t\t\t\t\tif (p.type !== \"number\")\n\t\t\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\t\t\tmidi_params.push(p.intt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t else if (midiCmdParam1Integer1OptionalString.indexOf(midi_cmd) >= 0){\n\n\t // ONE INT PARAMETER, ONE OPTIONAL string\n\t \tif (midi.length !== 1 && midi.length !== 2) \n\t\t\t\twarn(\"Expected one or two parameters in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi[0].type !== \"number\") \n\t\t\t\twarn(\"Expected integer parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse if (midi.length === 2 && midi[1].type !== \"alpha\") \n\t\t\t\twarn(\"Expected alpha parameter in MIDI \" + midi_cmd, restOfString, 0);\n\t\t\telse {\n\t \tmidi_params.push(midi[0].intt);\n\n\t // Currently only bassprog and chordprog with optional octave shifts use this path\n\t if (midi.length === 2){\n\t var cmd = midi[1].token;\n\t if (cmd.indexOf(\"octave=\") != -1){\n\t cmd = cmd.replace(\"octave=\",\"\");\n\t cmd = parseInt(cmd);\n\t if (!isNaN(cmd)){\n\t // Limit range from -1 to 3 octaves\n\t if (cmd < -1){\n\t\t\t\t\twarn(\"Expected octave= in MIDI \" + midi_cmd + ' to be >= -1 (recv:'+cmd+')');\n\t cmd = -1;\n\t }\n\t if (cmd > 3){\n\t\t\t\t\twarn(\"Expected octave= in MIDI \" + midi_cmd + ' to be <= 3 (recv:'+cmd+')');\n\t cmd = 3;\n\t }\n\t midi_params.push(cmd);\n\t } else\n\t warn(\"Expected octave value in MIDI\" + midi_cmd);\n\t }\n\t else{\n\t warn(\"Expected octave= in MIDI\" + midi_cmd);\n\t }\n\t }\n\t }\n\t }\n\n\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\ttuneBuilder.appendElement('midi', -1, -1, { cmd: midi_cmd, params: midi_params });\n\t\telse {\n\t\t\tif (tune.formatting['midi'] === undefined)\n\t\t\t\ttune.formatting['midi'] = {};\n\t\t\ttune.formatting['midi'][midi_cmd] = midi_params;\n\t\t}\n\t};\n\n\tparseDirective.parseFontChangeLine = function(textstr) {\n\t\t// We don't want to match two dollar signs, so change those temporarily\n\t\ttextstr = textstr.replace(/\\$\\$/g,\"\\x03\")\n\t\tvar textParts = textstr.split('$');\n\t\tif (textParts.length > 1 && multilineVars.setfont) {\n\t\t\tvar textarr = [ ];\n\t\t\tif (textParts[0] !== '') // did the original string start with `$`?\n\t\t\t\ttextarr.push({ text: textParts[0] })\n\t\t\tfor (var i = 1; i < textParts.length; i++) {\n\t\t\t\tif (textParts[i][0] === '0')\n\t\t\t\t\ttextarr.push({ text: textParts[i].substring(1).replace(/\\x03/g,\"$$\") });\n\t\t\t\telse {\n\t\t\t\t\tvar whichFont = parseInt(textParts[i][0],10)\n\t\t\t\t\tif (multilineVars.setfont[whichFont])\n\t\t\t\t\t\ttextarr.push({font: multilineVars.setfont[whichFont], text: textParts[i].substring(1).replace(/\\x03/g,\"$$\") });\n\t\t\t\t\telse\n\t\t\t\t\t\ttextarr[textarr.length-1].text += '$' + textParts[i].replace(/\\x03/g,\"$$\");\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\treturn textarr;\n\t\t}\n\t\treturn textstr.replace(/\\x03/g,\"$$\");\n\t};\n\n\tvar positionChoices = [ 'auto', 'above', 'below', 'hidden' ];\n\tparseDirective.addDirective = function(str) {\n\t\tvar tokens = tokenizer.tokenize(str, 0, str.length);\t// 3 or more % in a row, or just spaces after %% is just a comment\n\t\tif (tokens.length === 0 || tokens[0].type !== 'alpha') return null;\n\t\tvar restOfString = str.substring(str.indexOf(tokens[0].token)+tokens[0].token.length);\n\t\trestOfString = tokenizer.stripComment(restOfString);\n\t\tvar cmd = tokens.shift().token.toLowerCase();\n\t\tvar scratch = \"\";\n\t\tvar line;\n\t\tswitch (cmd)\n\t\t{\n\t\t\t// The following directives were added to abc_parser_lint, but haven't been implemented here.\n\t\t\t// Most of them are direct translations from the directives that will be parsed in. See abcm2ps's format.txt for info on each of these.\n\t\t\t//\t\t\t\t\talignbars: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\taligncomposer: { type: \"string\", Enum: [ 'left', 'center','right' ], optional: true },\n\t\t\t//\t\t\t\t\tbstemdown: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tcontinueall: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tdynalign: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\texprabove: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\texprbelow: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tgchordbox: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tgracespacebefore: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tgracespaceinside: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tgracespaceafter: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tinfospace: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tlineskipfac: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxshrink: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxstaffsep: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tmaxsysstaffsep: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tnotespacingfactor: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tparskipfac: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tslurheight: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tsplittune: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tsquarebreve: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tstemheight: { type: \"number\", optional: true },\n\t\t\t//\t\t\t\t\tstraightflags: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\tstretchstaff: { type: \"boolean\", optional: true },\n\t\t\t//\t\t\t\t\ttitleformat: { type: \"string\", optional: true },\n\t\t\tcase \"bagpipes\":tune.formatting.bagpipes = true;break;\n\t\t\tcase \"flatbeams\":tune.formatting.flatbeams = true;break;\n\t\t\tcase \"jazzchords\":tune.formatting.jazzchords = true;break;\n\t\t\tcase \"accentAbove\":tune.formatting.accentAbove = true;break;\n\t\t\tcase \"germanAlphabet\":tune.formatting.germanAlphabet = true;break;\n\t\t\tcase \"landscape\":multilineVars.landscape = true;break;\n\t\t\tcase \"papersize\":multilineVars.papersize = restOfString;break;\n\t\t\tcase \"graceslurs\":\n\t\t\t\tif (tokens.length !== 1)\n\t\t\t\t\treturn \"Directive graceslurs requires one parameter: 0 or 1\";\n\t\t\t\tif (tokens[0].token === '0' || tokens[0].token === 'false')\n\t\t\t\t\ttune.formatting.graceSlurs = false;\n\t\t\t\telse if (tokens[0].token === '1' || tokens[0].token === 'true')\n\t\t\t\t\ttune.formatting.graceSlurs = true;\n\t\t\t\telse\n\t\t\t\t\treturn \"Directive graceslurs requires one parameter: 0 or 1 (received \" + tokens[0].token + ')';\n\t\t\t\tbreak;\n\t\t\tcase \"lineThickness\":\n\t\t\t\tvar lt = parseStretchLast(tokens);\n\t\t\t\tif (lt.value !== undefined)\n\t\t\t\t\ttune.formatting.lineThickness = lt.value;\n\t\t\t\tif (lt.error)\n\t\t\t\t\treturn lt.error;\n\t\t\t\tbreak;\n\t\t\tcase \"stretchlast\":\n\t\t\t\tvar sl = parseStretchLast(tokens);\n\t\t\t\tif (sl.value !== undefined)\n\t\t\t\t\ttune.formatting.stretchlast = sl.value;\n\t\t\t\tif (sl.error)\n\t\t\t\t\treturn sl.error;\n\t\t\t\tbreak;\n\t\t\tcase \"titlecaps\":multilineVars.titlecaps = true;break;\n\t\t\tcase \"titleleft\":tune.formatting.titleleft = true;break;\n\t\t\tcase \"measurebox\":tune.formatting.measurebox = true;break;\n\n\t\t\tcase \"vocal\": return addMultilineVarOneParamChoice(\"vocalPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"dynamic\": return addMultilineVarOneParamChoice(\"dynamicPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"gchord\": return addMultilineVarOneParamChoice(\"chordPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"ornament\": return addMultilineVarOneParamChoice(\"ornamentPosition\", cmd, tokens, positionChoices);\n\t\t\tcase \"volume\": return addMultilineVarOneParamChoice(\"volumePosition\", cmd, tokens, positionChoices);\n\n\t\t\tcase \"botmargin\":\n\t\t\tcase \"botspace\":\n\t\t\tcase \"composerspace\":\n\t\t\tcase \"indent\":\n\t\t\tcase \"leftmargin\":\n\t\t\tcase \"linesep\":\n\t\t\tcase \"musicspace\":\n\t\t\tcase \"partsspace\":\n\t\t\tcase \"pageheight\":\n\t\t\tcase \"pagewidth\":\n\t\t\tcase \"rightmargin\":\n\t\t\tcase \"stafftopmargin\":\n\t\t\tcase \"staffsep\":\n\t\t\tcase \"staffwidth\":\n\t\t\tcase \"subtitlespace\":\n\t\t\tcase \"sysstaffsep\":\n\t\t\tcase \"systemsep\":\n\t\t\tcase \"textspace\":\n\t\t\tcase \"titlespace\":\n\t\t\tcase \"topmargin\":\n\t\t\tcase \"topspace\":\n\t\t\tcase \"vocalspace\":\n\t\t\tcase \"wordsspace\":\n\t\t\t\treturn oneParameterMeasurement(cmd, tokens);\n\t\t\tcase \"voicescale\":\n\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\treturn \"voicescale requires one float as a parameter\";\n\t\t\t\tvar voiceScale = tokens.shift();\n\t\t\t\tif (multilineVars.currentVoice) {\n\t\t\t\t\tmultilineVars.currentVoice.scale = voiceScale.floatt;\n\t\t\t\t\ttuneBuilder.changeVoiceScale(multilineVars.currentVoice.scale);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\tcase \"voicecolor\":\n\t\t\t\tif (tokens.length !== 1) // this could either be of type alpha or quote, but it's ok if it is a number\n\t\t\t\t\treturn \"voicecolor requires one string as a parameter\";\n\t\t\t\tvar voiceColor = tokens.shift();\n\t\t\t\tif (multilineVars.currentVoice) {\n\t\t\t\t\tmultilineVars.currentVoice.color = voiceColor.token;\n\t\t\t\t\ttuneBuilder.changeVoiceColor(multilineVars.currentVoice.color);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\tcase \"vskip\":\n\t\t\t\tvar vskip = Math.round(getRequiredMeasurement(cmd, tokens));\n\t\t\t\tif (vskip.error)\n\t\t\t\t\treturn vskip.error;\n\t\t\t\ttuneBuilder.addSpacing(vskip);\n\t\t\t\treturn null;\n\t\t\tcase \"scale\":\n\t\t\t\tsetScale(cmd, tokens);\n\t\t\t\tbreak;\n\t\t\tcase \"sep\":\n\t\t\t\tif (tokens.length === 0)\n\t\t\t\t\ttuneBuilder.addSeparator(14,14,85, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+5}); // If no parameters are given, then there is a default size.\n\t\t\t\telse {\n\t\t\t\t\tvar points = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar spaceAbove = points.value;\n\n\t\t\t\t\tpoints = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar spaceBelow = points.value;\n\n\t\t\t\t\tpoints = tokenizer.getMeasurement(tokens);\n\t\t\t\t\tif (points.used === 0 || tokens.length !== 0)\n\t\t\t\t\t\treturn \"Directive \\\"\" + cmd + \"\\\" requires 3 numbers: space above, space below, length of line\";\n\t\t\t\t\tvar lenLine = points.value;\n\t\t\t\t\ttuneBuilder.addSeparator(spaceAbove, spaceBelow, lenLine, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"barsperstaff\":\n\t\t\t\tscratch = addMultilineVar('barsperstaff', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"staffnonote\":\n\t\t\t\t// The sense of the boolean is opposite here. \"0\" means true.\n\t\t\t\tif (tokens.length !== 1)\n\t\t\t\t\treturn \"Directive staffnonote requires one parameter: 0 or 1\";\n\t\t\t\tif (tokens[0].token === '0')\n\t\t\t\t\tmultilineVars.staffnonote = true;\n\t\t\t\telse if (tokens[0].token === '1')\n\t\t\t\t\tmultilineVars.staffnonote = false;\n\t\t\t\telse\n\t\t\t\t\treturn \"Directive staffnonote requires one parameter: 0 or 1 (received \" + tokens[0].token + ')';\n\t\t\t\tbreak;\n\t\t\tcase \"printtempo\":\n\t\t\t\tscratch = addMultilineVarBool('printTempo', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"partsbox\":\n\t\t\t\tscratch = addMultilineVarBool('partsBox', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tmultilineVars.partsfont.box = multilineVars.partsBox;\n\t\t\t\tbreak;\n\t\t\tcase \"freegchord\":\n\t\t\t\tscratch = addMultilineVarBool('freegchord', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"measurenb\":\n\t\t\tcase \"barnumbers\":\n\t\t\t\tscratch = addMultilineVar('barNumbers', cmd, tokens);\n\t\t\t\tif (scratch !== null) return scratch;\n\t\t\t\tbreak;\n\t\t\tcase \"setbarnb\":\n\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number') {\n\t\t\t\t\treturn 'Directive setbarnb requires a number as a parameter.';\n\t\t\t\t}\n\t\t\t\tmultilineVars.currBarNumber = tuneBuilder.setBarNumberImmediate(tokens[0].intt);\n\t\t\t\tbreak;\n\t\t\tcase \"begintext\":\n\t\t\t\tvar textBlock = '';\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\twhile(line && line.indexOf('%%endtext') !== 0) {\n\t\t\t\t\tif (parseCommon.startsWith(line, \"%%\"))\n\t\t\t\t\t\ttextBlock += line.substring(2) + \"\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\ttextBlock += line + \"\\n\";\n\t\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\t}\n\t\t\t\ttuneBuilder.addText(textBlock, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+textBlock.length+7});\n\t\t\t\tbreak;\n\t\t\tcase \"continueall\":\n\t\t\t\tmultilineVars.continueall = true;\n\t\t\t\tbreak;\n\t\t\tcase \"beginps\":\n\t\t\t\tline = tokenizer.nextLine();\n\t\t\t\twhile(line && line.indexOf('%%endps') !== 0) {\n\t\t\t\t\ttokenizer.nextLine();\n\t\t\t\t}\n\t\t\t\twarn(\"Postscript ignored\", str, 0);\n\t\t\t\tbreak;\n\t\t\tcase \"deco\":\n\t\t\t\tif (restOfString.length > 0)\n\t\t\t\t\tmultilineVars.ignoredDecorations.push(restOfString.substring(0, restOfString.indexOf(' ')));\n\t\t\t\twarn(\"Decoration redefinition ignored\", str, 0);\n\t\t\t\tbreak;\n\t\t\tcase \"text\":\n\t\t\t\tvar textstr = tokenizer.translateString(restOfString);\n\t\t\t\ttuneBuilder.addText(parseDirective.parseFontChangeLine(textstr), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length+7});\n\t\t\t\tbreak;\n\t\t\tcase \"center\":\n\t\t\t\tvar centerstr = tokenizer.translateString(restOfString);\n\t\t\t\ttuneBuilder.addCentered(parseDirective.parseFontChangeLine(centerstr));\n\t\t\t\tbreak;\n\t\t\tcase \"font\":\n\t\t\t\t// don't need to do anything for this; it is a useless directive\n\t\t\t\tbreak;\n\t\t\tcase \"setfont\":\n\t\t\t\tvar sfTokens = tokenizer.tokenize(restOfString, 0, restOfString.length);\n//\t\t\t\tvar sfDone = false;\n\t\t\t\tif (sfTokens.length >= 4) {\n\t\t\t\t\tif (sfTokens[0].token === '-' && sfTokens[1].type === 'number') {\n\t\t\t\t\t\tvar sfNum = parseInt(sfTokens[1].token);\n\t\t\t\t\t\tif (sfNum >= 1 && sfNum <= 9) {\n\t\t\t\t\t\t\tif (!multilineVars.setfont)\n\t\t\t\t\t\t\t\tmultilineVars.setfont = [];\n\t\t\t\t\t\t\tsfTokens.shift();\n\t\t\t\t\t\t\tsfTokens.shift();\n\t\t\t\t\t\t\tmultilineVars.setfont[sfNum] = getFontParameter(sfTokens, multilineVars.setfont[sfNum], str, 0, 'setfont');\n//\t\t\t\t\t\t\tvar sfSize = sfTokens.pop();\n//\t\t\t\t\t\t\tif (sfSize.type === 'number') {\n//\t\t\t\t\t\t\t\tsfSize = parseInt(sfSize.token);\n//\t\t\t\t\t\t\t\tvar sfFontName = '';\n//\t\t\t\t\t\t\t\tfor (var sfi = 2; sfi < sfTokens.length; sfi++)\n//\t\t\t\t\t\t\t\t\tsfFontName += sfTokens[sfi].token;\n//\t\t\t\t\t\t\t\tmultilineVars.setfont[sfNum] = { face: sfFontName, size: sfSize };\n//\t\t\t\t\t\t\t\tsfDone = true;\n//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\tif (!sfDone)\n//\t\t\t\t\treturn \"Bad parameters: \" + cmd;\n\t\t\t\tbreak;\n\t\t\tcase \"gchordfont\":\n\t\t\tcase \"partsfont\":\n\t\t\tcase \"tripletfont\":\n\t\t\tcase \"vocalfont\":\n\t\t\tcase \"textfont\":\n\t\t\tcase \"annotationfont\":\n\t\t\tcase \"historyfont\":\n\t\t\tcase \"infofont\":\n\t\t\tcase \"measurefont\":\n\t\t\tcase \"repeatfont\":\n\t\t\tcase \"wordsfont\":\n\t\t\t\treturn getChangingFont(cmd, tokens, str);\n\t\t\tcase \"composerfont\":\n\t\t\tcase \"subtitlefont\":\n\t\t\tcase \"tempofont\":\n\t\t\tcase \"titlefont\":\n\t\t\tcase \"voicefont\":\n\t\t\tcase \"footerfont\":\n\t\t\tcase \"headerfont\":\n\t\t\t\treturn getGlobalFont(cmd, tokens, str);\n\t\t\tcase \"barlabelfont\":\n\t\t\tcase \"barnumberfont\":\n\t\t\tcase \"barnumfont\":\n\t\t\t\treturn getChangingFont(\"measurefont\", tokens, str);\n\t\t\tcase \"staves\":\n\t\t\tcase \"score\":\n\t\t\t\tmultilineVars.score_is_present = true;\n\t\t\t\tvar addVoice = function(id, newStaff, bracket, brace, continueBar) {\n\t\t\t\t\tif (newStaff || multilineVars.staves.length === 0) {\n\t\t\t\t\t\tmultilineVars.staves.push({index: multilineVars.staves.length, numVoices: 0});\n\t\t\t\t\t}\n\t\t\t\t\tvar staff = parseCommon.last(multilineVars.staves);\n\t\t\t\t\tif (bracket !== undefined && staff.bracket === undefined) staff.bracket = bracket;\n\t\t\t\t\tif (brace !== undefined && staff.brace === undefined) staff.brace = brace;\n\t\t\t\t\tif (continueBar) staff.connectBarLines = 'end';\n\t\t\t\t\tif (multilineVars.voices[id] === undefined) {\n\t\t\t\t\t\tmultilineVars.voices[id] = {staffNum: staff.index, index: staff.numVoices};\n\t\t\t\t\t\tstaff.numVoices++;\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tvar openParen = false;\n\t\t\t\tvar openBracket = false;\n\t\t\t\tvar openBrace = false;\n\t\t\t\tvar justOpenParen = false;\n\t\t\t\tvar justOpenBracket = false;\n\t\t\t\tvar justOpenBrace = false;\n\t\t\t\tvar continueBar = false;\n\t\t\t\tvar lastVoice;\n\t\t\t\tvar addContinueBar = function() {\n\t\t\t\t\tcontinueBar = true;\n\t\t\t\t\tif (lastVoice) {\n\t\t\t\t\t\tvar ty = 'start';\n\t\t\t\t\t\tif (lastVoice.staffNum > 0) {\n\t\t\t\t\t\t\tif (multilineVars.staves[lastVoice.staffNum-1].connectBarLines === 'start' ||\n\t\t\t\t\t\t\t\tmultilineVars.staves[lastVoice.staffNum-1].connectBarLines === 'continue')\n\t\t\t\t\t\t\t\tty = 'continue';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultilineVars.staves[lastVoice.staffNum].connectBarLines = ty;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\twhile (tokens.length) {\n\t\t\t\t\tvar t = tokens.shift();\n\t\t\t\t\tswitch (t.token) {\n\t\t\t\t\t\tcase '(':\n\t\t\t\t\t\t\tif (openParen) warn(\"Can't nest parenthesis in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openParen = true;justOpenParen = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\tif (!openParen || justOpenParen) warn(\"Unexpected close parenthesis in %%score\", str, t.start);\n\t\t\t\t\t\t\telse openParen = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '[':\n\t\t\t\t\t\t\tif (openBracket) warn(\"Can't nest brackets in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBracket = true;justOpenBracket = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ']':\n\t\t\t\t\t\t\tif (!openBracket || justOpenBracket) warn(\"Unexpected close bracket in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBracket = false;multilineVars.staves[lastVoice.staffNum].bracket = 'end';}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '{':\n\t\t\t\t\t\t\tif (openBrace ) warn(\"Can't nest braces in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBrace = true;justOpenBrace = true;}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '}':\n\t\t\t\t\t\t\tif (!openBrace || justOpenBrace) warn(\"Unexpected close brace in %%score\", str, t.start);\n\t\t\t\t\t\t\telse {openBrace = false;multilineVars.staves[lastVoice.staffNum].brace = 'end';}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '|':\n\t\t\t\t\t\t\taddContinueBar();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tvar vc = \"\";\n\t\t\t\t\t\t\twhile (t.type === 'alpha' || t.type === 'number') {\n\t\t\t\t\t\t\t\tvc += t.token;\n\t\t\t\t\t\t\t\tif (t.continueId)\n\t\t\t\t\t\t\t\t\tt = tokens.shift();\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar newStaff = !openParen || justOpenParen;\n\t\t\t\t\t\t\tvar bracket = justOpenBracket ? 'start' : openBracket ? 'continue' : undefined;\n\t\t\t\t\t\t\tvar brace = justOpenBrace ? 'start' : openBrace ? 'continue' : undefined;\n\t\t\t\t\t\t\taddVoice(vc, newStaff, bracket, brace, continueBar);\n\t\t\t\t\t\t\tjustOpenParen = false;\n\t\t\t\t\t\t\tjustOpenBracket = false;\n\t\t\t\t\t\t\tjustOpenBrace = false;\n\t\t\t\t\t\t\tcontinueBar = false;\n\t\t\t\t\t\t\tlastVoice = multilineVars.voices[vc];\n\t\t\t\t\t\t\tif (cmd === 'staves')\n\t\t\t\t\t\t\t\taddContinueBar();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"newpage\":\n\t\t\t\tvar pgNum = tokenizer.getInt(restOfString);\n\t\t\t\ttuneBuilder.addNewPage(pgNum.digits === 0 ? -1 : pgNum.value);\n\t\t\t\tbreak;\n\n\t\t\tcase \"abc\":\n\t\t\t\tvar arr = restOfString.split(' ');\n\t\t\t\tswitch (arr[0]) {\n\t\t\t\t\tcase \"-copyright\":\n\t\t\t\t\tcase \"-creator\":\n\t\t\t\t\tcase \"-edited-by\":\n\t\t\t\t\tcase \"-version\":\n\t\t\t\t\tcase \"-charset\":\n\t\t\t\t\t\tvar subCmd = arr.shift();\n\t\t\t\t\t\ttuneBuilder.addMetaText(cmd+subCmd, arr.join(' '), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+restOfString.length+5});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Unknown directive: \" + cmd+arr[0];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"header\":\n\t\t\tcase \"footer\":\n\t\t\t\tvar footerStr = tokenizer.getMeat(restOfString, 0, restOfString.length);\n\t\t\t\tfooterStr = restOfString.substring(footerStr.start, footerStr.end);\n\t\t\t\tif (footerStr[0] === '\"' && footerStr[footerStr.length-1] === '\"' )\n\t\t\t\t\tfooterStr = footerStr.substring(1, footerStr.length-1);\n\t\t\t\tvar footerArr = footerStr.split('\\t');\n\t\t\t\tvar footer = {};\n\t\t\t\tif (footerArr.length === 1)\n\t\t\t\t\tfooter = { left: \"\", center: footerArr[0], right: \"\" };\n\t\t\t\telse if (footerArr.length === 2)\n\t\t\t\t\tfooter = { left: footerArr[0], center: footerArr[1], right: \"\" };\n\t\t\t\telse\n\t\t\t\t\tfooter = { left: footerArr[0], center: footerArr[1], right: footerArr[2] };\n\t\t\t\tif (footerArr.length > 3)\n\t\t\t\t\twarn(\"Too many tabs in \" + cmd + \": \" + footerArr.length + \" found.\", restOfString, 0);\n\n\t\t\t\ttuneBuilder.addMetaTextObj(cmd, footer, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+str.length});\n\t\t\t\tbreak;\n\n\t\t\tcase \"midi\":\n\t\t\t\tvar midi = tokenizer.tokenize(restOfString, 0, restOfString.length, true);\n\t\t\t\tif (midi.length > 0 && midi[0].token === '=')\n\t\t\t\t\tmidi.shift();\n\t\t\t\tif (midi.length === 0)\n\t\t\t\t\twarn(\"Expected midi command\", restOfString, 0);\n\t\t\t\telse\n\t\t\t\t\tparseMidiCommand(midi, tune, restOfString);\n\t\t\t\tbreak;\n\t\t\tcase \"percmap\":\n\t\t\t\tvar percmap = interpretPercMap(restOfString);\n\t\t\t\tif (percmap.error)\n\t\t\t\t\twarn(percmap.error, str, 8);\n\t\t\t\telse {\n\t\t\t\t\tif (!tune.formatting.percmap)\n\t\t\t\t\t\ttune.formatting.percmap = {};\n\t\t\t\t\ttune.formatting.percmap[percmap.key] = percmap.value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"map\":\n\t\t\tcase \"playtempo\":\n\t\t\tcase \"auquality\":\n\t\t\tcase \"continuous\":\n\t\t\tcase \"nobarcheck\":\n\t\t\t\t// TODO-PER: Actually handle the parameters of these\n\t\t\t\ttune.formatting[cmd] = restOfString;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn \"Unknown directive: \" + cmd;\n\t\t}\n\t\treturn null;\n\t};\n\tparseDirective.globalFormatting = function(formatHash) {\n\t\tfor (var cmd in formatHash) {\n\t\t\tif (formatHash.hasOwnProperty(cmd)) {\n\t\t\t\tvar value = ''+formatHash[cmd];\n\t\t\t\tvar tokens = tokenizer.tokenize(value, 0, value.length);\n\t\t\t\tvar scratch;\n\t\t\t\tswitch (cmd) {\n\t\t\t\t\tcase \"titlefont\":\n\t\t\t\t\tcase \"gchordfont\":\n\t\t\t\t\tcase \"composerfont\":\n\t\t\t\t\tcase \"footerfont\":\n\t\t\t\t\tcase \"headerfont\":\n\t\t\t\t\tcase \"historyfont\":\n\t\t\t\t\tcase \"infofont\":\n\t\t\t\t\tcase \"measurefont\":\n\t\t\t\t\tcase \"partsfont\":\n\t\t\t\t\tcase \"repeatfont\":\n\t\t\t\t\tcase \"subtitlefont\":\n\t\t\t\t\tcase \"tempofont\":\n\t\t\t\t\tcase \"textfont\":\n\t\t\t\t\tcase \"voicefont\":\n\t\t\t\t\tcase \"tripletfont\":\n\t\t\t\t\tcase \"vocalfont\":\n\t\t\t\t\tcase \"wordsfont\":\n\t\t\t\t\tcase \"annotationfont\":\n\t\t\t\t\tcase \"tablabelfont\":\n\t\t\t\t\tcase \"tabnumberfont\":\n\t\t\t\t\tcase \"tabgracefont\":\n\t\t\t\t\t\tgetChangingFont(cmd, tokens, value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"scale\":\n\t\t\t\t\t\tsetScale(cmd, tokens);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"partsbox\":\n\t\t\t\t\t\tscratch = addMultilineVarBool('partsBox', cmd, tokens);\n\t\t\t\t\t\tif (scratch !== null) warn(scratch);\n\t\t\t\t\t\tmultilineVars.partsfont.box = multilineVars.partsBox;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"freegchord\":\n\t\t\t\t\t\tscratch = addMultilineVarBool('freegchord', cmd, tokens);\n\t\t\t\t\t\tif (scratch !== null) warn(scratch);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"fontboxpadding\":\n\t\t\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\t\t\twarn(\"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\");\n\t\t\t\t\t\ttune.formatting.fontboxpadding = tokens[0].floatt;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stafftopmargin\":\n\t\t\t\t\t\tif (tokens.length !== 1 || tokens[0].type !== 'number')\n\t\t\t\t\t\t\twarn(\"Directive \\\"\" + cmd + \"\\\" requires a number as a parameter.\");\n\t\t\t\t\t\ttune.formatting.stafftopmargin = tokens[0].floatt;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stretchlast\":\n\t\t\t\t\t\tvar sl = parseStretchLast(tokens);\n\t\t\t\t\t\tif (sl.value !== undefined)\n\t\t\t\t\t\t\ttune.formatting.stretchlast = sl.value;\n\t\t\t\t\t\tif (sl.error)\n\t\t\t\t\t\t\treturn sl.error;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twarn(\"Formatting directive unrecognized: \", cmd, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction parseStretchLast(tokens) {\n\t\tif (tokens.length === 0)\n\t\t\treturn { value: 1 }; // if there is no value then the presence of this is the same as \"true\"\n\t\telse if (tokens.length === 1) {\n\t\t\tif (tokens[0].type === \"number\") {\n\t\t\t\tif (tokens[0].floatt >= 0 || tokens[0].floatt <= 1)\n\t\t\t\t\treturn {value: tokens[0].floatt};\n\t\t\t} else if (tokens[0].token === 'false') {\n\t\t\t\treturn { value: 0 };\n\t\t\t} else if (tokens[0].token === 'true') {\n\t\t\t\treturn {value: 1};\n\t\t\t}\n\t\t}\n\t\treturn { error: \"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received \" + tokens[0].token + ')' };\n\t}\n})();\n\nmodule.exports = parseDirective;\n","// abc_parse_header.js: parses a the header fields from a string representing ABC Music Notation into a usable internal structure.\n\nvar parseCommon = require('./abc_common');\nvar parseDirective = require('./abc_parse_directive');\nvar parseKeyVoice = require('./abc_parse_key_voice');\n\nvar ParseHeader = function(tokenizer, warn, multilineVars, tune, tuneBuilder) {\n\tthis.reset = function(tokenizer, warn, multilineVars, tune) {\n\t\tparseKeyVoice.initialize(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t\tparseDirective.initialize(tokenizer, warn, multilineVars, tune, tuneBuilder);\n\t};\n\tthis.reset(tokenizer, warn, multilineVars, tune);\n\n\tthis.setTitle = function(title, origSize) {\n\t\tif (multilineVars.hasMainTitle)\n\t\t\ttuneBuilder.addSubtitle(title, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+origSize+2});\t// display secondary title\n\t\telse\n\t\t{\n\t\t\ttuneBuilder.addMetaText(\"title\", title, { startChar: multilineVars.iChar, endChar: multilineVars.iChar+origSize+2});\n\t\t\tmultilineVars.hasMainTitle = true;\n\t\t}\n\t};\n\n\tthis.setMeter = function(line) {\n\t\tline = tokenizer.stripComment(line);\n\t\tif (line === 'C') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'common_time'};\n\t\t} else if (line === 'C|') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'cut_time'};\n\t\t} else if (line === 'o') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_perfectum'};\n\t\t} else if (line === 'c') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_imperfectum'};\n\t\t} else if (line === 'o.') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_perfectum_prolatio'};\n\t\t} else if (line === 'c.') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn {type: 'tempus_imperfectum_prolatio'};\n\t\t} else if (line.length === 0 || line.toLowerCase() === 'none') {\n\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\tmultilineVars.default_length = 0.125;\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar tokens = tokenizer.tokenize(line, 0, line.length);\n\t\t\t// the form is [open_paren] decimal [ plus|dot decimal ]... [close_paren] slash decimal [plus same_as_before]\n\t\t\ttry {\n\t\t\t\tvar parseNum = function() {\n\t\t\t\t\t// handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren]\n\t\t\t\t\tvar ret = {value: 0, num: \"\"};\n\n\t\t\t\t\tvar tok = tokens.shift();\n\t\t\t\t\tif (tok.token === '(')\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\twhile (1) {\n\t\t\t\t\t\tif (tok.type !== 'number') throw \"Expected top number of meter\";\n\t\t\t\t\t\tret.value += parseInt(tok.token);\n\t\t\t\t\t\tret.num += tok.token;\n\t\t\t\t\t\tif (tokens.length === 0 || tokens[0].token === '/') return ret;\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\t\tif (tok.token === ')') {\n\t\t\t\t\t\t\tif (tokens.length === 0 || tokens[0].token === '/') return ret;\n\t\t\t\t\t\t\tthrow \"Unexpected paren in meter\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tok.token !== '.' && tok.token !== '+') throw \"Expected top number of meter\";\n\t\t\t\t\t\tret.num += tok.token;\n\t\t\t\t\t\tif (tokens.length === 0) throw \"Expected top number of meter\";\n\t\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\treturn ret;\t// just to suppress warning\n\t\t\t\t};\n\n\t\t\t\tvar parseFraction = function() {\n\t\t\t\t\t// handles this much: parseNum slash decimal\n\t\t\t\t\tvar ret = parseNum();\n\t\t\t\t\tif (tokens.length === 0) return ret;\n\t\t\t\t\tvar tok = tokens.shift();\n\t\t\t\t\tif (tok.token !== '/') throw \"Expected slash in meter\";\n\t\t\t\t\ttok = tokens.shift();\n\t\t\t\t\tif (tok.type !== 'number') throw \"Expected bottom number of meter\";\n\t\t\t\t\tret.den = tok.token;\n\t\t\t\t\tret.value = ret.value / parseInt(ret.den);\n\t\t\t\t\treturn ret;\n\t\t\t\t};\n\n\t\t\t\tif (tokens.length === 0) throw \"Expected meter definition in M: line\";\n\t\t\t\tvar meter = {type: 'specified', value: [ ]};\n\t\t\t\tvar totalLength = 0;\n\t\t\t\twhile (1) {\n\t\t\t\t\tvar ret = parseFraction();\n\t\t\t\t\ttotalLength += ret.value;\n\t\t\t\t\tvar mv = { num: ret.num };\n\t\t\t\t\tif (ret.den !== undefined)\n\t\t\t\t\t\tmv.den = ret.den;\n\t\t\t\t\tmeter.value.push(mv);\n\t\t\t\t\tif (tokens.length === 0) break;\n\t\t\t\t\t//var tok = tokens.shift();\n\t\t\t\t\t//if (tok.token !== '+') throw \"Extra characters in M: line\";\n\t\t\t\t}\n\n\t\t\t\tif (multilineVars.havent_set_length === true) {\n\t\t\t\t\tmultilineVars.default_length = totalLength < 0.75 ? 0.0625 : 0.125;\n\t\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t\t}\n\t\t\t\treturn meter;\n\t\t\t} catch (e) {\n\t\t\t\twarn(e, line, 0);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tthis.calcTempo = function(relTempo) {\n\t\tvar dur = 1/4;\n\t\tif (multilineVars.meter && multilineVars.meter.type === 'specified') {\n\t\t\tdur = 1 / parseInt(multilineVars.meter.value[0].den);\n\t\t} else if (multilineVars.origMeter && multilineVars.origMeter.type === 'specified') {\n\t\t\tdur = 1 / parseInt(multilineVars.origMeter.value[0].den);\n\t\t}\n\t\t//var dur = multilineVars.default_length ? multilineVars.default_length : 1;\n\t\tfor (var i = 0; i < relTempo.duration; i++)\n\t\t\trelTempo.duration[i] = dur * relTempo.duration[i];\n\t\treturn relTempo;\n\t};\n\n\tthis.resolveTempo = function() {\n\t\tif (multilineVars.tempo) {\t// If there's a tempo waiting to be resolved\n\t\t\tthis.calcTempo(multilineVars.tempo);\n\t\t\ttune.metaText.tempo = multilineVars.tempo;\n\t\t\tdelete multilineVars.tempo;\n\t\t}\n\t};\n\n\tthis.addUserDefinition = function(line, start, end) {\n\t\tvar equals = line.indexOf('=', start);\n\t\tif (equals === -1) {\n\t\t\twarn(\"Need an = in a macro definition\", line, start);\n\t\t\treturn;\n\t\t}\n\n\t\tvar before = parseCommon.strip(line.substring(start, equals));\n\t\tvar after = parseCommon.strip(line.substring(equals+1));\n\n\t\tif (before.length !== 1) {\n\t\t\twarn(\"Macro definitions can only be one character\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tvar legalChars = \"HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~\";\n\t\tif (legalChars.indexOf(before) === -1) {\n\t\t\twarn(\"Macro definitions must be H-Y, h-w, or tilde\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tif (after.length === 0) {\n\t\t\twarn(\"Missing macro definition\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tif (multilineVars.macros === undefined)\n\t\t\tmultilineVars.macros = {};\n\t\tmultilineVars.macros[before] = after;\n\t};\n\n\tthis.setDefaultLength = function(line, start, end) {\n\t\tvar len = line.substring(start, end).replace(/ /g, \"\");\n\t\tvar len_arr = len.split('/');\n\t\tif (len_arr.length === 2) {\n\t\t\tvar n = parseInt(len_arr[0]);\n\t\t\tvar d = parseInt(len_arr[1]);\n\t\t\tif (d > 0) {\n\t\t\t\tmultilineVars.default_length = n / d;\t// a whole note is 1\n\t\t\t\tmultilineVars.havent_set_length = false;\n\t\t\t}\n\t\t} else if (len_arr.length === 1 && len_arr[0] === '1') {\n\t\t\tmultilineVars.default_length = 1;\n\t\t\tmultilineVars.havent_set_length = false;\n\t\t}\n\t};\n\n\n\tvar tempoString = {\n\n\t\tlarghissimo: 20,\n\t\tadagissimo: 24,\n\t\tsostenuto: 28,\n\t\tgrave: 32,\n\t\tlargo: 40,\n\t\tlento: 50,\n\t\tlarghetto: 60,\n\t\tadagio: 68,\n\t\tadagietto: 74,\n\t\tandante: 80,\n\t\tandantino: 88,\n\t\t\"marcia moderato\": 84,\n\t\t\"andante moderato\": 100,\n\t\tmoderato: 112,\n\t\tallegretto: 116,\n\t\t\"allegro moderato\": 120,\n\t\tallegro: 126,\n\t\tanimato: 132,\n\t\tagitato: 140,\n\t\tveloce: 148,\n\t\t\"mosso vivo\": 156,\n\t\tvivace: 164,\n\t\tvivacissimo: 172,\n\t\tallegrissimo: 176,\n\t\tpresto: 184,\n\t\tprestissimo: 210,\n\t};\n\n\tthis.setTempo = function(line, start, end, iChar) {\n\t\t//Q - tempo; can be used to specify the notes per minute, e.g. If\n\t\t//the meter denominator is a 4 note then Q:120 or Q:C=120\n\t\t//is 120 quarter notes per minute. Similarly Q:C3=40 would be 40\n\t\t//dotted half notes per minute. An absolute tempo may also be\n\t\t//set, e.g. Q:1/8=120 is 120 eighth notes per minute,\n\t\t//irrespective of the meter's denominator.\n\t\t//\n\t\t// This is either a number, \"C=number\", \"Cnumber=number\", or fraction [fraction...]=number\n\t\t// It depends on the M: field, which may either not be present, or may appear after this.\n\t\t// If M: is not present, an eighth note is used.\n\t\t// That means that this field can't be calculated until the end, if it is the first three types, since we don't know if we'll see an M: field.\n\t\t// So, if it is the fourth type, set it here, otherwise, save the info in the multilineVars.\n\t\t// The temporary variables we keep are the duration and the bpm. In the first two forms, the duration is 1.\n\t\t// In addition, a quoted string may both precede and follow. If a quoted string is present, then the duration part is optional.\n\t\ttry {\n\t\t\tvar tokens = tokenizer.tokenize(line, start, end);\n\n\t\t\tif (tokens.length === 0) throw \"Missing parameter in Q: field\";\n\n\t\t\tvar tempo = { startChar: iChar+start-2, endChar: iChar+end };\n\t\t\tvar delaySet = true;\n\t\t\tvar token = tokens.shift();\n\t\t\tif (token.type === 'quote') {\n\t\t\t\ttempo.preString = token.token;\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (tokens.length === 0) {\t// It's ok to just get a string for the tempo\n\t\t\t\t\t// If the string is a well-known tempo, put in the bpm\n\t\t\t\t\tif (tempoString[tempo.preString.toLowerCase()]) {\n\t\t\t\t\t\ttempo.bpm = tempoString[tempo.preString.toLowerCase()];\n\t\t\t\t\t\ttempo.suppressBpm = true;\n\t\t\t\t\t}\n\t\t\t\t\treturn {type: 'immediate', tempo: tempo};\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (token.type === 'alpha' && token.token === 'C')\t { // either type 2 or type 3\n\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after C in Q: field\";\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (token.type === 'punct' && token.token === '=') {\n\t\t\t\t\t// This is a type 2 format. The duration is an implied 1\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected number after = in Q: field\";\n\t\t\t\t\ttempo.duration = [1];\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t} else if (token.type === 'number') {\n\t\t\t\t\t// This is a type 3 format.\n\t\t\t\t\ttempo.duration = [parseInt(token.token)];\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing = after duration in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' || token.token !== '=') throw \"Expected = after duration in Q: field\";\n\t\t\t\t\tif (tokens.length === 0) throw \"Missing tempo after = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected number after = in Q: field\";\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t} else throw \"Expected number or equal after C in Q: field\";\n\n\t\t\t} else if (token.type === 'number') {\t// either type 1 or type 4\n\t\t\t\tvar num = parseInt(token.token);\n\t\t\t\tif (tokens.length === 0 || tokens[0].type === 'quote') {\n\t\t\t\t\t// This is type 1\n\t\t\t\t\ttempo.duration = [1];\n\t\t\t\t\ttempo.bpm = num;\n\t\t\t\t} else {\t// This is type 4\n\t\t\t\t\tdelaySet = false;\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' && token.token !== '/') throw \"Expected fraction in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\tvar den = parseInt(token.token);\n\t\t\t\t\ttempo.duration = [num/den];\n\t\t\t\t\t// We got the first fraction, keep getting more as long as we find them.\n\t\t\t\t\twhile (tokens.length > 0 && tokens[0].token !== '=' && tokens[0].type !== 'quote') {\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\tnum = parseInt(token.token);\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'punct' && token.token !== '/') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\t\tif (token.type !== 'number') throw \"Expected fraction in Q: field\";\n\t\t\t\t\t\tden = parseInt(token.token);\n\t\t\t\t\t\ttempo.duration.push(num/den);\n\t\t\t\t\t}\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'punct' && token.token !== '=') throw \"Expected = in Q: field\";\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.type !== 'number') throw \"Expected tempo in Q: field\";\n\t\t\t\t\ttempo.bpm = parseInt(token.token);\n\t\t\t\t}\n\t\t\t} else throw \"Unknown value in Q: field\";\n\t\t\tif (tokens.length !== 0) {\n\t\t\t\ttoken = tokens.shift();\n\t\t\t\tif (token.type === 'quote') {\n\t\t\t\t\ttempo.postString = token.token;\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t}\n\t\t\t\tif (tokens.length !== 0) throw \"Unexpected string at end of Q: field\";\n\t\t\t}\n\t\t\tif (multilineVars.printTempo === false)\n\t\t\t\ttempo.suppress = true;\n\t\t\treturn {type: delaySet?'delaySet':'immediate', tempo: tempo};\n\t\t} catch (msg) {\n\t\t\twarn(msg, line, start);\n\t\t\treturn {type: 'none'};\n\t\t}\n\t};\n\n\tthis.letter_to_inline_header = function(line, i, startLine)\n\t{\n\t\tvar needsNewLine = false\n\t\tvar ws = tokenizer.eatWhiteSpace(line, i);\n\t\ti +=ws;\n\t\tif (line.length >= i+5 && line[i] === '[' && line[i+2] === ':') {\n\t\t\tvar e = line.indexOf(']', i);\n\t\t\tvar startChar = multilineVars.iChar + i;\n\t\t\tvar endChar = multilineVars.iChar + e + 1;\n\t\t\tswitch(line.substring(i, i+3))\n\t\t\t{\n\t\t\t\tcase \"[I:\":\n\t\t\t\t\tvar err = parseDirective.addDirective(line.substring(i+3, e));\n\t\t\t\t\tif (err) warn(err, line, i);\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[M:\":\n\t\t\t\t\tvar meter = this.setMeter(line.substring(i+3, e));\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic() && meter)\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('meter', startChar, endChar, meter);\n\t\t\t\t\telse\n\t\t\t\t\t\tmultilineVars.meter = meter;\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[K:\":\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(i+3, e), true);\n\t\t\t\t\tif (result.foundClef && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', startChar, endChar, multilineVars.clef);\n\t\t\t\t\tif (result.foundKey && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', startChar, endChar, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[P:\":\n\t\t\t\t\tvar part = parseDirective.parseFontChangeLine(line.substring(i+3, e))\n\t\t\t\t\tif (startLine || tune.lines.length <= tune.lineNum)\n\t\t\t\t\t\tmultilineVars.partForNextLine = { title: part, startChar: startChar, endChar: endChar };\n\t\t\t\t\telse\n\t\t\t\t\t\ttuneBuilder.appendElement('part', startChar, endChar, {title: part});\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[L:\":\n\t\t\t\t\tthis.setDefaultLength(line, i+3, e);\n\t\t\t\t\treturn [ e-i+1+ws ];\n\t\t\t\tcase \"[Q:\":\n\t\t\t\t\tif (e > 0) {\n\t\t\t\t\t\tvar tempo = this.setTempo(line, i+3, e, multilineVars.iChar);\n\t\t\t\t\t\tif (tempo.type === 'delaySet') {\n\t\t\t\t\t\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('tempo', startChar, endChar, this.calcTempo(tempo.tempo));\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, this.calcTempo(tempo.tempo)]\n\t\t\t\t\t\t} else if (tempo.type === 'immediate') {\n\t\t\t\t\t\t\tif (!startLine && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('tempo', startChar, endChar, tempo.tempo);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, tempo.tempo]\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ e-i+1+ws, line[i+1], line.substring(i+3, e)];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[V:\":\n\t\t\t\t\tif (e > 0) {\n\t\t\t\t\t\tneedsNewLine = parseKeyVoice.parseVoice(line, i+3, e);\n\t\t\t\t\t\t//startNewLine();\n\t\t\t\t\t\treturn [ e-i+1+ws, line[i+1], line.substring(i+3, e), needsNewLine];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[r:\":\n\t\t\t\t\treturn [ e-i+1+ws ];\n\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO: complain about unhandled header\n\t\t\t}\n\t\t}\n\t\treturn [ 0 ];\n\t};\n\n\tthis.letter_to_body_header = function(line, i)\n\t{\n\t\tvar needsNewLine = false\n\t\tif (line.length >= i+3) {\n\t\t\tswitch(line.substring(i, i+2))\n\t\t\t{\n\t\t\t\tcase \"I:\":\n\t\t\t\t\tvar err = parseDirective.addDirective(line.substring(i+2));\n\t\t\t\t\tif (err) warn(err, line, i);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"M:\":\n\t\t\t\t\tvar meter = this.setMeter(line.substring(i+2));\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic() && meter)\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('meter', multilineVars.iChar + i, multilineVars.iChar + line.length, meter);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"K:\":\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(i+2), tuneBuilder.hasBeginMusic());\n\t\t\t\t\tif (result.foundClef && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', multilineVars.iChar + i, multilineVars.iChar + line.length, multilineVars.clef);\n\t\t\t\t\tif (result.foundKey && tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', multilineVars.iChar + i, multilineVars.iChar + line.length, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"P:\":\n\t\t\t\t\tif (tuneBuilder.hasBeginMusic())\n\t\t\t\t\t\ttuneBuilder.appendElement('part', multilineVars.iChar + i, multilineVars.iChar + line.length, {title: line.substring(i+2)});\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"L:\":\n\t\t\t\t\tthis.setDefaultLength(line, i+2, line.length);\n\t\t\t\t\treturn [ line.length ];\n\t\t\t\tcase \"Q:\":\n\t\t\t\t\tvar e = line.indexOf('\\x12', i+2);\n\t\t\t\t\tif (e === -1) e = line.length;\n\t\t\t\t\tvar tempo = this.setTempo(line, i+2, e, multilineVars.iChar);\n\t\t\t\t\tif (tempo.type === 'delaySet') tuneBuilder.appendElement('tempo', multilineVars.iChar + i, multilineVars.iChar + line.length, this.calcTempo(tempo.tempo));\n\t\t\t\t\telse if (tempo.type === 'immediate') tuneBuilder.appendElement('tempo', multilineVars.iChar + i, multilineVars.iChar + line.length, tempo.tempo);\n\t\t\t\treturn [ e, line[i], parseCommon.strip(line.substring(i+2))];\n\t\t\t\tcase \"V:\":\n\t\t\t\t\tneedsNewLine = parseKeyVoice.parseVoice(line, i+2, line.length);\n//\t\t\t\t\t\tstartNewLine();\n\t\t\t\t\treturn [ line.length, line[i], parseCommon.strip(line.substring(i+2)), needsNewLine];\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO: complain about unhandled header\n\t\t\t}\n\t\t}\n\t\treturn [ 0 ];\n\t};\n\n\tvar metaTextHeaders = {\n\t\tA: 'author',\n\t\tB: 'book',\n\t\tC: 'composer',\n\t\tD: 'discography',\n\t\tF: 'url',\n\t\tG: 'group',\n\t\tI: 'instruction',\n\t\tN: 'notes',\n\t\tO: 'origin',\n\t\tR: 'rhythm',\n\t\tS: 'source',\n\t\tW: 'unalignedWords',\n\t\tZ: 'transcription'\n\t};\n\n\tthis.parseHeader = function(line) {\n\t\tvar field = metaTextHeaders[line[0]];\n\t\tvar origSize = line.length-2\n\t\tvar restOfLine = tokenizer.translateString(tokenizer.stripComment(line.substring(2)))\n\t\tif (field === 'unalignedWords' || field === 'notes') {\n\t\t\t// These fields can be multi-line\n\t\t\ttuneBuilder.addMetaTextArray(field, parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t} else if (field !== undefined) {\n\t\t\t// these fields are single line\n\t\t\ttuneBuilder.addMetaText(field, parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t} else {\n\t\t\tvar startChar = multilineVars.iChar;\n\t\t\tvar endChar = startChar + line.length;\n\t\t\tswitch(line[0])\n\t\t\t{\n\t\t\t\tcase 'H':\n\t\t\t\t\t// History is a little different because once it starts it continues until another header field is encountered\n\t\t\t\t\ttuneBuilder.addMetaTextArray(\"history\", parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\tline = tokenizer.peekLine()\n\t\t\t\t\twhile (line && line[1] !== ':') {\n\t\t\t\t\t\ttokenizer.nextLine()\n\t\t\t\t\t\ttuneBuilder.addMetaTextArray(\"history\", parseDirective.parseFontChangeLine(tokenizer.translateString(tokenizer.stripComment(line))), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\t\tline = tokenizer.peekLine()\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'K':\n\t\t\t\t\t// since the key is the last thing that can happen in the header, we can resolve the tempo now\n\t\t\t\t\tthis.resolveTempo();\n\t\t\t\t\tvar result = parseKeyVoice.parseKey(line.substring(2), false);\n\t\t\t\t\tif (!multilineVars.is_in_header && tuneBuilder.hasBeginMusic()) {\n\t\t\t\t\t\tif (result.foundClef)\n\t\t\t\t\t\t\ttuneBuilder.appendStartingElement('clef', startChar, endChar, multilineVars.clef);\n\t\t\t\t\t\tif (result.foundKey)\n\t\t\t\t\t\t\ttuneBuilder.appendStartingElement('key', startChar, endChar, parseKeyVoice.fixKey(multilineVars.clef, multilineVars.key));\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.is_in_header = false;\t// The first key signifies the end of the header.\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'L':\n\t\t\t\t\tthis.setDefaultLength(line, 2, line.length);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'M':\n\t\t\t\t\tmultilineVars.origMeter = multilineVars.meter = this.setMeter(line.substring(2));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'P':\n\t\t\t\t\t// TODO-PER: There is more to do with parts, but the writer doesn't care.\n\t\t\t\t\tif (multilineVars.is_in_header)\n\t\t\t\t\t\ttuneBuilder.addMetaText(\"partOrder\", parseDirective.parseFontChangeLine(restOfLine), { startChar: multilineVars.iChar, endChar: multilineVars.iChar+line.length});\n\t\t\t\t\telse\n\t\t\t\t\t\tmultilineVars.partForNextLine = { title: restOfLine, startChar: startChar, endChar: endChar};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Q':\n\t\t\t\t\tvar tempo = this.setTempo(line, 2, line.length, multilineVars.iChar);\n\t\t\t\t\tif (tempo.type === 'delaySet') multilineVars.tempo = tempo.tempo;\n\t\t\t\t\telse if (tempo.type === 'immediate') {\n\t\t\t\t\t\tif (!tune.metaText.tempo)\n\t\t\t\t\t\t\ttune.metaText.tempo = tempo.tempo;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmultilineVars.tempoForNextLine = ['tempo', startChar, endChar, tempo.tempo]\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'T':\n\t\t\t\t\tif (multilineVars.titlecaps)\n\t\t\t\t\t\trestOfLine = restOfLine.toUpperCase();\t\t\n\t\t\t\t\tthis.setTitle(parseDirective.parseFontChangeLine(tokenizer.theReverser(restOfLine)), origSize);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'U':\n\t\t\t\t\tthis.addUserDefinition(line, 2, line.length);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'V':\n\t\t\t\t\tparseKeyVoice.parseVoice(line, 2, line.length);\n\t\t\t\t\tif (!multilineVars.is_in_header)\n\t\t\t\t\t\treturn {newline: true};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's':\n\t\t\t\t\treturn {symbols: true};\n\t\t\t\tcase 'w':\n\t\t\t\t\treturn {words: true};\n\t\t\t\tcase 'X':\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'm':\n\t\t\t\t\twarn(\"Ignored header\", line, 0);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {regular: true};\n\t\t\t}\n\t\t}\n\t\treturn {};\n\t};\n};\n\nmodule.exports = ParseHeader;\n","var parseDirective = require('./abc_parse_directive');\nvar transpose = require('./abc_transpose');\n\nvar parseKeyVoice = {};\n\n(function() {\n\tvar tokenizer;\n\tvar warn;\n\tvar multilineVars;\n\tvar tune;\n\tvar tuneBuilder;\n\tparseKeyVoice.initialize = function(tokenizer_, warn_, multilineVars_, tune_, tuneBuilder_) {\n\t\ttokenizer = tokenizer_;\n\t\twarn = warn_;\n\t\tmultilineVars = multilineVars_;\n\t\ttune = tune_;\n\t\ttuneBuilder = tuneBuilder_;\n\t};\n\n\tparseKeyVoice.standardKey = function(keyName, root, acc, localTranspose) {\n\t\treturn transpose.keySignature(multilineVars, keyName, root, acc, localTranspose);\n\t};\n\n\tvar clefLines = {\n\t\t'treble': { clef: 'treble', pitch: 4, mid: 0 },\n\t\t'treble+8': { clef: 'treble+8', pitch: 4, mid: 0 },\n\t\t'treble-8': { clef: 'treble-8', pitch: 4, mid: 0 },\n\t\t'treble^8': { clef: 'treble+8', pitch: 4, mid: 0 },\n\t\t'treble_8': { clef: 'treble-8', pitch: 4, mid: 0 },\n\t\t'treble1': { clef: 'treble', pitch: 2, mid: 2 },\n\t\t'treble2': { clef: 'treble', pitch: 4, mid: 0 },\n\t\t'treble3': { clef: 'treble', pitch: 6, mid: -2 },\n\t\t'treble4': { clef: 'treble', pitch: 8, mid: -4 },\n\t\t'treble5': { clef: 'treble', pitch: 10, mid: -6 },\n\t\t'perc': { clef: 'perc', pitch: 6, mid: 0 },\n\t\t'none': { clef: 'none', mid: 0 },\n\t\t'bass': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass+8': { clef: 'bass+8', pitch: 8, mid: -12 },\n\t\t'bass-8': { clef: 'bass-8', pitch: 8, mid: -12 },\n\t\t'bass^8': { clef: 'bass+8', pitch: 8, mid: -12 },\n\t\t'bass_8': { clef: 'bass-8', pitch: 8, mid: -12 },\n\t\t'bass+16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass-16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass^16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass_16': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass1': { clef: 'bass', pitch: 2, mid: -6 },\n\t\t'bass2': { clef: 'bass', pitch: 4, mid: -8 },\n\t\t'bass3': { clef: 'bass', pitch: 6, mid: -10 },\n\t\t'bass4': { clef: 'bass', pitch: 8, mid: -12 },\n\t\t'bass5': { clef: 'bass', pitch: 10, mid: -14 },\n\t\t'tenor': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'tenor1': { clef: 'alto', pitch: 2, mid: -2 },\n\t\t'tenor2': { clef: 'alto', pitch: 4, mid: -4 },\n\t\t'tenor3': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'tenor4': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'tenor5': { clef: 'alto', pitch: 10, mid: -10 },\n\t\t'alto': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'alto1': { clef: 'alto', pitch: 2, mid: -2 },\n\t\t'alto2': { clef: 'alto', pitch: 4, mid: -4 },\n\t\t'alto3': { clef: 'alto', pitch: 6, mid: -6 },\n\t\t'alto4': { clef: 'alto', pitch: 8, mid: -8 },\n\t\t'alto5': { clef: 'alto', pitch: 10, mid: -10 },\n\t\t'alto+8': { clef: 'alto+8', pitch: 6, mid: -6 },\n\t\t'alto-8': { clef: 'alto-8', pitch: 6, mid: -6 },\n\t\t'alto^8': { clef: 'alto+8', pitch: 6, mid: -6 },\n\t\t'alto_8': { clef: 'alto-8', pitch: 6, mid: -6 }\n\t};\n\n\tvar calcMiddle = function(clef, oct) {\n\t\tvar value = clefLines[clef];\n\t\tvar mid = value ? value.mid : 0;\n\t\treturn mid+oct;\n\t};\n\n\tparseKeyVoice.fixClef = function(clef) {\n\t\tvar value = clefLines[clef.type];\n\t\tif (value) {\n\t\t\tclef.clefPos = value.pitch;\n\t\t\tclef.type = value.clef;\n\t\t}\n\t};\n\n\tparseKeyVoice.deepCopyKey = function(key) {\n\t\tvar ret = { accidentals: [], root: key.root, acc: key.acc, mode: key.mode };\n\t\tkey.accidentals.forEach(function(k) {\n\t\tret.accidentals.push(Object.assign({},k));\n\t\t});\n\t\treturn ret;\n\t};\n\n\tvar pitches = {A: 5, B: 6, C: 0, D: 1, E: 2, F: 3, G: 4, a: 12, b: 13, c: 7, d: 8, e: 9, f: 10, g: 11};\n\n\tparseKeyVoice.addPosToKey = function(clef, key) {\n\t\t// Shift the key signature from the treble positions to whatever position is needed for the clef.\n\t\t// This may put the key signature unnaturally high or low, so if it does, then shift it.\n\t\tvar mid = clef.verticalPos;\n\t\tkey.accidentals.forEach(function(acc) {\n\t\t\tvar pitch = pitches[acc.note];\n\t\t\tpitch = pitch - mid;\n\t\t\tacc.verticalPos = pitch;\n\t\t});\n\t\tif (key.impliedNaturals)\n\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\tvar pitch = pitches[acc.note];\n\t\t\t\tpitch = pitch - mid;\n\t\t\t\tacc.verticalPos = pitch;\n\t\t\t});\n\n\t\tif (mid < -10) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat'))\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (acc.note === 'A' && acc.acc === 'sharp' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\tif ((acc.note === 'G' || acc.note === 'F') && acc.acc === 'flat' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat'))\n\t\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (acc.note === 'A' && acc.acc === 'sharp' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t\tif ((acc.note === 'G' || acc.note === 'F') && acc.acc === 'flat' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t});\n\t\t} else if (mid < -4) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\tif (mid === -8 && (acc.note === 'f' || acc.note === 'g') && acc.acc === 'sharp' )\n\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos -= 7;\n\t\t\t\t\tif (mid === -8 && (acc.note === 'f' || acc.note === 'g') && acc.acc === 'sharp' )\n\t\t\t\t\t\tacc.verticalPos -=7;\n\t\t\t\t});\n\t\t} else if (mid >= 7) {\n\t\t\tkey.accidentals.forEach(function(acc) {\n\t\t\t\tacc.verticalPos += 7;\n\t\t\t});\n\t\t\tif (key.impliedNaturals)\n\t\t\t\tkey.impliedNaturals.forEach(function(acc) {\n\t\t\t\t\tacc.verticalPos += 7;\n\t\t\t\t});\n\t\t}\n\t};\n\n\tparseKeyVoice.fixKey = function(clef, key) {\n\t\tvar fixedKey = Object.assign({},key);\n\t\tparseKeyVoice.addPosToKey(clef, fixedKey);\n\t\treturn fixedKey;\n\t};\n\n\tvar parseMiddle = function(str) {\n\t\tvar i = 0;\n\t\tvar p = str[i++];\n\t\tif (p === '^' || p === '_')\n\t\t\tp = str[i++];\n\t var mid = pitches[p];\n\t\tif (mid === undefined)\n\t\t\tmid = 6; // If a legal middle note wasn't received, just ignore it.\n\t\tfor ( ; i < str.length; i++) {\n\t\t\tif (str[i] === ',') mid -= 7;\n\t\t\telse if (str[i] === \"'\") mid += 7;\n\t\t\telse break;\n\t\t}\n\t\treturn { mid: mid - 6, str: str.substring(i) };\t// We get the note in the middle of the staff. We want the note that appears as the first ledger line below the staff.\n\t};\n\n\tvar normalizeAccidentals = function(accs) {\n\t\tfor (var i = 0; i < accs.length; i++) {\n\t\t\tif (accs[i].note === 'b')\n\t\t\t\taccs[i].note = 'B';\n\t\t\telse if (accs[i].note === 'a')\n\t\t\t\taccs[i].note = 'A';\n\t\t\telse if (accs[i].note === 'F')\n\t\t\t\taccs[i].note = 'f';\n\t\t\telse if (accs[i].note === 'E')\n\t\t\t\taccs[i].note = 'e';\n\t\t\telse if (accs[i].note === 'D')\n\t\t\t\taccs[i].note = 'd';\n\t\t\telse if (accs[i].note === 'C')\n\t\t\t\taccs[i].note = 'c';\n\t\t\telse if (accs[i].note === 'G' && accs[i].acc === 'sharp')\n\t\t\t\taccs[i].note = 'g';\n\t\t\telse if (accs[i].note === 'g' && accs[i].acc === 'flat')\n\t\t\t\taccs[i].note = 'G';\n\t\t}\n\t};\n\n\tparseKeyVoice.parseKey = function(str, isInline)\t// (and clef)\n\t{\n\t\t// returns:\n\t\t//\t\t{ foundClef: true, foundKey: true }\n\t\t// Side effects:\n\t\t//\t\tcalls warn() when there is a syntax error\n\t\t//\t\tsets these members of multilineVars:\n\t\t//\t\t\tclef\n\t\t//\t\t\tkey\n\t\t//\t\t\tstyle\n\t\t//\n\t\t// The format is:\n\t\t// K: [⟨key⟩] [⟨modifiers⟩*]\n\t\t// modifiers are any of the following in any order:\n\t\t// [⟨clef⟩] [middle=⟨pitch⟩] [transpose=[-]⟨number⟩] [stafflines=⟨number⟩] [staffscale=⟨number⟩][style=⟨style⟩]\n\t\t// key is none|HP|Hp|⟨specified_key⟩\n\t\t// clef is [clef=] [⟨clef type⟩] [⟨line number⟩] [+8|-8]\n\t\t// specified_key is ⟨pitch⟩[#|b][mode(first three chars are significant)][accidentals*]\n\t\tif (str.length === 0) {\n\t\t\t// an empty K: field is the same as K:none\n\t\t\tstr = 'none';\n\t\t}\n\t\tvar tokens = tokenizer.tokenize(str, 0, str.length);\n\t\tvar ret = {};\n\n\t\t// Be sure that a key was passed in\n\t\tif (tokens.length === 0) {\n\t\t\twarn(\"Must pass in key signature.\", str, 0);\n\t\t\treturn ret;\n\t\t}\n\n\t\t// first the key\n\t\tswitch (tokens[0].token) {\n\t\t\tcase 'HP':\n\t\t\t\tparseDirective.addDirective(\"bagpipes\");\n\t\t\t\tmultilineVars.key = { root: \"HP\", accidentals: [], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tcase 'Hp':\n\t\t\t\tparseDirective.addDirective(\"bagpipes\");\n\t\t\t\tmultilineVars.key = { root: \"Hp\", accidentals: [{acc: 'natural', note: 'g'}, {acc: 'sharp', note: 'f'}, {acc: 'sharp', note: 'c'}], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tcase 'none':\n\t\t\t\t// we got the none key - that's the same as C to us\n\t\t\t\tmultilineVars.key = { root: \"none\", accidentals: [], acc: \"\", mode: \"\" };\n\t\t\t\tret.foundKey = true;\n\t\t\t\ttokens.shift();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar retPitch = tokenizer.getKeyPitch(tokens[0].token);\n\t\t\t\tif (retPitch.len > 0) {\n\t\t\t\t\tret.foundKey = true;\n\t\t\t\t\tvar acc = \"\";\n\t\t\t\t\tvar mode = \"\";\n\t\t\t\t\t// The accidental and mode might be attached to the pitch, so we might want to just remove the first character.\n\t\t\t\t\tif (tokens[0].token.length > 1)\n\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\tvar key = retPitch.token;\n\t\t\t\t\t// We got a pitch to start with, so we might also have an accidental and a mode\n\t\t\t\t\tif (tokens.length > 0) {\n\t\t\t\t\t\tvar retAcc = tokenizer.getSharpFlat(tokens[0].token);\n\t\t\t\t\t\tif (retAcc.len > 0) {\n\t\t\t\t\t\t\tif (tokens[0].token.length > 1)\n\t\t\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\tkey += retAcc.token;\n\t\t\t\t\t\t\tacc = retAcc.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens.length > 0) {\n\t\t\t\t\t\t\tvar retMode = tokenizer.getMode(tokens[0].token);\n\t\t\t\t\t\t\tif (retMode.len > 0) {\n\t\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\t\tkey += retMode.token;\n\t\t\t\t\t\t\t\tmode = retMode.token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Be sure that the key specified is in the list: not all keys are physically possible, like Cbmin.\n\t\t\t\t\t\tif (parseKeyVoice.standardKey(key, retPitch.token, acc, 0) === undefined) {\n\t\t\t\t\t\t\twarn(\"Unsupported key signature: \" + key, str, 0);\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// We need to do a deep copy because we are going to modify it\n\t\t\t\t\tvar oldKey = parseKeyVoice.deepCopyKey(multilineVars.key);\n\t\t\t\t\t//TODO-PER: HACK! To get the local transpose to work, the transposition is done for each line. This caused the global transposition variable to be factored in twice, so, instead of rewriting that right now, I'm just subtracting one of them here.\n\t\t\t\t\tvar keyCompensate = !isInline && multilineVars.globalTranspose ? -multilineVars.globalTranspose : 0;\n\t\t\t\t\t//console.log(\"parse\", JSON.stringify(multilineVars), isInline)\n\t\t\t\t\tvar savedOrigKey;\n\t\t\t\t\tif (isInline)\n\t\t\t\t\t\tsavedOrigKey = multilineVars.globalTransposeOrigKeySig\n\t\t\t\t\tmultilineVars.key = parseKeyVoice.deepCopyKey(parseKeyVoice.standardKey(key, retPitch.token, acc, keyCompensate));\n\t\t\t\t\tif (isInline)\n\t\t\t\t\t\tmultilineVars.globalTransposeOrigKeySig = savedOrigKey\n\t\t\t\t\tmultilineVars.key.mode = mode;\n\t\t\t\t\tif (oldKey) {\n\t\t\t\t\t\t// Add natural in all places that the old key had an accidental.\n\t\t\t\t\t\tvar kk;\n\t\t\t\t\t\tfor (var k = 0; k < multilineVars.key.accidentals.length; k++) {\n\t\t\t\t\t\t\tfor (kk = 0; kk < oldKey.accidentals.length; kk++) {\n\t\t\t\t\t\t\t\tif (oldKey.accidentals[kk].note && multilineVars.key.accidentals[k].note.toLowerCase() === oldKey.accidentals[kk].note.toLowerCase())\n\t\t\t\t\t\t\t\t\toldKey.accidentals[kk].note = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (kk = 0; kk < oldKey.accidentals.length; kk++) {\n\t\t\t\t\t\t\tif (oldKey.accidentals[kk].note) {\n\t\t\t\t\t\t\t\tif (!multilineVars.key.impliedNaturals)\n\t\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals = [];\n\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals.push({ acc: 'natural', note: oldKey.accidentals[kk].note });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// There are two special cases of deprecated syntax. Ignore them if they occur\n\t\tif (tokens.length === 0) return ret;\n\t\tif (tokens[0].token === 'exp') tokens.shift();\n\t\tif (tokens.length === 0) return ret;\n\t\tif (tokens[0].token === 'oct') tokens.shift();\n\n\t\t// now see if there are extra accidentals\n\t\tif (tokens.length === 0) return ret;\n\t\tvar accs = tokenizer.getKeyAccidentals2(tokens);\n\t\tif (accs.warn)\n\t\t\twarn(accs.warn, str, 0);\n\t\t// If we have extra accidentals, first replace ones that are of the same pitch before adding them to the end.\n\t\tif (accs.accs) {\n\t\t\tif (!ret.foundKey) {\t\t// if there are only extra accidentals, make sure this is set.\n\t\t\t\tret.foundKey = true;\n\t\t\t\tmultilineVars.key = { root: \"none\", acc: \"\", mode: \"\", accidentals: [] };\n\t\t\t}\n\t\t\tnormalizeAccidentals(accs.accs);\n\t\t\tfor (var i = 0; i < accs.accs.length; i++) {\n\t\t\t\tvar found = false;\n\t\t\t\tfor (var j = 0; j < multilineVars.key.accidentals.length && !found; j++) {\n\t\t\t\t\tif (multilineVars.key.accidentals[j].note === accs.accs[i].note) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tif (multilineVars.key.accidentals[j].acc !== accs.accs[i].acc) {\n\t\t\t\t\t\t\t// If the accidental is different, then replace it. If it is the same, then the declaration was redundant, so just ignore it.\n\t\t\t\t\t\t\tmultilineVars.key.accidentals[j].acc = accs.accs[i].acc;\n\t\t\t\t\t\t\tif (!multilineVars.key.explicitAccidentals)\n\t\t\t\t\t\t\t\tmultilineVars.key.explicitAccidentals = [];\n\t\t\t\t\t\t\tmultilineVars.key.explicitAccidentals.push(accs.accs[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (!multilineVars.key.explicitAccidentals)\n\t\t\t\t\t\tmultilineVars.key.explicitAccidentals = [];\n\t\t\t\t\tmultilineVars.key.explicitAccidentals.push(accs.accs[i]);\n\t\t\t\t\tmultilineVars.key.accidentals.push(accs.accs[i]);\n\t\t\t\t\tif (multilineVars.key.impliedNaturals) {\n\t\t\t\t\t\tfor (var kkk = 0; kkk < multilineVars.key.impliedNaturals.length; kkk++) {\n\t\t\t\t\t\t\tif (multilineVars.key.impliedNaturals[kkk].note === accs.accs[i].note)\n\t\t\t\t\t\t\t\tmultilineVars.key.impliedNaturals.splice(kkk, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now see if any optional parameters are present. They have the form \"key=value\", except that \"clef=\" is optional\n\t\tvar token;\n\t\twhile (tokens.length > 0) {\n\t\t\tswitch (tokens[0].token) {\n\t\t\t\tcase \"m\":\n\t\t\t\tcase \"middle\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after middle\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after middle\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after middle=\", str, 0); return ret; }\n\t\t\t\t\tvar pitch = tokenizer.getPitchFromTokens(tokens);\n\t\t\t\t\tif (pitch.warn)\n\t\t\t\t\t\twarn(pitch.warn, str, 0);\n\t\t\t\t\tif (pitch.position)\n\t\t\t\t\t\tmultilineVars.clef.verticalPos = pitch.position - 6;\t// we get the position from the middle line, but want to offset it to the first ledger line.\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"transpose\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after transpose\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after transpose\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after transpose=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after transpose\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.transpose = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stafflines\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after stafflines\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after stafflines\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after stafflines=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after stafflines\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.stafflines = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"staffscale\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after staffscale\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after staffscale\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after staffscale=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after staffscale\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.clef.staffscale = tokens[0].floatt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"octave\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after octave\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after octave\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after octave=\", str, 0); return ret; }\n\t\t\t\t\tif (tokens[0].type !== 'number') { warn(\"Expected number after octave\", str, tokens[0].start); break; }\n\t\t\t\t\tmultilineVars.octave = tokens[0].intt;\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"style\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after style\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after style\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after style=\", str, 0); return ret; }\n\t\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\t\tcase \"normal\":\n\t\t\t\t\t\tcase \"harmonic\":\n\t\t\t\t\t\tcase \"rhythm\":\n\t\t\t\t\t\tcase \"x\":\n\t\t\t\t\t\tcase \"triangle\":\n\t\t\t\t\t\t\tmultilineVars.style = tokens[0].token;\n\t\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\twarn(\"error parsing style element: \" + tokens[0].token, str, tokens[0].start);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"clef\":\n\t\t\t\t\ttokens.shift();\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected = after clef\", str, 0); return ret; }\n\t\t\t\t\ttoken = tokens.shift();\n\t\t\t\t\tif (token.token !== \"=\") { warn(\"Expected = after clef\", str, token.start); break; }\n\t\t\t\t\tif (tokens.length === 0) { warn(\"Expected parameter after clef=\", str, 0); return ret; }\n\t\t\t\t\t//break; yes, we want to fall through. That allows \"clef=\" to be optional.\n\t\t\t\tcase \"treble\":\n\t\t\t\tcase \"bass\":\n\t\t\t\tcase \"alto\":\n\t\t\t\tcase \"tenor\":\n\t\t\t\tcase \"perc\":\n\t\t\t\tcase \"none\":\n\t\t\t\t\t// clef is [clef=] [⟨clef type⟩] [⟨line number⟩] [+8|-8]\n\t\t\t\t\tvar clef = tokens.shift();\n\t\t\t\t\tswitch (clef.token) {\n\t\t\t\t\t\tcase 'treble':\n\t\t\t\t\t\tcase 'tenor':\n\t\t\t\t\t\tcase 'alto':\n\t\t\t\t\t\tcase 'bass':\n\t\t\t\t\t\tcase 'perc':\n\t\t\t\t\t\tcase 'none':\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'C': clef.token = 'alto'; break;\n\t\t\t\t\t\tcase 'F': clef.token = 'bass'; break;\n\t\t\t\t\t\tcase 'G': clef.token = 'treble'; break;\n\t\t\t\t\t\tcase 'c': clef.token = 'alto'; break;\n\t\t\t\t\t\tcase 'f': clef.token = 'bass'; break;\n\t\t\t\t\t\tcase 'g': clef.token = 'treble'; break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\twarn(\"Expected clef name. Found \" + clef.token, str, clef.start);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tokens.length > 0 && tokens[0].type === 'number') {\n\t\t\t\t\t\tclef.token += tokens[0].token;\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\tif (tokens.length > 1 && (tokens[0].token === '-' || tokens[0].token === '+' || tokens[0].token === '^' || tokens[0].token === '_') && tokens[1].token === '8') {\n\t\t\t\t\t\tclef.token += tokens[0].token + tokens[1].token;\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.clef = {type: clef.token, verticalPos: calcMiddle(clef.token, 0)};\n\t\t\t\t\tif (multilineVars.currentVoice && multilineVars.currentVoice.transpose !== undefined)\n\t\t\t\t\t\tmultilineVars.clef.transpose = multilineVars.currentVoice.transpose;\n\t\t\t\t\tret.foundClef = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\twarn(\"Unknown parameter: \" + tokens[0].token, str, tokens[0].start);\n\t\t\t\t\ttokens.shift();\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t};\n\n\tvar setCurrentVoice = function(id) {\n\t\tvar currentVoice = multilineVars.voices[id]\n\t\tif (multilineVars.currentVoice) {\n\t\t\tif (multilineVars.currentVoice.index === currentVoice.index && multilineVars.currentVoice.staffNum === currentVoice.staffNum)\n\t\t\t\treturn // there was no change so don't reset it.\n\t\t}\n\t\tmultilineVars.currentVoice = currentVoice;\n\t\treturn tuneBuilder.setCurrentVoice(currentVoice.staffNum, currentVoice.index, id);\n\t};\n\n\tparseKeyVoice.parseVoice = function(line, i, e) {\n\t\t//First truncate the string to the first non-space character after V: through either the\n\t\t//end of the line or a % character. Then remove trailing spaces, too.\n\t\tvar ret = tokenizer.getMeat(line, i, e);\n\t\tvar start = ret.start;\n\t\tvar end = ret.end;\n\t\t//The first thing on the line is the ID. It can be any non-space string and terminates at the\n\t\t//first space.\n\t\tvar id = tokenizer.getToken(line, start, end);\n\t\tif (id.length === 0) {\n\t\t\twarn(\"Expected a voice id\", line, start);\n\t\t\treturn;\n\t\t}\n\t\tvar isNew = false;\n\t\tif (multilineVars.voices[id] === undefined) {\n\t\t\tmultilineVars.voices[id] = {};\n\t\t\tisNew = true;\n\t\t\tif (multilineVars.score_is_present)\n\t\t\t\twarn(\"Can't have an unknown V: id when the %score directive is present\", line, start);\n\t\t}\n\t\tstart += id.length;\n\t\tstart += tokenizer.eatWhiteSpace(line, start);\n\n\t\tvar staffInfo = {startStaff: isNew};\n\t\tvar addNextTokenToStaffInfo = function(name) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse\n\t\t\t\tstaffInfo[name] = attr.token;\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar addNextTokenToVoiceInfo = function(id, name, type) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tif (type === 'number')\n\t\t\t\t\tattr.token = parseFloat(attr.token);\n\t\t\t\tmultilineVars.voices[id][name] = attr.token;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar getNextToken = function(name, type) {\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.err !== undefined)\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice: \" + attr.err, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected value for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tif (type === 'number')\n\t\t\t\t\tattr.token = parseFloat(attr.token);\n\t\t\t\treturn attr.token;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\t\tvar addNextNoteTokenToVoiceInfo = function(id, name) {\n\t\t\tvar noteToTransposition = {\n\t\t\t\t\"_B\": 2,\n\t\t\t\t\"_E\": 9,\n\t\t\t\t\"_b\": -10,\n\t\t\t\t\"_e\": -3\n\t\t\t};\n\t\t\tvar attr = tokenizer.getVoiceToken(line, start, end);\n\t\t\tif (attr.warn !== undefined)\n\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice: \" + attr.warn, line, start);\n\t\t\telse if (attr.token.length === 0 && line[start] !== '\"')\n\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice\", line, start);\n\t\t\telse {\n\t\t\t\tvar t = noteToTransposition[attr.token];\n\t\t\t\tif (!t)\n\t\t\t\t\twarn(\"Expected one of (_B, _E, _b, _e) for \" + name + \" in voice\", line, start);\n\t\t\t\telse\n\t\t\t\t\tmultilineVars.voices[id][name] = t;\n\t\t\t}\n\t\t\tstart += attr.len;\n\t\t};\n\n\t\t//Then the following items can occur in any order:\n\t\twhile (start < end) {\n\t\t\tvar token = tokenizer.getVoiceToken(line, start, end);\n\t\t\tstart += token.len;\n\n\t\t\tif (token.warn) {\n\t\t\t\twarn(\"Error parsing voice: \" + token.warn, line, start);\n\t\t\t} else {\n\t\t\t\tvar attr = null;\n\t\t\t\tswitch (token.token) {\n\t\t\t\t\tcase 'clef':\n\t\t\t\t\tcase 'cl':\n\t\t\t\t\t\taddNextTokenToStaffInfo('clef');\n\t\t\t\t\t\t// TODO-PER: check for a legal clef; do octavizing\n\t\t\t\t\t\tvar oct = 0;\n\t//\t\t\t\t\t\t\tfor (var ii = 0; ii < staffInfo.clef.length; ii++) {\n\t//\t\t\t\t\t\t\t\tif (staffInfo.clef[ii] === ',') oct -= 7;\n\t//\t\t\t\t\t\t\t\telse if (staffInfo.clef[ii] === \"'\") oct += 7;\n\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staffInfo.clef !== undefined) {\n\t\t\t\t\t\t staffInfo.clef = staffInfo.clef.replace(/[',]/g, \"\"); //'//comment for emacs formatting of regexp\n\t\t\t\t\t\t\tif (staffInfo.clef.indexOf('+16') !== -1) {\n\t\t\t\t\t\t\t\toct += 14;\n\t\t\t\t\t\t\t\tstaffInfo.clef = staffInfo.clef.replace('+16', '');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstaffInfo.verticalPos = calcMiddle(staffInfo.clef, oct);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'treble':\n\t\t\t\t\tcase 'bass':\n\t\t\t\t\tcase 'tenor':\n\t\t\t\t\tcase 'alto':\n\t\t\t\t\tcase 'perc':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\tcase 'treble\\'':\n\t\t\t\t\tcase 'bass\\'':\n\t\t\t\t\tcase 'tenor\\'':\n\t\t\t\t\tcase 'alto\\'':\n\t\t\t\t\tcase 'none\\'':\n\t\t\t\t\tcase 'treble\\'\\'':\n\t\t\t\t\tcase 'bass\\'\\'':\n\t\t\t\t\tcase 'tenor\\'\\'':\n\t\t\t\t\tcase 'alto\\'\\'':\n\t\t\t\t\tcase 'none\\'\\'':\n\t\t\t\t\tcase 'treble,':\n\t\t\t\t\tcase 'bass,':\n\t\t\t\t\tcase 'tenor,':\n\t\t\t\t\tcase 'alto,':\n\t\t\t\t\tcase 'none,':\n\t\t\t\t\tcase 'treble,,':\n\t\t\t\t\tcase 'bass,,':\n\t\t\t\t\tcase 'tenor,,':\n\t\t\t\t\tcase 'alto,,':\n\t\t\t\t\tcase 'none,,':\n\t\t\t\t\t\t// TODO-PER: handle the octave indicators on the clef by changing the middle property\n\t\t\t\t\t\tvar oct2 = 0;\n\t//\t\t\t\t\t\t\tfor (var iii = 0; iii < token.token.length; iii++) {\n\t//\t\t\t\t\t\t\t\tif (token.token[iii] === ',') oct2 -= 7;\n\t//\t\t\t\t\t\t\t\telse if (token.token[iii] === \"'\") oct2 += 7;\n\t//\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t staffInfo.clef = token.token.replace(/[',]/g, \"\"); //'//comment for emacs formatting of regexp\n\t\t\t\t\t\tstaffInfo.verticalPos = calcMiddle(staffInfo.clef, oct2);\n\t\t\t\t\t\tmultilineVars.voices[id].clef = token.token;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'staves':\n\t\t\t\t\tcase 'stave':\n\t\t\t\t\tcase 'stv':\n\t\t\t\t\t\taddNextTokenToStaffInfo('staves');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'brace':\n\t\t\t\t\tcase 'brc':\n\t\t\t\t\t\taddNextTokenToStaffInfo('brace');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bracket':\n\t\t\t\t\tcase 'brk':\n\t\t\t\t\t\taddNextTokenToStaffInfo('bracket');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'name':\n\t\t\t\t\tcase 'nm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('name');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'subname':\n\t\t\t\t\tcase 'sname':\n\t\t\t\t\tcase 'snm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('subname');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'merge':\n\t\t\t\t\t\tstaffInfo.startStaff = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stem':\n\t\t\t\t\tcase 'stems':\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.warn !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for stems in voice: \" + attr.warn, line, start);\n\t\t\t\t\t\telse if (attr.err !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for stems in voice: \" + attr.err, line, start);\n\t\t\t\t\t\telse if (attr.token === 'up' || attr.token === 'down')\n\t\t\t\t\t\t\tmultilineVars.voices[id].stem = attr.token;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"Expected up or down for voice stem\", line, start);\n\t\t\t\t\t\tstart += attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'up':\n\t\t\t\t\tcase 'down':\n\t\t\t\t\t\tmultilineVars.voices[id].stem = token.token;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'middle':\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\taddNextTokenToStaffInfo('verticalPos');\n\t\t\t\t\t\tstaffInfo.verticalPos = parseMiddle(staffInfo.verticalPos).mid;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'gchords':\n\t\t\t\t\tcase 'gch':\n\t\t\t\t\t\tmultilineVars.voices[id].suppressChords = true;\n\t\t\t\t\t\t// gchords can stand on its own, or it could be gchords=0.\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.token === \"0\")\n\t\t\t\t\t\t\tstart = start + attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'space':\n\t\t\t\t\tcase 'spc':\n\t\t\t\t\t\taddNextTokenToStaffInfo('spacing');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'scale':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'scale', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'score':\n\t\t\t\t\t\taddNextNoteTokenToVoiceInfo(id, 'scoreTranspose');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'transpose':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'transpose', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stafflines':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'stafflines', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'staffscale':\n\t\t\t\t\t\t// TODO-PER: This is passed to the engraver, but the engraver ignores it.\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'staffscale', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'octave':\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'octave', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'volume':\n\t\t\t\t\t\t// TODO-PER: This is accepted, but not implemented, yet.\n\t\t\t\t\t\taddNextTokenToVoiceInfo(id, 'volume', 'number');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'cue':\n\t\t\t\t\t\t// TODO-PER: This is accepted, but not implemented, yet.\n\t\t\t\t\t\tvar cue = getNextToken('cue', 'string');\n\t\t\t\t\t\tif (cue === 'on')\n\t\t\t\t\t\t\tmultilineVars.voices[id].scale = 0.6;\n\t\t\t\t\t\telse multilineVars.voices[id].scale = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"style\":\n\t\t\t\t\t\tattr = tokenizer.getVoiceToken(line, start, end);\n\t\t\t\t\t\tif (attr.warn !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for style in voice: \" + attr.warn, line, start);\n\t\t\t\t\t\telse if (attr.err !== undefined)\n\t\t\t\t\t\t\twarn(\"Expected value for style in voice: \" + attr.err, line, start);\n\t\t\t\t\t\telse if (attr.token === 'normal' || attr.token === 'harmonic' || attr.token === 'rhythm' || attr.token === 'x' || attr.token === 'triangle')\n\t\t\t\t\t\t\tmultilineVars.voices[id].style = attr.token;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\twarn(\"Expected one of [normal, harmonic, rhythm, x, triangle] for voice style\", line, start);\n\t\t\t\t\t\tstart += attr.len;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// default:\n\t\t\t\t\t// Use this to find V: usages that aren't handled.\n\t\t\t\t\t// \tconsole.log(\"parse voice\", token, tune.metaText.title);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstart += tokenizer.eatWhiteSpace(line, start);\n\t\t}\n\n\t\t// now we've filled up staffInfo, figure out what to do with this voice\n\t\t// TODO-PER: It is unclear from the standard and the examples what to do with brace, bracket, and staves, so they are ignored for now.\n\t\tif (staffInfo.startStaff || multilineVars.staves.length === 0) {\n\t\t\tmultilineVars.staves.push({index: multilineVars.staves.length, meter: multilineVars.origMeter});\n\t\t\tif (!multilineVars.score_is_present)\n\t\t\t\tmultilineVars.staves[multilineVars.staves.length-1].numVoices = 0;\n\t\t}\n\t\tif (multilineVars.voices[id].staffNum === undefined) {\n\t\t\t// store where to write this for quick access later.\n\t\t\tmultilineVars.voices[id].staffNum = multilineVars.staves.length-1;\n\t\t\tvar vi = 0;\n\t\t\tfor(var v in multilineVars.voices) {\n\t\t\t\tif(multilineVars.voices.hasOwnProperty(v)) {\n\t\t\t\t\tif (multilineVars.voices[v].staffNum === multilineVars.voices[id].staffNum)\n\t\t\t\t\t\tvi++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmultilineVars.voices[id].index = vi-1;\n\t\t}\n\t\tvar s = multilineVars.staves[multilineVars.voices[id].staffNum];\n\t\tif (!multilineVars.score_is_present)\n\t\t\ts.numVoices++;\n\t\tif (staffInfo.clef) s.clef = {type: staffInfo.clef, verticalPos: staffInfo.verticalPos};\n\t\tif (staffInfo.spacing) s.spacing_below_offset = staffInfo.spacing;\n\t\tif (staffInfo.verticalPos) s.verticalPos = staffInfo.verticalPos;\n\n\t\tif (staffInfo.name) {if (s.name) s.name.push(staffInfo.name); else s.name = [ staffInfo.name ];}\n\t\tif (staffInfo.subname) {if (s.subname) s.subname.push(staffInfo.subname); else s.subname = [ staffInfo.subname ];}\n\n\t\treturn setCurrentVoice(id);\n\t};\n\n})();\n\nmodule.exports = parseKeyVoice;\n","var parseKeyVoice = require('./abc_parse_key_voice');\nvar transpose = require('./abc_transpose');\n\nvar tokenizer;\nvar warn;\nvar multilineVars;\nvar tune;\nvar tuneBuilder;\nvar header;\n\nvar {\n legalAccents,\n volumeDecorations,\n dynamicDecorations,\n accentPseudonyms,\n accentDynamicPseudonyms,\n nonDecorations,\n durations,\n pitches,\n rests,\n accMap,\n tripletQ\n} = require('./abc_parse_settings')\n\nvar MusicParser = function(_tokenizer, _warn, _multilineVars, _tune, _tuneBuilder, _header) {\n\ttokenizer = _tokenizer;\n\twarn = _warn;\n\tmultilineVars = _multilineVars;\n\ttune = _tune;\n\ttuneBuilder = _tuneBuilder;\n\theader = _header;\n\tthis.lineContinuation = false;\n}\n\n//\n// Parse line of music\n//\n// This is a stream of <(bar-marking|header|note-group)...> in any order, with optional spaces between each element\n// core-note is with no spaces within that\n// chord is with no spaces within that\n// grace-notes is spaces are allowed\n// note-group is spaces are allowed between items\n// bar-marking is or spaces allowed\n// header is spaces can occur between the colon, in the field, and before the close bracket\n// header can also be the only thing on a line. This is true even if it is a continuation line. In this case the brackets are not required.\n// a space is a back-tick, a space, or a tab. If it is a back-tick, then there is no end-beam.\n\n// Line preprocessing: anything after a % is ignored (the double %% should have been taken care of before this)\n// Then, all leading and trailing spaces are ignored.\n// If there was a line continuation, the \\n was replaced by a \\r and the \\ was replaced by a space. This allows the construct\n// of having a header mid-line conceptually, but actually be at the start of the line. This is equivolent to putting the header in [ ].\n\n// TODO-PER: How to handle ! for line break?\n// TODO-PER: dots before bar, dots before slur\n// TODO-PER: U: redefinable symbols.\n\n// Ambiguous symbols:\n// \"[\" can be the start of a chord, the start of a header element or part of a bar line.\n// --- if it is immediately followed by \"|\", it is a bar line\n// --- if it is immediately followed by K: L: M: V: it is a header (note: there are other headers mentioned in the standard, but I'm not sure how they would be used.)\n// --- otherwise it is the beginning of a chord\n// \"(\" can be the start of a slur or a triplet\n// --- if it is followed by a number from 2-9, then it is a triplet\n// --- otherwise it is a slur\n// \"]\"\n// --- if there is a chord open, then this is the close\n// --- if it is after a [|, then it is an invisible bar line\n// --- otherwise, it is par of a bar\n// \".\" can be a bar modifier or a slur modifier, or a decoration\n// --- if it comes immediately before a bar, it is a bar modifier\n// --- if it comes immediately before a slur, it is a slur modifier\n// --- otherwise it is a decoration for the next note.\n// number:\n// --- if it is after a bar, with no space, it is an ending marker\n// --- if it is after a ( with no space, it is a triplet count\n// --- if it is after a pitch or octave or slash, then it is a duration\n\n// Unambiguous symbols (except inside quoted strings):\n// vertical-bar, colon: part of a bar\n// ABCDEFGabcdefg: pitch\n// xyzZ: rest\n// comma, prime: octave\n// close-paren: end-slur\n// hyphen: tie\n// tilde, v, u, bang, plus, THLMPSO: decoration\n// carat, underscore, equal: accidental\n// ampersand: time reset\n// open-curly, close-curly: grace notes\n// double-quote: chord symbol\n// less-than, greater-than, slash: duration\n// back-tick, space, tab: space\n\nvar isInTie = function(multilineVars, overlayLevel, el) {\n\tif (multilineVars.inTie[overlayLevel] === undefined)\n\t\treturn false;\n\t// If this is single voice music then the voice index isn't set, so we use the first voice.\n\tvar voiceIndex = multilineVars.currentVoice ? multilineVars.currentVoice.staffNum * 100 + multilineVars.currentVoice.index : 0;\n\tif (multilineVars.inTie[overlayLevel][voiceIndex]) {\n\t\tif (el.pitches !== undefined || el.rest.type !== 'spacer')\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nvar el = { };\nMusicParser.prototype.parseMusic = function(line) {\n\theader.resolveTempo();\n\t//multilineVars.havent_set_length = false;\t// To late to set this now.\n\tmultilineVars.is_in_header = false;\t// We should have gotten a key header by now, but just in case, this is definitely out of the header.\n\tvar i = 0;\n\tvar startOfLine = multilineVars.iChar;\n\t// see if there is nothing but a comment on this line. If so, just ignore it. A full line comment is optional white space followed by %\n\twhile (tokenizer.isWhiteSpace(line[i]) && i < line.length)\n\t\ti++;\n\tif (i === line.length || line[i] === '%')\n\t\treturn;\n\n\t// Start with the standard staff, clef and key symbols on each line\n\tvar delayStartNewLine = multilineVars.start_new_line;\n\tif (multilineVars.continueall === undefined)\n\t\tmultilineVars.start_new_line = true;\n\telse\n\t\tmultilineVars.start_new_line = false;\n\tvar tripletNotesLeft = 0;\n\n\t// See if the line starts with a header field\n\tvar retHeader = header.letter_to_body_header(line, i);\n\tif (retHeader[0] > 0) {\n\t\ti += retHeader[0];\n\t\t// fixes bug on this: c[V:2]d\n\t\tif (retHeader[1] === 'V')\n\t\t\tthis.startNewLine();\n\t\t\t// delayStartNewLine = true;\n\t\t// TODO-PER: Handle inline headers\n\t}\n\n\tvar overlayLevel = 0;\n\twhile (i < line.length)\n\t{\n\t\tvar startI = i;\n\t\tif (line[i] === '%')\n\t\t\tbreak;\n\n\t\tvar retInlineHeader = header.letter_to_inline_header(line, i, delayStartNewLine);\n\t\tif (retInlineHeader[0] > 0) {\n\t\t\ti += retInlineHeader[0];\n\t\t\t//console.log(\"inline header\", retInlineHeader)\n\t\t\tif (retInlineHeader[1] === 'V')\n\t\t\t\tdelayStartNewLine = true; // fixes bug on this: c[V:2]d\n\t\t\t// TODO-PER: Handle inline headers\n\t\t\t//multilineVars.start_new_line = false;\n\t\t} else {\n\t\t\t// Wait until here to actually start the line because we know we're past the inline statements.\n\t\t\tif (!tuneBuilder.hasBeginMusic() || (delayStartNewLine && !this.lineContinuation)) {\n\t\t\t\tthis.startNewLine();\n\t\t\t\tdelayStartNewLine = false;\n\t\t\t}\n\n\t\t\t// We need to decide if the following characters are a bar-marking or a note-group.\n\t\t\t// Unfortunately, that is ambiguous. Both can contain chord symbols and decorations.\n\t\t\t// If there is a grace note either before or after the chord symbols and decorations, then it is definitely a note-group.\n\t\t\t// If there is a bar marker, it is definitely a bar-marking.\n\t\t\t// If there is either a core-note or chord, it is definitely a note-group.\n\t\t\t// So, loop while we find grace-notes, chords-symbols, or decorations. [It is an error to have more than one grace-note group in a row; the others can be multiple]\n\t\t\t// Then, if there is a grace-note, we know where to go.\n\t\t\t// Else see if we have a chord, core-note, slur, triplet, or bar.\n\n\t\t\tvar ret;\n\t\t\twhile (1) {\n\t\t\t\tret = tokenizer.eatWhiteSpace(line, i);\n\t\t\t\tif (ret > 0) {\n\t\t\t\t\ti += ret;\n\t\t\t\t}\n\t\t\t\tif (i > 0 && line[i-1] === '\\x12') {\n\t\t\t\t\t// there is one case where a line continuation isn't the same as being on the same line, and that is if the next character after it is a header.\n\t\t\t\t\tret = header.letter_to_body_header(line, i);\n\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\tif (ret[1] === 'V')\n\t\t\t\t\t\t\tthis.startNewLine(); // fixes bug on this: c\\\\nV:2]\\\\nd\n\t\t\t\t\t\t// TODO: insert header here\n\t\t\t\t\t\ti = ret[0];\n\t\t\t\t\t\tmultilineVars.start_new_line = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// gather all the grace notes, chord symbols and decorations\n\t\t\t\tret = letter_to_spacer(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\ti += ret[0];\n\t\t\t\t}\n\n\t\t\t\tret = letter_to_chord(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t// There could be more than one chord here if they have different positions.\n\t\t\t\t\t// If two chords have the same position, then connect them with newline.\n\t\t\t\t\tif (!el.chord)\n\t\t\t\t\t\tel.chord = [];\n\t\t\t\t\tvar chordName = tokenizer.translateString(ret[1]);\n\t\t\t\t\tchordName = chordName.replace(/;/g, \"\\n\");\n\t\t\t\t\tvar addedChord = false;\n\t\t\t\t\tfor (var ci = 0; ci < el.chord.length; ci++) {\n\t\t\t\t\t\tif (el.chord[ci].position === ret[2]) {\n\t\t\t\t\t\t\taddedChord = true;\n\t\t\t\t\t\t\tel.chord[ci].name += \"\\n\" + chordName;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (addedChord === false) {\n\t\t\t\t\t\tif (ret[2] === null && ret[3])\n\t\t\t\t\t\t\tel.chord.push({name: chordName, rel_position: ret[3]});\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel.chord.push({name: chordName, position: ret[2]});\n\t\t\t\t\t}\n\n\t\t\t\t\ti += ret[0];\n\t\t\t\t\tvar ii = tokenizer.skipWhiteSpace(line.substring(i));\n\t\t\t\t\tif (ii > 0)\n\t\t\t\t\t\tel.force_end_beam_last = true;\n\t\t\t\t\ti += ii;\n\t\t\t\t} else {\n\t\t\t\t\tif (nonDecorations.indexOf(line[i]) === -1)\n\t\t\t\t\t\tret = letter_to_accent(line, i);\n\t\t\t\t\telse ret = [ 0 ];\n\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\tif (ret[1] === null) {\n\t\t\t\t\t\t\tif (i + 1 < line.length)\n\t\t\t\t\t\t\t\tthis.startNewLine();\t// There was a ! in the middle of the line. Start a new line if there is anything after it.\n\t\t\t\t\t\t} else if (ret[1].length > 0) {\n\t\t\t\t\t\t\tif (ret[1].indexOf(\"style=\") === 0) {\n\t\t\t\t\t\t\t\tel.style = ret[1].substr(6);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (el.decoration === undefined)\n\t\t\t\t\t\t\t\t\tel.decoration = [];\n\t\t\t\t\t\t\t\tif (ret[1] === 'beambr1')\n\t\t\t\t\t\t\t\t\tel.beambr = 1;\n\t\t\t\t\t\t\t\telse if (ret[1] === \"beambr2\")\n\t\t\t\t\t\t\t\t\tel.beambr = 2;\n\t\t\t\t\t\t\t\telse el.decoration.push(ret[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti += ret[0];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret = letter_to_grace(line, i);\n\t\t\t\t\t\t// TODO-PER: Be sure there aren't already grace notes defined. That is an error.\n\t\t\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\t\t\tel.gracenotes = ret[1];\n\t\t\t\t\t\t\ti += ret[0];\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tret = letter_to_bar(line, i);\n\t\t\tif (ret[0] > 0) {\n\t\t\t\t// This is definitely a bar\n\t\t\t\toverlayLevel = 0;\n\t\t\t\tif (el.gracenotes !== undefined) {\n\t\t\t\t\t// Attach the grace note to an invisible note\n\t\t\t\t\tel.rest = { type: 'spacer' };\n\t\t\t\t\tel.duration = 0.125; // TODO-PER: I don't think the duration of this matters much, but figure out if it does.\n\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+i, startOfLine+i+ret[0], el);\n\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\tel = {};\n\t\t\t\t}\n\t\t\t\tvar bar = {type: ret[1]};\n\t\t\t\tif (bar.type.length === 0)\n\t\t\t\t\twarn(\"Unknown bar type\", line, i);\n\t\t\t\telse {\n\t\t\t\t\tif (multilineVars.inEnding && bar.type !== 'bar_thin') {\n\t\t\t\t\t\tbar.endEnding = true;\n\t\t\t\t\t\tmultilineVars.inEnding = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (ret[2]) {\n\t\t\t\t\t\tbar.startEnding = ret[2];\n\t\t\t\t\t\tif (multilineVars.inEnding)\n\t\t\t\t\t\t\tbar.endEnding = true;\n\t\t\t\t\t\tmultilineVars.inEnding = true;\n\t\t\t\t\t\tif (ret[1] === \"bar_right_repeat\") {\n\t\t\t\t\t\t\t// restore the tie and slur state from the start repeat\n\t\t\t\t\t\t\tmultilineVars.restoreStartEndingHoldOvers();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// save inTie, inTieChord\n\t\t\t\t\t\t\tmultilineVars.duplicateStartEndingHoldOvers();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (el.decoration !== undefined)\n\t\t\t\t\t\tbar.decoration = el.decoration;\n\t\t\t\t\tif (el.chord !== undefined)\n\t\t\t\t\t\tbar.chord = el.chord;\n\t\t\t\t\tif (bar.startEnding && multilineVars.barFirstEndingNum === undefined)\n\t\t\t\t\t\tmultilineVars.barFirstEndingNum = multilineVars.currBarNumber;\n\t\t\t\t\telse if (bar.startEnding && bar.endEnding && multilineVars.barFirstEndingNum)\n\t\t\t\t\t\tmultilineVars.currBarNumber = multilineVars.barFirstEndingNum;\n\t\t\t\t\telse if (bar.endEnding)\n\t\t\t\t\t\tmultilineVars.barFirstEndingNum = undefined;\n\t\t\t\t\tif (bar.type !== 'bar_invisible' && multilineVars.measureNotEmpty) {\n\t\t\t\t\t\tvar isFirstVoice = multilineVars.currentVoice === undefined || (multilineVars.currentVoice.staffNum === 0 && multilineVars.currentVoice.index === 0);\n\t\t\t\t\t\tif (isFirstVoice) {\n\t\t\t\t\t\t\tmultilineVars.currBarNumber++;\n\t\t\t\t\t\t\tif (multilineVars.barNumbers && multilineVars.currBarNumber % multilineVars.barNumbers === 0)\n\t\t\t\t\t\t\t\tbar.barNumber = multilineVars.currBarNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'bar');\n\t\t\t\t\ttuneBuilder.appendElement('bar', startOfLine+startI, startOfLine+i+ret[0], bar);\n\t\t\t\t\tmultilineVars.measureNotEmpty = false;\n\t\t\t\t\tel = {};\n\t\t\t\t}\n\t\t\t\ti += ret[0];\n\t\t\t} else if (line[i] === '&') {\t// backtrack to beginning of measure\n\t\t\t\tret = letter_to_overlay(line, i);\n\t\t\t\tif (ret[0] > 0) {\n\t\t\t\t\ttuneBuilder.appendElement('overlay', startOfLine, startOfLine+1, {});\n\t\t\t\t\ti += 1;\n\t\t\t\t\toverlayLevel++;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// This is definitely a note group\n\t\t\t\t//\n\t\t\t\t// Look for as many open slurs and triplets as there are. (Note: only the first triplet is valid.)\n\t\t\t\tret = letter_to_open_slurs_and_triplets(line, i);\n\t\t\t\tif (ret.consumed > 0) {\n\t\t\t\t\tif (ret.startSlur !== undefined)\n\t\t\t\t\t\tel.startSlur = ret.startSlur;\n\t\t\t\t\tif (ret.dottedSlur)\n\t\t\t\t\t\tel.dottedSlur = true;\n\t\t\t\t\tif (ret.triplet !== undefined) {\n\t\t\t\t\t\tif (tripletNotesLeft > 0)\n\t\t\t\t\t\t\twarn(\"Can't nest triplets\", line, i);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tel.startTriplet = ret.triplet;\n\t\t\t\t\t\t\tel.tripletMultiplier = ret.tripletQ / ret.triplet;\n\t\t\t\t\t\t\tel.tripletR = ret.num_notes;\n\t\t\t\t\t\t\ttripletNotesLeft = ret.num_notes === undefined ? ret.triplet : ret.num_notes;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ti += ret.consumed;\n\t\t\t\t}\n\n\t\t\t\t// handle chords.\n\t\t\t\tif (line[i] === '[') {\n\t\t\t\t\tvar chordStartChar = i;\n\t\t\t\t\ti++;\n\t\t\t\t\tvar chordDuration = null;\n\t\t\t\t\tvar rememberEndBeam = false;\n\n\t\t\t\t\tvar done = false;\n\t\t\t\t\twhile (!done) {\n\t\t\t\t\t\tvar accent = letter_to_accent(line, i);\n\t\t\t\t\t\tif (accent[0] > 0) {\n\t\t\t\t\t\t\ti += accent[0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar chordNote = getCoreNote(line, i, {}, false);\n\t\t\t\t\t\tif (chordNote !== null && chordNote.pitch !== undefined) {\n\t\t\t\t\t\t\tif (accent[0] > 0) { // If we found a decoration above, it modifies the entire chord. \"style\" is handled below.\n\t\t\t\t\t\t\t\tif (accent[1].indexOf(\"style=\") !== 0) {\n\t\t\t\t\t\t\t\t\tif (el.decoration === undefined)\n\t\t\t\t\t\t\t\t\t\tel.decoration = [];\n\t\t\t\t\t\t\t\t\tel.decoration.push(accent[1]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (chordNote.end_beam) {\n\t\t\t\t\t\t\t\tel.end_beam = true;\n\t\t\t\t\t\t\t\tdelete chordNote.end_beam;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (el.pitches === undefined) {\n\t\t\t\t\t\t\t\tel.duration = chordNote.duration;\n\t\t\t\t\t\t\t\tel.pitches = [ chordNote ];\n\t\t\t\t\t\t\t} else\t// Just ignore the note lengths of all but the first note. The standard isn't clear here, but this seems less confusing.\n\t\t\t\t\t\t\t\tel.pitches.push(chordNote);\n\t\t\t\t\t\t\tdelete chordNote.duration;\n\t\t\t\t\t\t\tif (accent[0] > 0) { // If we found a style above, it modifies the individual pitch, not the entire chord.\n\t\t\t\t\t\t\t\tif (accent[1].indexOf(\"style=\") === 0) {\n\t\t\t\t\t\t\t\t\tel.pitches[el.pitches.length-1].style = accent[1].substr(6);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (multilineVars.inTieChord[el.pitches.length]) {\n\t\t\t\t\t\t\t\tchordNote.endTie = true;\n\t\t\t\t\t\t\t\tmultilineVars.inTieChord[el.pitches.length] = undefined;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (chordNote.startTie)\n\t\t\t\t\t\t\t\tmultilineVars.inTieChord[el.pitches.length] = true;\n\n\t\t\t\t\t\t\ti = chordNote.endChar;\n\t\t\t\t\t\t\tdelete chordNote.endChar;\n\t\t\t\t\t\t} else if (line[i] === ' ') {\n\t\t\t\t\t\t\t// Spaces are not allowed in chords, but we can recover from it by ignoring it.\n\t\t\t\t\t\t\twarn(\"Spaces are not allowed in chords\", line, i);\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (i < line.length && line[i] === ']') {\n\t\t\t\t\t\t\t\t// consume the close bracket\n\t\t\t\t\t\t\t\ti++;\n\n\t\t\t\t\t\t\t\tif (multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\t\t\t\tel.duration = el.duration * multilineVars.next_note_duration;\n\t\t\t\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isInTie(multilineVars, overlayLevel, el)) {\n\t\t\t\t\t\t\t\t\tel.pitches.forEach(function(pitch) { pitch.endTie = true; });\n\t\t\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (tripletNotesLeft > 0 && !(el.rest && el.rest.type === \"spacer\")) {\n\t\t\t\t\t\t\t\t\ttripletNotesLeft--;\n\t\t\t\t\t\t\t\t\tif (tripletNotesLeft === 0) {\n\t\t\t\t\t\t\t\t\t\tel.endTriplet = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tvar postChordDone = false;\n\t\t\t\t\t\t\t\twhile (i < line.length && !postChordDone) {\n\t\t\t\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\t\t\t\tcase ' ':\n\t\t\t\t\t\t\t\t\t\tcase '\\t':\n\t\t\t\t\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\t\t\t\t\tif (el.endSlur === undefined) el.endSlur = 1; else el.endSlur++;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '-':\n\t\t\t\t\t\t\t\t\t\t\tel.pitches.forEach(function(pitch) { pitch.startTie = {}; });\n\t\t\t\t\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, true);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\t\t\t\t\tvar br2 = getBrokenRhythm(line, i);\n\t\t\t\t\t\t\t\t\t\t\ti += br2[0] - 1;\t// index gets incremented below, so we'll let that happen\n\t\t\t\t\t\t\t\t\t\t\tmultilineVars.next_note_duration = br2[2];\n\t\t\t\t\t\t\t\t\t\t\tif (chordDuration)\n\t\t\t\t\t\t\t\t\t\t\t\tchordDuration = chordDuration * br2[1];\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tchordDuration = br2[1];\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\t\t\t\tcase '/':\n\t\t\t\t\t\t\t\t\t\t\tvar fraction = tokenizer.getFraction(line, i);\n\t\t\t\t\t\t\t\t\t\t\tchordDuration = fraction.value;\n\t\t\t\t\t\t\t\t\t\t\ti = fraction.index;\n\t\t\t\t\t\t\t\t\t\t\tvar ch = line[i]\n\t\t\t\t\t\t\t\t\t\t\tif (ch === ' ')\n\t\t\t\t\t\t\t\t\t\t\t\trememberEndBeam = true;\n\t\t\t\t\t\t\t\t\t\t\tif (ch === '-' || ch === ')' || ch === ' ' || ch === '<' || ch === '>')\n\t\t\t\t\t\t\t\t\t\t\t\ti--; // Subtracting one because one is automatically added below\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\tpostChordDone = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\t\t\t\t\t\tchordDuration = 0;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tpostChordDone = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (!postChordDone) {\n\t\t\t\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\twarn(\"Expected ']' to end the chords\", line, i);\n\n\t\t\t\t\t\t\tif (el.pitches !== undefined) {\n\t\t\t\t\t\t\t\tif (chordDuration !== null) {\n\t\t\t\t\t\t\t\t\tel.duration = el.duration * chordDuration;\n\t\t\t\t\t\t\t\t\tif (rememberEndBeam)\n\t\t\t\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\t\t\t\tel = {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t// Single pitch\n\t\t\t\t\tvar el2 = {};\n\t\t\t\t\tvar core = getCoreNote(line, i, el2, true);\n\t\t\t\t\tif (el2.endTie !== undefined) setIsInTie(multilineVars, overlayLevel, true);\n\t\t\t\t\tif (core !== null) {\n\t\t\t\t\t\tif (core.pitch !== undefined) {\n\t\t\t\t\t\t\tel.pitches = [ { } ];\n\t\t\t\t\t\t\t// TODO-PER: straighten this out so there is not so much copying: getCoreNote shouldn't change e'\n\t\t\t\t\t\t\tif (core.accidental !== undefined) el.pitches[0].accidental = core.accidental;\n\t\t\t\t\t\t\tel.pitches[0].pitch = core.pitch;\n\t\t\t\t\t\t\tel.pitches[0].name = core.name;\n\t\t\t\t\t\t\tif (core.midipitch || core.midipitch === 0)\n\t\t\t\t\t\t\t\tel.pitches[0].midipitch = core.midipitch;\n\t\t\t\t\t\t\tif (core.endSlur !== undefined) el.pitches[0].endSlur = core.endSlur;\n\t\t\t\t\t\t\tif (core.endTie !== undefined) el.pitches[0].endTie = core.endTie;\n\t\t\t\t\t\t\tif (core.startSlur !== undefined) el.pitches[0].startSlur = core.startSlur;\n\t\t\t\t\t\t\tif (el.startSlur !== undefined) el.pitches[0].startSlur = el.startSlur;\n\t\t\t\t\t\t\tif (el.dottedSlur !== undefined) el.pitches[0].dottedSlur = true;\n\t\t\t\t\t\t\tif (core.startTie !== undefined) el.pitches[0].startTie = core.startTie;\n\t\t\t\t\t\t\tif (el.startTie !== undefined) el.pitches[0].startTie = el.startTie;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tel.rest = core.rest;\n\t\t\t\t\t\t\tif (core.endSlur !== undefined) el.endSlur = core.endSlur;\n\t\t\t\t\t\t\tif (core.endTie !== undefined) el.rest.endTie = core.endTie;\n\t\t\t\t\t\t\tif (core.startSlur !== undefined) el.startSlur = core.startSlur;\n\t\t\t\t\t\t\tif (core.startTie !== undefined) el.rest.startTie = core.startTie;\n\t\t\t\t\t\t\tif (el.startTie !== undefined) el.rest.startTie = el.startTie;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (core.chord !== undefined) el.chord = core.chord;\n\t\t\t\t\t\tif (core.duration !== undefined) el.duration = core.duration;\n\t\t\t\t\t\tif (core.decoration !== undefined) el.decoration = core.decoration;\n\t\t\t\t\t\tif (core.graceNotes !== undefined) el.graceNotes = core.graceNotes;\n\t\t\t\t\t\tdelete el.startSlur;\n\t\t\t\t\t\tdelete el.dottedSlur;\n\t\t\t\t\t\tif (isInTie(multilineVars, overlayLevel, el)) {\n\t\t\t\t\t\t\tif (el.pitches !== undefined) {\n\t\t\t\t\t\t\t\tel.pitches[0].endTie = true;\n\t\t\t\t\t\t\t} else if (el.rest.type !== 'spacer') {\n\t\t\t\t\t\t\t\tel.rest.endTie = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (core.startTie || el.startTie)\n\t\t\t\t\t\t\tsetIsInTie(multilineVars, overlayLevel, true);\n\t\t\t\t\t\ti = core.endChar;\n\n\t\t\t\t\t\tif (tripletNotesLeft > 0 && !(core.rest && core.rest.type === \"spacer\")) {\n\t\t\t\t\t\t\ttripletNotesLeft--;\n\t\t\t\t\t\t\tif (tripletNotesLeft === 0) {\n\t\t\t\t\t\t\t\tel.endTriplet = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (core.end_beam)\n\t\t\t\t\t\t\taddEndBeam(el);\n\n\t\t\t\t\t\t// If there is a whole rest, then it should be the duration of the measure, not it's own duration. We need to special case it.\n\t\t\t\t\t\t// If the time signature length is greater than 4/4, though, then a whole rest has no special treatment.\n\t\t\t\t\t\tif (el.rest && el.rest.type === 'rest' && el.duration === 1 && durationOfMeasure(multilineVars) <= 1) {\n\t\t\t\t\t\t\tel.rest.type = 'whole';\n\n\t\t\t\t\t\t\tel.duration = durationOfMeasure(multilineVars);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Create a warning if this is not a displayable duration.\n\t\t\t\t\t\t// The first item on a line is a regular note value, each item after that represents a dot placed after the previous note.\n\t\t\t\t\t\t// Only durations less than a whole note are tested because whole note durations have some tricky rules.\n\n\t\t\t\t\t\tif (el.duration < 1 && durations.indexOf(el.duration) === -1 && el.duration !== 0) {\n\t\t\t\t\t\t\tif (!el.rest || el.rest.type !== 'spacer')\n\t\t\t\t\t\t\t\twarn(\"Duration not representable: \" + line.substring(startI, i), line, i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmultilineVars.addFormattingOptions(el, tune.formatting, 'note');\n\t\t\t\t\t\tvar succeeded = tuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\tif (!succeeded) {\n\t\t\t\t\t\t\tthis.startNewLine()\n\t\t\t\t\t\t\ttuneBuilder.appendElement('note', startOfLine+startI, startOfLine+i, el);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmultilineVars.measureNotEmpty = true;\n\t\t\t\t\t\tel = {};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i === startI) {\t// don't know what this is, so ignore it.\n\t\t\t\t\tif (line[i] !== ' ' && line[i] !== '`')\n\t\t\t\t\t\twarn(\"Unknown character ignored\", line, i);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tthis.lineContinuation = line.indexOf('\\x12') >= 0 || (retHeader[0] > 0)\n\tif (!this.lineContinuation) { el = { } }\n};\n\nvar setIsInTie =function(multilineVars, overlayLevel, value) {\n\t// If this is single voice music then the voice index isn't set, so we use the first voice.\n\tvar voiceIndex = multilineVars.currentVoice ? multilineVars.currentVoice.staffNum * 100 + multilineVars.currentVoice.index : 0;\n\tif (multilineVars.inTie[overlayLevel] === undefined)\n\t\tmultilineVars.inTie[overlayLevel] = [];\n\tmultilineVars.inTie[overlayLevel][voiceIndex] = value;\n};\n\nvar letter_to_chord = function(line, i) {\n\tif (line[i] === '\"')\n\t{\n\t\tvar chord = tokenizer.getBrackettedSubstring(line, i, 5);\n\t\tif (!chord[2])\n\t\t\twarn(\"Missing the closing quote while parsing the chord symbol\", line , i);\n\t\t// If it starts with ^, then the chord appears above.\n\t\t// If it starts with _ then the chord appears below.\n\t\t// (note that the 2.0 draft standard defines them as not chords, but annotations and also defines @.)\n\t\tif (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '^') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'above';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '_') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'below';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '<') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'left';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '>') {\n\t\t\tchord[1] = chord[1].substring(1);\n\t\t\tchord[2] = 'right';\n\t\t} else if (chord[0] > 0 && chord[1].length > 0 && chord[1][0] === '@') {\n\t\t // @-15,5.7\t\t\n\t\t chord[1] = chord[1].substring(1);\n\t\t var x = tokenizer.getFloat(chord[1]);\n\t\t if (x.digits === 0){\n\t\t\twarn(\"Missing first position in absolutely positioned annotation.\", line, i);\n\t\t\tchord[1] = chord[1].replace(\"@\",\"\");\n\t\t\tchord[2] = 'above';\n\t\t\treturn chord;\n\t\t }\n\t\t chord[1] = chord[1].substring(x.digits);\n\t\t if (chord[1][0] !== ','){\n\t\t\twarn(\"Missing comma absolutely positioned annotation.\", line, i);\n\t\t\tchord[1] = chord[1].replace(\"@\",\"\");\n\t\t\tchord[2] = 'above';\n\t\t\treturn chord;\n\t\t }\n\t\t chord[1] = chord[1].substring(1);\n\t\t var y = tokenizer.getFloat(chord[1]);\n\t\t if (y.digits === 0){\n\t\t\twarn(\"Missing second position in absolutely positioned annotation.\", line, i);\n\t\t\tchord[1] = chord[1].replace(\"@\",\"\");\n\t\t\tchord[2] = 'above';\n\t\t\treturn chord;\n\t\t }\n\t\t chord[1] = chord[1].substring(y.digits);\n\t\t var ws = tokenizer.skipWhiteSpace(chord[1]);\n\t\t chord[1] = chord[1].substring(ws);\n\t\t chord[2] = null;\n\t\t chord[3] = {\n\t\t\tx: x.value,\n\t\t\ty: y.value\n\t\t };\t\n\t\t} else {\n\t\t\tif (multilineVars.freegchord !== true) {\n\t\t\t\tchord[1] = chord[1].replace(/([ABCDEFG0-9])b/g, \"$1♭\");\n\t\t\t\tchord[1] = chord[1].replace(/([ABCDEFG0-9])#/g, \"$1♯\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g, \"$1$2°$3\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)o$/g, \"$1$2°\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g, \"$1$2ø$3\");\n\t\t\t\tchord[1] = chord[1].replace(/^([ABCDEFG])([♯♭]?)\\^([^A-Za-z])/g, \"$1$2∆$3\");\n\t\t\t}\n\t\t\tchord[2] = 'default';\n\t\t\tchord[1] = transpose.chordName(multilineVars, chord[1]);\n\t\t}\n\t\treturn chord;\n\t}\n\treturn [0, \"\"];\n};\n\nvar letter_to_grace = function(line, i) {\n\t// Grace notes are an array of: startslur, note, endslur, space; where note is accidental, pitch, duration\n\tif (line[i] === '{') {\n\t\t// fetch the gracenotes string and consume that into the array\n\t\tvar gra = tokenizer.getBrackettedSubstring(line, i, 1, '}');\n\t\tif (!gra[2])\n\t\t\twarn(\"Missing the closing '}' while parsing grace note\", line, i);\n\t\t// If there is a slur after the grace construction, then move it to the last note inside the grace construction\n\t\tif (line[i+gra[0]] === ')') {\n\t\t\tgra[0]++;\n\t\t\tgra[1] += ')';\n\t\t}\n\n\t\tvar gracenotes = [];\n\t\tvar ii = 0;\n\t\tvar inTie = false;\n\t\twhile (ii < gra[1].length) {\n\t\t\tvar acciaccatura = false;\n\t\t\tif (gra[1][ii] === '/') {\n\t\t\t\tacciaccatura = true;\n\t\t\t\tii++;\n\t\t\t}\n\t\t\tvar note = getCoreNote(gra[1], ii, {}, false);\n\t\t\tif (note !== null) {\n\t\t\t\t// The grace note durations should not be affected by the default length: they should be based on 1/16, so if that isn't the default, then multiply here.\n\t\t\t\tnote.duration = note.duration / (multilineVars.default_length * 8);\n\t\t\t\tif (acciaccatura)\n\t\t\t\t\tnote.acciaccatura = true;\n\t\t\t\tif (note.rest) {\n\t\t\t\t\t// don't allow rests inside gracenotes\n\t\t\t\t\twarn(\"Rests not allowed as grace notes '\" + gra[1][ii] + \"' while parsing grace note\", line, i);\n\t\t\t\t} else\n\t\t\t\t\tgracenotes.push(note);\n\n\t\t\t\tif (inTie) {\n\t\t\t\t\tnote.endTie = true;\n\t\t\t\t\tinTie = false;\n\t\t\t\t}\n\t\t\t\tif (note.startTie)\n\t\t\t\t\tinTie = true;\n\n\t\t\t\tii = note.endChar;\n\t\t\t\tdelete note.endChar;\n\n\t\t\t\tif (note.end_beam) {\n\t\t\t\t\tnote.endBeam = true;\n\t\t\t\t\tdelete note.end_beam;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// We shouldn't get anything but notes or a space here, so report an error\n\t\t\t\tif (gra[1][ii] === ' ') {\n\t\t\t\t\tif (gracenotes.length > 0)\n\t\t\t\t\t\tgracenotes[gracenotes.length-1].endBeam = true;\n\t\t\t\t} else\n\t\t\t\t\twarn(\"Unknown character '\" + gra[1][ii] + \"' while parsing grace note\", line, i);\n\t\t\t\tii++;\n\t\t\t}\n\t\t}\n\t\tif (gracenotes.length)\n\t\t\treturn [gra[0], gracenotes];\n\t}\n\treturn [ 0 ];\n};\n\nfunction letter_to_overlay(line, i) {\n\tif (line[i] === '&') {\n\t\tvar start = i;\n\t\twhile (line[i] && line[i] !== ':' && line[i] !== '|')\n\t\t\ti++;\n\t\treturn [ i-start, line.substring(start+1, i) ];\n\t}\n\treturn [ 0 ];\n}\n\nfunction durationOfMeasure(multilineVars) {\n\t// TODO-PER: This could be more complicated if one of the unusual measures is used.\n\tvar meter = multilineVars.origMeter;\n\tif (!meter || meter.type !== 'specified')\n\t\treturn 1;\n\tif (!meter.value || meter.value.length === 0)\n\t\treturn 1;\n\treturn parseInt(meter.value[0].num, 10) / parseInt(meter.value[0].den, 10);\n}\n\n\n\n\nvar letter_to_accent = function(line, i) {\n\tvar macro = multilineVars.macros[line[i]];\n\n\tif (macro !== undefined) {\n\t\tif (macro[0] === '!' || macro[0] === '+')\n\t\t\tmacro = macro.substring(1);\n\t\tif (macro[macro.length-1] === '!' || macro[macro.length-1] === '+')\n\t\t\tmacro = macro.substring(0, macro.length-1);\n\t\tif (legalAccents.includes(macro))\n\t\t\treturn [ 1, macro ];\n\t\telse if (volumeDecorations.includes(macro)) {\n\t\t\tif (multilineVars.volumePosition === 'hidden')\n\t\t\t\tmacro = \"\";\n\t\t\treturn [1, macro];\n\t\t} else if (dynamicDecorations.includes(macro)) {\n\t\t\tif (multilineVars.dynamicPosition === 'hidden')\n\t\t\t\tmacro = \"\";\n\t\t\treturn [1, macro];\n\t\t} else {\n\t\t\tif (!multilineVars.ignoredDecorations.includes(macro))\n\t\t\t\twarn(\"Unknown macro: \" + macro, line, i);\n\t\t\treturn [1, '' ];\n\t\t}\n\t}\n\tswitch (line[i])\n\t{\n\t\tcase '.':\n\t\t\tif (line[i+1] === '(' || line[i+1] === '-') // a dot then open paren is a dotted slur; likewise dot dash is dotted tie.\n\t\t\t\tbreak;\n\t\t\treturn [1, 'staccato'];\n\t\tcase 'u':return [1, 'upbow'];\n\t\tcase 'v':return [1, 'downbow'];\n\t\tcase '~':return [1, 'irishroll'];\n\t\tcase '!':\n\t\tcase '+':\n\t\t\tvar ret = tokenizer.getBrackettedSubstring(line, i, 5);\n\t\t\t// Be sure that the accent is recognizable.\n\t\t\tif (ret[1].length > 1 && (ret[1][0] === '^' || ret[1][0] ==='_'))\n\t\t\t\tret[1] = ret[1].substring(1);\t// TODO-PER: The test files have indicators forcing the ornament to the top or bottom, but that isn't in the standard. We'll just ignore them.\n\t\t\tif (legalAccents.includes(ret[1]))\n\t\t\t\treturn ret;\n\t\t\tif (volumeDecorations.includes(ret[1])) {\n\t\t\t\tif (multilineVars.volumePosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t\tif (dynamicDecorations.includes(ret[1])) {\n\t\t\t\tif (multilineVars.dynamicPosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tvar ind = accentPseudonyms.findIndex(function (acc) { return ret[1] === acc[0]})\n\t\t\tif (ind >= 0) {\n\t\t\t\tret[1] = accentPseudonyms[ind][1];\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\tind = accentDynamicPseudonyms.findIndex(function (acc) { return ret[1] === acc[0]})\n\t\t\tif (ind >= 0) {\n\t\t\t\tret[1] = accentDynamicPseudonyms[ind][1];\n\t\t\t\tif (multilineVars.dynamicPosition === 'hidden' )\n\t\t\t\t\tret[1] = '';\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// We didn't find the accent in the list, so consume the space, but don't return an accent.\n\t\t\t// Although it is possible that ! was used as a line break, so accept that.\n\t\t\tif (line[i] === '!' && (ret[0] === 1 || line[i+ret[0]-1] !== '!'))\n\t\t\t\treturn [1, null ];\n\t\t\twarn(\"Unknown decoration: \" + ret[1], line, i);\n\t\t\tret[1] = \"\";\n\t\t\treturn ret;\n\t\tcase 'H':return [1, 'fermata'];\n\t\tcase 'J':return [1, 'slide'];\n\t\tcase 'L':return [1, 'accent'];\n\t\tcase 'M':return [1, 'mordent'];\n\t\tcase 'O':return[1, 'coda'];\n\t\tcase 'P':return[1, 'pralltriller'];\n\t\tcase 'R':return [1, 'roll'];\n\t\tcase 'S':return [1, 'segno'];\n\t\tcase 'T':return [1, 'trill'];\n\t}\n\treturn [0, 0];\n};\n\nvar letter_to_spacer = function(line, i) {\n\tvar start = i;\n\twhile (tokenizer.isWhiteSpace(line[i]))\n\t\ti++;\n\treturn [ i-start ];\n};\n\n// returns the class of the bar line\n// the number of the repeat\n// and the number of characters used up\n// if 0 is returned, then the next element was not a bar line\nvar letter_to_bar = function(line, curr_pos) {\n\tvar ret = tokenizer.getBarLine(line, curr_pos);\n\tif (ret.len === 0)\n\t\treturn [0,\"\"];\n\tif (ret.warn) {\n\t\twarn(ret.warn, line, curr_pos);\n\t\treturn [ret.len,\"\"];\n\t}\n\n\t// Now see if this is a repeated ending\n\t// A repeated ending is all of the characters 1,2,3,4,5,6,7,8,9,0,-, and comma\n\t// It can also optionally start with '[', which is ignored.\n\t// Also, it can have white space before the '['.\n\tfor (var ws = 0; ws < line.length; ws++)\n\t\tif (line[curr_pos + ret.len + ws] !== ' ')\n\t\t\tbreak;\n\tvar orig_bar_len = ret.len;\n\tif (line[curr_pos+ret.len+ws] === '[') {\n\t\tret.len += ws + 1;\n\t}\n\n\t// It can also be a quoted string. It is unclear whether that construct requires '[', but it seems like it would. otherwise it would be confused with a regular chord.\n\tif (line[curr_pos+ret.len] === '\"' && line[curr_pos+ret.len-1] === '[') {\n\t\tvar ending = tokenizer.getBrackettedSubstring(line, curr_pos+ret.len, 5);\n\t\treturn [ret.len+ending[0], ret.token, ending[1]];\n\t}\n\tvar retRep = tokenizer.getTokenOf(line.substring(curr_pos+ret.len), \"1234567890-,\");\n\tif (retRep.len === 0 || retRep.token[0] === '-')\n\t\treturn [orig_bar_len, ret.token];\n\n\treturn [ret.len+retRep.len, ret.token, retRep.token];\n};\n\nvar letter_to_open_slurs_and_triplets = function(line, i) {\n\t// consume spaces, and look for all the open parens. If there is a number after the open paren,\n\t// that is a triplet. Otherwise that is a slur. Collect all the slurs and the first triplet.\n\tvar ret = {};\n\tvar start = i;\n\tif (line[i] === '.' && line[i+1] === '(') {\n\t\tret.dottedSlur = true;\n\t\ti++;\n\t}\n\twhile (line[i] === '(' || tokenizer.isWhiteSpace(line[i])) {\n\t\tif (line[i] === '(') {\n\t\t\tif (i+1 < line.length && (line[i+1] >= '2' && line[i+1] <= '9')) {\n\t\t\t\tif (ret.triplet !== undefined)\n\t\t\t\t\twarn(\"Can't nest triplets\", line, i);\n\t\t\t\telse {\n\t\t\t\t\tret.triplet = line[i+1] - '0';\n\t\t\t\t\tret.tripletQ = tripletQ[ret.triplet];\n\t\t\t\t\tret.num_notes = ret.triplet;\n\t\t\t\t\tif (i+2 < line.length && line[i+2] === ':') {\n\t\t\t\t\t\t// We are expecting \"(p:q:r\" or \"(p:q\" or \"(p::r\"\n\t\t\t\t\t\t// That is: \"put p notes into the time of q for the next r notes\"\n\t\t\t\t\t\t// if r is missing, then it is equal to p.\n\t\t\t\t\t\t// if q is missing, it is determined from this table:\n\t\t\t\t\t\t// (2 notes in the time of 3\n\t\t\t\t\t\t// (3 notes in the time of 2\n\t\t\t\t\t\t// (4 notes in the time of 3\n\t\t\t\t\t\t// (5 notes in the time of n | if time sig is (6/8, 9/8, 12/8), n=3, else n=2\n\t\t\t\t\t\t// (6 notes in the time of 2\n\t\t\t\t\t\t// (7 notes in the time of n\n\t\t\t\t\t\t// (8 notes in the time of 3\n\t\t\t\t\t\t// (9 notes in the time of n\n\t\t\t\t\t\tif (i+3 < line.length && line[i+3] === ':') {\n\t\t\t\t\t\t\t// The second number, 'q', is not present.\n\t\t\t\t\t\t\tif (i+4 < line.length && (line[i+4] >= '1' && line[i+4] <= '9')) {\n\t\t\t\t\t\t\t\tret.num_notes = line[i+4] - '0';\n\t\t\t\t\t\t\t\ti += 3;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\twarn(\"expected number after the two colons after the triplet to mark the duration\", line, i);\n\t\t\t\t\t\t} else if (i+3 < line.length && (line[i+3] >= '1' && line[i+3] <= '9')) {\n\t\t\t\t\t\t\tret.tripletQ = line[i+3] - '0';\n\t\t\t\t\t\t\tif (i+4 < line.length && line[i+4] === ':') {\n\t\t\t\t\t\t\t\tif (i+5 < line.length && (line[i+5] >= '1' && line[i+5] <= '9')) {\n\t\t\t\t\t\t\t\t\tret.num_notes = line[i+5] - '0';\n\t\t\t\t\t\t\t\t\ti += 4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ti += 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\twarn(\"expected number after the triplet to mark the duration\", line, i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (ret.startSlur === undefined)\n\t\t\t\t\tret.startSlur = 1;\n\t\t\t\telse\n\t\t\t\t\tret.startSlur++;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\tret.consumed = i-start;\n\treturn ret;\n};\n\nMusicParser.prototype.startNewLine = function() {\n\tvar params = { startChar: -1, endChar: -1};\n\tif (multilineVars.partForNextLine.title)\n\t\tparams.part = multilineVars.partForNextLine;\n\tparams.clef = multilineVars.currentVoice && multilineVars.staves[multilineVars.currentVoice.staffNum].clef !== undefined ? Object.assign({},multilineVars.staves[multilineVars.currentVoice.staffNum].clef) : Object.assign({},multilineVars.clef);\n\tvar scoreTranspose = multilineVars.currentVoice ? multilineVars.currentVoice.scoreTranspose : 0;\n\tparams.key = parseKeyVoice.standardKey(multilineVars.key.root+multilineVars.key.acc+multilineVars.key.mode, multilineVars.key.root, multilineVars.key.acc, scoreTranspose);\n\tparams.key.mode = multilineVars.key.mode;\n\tif (multilineVars.key.impliedNaturals)\n\t\tparams.key.impliedNaturals = multilineVars.key.impliedNaturals;\n\tif (multilineVars.key.explicitAccidentals) {\n\t\tfor (var i = 0; i < multilineVars.key.explicitAccidentals.length; i++) {\n\t\t\tvar found = false;\n\t\t\tfor (var j = 0; j < params.key.accidentals.length; j++) {\n\t\t\t\tif (params.key.accidentals[j].note === multilineVars.key.explicitAccidentals[i].note) {\n\t\t\t\t\t// If the note is already in the list, override it with the new value\n\t\t\t\t\tparams.key.accidentals[j].acc = multilineVars.key.explicitAccidentals[i].acc;\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found)\n\t\t\t\tparams.key.accidentals.push(multilineVars.key.explicitAccidentals[i]);\n\t\t}\n\t}\n\tmultilineVars.targetKey = params.key;\n\tif (params.key.explicitAccidentals)\n\t\tdelete params.key.explicitAccidentals;\n\tparseKeyVoice.addPosToKey(params.clef, params.key);\n\tif (multilineVars.meter !== null) {\n\t\tif (multilineVars.currentVoice) {\n\t\t\tmultilineVars.staves.forEach(function(st) {\n\t\t\t\tst.meter = multilineVars.meter;\n\t\t\t});\n\t\t\tparams.meter = multilineVars.staves[multilineVars.currentVoice.staffNum].meter;\n\t\t\tmultilineVars.staves[multilineVars.currentVoice.staffNum].meter = null;\n\t\t} else\n\t\t\tparams.meter = multilineVars.meter;\n\t\tmultilineVars.meter = null;\n\t} else if (multilineVars.currentVoice && multilineVars.staves[multilineVars.currentVoice.staffNum].meter) {\n\t\t// Make sure that each voice gets the meter marking.\n\t\tparams.meter = multilineVars.staves[multilineVars.currentVoice.staffNum].meter;\n\t\tmultilineVars.staves[multilineVars.currentVoice.staffNum].meter = null;\n\t}\n\tif (multilineVars.currentVoice && multilineVars.currentVoice.name)\n\t\tparams.name = multilineVars.currentVoice.name;\n\tif (multilineVars.vocalfont)\n\t\tparams.vocalfont = multilineVars.vocalfont;\n\tif (multilineVars.tripletfont)\n\t\tparams.tripletfont = multilineVars.tripletfont;\n\tif (multilineVars.gchordfont)\n\t\tparams.gchordfont = multilineVars.gchordfont;\n\tif (multilineVars.style)\n\t\tparams.style = multilineVars.style;\n\tif (multilineVars.currentVoice) {\n\t\tvar staff = multilineVars.staves[multilineVars.currentVoice.staffNum];\n\t\tif (staff.brace) params.brace = staff.brace;\n\t\tif (staff.bracket) params.bracket = staff.bracket;\n\t\tif (staff.connectBarLines) params.connectBarLines = staff.connectBarLines;\n\t\tif (staff.name) params.name = staff.name[multilineVars.currentVoice.index];\n\t\tif (staff.subname) params.subname = staff.subname[multilineVars.currentVoice.index];\n\t\tif (multilineVars.currentVoice.stem)\n\t\t\tparams.stem = multilineVars.currentVoice.stem;\n\t\tif (multilineVars.currentVoice.stafflines)\n\t\t\tparams.stafflines = multilineVars.currentVoice.stafflines;\n\t\tif (multilineVars.currentVoice.staffscale)\n\t\t\tparams.staffscale = multilineVars.currentVoice.staffscale;\n\t\tif (multilineVars.currentVoice.scale)\n\t\t\tparams.scale = multilineVars.currentVoice.scale;\n\t\tif (multilineVars.currentVoice.color)\n\t\t\tparams.color = multilineVars.currentVoice.color;\n\t\tif (multilineVars.currentVoice.style)\n\t\t\tparams.style = multilineVars.currentVoice.style;\n\t\tif (multilineVars.currentVoice.transpose)\n\t\t\tparams.clef.transpose = multilineVars.currentVoice.transpose;\n\t\tparams.currentVoice = multilineVars.currentVoice\n\t\tvar voices = Object.keys(multilineVars.voices)\n\t\tfor (var mv = 0; mv < voices.length; mv++) {\n\t\t\tif (params.currentVoice.staffNum === multilineVars.voices[voices[mv]].staffNum && params.currentVoice.index === multilineVars.voices[voices[mv]].index)\n\t\t\t\tparams.currentVoiceName = voices[mv]\n\t\t}\n\t}\n\tvar isFirstVoice = multilineVars.currentVoice === undefined || (multilineVars.currentVoice.staffNum === 0 && multilineVars.currentVoice.index === 0);\n\tif (multilineVars.barNumbers === 0 && isFirstVoice && multilineVars.currBarNumber !== 1)\n\t\tparams.barNumber = multilineVars.currBarNumber;\n\ttuneBuilder.startNewLine(params);\n\tif (multilineVars.key.impliedNaturals)\n\t\tdelete multilineVars.key.impliedNaturals;\n\n\tmultilineVars.partForNextLine = {};\n\tif (multilineVars.tempoForNextLine.length === 4)\n\t\ttuneBuilder.appendElement(multilineVars.tempoForNextLine[0],multilineVars.tempoForNextLine[1],multilineVars.tempoForNextLine[2],multilineVars.tempoForNextLine[3]);\n\tmultilineVars.tempoForNextLine = [];\n}\n\n// TODO-PER: make this a method in el.\nvar addEndBeam = function(el) {\n\tif (el.duration !== undefined && el.duration < 0.25)\n\t\tel.end_beam = true;\n\treturn el;\n};\n\nvar getCoreNote = function(line, index, el, canHaveBrokenRhythm) {\n\t//var el = { startChar: index };\n\tvar isComplete = function(state) {\n\t\treturn (state === 'octave' || state === 'duration' || state === 'Zduration' || state === 'broken_rhythm' || state === 'end_slur');\n\t};\n\tvar dottedTie;\n\tif (line[index] === '.' && line[index+1] === '-') {\n\t\tdottedTie = true;\n\t\tindex++;\n\t}\n\tvar state = 'startSlur';\n\tvar durationSetByPreviousNote = false;\n\twhile (1) {\n\t\tswitch(line[index]) {\n\t\t\tcase '(':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\tif (el.startSlur === undefined) el.startSlur = 1; else el.startSlur++;\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ')':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tif (el.endSlur === undefined) el.endSlur = 1; else el.endSlur++;\n\t\t\t\t} else return null;\n\t\t\t\tbreak;\n\t\t\tcase '^':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'sharp';state = 'sharp2';}\n\t\t\t\telse if (state === 'sharp2') {el.accidental = 'dblsharp';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '_':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'flat';state = 'flat2';}\n\t\t\t\telse if (state === 'flat2') {el.accidental = 'dblflat';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '=':\n\t\t\t\tif (state === 'startSlur') {el.accidental = 'natural';state = 'pitch';}\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\t\tif (state === 'startSlur' || state === 'sharp2' || state === 'flat2' || state === 'pitch') {\n\t\t\t\t\tel.pitch = pitches[line[index]];\n\t\t\t\t\tel.pitch += 7 * (multilineVars.currentVoice && multilineVars.currentVoice.octave !== undefined ? multilineVars.currentVoice.octave : multilineVars.octave);\n\t\t\t\t\tel.name = line[index];\n\t\t\t\t\tif (el.accidental)\n\t\t\t\t\t\tel.name = accMap[el.accidental] + el.name;\n\t\t\t\t\ttranspose.note(multilineVars, el);\n\t\t\t\t\tstate = 'octave';\n\t\t\t\t\t// At this point we have a valid note. The rest is optional. Set the duration in case we don't get one below\n\t\t\t\t\tif (canHaveBrokenRhythm && multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\tel.duration = multilineVars.default_length * multilineVars.next_note_duration;\n\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\tdurationSetByPreviousNote = true;\n\t\t\t\t\t} else\n\t\t\t\t\t\tel.duration = multilineVars.default_length;\n\t\t\t\t\t// If the clef is percussion, there is probably some translation of the pitch to a particular drum kit item.\n\t\t\t\t\tif ((multilineVars.clef && multilineVars.clef.type === \"perc\") ||\n\t\t\t\t\t\t(multilineVars.currentVoice && multilineVars.currentVoice.clef === \"perc\")) {\n\t\t\t\t\t\tvar key = line[index];\n\t\t\t\t\t\tif (el.accidental) {\n\t\t\t\t\t\t\tkey = accMap[el.accidental] + key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tune.formatting && tune.formatting.midi && tune.formatting.midi.drummap)\n\t\t\t\t\t\tel.midipitch = tune.formatting.midi.drummap[key];\n\t\t\t\t\t}\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ',':\n\t\t\t\tif (state === 'octave') {el.pitch -= 7; el.name += ','; }\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '\\'':\n\t\t\t\tif (state === 'octave') {el.pitch += 7; el.name += \"'\"; }\n\t\t\t\telse if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'y':\n\t\t\tcase 'z':\n\t\t\tcase 'Z':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\tel.rest = { type: rests[line[index]] };\n\t\t\t\t\t// There shouldn't be some of the properties that notes have. If some sneak in due to bad syntax in the abc file,\n\t\t\t\t\t// just nix them here.\n\t\t\t\t\tdelete el.accidental;\n\t\t\t\t\tdelete el.startSlur;\n\t\t\t\t\tdelete el.startTie;\n\t\t\t\t\tdelete el.endSlur;\n\t\t\t\t\tdelete el.endTie;\n\t\t\t\t\tdelete el.end_beam;\n\t\t\t\t\tdelete el.grace_notes;\n\t\t\t\t\t// At this point we have a valid note. The rest is optional. Set the duration in case we don't get one below\n\t\t\t\t\tif (el.rest.type.indexOf('multimeasure') >= 0) {\n\t\t\t\t\t\tel.duration = tune.getBarLength();\n\t\t\t\t\t\tel.rest.text = 1;\n\t\t\t\t\t\tstate = 'Zduration';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (canHaveBrokenRhythm && multilineVars.next_note_duration !== 0) {\n\t\t\t\t\t\t\tel.duration = multilineVars.default_length * multilineVars.next_note_duration;\n\t\t\t\t\t\t\tmultilineVars.next_note_duration = 0;\n\t\t\t\t\t\t\tdurationSetByPreviousNote = true;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tel.duration = multilineVars.default_length;\n\t\t\t\t\t\tstate = 'duration';\n\t\t\t\t\t}\n\t\t\t\t} else if (isComplete(state)) {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9':\n\t\t\tcase '0':\n\t\t\tcase '/':\n\t\t\t\tif (state === 'octave' || state === 'duration') {\n\t\t\t\t\tvar fraction = tokenizer.getFraction(line, index);\n\t\t\t\t\t//if (!durationSetByPreviousNote)\n\t\t\t\t\tel.duration = el.duration * fraction.value;\n\t\t\t\t\t// TODO-PER: We can test the returned duration here and give a warning if it isn't the one expected.\n\t\t\t\t\tel.endChar = fraction.index;\n\t\t\t\t\twhile (fraction.index < line.length && (tokenizer.isWhiteSpace(line[fraction.index]) || line[fraction.index] === '-')) {\n\t\t\t\t\t\tif (line[fraction.index] === '-')\n\t\t\t\t\t\t\tel.startTie = {};\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tel = addEndBeam(el);\n\t\t\t\t\t\tfraction.index++;\n\t\t\t\t\t}\n\t\t\t\t\tindex = fraction.index-1;\n\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t} else if (state === 'sharp2') {\n\t\t\t\t\tel.accidental = 'quartersharp';state = 'pitch';\n\t\t\t\t} else if (state === 'flat2') {\n\t\t\t\t\tel.accidental = 'quarterflat';state = 'pitch';\n\t\t\t\t} else if (state === 'Zduration') {\n\t\t\t\t\tvar num = tokenizer.getNumber(line, index);\n\t\t\t\t\tel.duration = num.num * tune.getBarLength();\n\t\t\t\t\tel.rest.text = num.num;\n\t\t\t\t\tel.endChar = num.index;\n\t\t\t\t\treturn el;\n\t\t\t\t} else return null;\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tif (state === 'startSlur') {\n\t\t\t\t\t// This is the first character, so it must have been meant for the previous note. Correct that here.\n\t\t\t\t\ttuneBuilder.addTieToLastNote(dottedTie);\n\t\t\t\t\tel.endTie = true;\n\t\t\t\t} else if (state === 'octave' || state === 'duration' || state === 'end_slur') {\n\t\t\t\t\tel.startTie = {};\n\t\t\t\t\tif (!durationSetByPreviousNote && canHaveBrokenRhythm)\n\t\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Peek ahead to the next character. If it is a space, then we have an end beam.\n\t\t\t\t\t\tif (tokenizer.isWhiteSpace(line[index + 1]))\n\t\t\t\t\t\t\taddEndBeam(el);\n\t\t\t\t\t\tel.endChar = index+1;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t}\n\t\t\t\t} else if (state === 'broken_rhythm') {el.endChar = index;return el;}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase ' ':\n\t\t\tcase '\\t':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tel.end_beam = true;\n\t\t\t\t\t// look ahead to see if there is a tie\n\t\t\t\t\tdottedTie = false;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (line[index] === '.' && line[index+1] === '-') {\n\t\t\t\t\t\t\tdottedTie = true;\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (line[index] === '-') {\n\t\t\t\t\t\t\tel.startTie = {};\n\t\t\t\t\t\t\tif (dottedTie)\n\t\t\t\t\t\t\t\tel.startTie.style = \"dotted\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} while (index < line.length &&\n\t\t\t\t\t\t(tokenizer.isWhiteSpace(line[index]) || line[index] === '-') ||\n\t\t\t\t\t\t(line[index] === '.' && line[index+1] === '-'));\n\t\t\t\t\tel.endChar = index;\n\t\t\t\t\tif (!durationSetByPreviousNote && canHaveBrokenRhythm && (line[index] === '<' || line[index] === '>')) {\t// TODO-PER: Don't need the test for < and >, but that makes the endChar work out for the regression test.\n\t\t\t\t\t\tindex--;\n\t\t\t\t\t\tstate = 'broken_rhythm';\n\t\t\t\t\t} else\n\t\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\telse return null;\n\t\t\t\tbreak;\n\t\t\tcase '>':\n\t\t\tcase '<':\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tif (canHaveBrokenRhythm) {\n\t\t\t\t\t\tvar br2 = getBrokenRhythm(line, index);\n\t\t\t\t\t\tindex += br2[0] - 1;\t// index gets incremented below, so we'll let that happen\n\t\t\t\t\t\tmultilineVars.next_note_duration = br2[2];\n\t\t\t\t\t\tel.duration = br2[1]*el.duration;\n\t\t\t\t\t\tstate = 'end_slur';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tel.endChar = index;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\treturn null;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (isComplete(state)) {\n\t\t\t\t\tel.endChar = index;\n\t\t\t\t\treturn el;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t}\n\t\tindex++;\n\t\tif (index === line.length) {\n\t\t\tif (isComplete(state)) {el.endChar = index;return el;}\n\t\t\telse return null;\n\t\t}\n\t}\n\treturn null;\n};\n\nvar getBrokenRhythm = function(line, index) {\n\tswitch (line[index]) {\n\t\tcase '>':\n\t\t\tif (index < line.length - 2 && line[index + 1] === '>' && line[index + 2] === '>')\t// triple >>>\n\t\t\t\treturn [3, 1.875, 0.125];\n\t\t\telse if (index < line.length - 1 && line[index + 1] === '>')\t// double >>\n\t\t\t\treturn [2, 1.75, 0.25];\n\t\t\telse\n\t\t\t\treturn [1, 1.5, 0.5];\n\t\tcase '<':\n\t\t\tif (index < line.length - 2 && line[index + 1] === '<' && line[index + 2] === '<')\t// triple <<<\n\t\t\t\treturn [3, 0.125, 1.875];\n\t\t\telse if (index < line.length - 1 && line[index + 1] === '<')\t// double <<\n\t\t\t\treturn [2, 0.25, 1.75];\n\t\t\telse\n\t\t\t\treturn [1, 0.5, 1.5];\n\t}\n\treturn null;\n};\n\nmodule.exports = MusicParser;\n","module.exports.legalAccents = [\n 'trill',\n 'lowermordent',\n 'uppermordent',\n 'mordent',\n 'pralltriller',\n 'accent',\n 'fermata',\n 'invertedfermata',\n 'tenuto',\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '+',\n 'wedge',\n 'open',\n 'thumb',\n 'snap',\n 'turn',\n 'roll',\n 'breath',\n 'shortphrase',\n 'mediumphrase',\n 'longphrase',\n 'segno',\n 'coda',\n 'D.S.',\n 'D.C.',\n 'fine',\n 'beambr1',\n 'beambr2',\n 'slide',\n 'marcato',\n 'upbow',\n 'downbow',\n '/',\n '//',\n '///',\n '////',\n 'trem1',\n 'trem2',\n 'trem3',\n 'trem4',\n 'turnx',\n 'invertedturn',\n 'invertedturnx',\n 'trill(',\n 'trill)',\n 'arpeggio',\n 'xstem',\n 'mark',\n 'umarcato',\n 'style=normal',\n 'style=harmonic',\n 'style=rhythm',\n 'style=x',\n 'style=triangle',\n 'D.C.alcoda',\n 'D.C.alfine',\n 'D.S.alcoda',\n 'D.S.alfine',\n 'editorial',\n 'courtesy'\n];\n\nmodule.exports.volumeDecorations = [\n 'p',\n 'pp',\n 'f',\n 'ff',\n 'mf',\n 'mp',\n 'ppp',\n 'pppp',\n 'fff',\n 'ffff',\n 'sfz'\n];\n\nmodule.exports.dynamicDecorations = [\n 'crescendo(',\n 'crescendo)',\n 'diminuendo(',\n 'diminuendo)',\n 'glissando(',\n 'glissando)',\n '~(',\n '~)'\n];\n\nmodule.exports.accentPseudonyms = [\n ['<', 'accent'],\n ['>', 'accent'],\n ['tr', 'trill'],\n ['plus', '+'],\n ['emphasis', 'accent'],\n ['^', 'umarcato'],\n ['marcato', 'umarcato']\n];\n\nmodule.exports.accentDynamicPseudonyms = [\n ['<(', 'crescendo('],\n ['<)', 'crescendo)'],\n ['>(', 'diminuendo('],\n ['>)', 'diminuendo)']\n];\n\nmodule.exports.nonDecorations = 'ABCDEFGabcdefgxyzZ[]|^_{'; // use this to prescreen so we don't have to look for a decoration at every note.\n\nmodule.exports.durations = [\n 0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.25, 0.375, 0.4375, 0.46875,\n 0.484375, 0.4921875, 0.125, 0.1875, 0.21875, 0.234375, 0.2421875, 0.24609375,\n 0.0625, 0.09375, 0.109375, 0.1171875, 0.12109375, 0.123046875, 0.03125,\n 0.046875, 0.0546875, 0.05859375, 0.060546875, 0.0615234375, 0.015625,\n 0.0234375, 0.02734375, 0.029296875, 0.0302734375, 0.03076171875\n];\n\nmodule.exports.pitches = {\n A: 5,\n B: 6,\n C: 0,\n D: 1,\n E: 2,\n F: 3,\n G: 4,\n a: 12,\n b: 13,\n c: 7,\n d: 8,\n e: 9,\n f: 10,\n g: 11\n};\n\nmodule.exports.rests = {\n x: 'invisible',\n X: 'invisible-multimeasure',\n y: 'spacer',\n z: 'rest',\n Z: 'multimeasure'\n};\n\nmodule.exports.accMap = {\n dblflat: '__',\n flat: '_',\n natural: '=',\n sharp: '^',\n dblsharp: '^^',\n quarterflat: '_/',\n quartersharp: '^/'\n};\n\nmodule.exports.tripletQ = {\n 2: 3,\n 3: 2,\n 4: 3,\n 5: 2, // TODO-PER: not handling 6/8 rhythm yet\n 6: 2,\n 7: 2, // TODO-PER: not handling 6/8 rhythm yet\n 8: 3,\n 9: 2 // TODO-PER: not handling 6/8 rhythm yet\n};\n","// abc_tokenizer.js: tokenizes an ABC Music Notation string to support abc_parse.\n\nvar parseCommon = require('./abc_common');\n\n// this is a series of functions that get a particular element out of the passed stream.\n// the return is the number of characters consumed, so 0 means that the element wasn't found.\n// also returned is the element found. This may be a different length because spaces may be consumed that aren't part of the string.\n// The return structure for most calls is { len: num_chars_consumed, token: str }\nvar Tokenizer = function(lines, multilineVars) {\n\tthis.lineIndex = 0\n\tthis.lines = lines\n\tthis.multilineVars = multilineVars;\n\n\tthis.skipWhiteSpace = function(str) {\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t if (!this.isWhiteSpace(str[i]))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn str.length;\t// It must have been all white space\n\t};\n\tvar finished = function(str, i) {\n\t\treturn i >= str.length;\n\t};\n\tthis.eatWhiteSpace = function(line, index) {\n\t\tfor (var i = index; i < line.length; i++) {\n\t\t if (!this.isWhiteSpace(line[i]))\n\t\t\t\treturn i-index;\n\t\t}\n\t\treturn i-index;\n\t};\n\n\t// This just gets the basic pitch letter, ignoring leading spaces, and normalizing it to a capital\n\tthis.getKeyPitch = function(str) {\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tswitch (str[i]) {\n\t\t\tcase 'A':return {len: i+1, token: 'A'};\n\t\t\tcase 'B':return {len: i+1, token: 'B'};\n\t\t\tcase 'C':return {len: i+1, token: 'C'};\n\t\t\tcase 'D':return {len: i+1, token: 'D'};\n\t\t\tcase 'E':return {len: i+1, token: 'E'};\n\t\t\tcase 'F':return {len: i+1, token: 'F'};\n\t\t\tcase 'G':return {len: i+1, token: 'G'};\n//\t\t\tcase 'a':return {len: i+1, token: 'A'};\n//\t\t\tcase 'b':return {len: i+1, token: 'B'};\n//\t\t\tcase 'c':return {len: i+1, token: 'C'};\n//\t\t\tcase 'd':return {len: i+1, token: 'D'};\n//\t\t\tcase 'e':return {len: i+1, token: 'E'};\n//\t\t\tcase 'f':return {len: i+1, token: 'F'};\n//\t\t\tcase 'g':return {len: i+1, token: 'G'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\t// This just gets the basic accidental, ignoring leading spaces, and only the ones that appear in a key\n\tthis.getSharpFlat = function(str) {\n\t\tif (str === 'bass')\n\t\t\treturn {len: 0};\n\t\tswitch (str[0]) {\n\t\t\tcase '#':return {len: 1, token: '#'};\n\t\t\tcase 'b':return {len: 1, token: 'b'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\tthis.getMode = function(str) {\n\t\tvar skipAlpha = function(str, start) {\n\t\t\t// This returns the index of the next non-alphabetic char, or the entire length of the string if not found.\n\t\t while (start < str.length && ((str[start] >= 'a' && str[start] <= 'z') || (str[start] >= 'A' && str[start] <= 'Z')))\n\t\t\t\tstart++;\n\t\t\treturn start;\n\t\t};\n\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tvar firstThree = str.substring(i,i+3).toLowerCase();\n\t\tif (firstThree.length > 1 && firstThree[1] === ' ' || firstThree[1] === '^' || firstThree[1] === '_' || firstThree[1] === '=') firstThree = firstThree[0];\t// This will handle the case of 'm'\n\t\tswitch (firstThree) {\n\t\t\tcase 'mix':return {len: skipAlpha(str, i), token: 'Mix'};\n\t\t\tcase 'dor':return {len: skipAlpha(str, i), token: 'Dor'};\n\t\t\tcase 'phr':return {len: skipAlpha(str, i), token: 'Phr'};\n\t\t\tcase 'lyd':return {len: skipAlpha(str, i), token: 'Lyd'};\n\t\t\tcase 'loc':return {len: skipAlpha(str, i), token: 'Loc'};\n\t\t\tcase 'aeo':return {len: skipAlpha(str, i), token: 'm'};\n\t\t\tcase 'maj':return {len: skipAlpha(str, i), token: ''};\n\t\t\tcase 'ion':return {len: skipAlpha(str, i), token: ''};\n\t\t\tcase 'min':return {len: skipAlpha(str, i), token: 'm'};\n\t\t\tcase 'm':return {len: skipAlpha(str, i), token: 'm'};\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\tthis.getClef = function(str, bExplicitOnly) {\n\t\tvar strOrig = str;\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\t// The word 'clef' is optional, but if it appears, a clef MUST appear\n\t\tvar needsClef = false;\n\t\tvar strClef = str.substring(i);\n\t\tif (parseCommon.startsWith(strClef, 'clef=')) {\n\t\t\tneedsClef = true;\n\t\t\tstrClef = strClef.substring(5);\n\t\t\ti += 5;\n\t\t}\n\t\tif (strClef.length === 0 && needsClef)\n\t\t\treturn {len: i+5, warn: \"No clef specified: \" + strOrig};\n\n\t\tvar j = this.skipWhiteSpace(strClef);\n\t\tif (finished(strClef, j))\n\t\t\treturn {len: 0};\n\t\tif (j > 0) {\n\t\t\ti += j;\n\t\t\tstrClef = strClef.substring(j);\n\t\t}\n\t\tvar name = null;\n\t\tif (parseCommon.startsWith(strClef, 'treble'))\n\t\t\tname = 'treble';\n\t\telse if (parseCommon.startsWith(strClef, 'bass3'))\n\t\t\tname = 'bass3';\n\t\telse if (parseCommon.startsWith(strClef, 'bass'))\n\t\t\tname = 'bass';\n\t\telse if (parseCommon.startsWith(strClef, 'tenor'))\n\t\t\tname = 'tenor';\n\t\telse if (parseCommon.startsWith(strClef, 'alto2'))\n\t\t\tname = 'alto2';\n\t\telse if (parseCommon.startsWith(strClef, 'alto1'))\n\t\t\tname = 'alto1';\n\t\telse if (parseCommon.startsWith(strClef, 'alto'))\n\t\t\tname = 'alto';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'none')))\n\t\t\tname = 'none';\n\t\telse if (parseCommon.startsWith(strClef, 'perc'))\n\t\t\tname = 'perc';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'C')))\n\t\t\tname = 'tenor';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'F')))\n\t\t\tname = 'bass';\n\t\telse if (!bExplicitOnly && (needsClef && parseCommon.startsWith(strClef, 'G')))\n\t\t\tname = 'treble';\n\t\telse\n\t\t\treturn {len: i+5, warn: \"Unknown clef specified: \" + strOrig};\n\n\t\tstrClef = strClef.substring(name.length);\n\t\tj = this.isMatch(strClef, '+8');\n\t\tif (j > 0)\n\t\t\tname += \"+8\";\n\t\telse {\n\t\t\tj = this.isMatch(strClef, '-8');\n\t\t\tif (j > 0)\n\t\t\t\tname += \"-8\";\n\t\t}\n\t\treturn {len: i+name.length, token: name, explicit: needsClef};\n\t};\n\n\t// This returns one of the legal bar lines\n\t// This is called alot and there is no obvious tokenable items, so this is broken apart.\n\tthis.getBarLine = function(line, i) {\n\t\tswitch (line[i]) {\n\t\t\tcase ']':\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase '|': return {len: 2, token: \"bar_thick_thin\"};\n\t\t\t\t\tcase '[':\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tif ((line[i] >= '1' && line[i] <= '9') || line[i] === '\"')\n\t\t\t\t\t\t\treturn {len: 2, token: \"bar_invisible\"};\n\t\t\t\t\t\treturn {len: 1, warn: \"Unknown bar symbol\"};\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 1, token: \"bar_invisible\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ':':\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase ':': return {len: 2, token: \"bar_dbl_repeat\"};\n\t\t\t\t\tcase '|':\t// :|\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\tcase ']':\t// :|]\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\t\t\t\tcase '|':\t// :|]|\n\t\t\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\t\t\tif (line[i] === ':') return {len: 5, token: \"bar_dbl_repeat\"};\n\t\t\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase '|':\t// :||\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\tif (line[i] === ':') return {len: 4, token: \"bar_dbl_repeat\"};\n\t\t\t\t\t\t\t\treturn {len: 3, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\treturn {len: 2, token: \"bar_right_repeat\"};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 1, warn: \"Unknown bar symbol\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '[':\t// [\n\t\t\t\t++i;\n\t\t\t\tif (line[i] === '|') {\t// [|\n\t\t\t\t\t++i;\n\t\t\t\t\tswitch (line[i]) {\n\t\t\t\t\t\tcase ':': return {len: 3, token: \"bar_left_repeat\"};\n\t\t\t\t\t\tcase ']': return {len: 3, token: \"bar_invisible\"};\n\t\t\t\t\t\tdefault: return {len: 2, token: \"bar_thick_thin\"};\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ((line[i] >= '1' && line[i] <= '9') || line[i] === '\"')\n\t\t\t\t\t\treturn {len: 1, token: \"bar_invisible\"};\n\t\t\t\t\treturn {len: 0};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '|':\t// |\n\t\t\t\t++i;\n\t\t\t\tswitch (line[i]) {\n\t\t\t\t\tcase ']': return {len: 2, token: \"bar_thin_thick\"};\n\t\t\t\t\tcase '|': // ||\n\t\t\t\t\t\t++i;\n\t\t\t\t\t\tif (line[i] === ':') return {len: 3, token: \"bar_left_repeat\"};\n\t\t\t\t\t\treturn {len: 2, token: \"bar_thin_thin\"};\n\t\t\t\t\tcase ':':\t// |:\n\t\t\t\t\t\tvar colons = 0;\n\t\t\t\t\t\twhile (line[i+colons] === ':') colons++;\n\t\t\t\t\t\treturn { len: 1+colons, token: \"bar_left_repeat\"};\n\t\t\t\t\tdefault: return {len: 1, token: \"bar_thin\"};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {len: 0};\n\t};\n\n\t// this returns all the characters in the string that match one of the characters in the legalChars string\n\tthis.getTokenOf = function(str, legalChars) {\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (legalChars.indexOf(str[i]) < 0)\n\t\t\t\treturn {len: i, token: str.substring(0, i)};\n\t\t}\n\t\treturn {len: i, token: str};\n\t};\n\n\tthis.getToken = function(str, start, end) {\n\t\t// This returns the next set of chars that doesn't contain spaces\n\t\tvar i = start;\n\t\twhile (i < end && !this.isWhiteSpace(str[i]))\n\t\t\ti++;\n\t\treturn str.substring(start, i);\n\t};\n\n\t// This just sees if the next token is the word passed in, with possible leading spaces\n\tthis.isMatch = function(str, match) {\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn 0;\n\t\tif (parseCommon.startsWith(str.substring(i), match))\n\t\t\treturn i+match.length;\n\t\treturn 0;\n\t};\n\n\tthis.getPitchFromTokens = function(tokens) {\n\t\tvar ret = { };\n\t\tvar pitches = {A: 5, B: 6, C: 0, D: 1, E: 2, F: 3, G: 4, a: 12, b: 13, c: 7, d: 8, e: 9, f: 10, g: 11};\n\t\tret.position = pitches[tokens[0].token];\n\t\tif (ret.position === undefined)\n\t\t\treturn { warn: \"Pitch expected. Found: \" + tokens[0].token };\n\t\ttokens.shift();\n\t\twhile (tokens.length) {\n\t\t\tswitch (tokens[0].token) {\n\t\t\t\tcase ',': ret.position -= 7; tokens.shift(); break;\n\t\t\t\tcase '\\'': ret.position += 7; tokens.shift(); break;\n\t\t\t\tdefault: return ret;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t};\n\n\tthis.getKeyAccidentals2 = function(tokens) {\n\t\tvar accs;\n\t\t// find and strip off all accidentals in the token list\n\t\twhile (tokens.length > 0) {\n\t\t\tvar acc;\n\t\t\tif (tokens[0].token === '^') {\n\t\t\t\tacc = 'sharp';\n\t\t\t\ttokens.shift();\n\t\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\tcase '^': acc = 'dblsharp'; tokens.shift(); break;\n\t\t\t\t\tcase '/': acc = 'quartersharp'; tokens.shift(); break;\n\t\t\t\t}\n\t\t\t} else if (tokens[0].token === '=') {\n\t\t\t\tacc = 'natural';\n\t\t\t\ttokens.shift();\n\t\t\t} else if (tokens[0].token === '_') {\n\t\t\t\tacc = 'flat';\n\t\t\t\ttokens.shift();\n\t\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\t\tswitch (tokens[0].token) {\n\t\t\t\t\tcase '_': acc = 'dblflat'; tokens.shift(); break;\n\t\t\t\t\tcase '/': acc = 'quarterflat'; tokens.shift(); break;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Not an accidental, we'll assume that a later parse will recognize it.\n\t\t\t\treturn { accs: accs };\n\t\t\t}\n\t\t\tif (tokens.length === 0) return {accs: accs, warn: 'Expected note name after ' + acc};\n\t\t\tswitch (tokens[0].token[0])\n\t\t\t{\n\t\t\t\tcase 'a':\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'e':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'A':\n\t\t\t\tcase 'B':\n\t\t\t\tcase 'C':\n\t\t\t\tcase 'D':\n\t\t\t\tcase 'E':\n\t\t\t\tcase 'F':\n\t\t\t\tcase 'G':\n\t\t\t\t\tif (accs === undefined)\n\t\t\t\t\t\taccs = [];\n\t\t\t\t\taccs.push({ acc: acc, note: tokens[0].token[0] });\n\t\t\t\t\tif (tokens[0].token.length === 1)\n\t\t\t\t\t\ttokens.shift();\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens[0].token = tokens[0].token.substring(1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {accs: accs, warn: 'Expected note name after ' + acc + ' Found: ' + tokens[0].token };\n\t\t\t}\n\t\t}\n\t\treturn { accs: accs };\n\t};\n\n\t// This gets an accidental marking for the key signature. It has the accidental then the pitch letter.\n\tthis.getKeyAccidental = function(str) {\n\t\tvar accTranslation = {\n\t\t\t'^': 'sharp',\n\t\t\t'^^': 'dblsharp',\n\t\t\t'=': 'natural',\n\t\t\t'_': 'flat',\n\t\t\t'__': 'dblflat',\n\t\t\t'_/': 'quarterflat',\n\t\t\t'^/': 'quartersharp'\n\t\t};\n\t\tvar i = this.skipWhiteSpace(str);\n\t\tif (finished(str, i))\n\t\t\treturn {len: 0};\n\t\tvar acc = null;\n\t\tswitch (str[i])\n\t\t{\n\t\t\tcase '^':\n\t\t\tcase '_':\n\t\t\tcase '=':\n\t\t\t\tacc = str[i];\n\t\t\t\tbreak;\n\t\t\tdefault:return {len: 0};\n\t\t}\n\t\ti++;\n\t\tif (finished(str, i))\n\t\t\treturn {len: 1, warn: 'Expected note name after accidental'};\n\t\tswitch (str[i])\n\t\t{\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase 'd':\n\t\t\tcase 'e':\n\t\t\tcase 'f':\n\t\t\tcase 'g':\n\t\t\tcase 'A':\n\t\t\tcase 'B':\n\t\t\tcase 'C':\n\t\t\tcase 'D':\n\t\t\tcase 'E':\n\t\t\tcase 'F':\n\t\t\tcase 'G':\n\t\t\t\treturn {len: i+1, token: {acc: accTranslation[acc], note: str[i]}};\n\t\t\tcase '^':\n\t\t\tcase '_':\n\t\t\tcase '/':\n\t\t\t\tacc += str[i];\n\t\t\t\ti++;\n\t\t\t\tif (finished(str, i))\n\t\t\t\t\treturn {len: 2, warn: 'Expected note name after accidental'};\n\t\t\t\tswitch (str[i])\n\t\t\t\t{\n\t\t\t\t\tcase 'a':\n\t\t\t\t\tcase 'b':\n\t\t\t\t\tcase 'c':\n\t\t\t\t\tcase 'd':\n\t\t\t\t\tcase 'e':\n\t\t\t\t\tcase 'f':\n\t\t\t\t\tcase 'g':\n\t\t\t\t\tcase 'A':\n\t\t\t\t\tcase 'B':\n\t\t\t\t\tcase 'C':\n\t\t\t\t\tcase 'D':\n\t\t\t\t\tcase 'E':\n\t\t\t\t\tcase 'F':\n\t\t\t\t\tcase 'G':\n\t\t\t\t\t\treturn {len: i+1, token: {acc: accTranslation[acc], note: str[i]}};\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn {len: 2, warn: 'Expected note name after accidental'};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn {len: 1, warn: 'Expected note name after accidental'};\n\t\t}\n\t};\n\n\tthis.isWhiteSpace = function(ch) {\n\t\treturn ch === ' ' || ch === '\\t' || ch === '\\x12';\n\t};\n\n\tthis.getMeat = function(line, start, end) {\n\t\t// This removes any comments starting with '%' and trims the ends of the string so that there are no leading or trailing spaces.\n\t\t// it returns just the start and end characters that contain the meat.\n\t\tvar comment = line.indexOf('%', start);\n\t\tif (comment >= 0 && comment < end)\n\t\t\tend = comment;\n\t\twhile (start < end && (line[start] === ' ' || line[start] === '\\t' || line[start] === '\\x12'))\n\t\t\tstart++;\n\t\twhile (start < end && (line[end-1] === ' ' || line[end-1] === '\\t' || line[end-1] === '\\x12'))\n\t\t\tend--;\n\t\treturn {start: start, end: end};\n\t};\n\n\tvar isLetter = function(ch) {\n\t\treturn (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');\n\t};\n\n\tvar isNumber = function(ch) {\n\t\treturn (ch >= '0' && ch <= '9');\n\t};\n\n\tthis.tokenize = function(line, start, end, alphaUntilWhiteSpace) {\n\t\t// this returns all the tokens inside the passed string. A token is a punctuation mark, a string of digits, a string of letters.\n\t\t// Quoted strings are one token.\n\t\t// If there is a minus sign next to a number, then it is included in the number.\n\t\t// If there is a period immediately after a number, with a number immediately following, then a float is returned.\n\t\t// The type of token is returned: quote, alpha, number, punct\n\t\t// If alphaUntilWhiteSpace is true, then the behavior of the alpha token changes.\n\n\t\tvar ret = this.getMeat(line, start, end);\n\t\tstart = ret.start;\n\t\tend = ret.end;\n\t\tvar tokens = [];\n\t\tvar i;\n\t\twhile (start < end) {\n\t\t\tif (line[start] === '\"') {\n\t\t\t\ti = start+1;\n\t\t\t\twhile (i < end && line[i] !== '\"') i++;\n\t\t\t\ttokens.push({ type: 'quote', token: line.substring(start+1, i), start: start+1, end: i});\n\t\t\t\ti++;\n\t\t\t} else if (isLetter(line[start])) {\n\t\t\t\ti = start+1;\n\t\t\t\tif (alphaUntilWhiteSpace)\n\t\t\t\t\twhile (i < end && !this.isWhiteSpace(line[i])) i++;\n\t\t\t\telse\n\t\t\t\t\twhile (i < end && isLetter(line[i])) i++;\n\t\t\t\ttokens.push({ type: 'alpha', token: line.substring(start, i), continueId: isNumber(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (line[start] === '.' && isNumber(line[i+1])) {\n\t\t\t\ti = start+1;\n\t\t\t\tvar int2 = null;\n\t\t\t\tvar float2 = null;\n\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\n\t\t\t\tfloat2 = parseFloat(line.substring(start, i));\n\t\t\t\ttokens.push({ type: 'number', token: line.substring(start, i), intt: int2, floatt: float2, continueId: isLetter(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (isNumber(line[start]) || (line[start] === '-' && isNumber(line[i+1]))) {\n\t\t\t\ti = start+1;\n\t\t\t\tvar intt = null;\n\t\t\t\tvar floatt = null;\n\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\t\t\t\tif (line[i] === '.' && isNumber(line[i+1])) {\n\t\t\t\t\ti++;\n\t\t\t\t\twhile (i < end && isNumber(line[i])) i++;\n\t\t\t\t} else\n\t\t\t\t\tintt = parseInt(line.substring(start, i));\n\n\t\t\t\tfloatt = parseFloat(line.substring(start, i));\n\t\t\t\ttokens.push({ type: 'number', token: line.substring(start, i), intt: intt, floatt: floatt, continueId: isLetter(line[i]), start: start, end: i});\n\t\t\t\tstart = i + 1;\n\t\t\t} else if (line[start] === ' ' || line[start] === '\\t') {\n\t\t\t\ti = start+1;\n\t\t\t} else {\n\t\t\t\ttokens.push({ type: 'punct', token: line[start], start: start, end: start+1});\n\t\t\t\ti = start+1;\n\t\t\t}\n\t\t\tstart = i;\n\t\t}\n\t\treturn tokens;\n\t};\n\n\tthis.getVoiceToken = function(line, start, end) {\n\t\t// This finds the next token. A token is delimited by a space or an equal sign. If it starts with a quote, then the portion between the quotes is returned.\n\t\tvar i = start;\n\t\twhile (i < end && this.isWhiteSpace(line[i]) || line[i] === '=')\n\t\t\ti++;\n\n\t\tif (line[i] === '\"') {\n\t\t\tvar close = line.indexOf('\"', i+1);\n\t\t\tif (close === -1 || close >= end)\n\t\t\t\treturn {len: 1, err: \"Missing close quote\"};\n\t\t\treturn {len: close-start+1, token: this.translateString(line.substring(i+1, close))};\n\t\t} else {\n\t\t\tvar ii = i;\n\t\t\twhile (ii < end && !this.isWhiteSpace(line[ii]) && line[ii] !== '=')\n\t\t\t\tii++;\n\t\t\treturn {len: ii-start+1, token: line.substring(i, ii)};\n\t\t}\n\t};\n\n\tvar charMap = {\n\t\t\"`a\": 'à', \"'a\": \"á\", \"^a\": \"â\", \"~a\": \"ã\", \"\\\"a\": \"ä\", \"oa\": \"å\", \"aa\": \"å\", \"=a\": \"ā\", \"ua\": \"ă\", \";a\": \"ą\",\n\t\t\"`e\": 'è', \"'e\": \"é\", \"^e\": \"ê\", \"\\\"e\": \"ë\", \"=e\": \"ē\", \"ue\": \"ĕ\", \";e\": \"ę\", \".e\": \"ė\",\n\t\t\"`i\": 'ì', \"'i\": \"í\", \"^i\": \"î\", \"\\\"i\": \"ï\", \"=i\": \"ī\", \"ui\": \"ĭ\", \";i\": \"į\",\n\t\t\"`o\": 'ò', \"'o\": \"ó\", \"^o\": \"ô\", \"~o\": \"õ\", \"\\\"o\": \"ö\", \"=o\": \"ō\", \"uo\": \"ŏ\", \"/o\": \"ø\",\n\t\t\"`u\": 'ù', \"'u\": \"ú\", \"^u\": \"û\", \"~u\": \"ũ\", \"\\\"u\": \"ü\", \"ou\": \"ů\", \"=u\": \"ū\", \"uu\": \"ŭ\", \";u\": \"ų\",\n\t\t\"`A\": 'À', \"'A\": \"Á\", \"^A\": \"Â\", \"~A\": \"Ã\", \"\\\"A\": \"Ä\", \"oA\": \"Å\", \"AA\": \"Å\", \"=A\": \"Ā\", \"uA\": \"Ă\", \";A\": \"Ą\",\n\t\t\"`E\": 'È', \"'E\": \"É\", \"^E\": \"Ê\", \"\\\"E\": \"Ë\", \"=E\": \"Ē\", \"uE\": \"Ĕ\", \";E\": \"Ę\", \".E\": \"Ė\",\n\t\t\"`I\": 'Ì', \"'I\": \"Í\", \"^I\": \"Î\", \"~I\": \"Ĩ\", \"\\\"I\": \"Ï\", \"=I\": \"Ī\", \"uI\": \"Ĭ\", \";I\": \"Į\", \".I\": \"İ\",\n\t\t\"`O\": 'Ò', \"'O\": \"Ó\", \"^O\": \"Ô\", \"~O\": \"Õ\", \"\\\"O\": \"Ö\", \"=O\": \"Ō\", \"uO\": \"Ŏ\", \"/O\": \"Ø\",\n\t\t\"`U\": 'Ù', \"'U\": \"Ú\", \"^U\": \"Û\", \"~U\": \"Ũ\", \"\\\"U\": \"Ü\", \"oU\": \"Ů\", \"=U\": \"Ū\", \"uU\": \"Ŭ\", \";U\": \"Ų\",\n\t\t\"ae\": \"æ\", \"AE\": \"Æ\", \"oe\": \"œ\", \"OE\": \"Œ\", \"ss\": \"ß\",\n\t\t\"'c\": \"ć\", \"^c\": \"ĉ\", \"uc\": \"č\", \"cc\": \"ç\", \".c\": \"ċ\", \"cC\": \"Ç\", \"'C\": \"Ć\", \"^C\": \"Ĉ\", \"uC\": \"Č\", \".C\": \"Ċ\",\n\t\t\"~N\": \"Ñ\", \"~n\": \"ñ\",\n\t\t\"=s\": \"š\", \"vs\": \"š\",\n\t\t\"DH\": \"Ð\", \"dh\": \"ð\",\n\t\t\"HO\": \"Ő\", \"Ho\": \"ő\", \"HU\": \"Ű\", \"Hu\": \"ű\",\n\t\t\"'Y\": \"Ý\", \"'y\": \"ý\", \"^Y\": \"Ŷ\", \"^y\": \"ŷ\", \"\\\"Y\": \"Ÿ\", \"\\\"y\": \"ÿ\",\n\t\t\"vS\": \"Š\", \"vZ\": \"Ž\", \"vz\": 'ž'\n\n// More chars: IJ ij Ď ď Đ đ Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ħ ħ Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ŀ ŀ Ł ł Ń ń Ņ ņ Ň ň ʼn Ŋ ŋ Ŕ ŕ Ŗ ŗ Ř ř Ś ś Ŝ ŝ Ş ş Š Ţ ţ Ť ť Ŧ ŧ Ŵ ŵ Ź ź Ż ż Ž\n\t};\n\tvar charMap1 = {\n\t\t\"#\": \"♯\",\n\t\t\"b\": \"♭\",\n\t\t\"=\": \"♮\"\n\t};\n\tvar charMap2 = {\n\t\t\"201\": \"♯\",\n\t\t\"202\": \"♭\",\n\t\t\"203\": \"♮\",\n\t\t\"241\": \"¡\",\n\t\t\"242\": \"¢\", \"252\": \"a\", \"262\": \"2\", \"272\": \"o\", \"302\": \"Â\", \"312\": \"Ê\", \"322\": \"Ò\", \"332\": \"Ú\", \"342\": \"â\", \"352\": \"ê\", \"362\": \"ò\", \"372\": \"ú\",\n\t\t\"243\": \"£\", \"253\": \"«\", \"263\": \"3\", \"273\": \"»\", \"303\": \"Ã\", \"313\": \"Ë\", \"323\": \"Ó\", \"333\": \"Û\", \"343\": \"ã\", \"353\": \"ë\", \"363\": \"ó\", \"373\": \"û\",\n\t\t\"244\": \"¤\", \"254\": \"¬\", \"264\": \" ́\", \"274\": \"1⁄4\", \"304\": \"Ä\", \"314\": \"Ì\", \"324\": \"Ô\", \"334\": \"Ü\", \"344\": \"ä\", \"354\": \"ì\", \"364\": \"ô\", \"374\": \"ü\",\n\t\t\"245\": \"¥\", \"255\": \"-\", \"265\": \"μ\", \"275\": \"1⁄2\", \"305\": \"Å\", \"315\": \"Í\", \"325\": \"Õ\", \"335\": \"Ý\", \"345\": \"å\", \"355\": \"í\", \"365\": \"õ\", \"375\": \"ý\",\n\t\t\"246\": \"¦\", \"256\": \"®\", \"266\": \"¶\", \"276\": \"3⁄4\", \"306\": \"Æ\", \"316\": \"Î\", \"326\": \"Ö\", \"336\": \"Þ\", \"346\": \"æ\", \"356\": \"î\", \"366\": \"ö\", \"376\": \"þ\",\n\t\t\"247\": \"§\", \"257\": \" ̄\", \"267\": \"·\", \"277\": \"¿\", \"307\": \"Ç\", \"317\": \"Ï\", \"327\": \"×\", \"337\": \"ß\", \"347\": \"ç\", \"357\": \"ï\", \"367\": \"÷\", \"377\": \"ÿ\",\n\t\t\"250\": \" ̈\", \"260\": \"°\", \"270\": \" ̧\", \"300\": \"À\", \"310\": \"È\", \"320\": \"Ð\", \"330\": \"Ø\", \"340\": \"à\", \"350\": \"è\", \"360\": \"ð\", \"370\": \"ø\",\n\t\t\"251\": \"©\", \"261\": \"±\", \"271\": \"1\", \"301\": \"Á\", \"311\": \"É\", \"321\": \"Ñ\", \"331\": \"Ù\", \"341\": \"á\", \"351\": \"é\", \"361\": \"ñ\", \"371\": \"ù\" };\n\tthis.translateString = function(str) {\n\t\tvar arr = str.split('\\\\');\n\t\tif (arr.length === 1) return str;\n\t\tvar out = null;\n\t\tarr.forEach(function(s) {\n\t\t\tif (out === null)\n\t\t\t\tout = s;\n\t\t\telse {\n\t\t\t\tvar c = charMap[s.substring(0, 2)];\n\t\t\t\tif (c !== undefined)\n\t\t\t\t\tout += c + s.substring(2);\n\t\t\t\telse {\n\t\t\t\t\tc = charMap2[s.substring(0, 3)];\n\t\t\t\t\tif (c !== undefined)\n\t\t\t\t\t\tout += c + s.substring(3);\n\t\t\t\t\telse {\n\t\t\t\t\t\tc = charMap1[s.substring(0, 1)];\n\t\t\t\t\t\tif (c !== undefined)\n\t\t\t\t\t\t\tout += c + s.substring(1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tout += \"\\\\\" + s;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn out;\n\t};\n\tthis.getNumber = function(line, index) {\n\t\tvar num = 0;\n\t\twhile (index < line.length) {\n\t\t\tswitch (line[index]) {\n\t\t\t\tcase '0':num = num*10;index++;break;\n\t\t\t\tcase '1':num = num*10+1;index++;break;\n\t\t\t\tcase '2':num = num*10+2;index++;break;\n\t\t\t\tcase '3':num = num*10+3;index++;break;\n\t\t\t\tcase '4':num = num*10+4;index++;break;\n\t\t\t\tcase '5':num = num*10+5;index++;break;\n\t\t\t\tcase '6':num = num*10+6;index++;break;\n\t\t\t\tcase '7':num = num*10+7;index++;break;\n\t\t\t\tcase '8':num = num*10+8;index++;break;\n\t\t\t\tcase '9':num = num*10+9;index++;break;\n\t\t\t\tdefault:\n\t\t\t\t\treturn {num: num, index: index};\n\t\t\t}\n\t\t}\n\t\treturn {num: num, index: index};\n\t};\n\n\tthis.getFraction = function(line, index) {\n\t\tvar num = 1;\n\t\tvar den = 1;\n\t\tif (line[index] !== '/') {\n\t\t\tvar ret = this.getNumber(line, index);\n\t\t\tnum = ret.num;\n\t\t\tindex = ret.index;\n\t\t}\n\t\tif (line[index] === '/') {\n\t\t\tindex++;\n\t\t\tif (line[index] === '/') {\n\t\t\t\tvar div = 0.5;\n\t\t\t\twhile (line[index++] === '/')\n\t\t\t\t\tdiv = div /2;\n\t\t\t\treturn {value: num * div, index: index-1};\n\t\t\t} else {\n\t\t\t\tvar iSave = index;\n\t\t\t\tvar ret2 = this.getNumber(line, index);\n\t\t\t\tif (ret2.num === 0 && iSave === index)\t// If we didn't use any characters, it is an implied 2\n\t\t\t\t\tret2.num = 2;\n\t\t\t\tif (ret2.num !== 0)\n\t\t\t\t\tden = ret2.num;\n\t\t\t\tindex = ret2.index;\n\t\t\t}\n\t\t}\n\n\t\treturn {value: num/den, index: index};\n\t};\n\n//\n// MAE 10 Jan 2023 - For better handling of tunes that have tune numbers in front of them.\n//\n// Previous version would take:\n// 21. Woman of the House, The\n// and return:\n// The 21. Woman of the House\n// \n// This fix results in:\n// 21. The Woman of the House\n//\n// Also added additional checks and handlers for lower case \", the\" and \", a\" since I found several tune collections with those tune name constructs\n//\n// Find an optional title number at the start of a tune title\nfunction getTitleNumber(str){\n\n const regex = /^(\\d+)\\./;\n\n // Use the exec method to search for the pattern in the string\n const match = regex.exec(str);\n\n // Check if a match is found\n if (match) {\n\n\t// The matched number is captured in the first group (index 1)\n\tconst foundNumber = match[1];\n\treturn foundNumber;\n\n } else {\n\n\t// Return null if no match is found\n\treturn null;\n\t\n }\n\n}\n\nvar thePatterns = [\n\t{ match: /,\\s*[Tt]he$/, replace: \"The \" },\n\t{ match: /,\\s*[Aa]$/, replace: \"A \" },\n\t{ match: /,\\s*[Aa]n$/, replace: \"An \" },\n]\n\nthis.theReverser = function (str) {\n\n for (var i = 0; i < thePatterns.length; i++) {\n\t\tvar thisPattern = thePatterns[i]\n\t\tvar match = str.match(thisPattern.match)\n\t\tif (match) {\n\t\t\tvar theTitleNumber = getTitleNumber(str);\n\t\t\tif (theTitleNumber){\n\t\t\n\t\t\t //console.log(\"theReverser The titlenumber:\"+theTitleNumber); \n\t\t\n\t\t\t str = str.replace(theTitleNumber+\".\",\"\");\n\t\t\t str = str.trim();\n\t\t\t}\n\t\t\tvar len = match[0].length\n\t\t\tvar result = thisPattern.replace + str.substring(0, str.length - len);\n\t\t\n\t\t\tif (theTitleNumber){\n\t\t\t result = theTitleNumber+\". \"+result;\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\n\t\t}\n\t}\n\n return str;\n\n };\n\n\tthis.stripComment = function(str) {\n\t\tvar i = str.indexOf('%');\n\t\tif (i >= 0)\n\t\t\treturn parseCommon.strip(str.substring(0, i));\n\t\treturn parseCommon.strip(str);\n\t};\n\n\tthis.getInt = function(str) {\n\t\t// This parses the beginning of the string for a number and returns { value: num, digits: num }\n\t\t// If digits is 0, then the string didn't point to a number.\n\t\tvar x = parseInt(str);\n\t\tif (isNaN(x))\n\t\t\treturn {digits: 0};\n\t\tvar s = \"\" + x;\n\t\tvar i = str.indexOf(s);\t// This is to account for leading spaces\n\t\treturn {value: x, digits: i+s.length};\n\t};\n\n\tthis.getFloat = function(str) {\n\t\t// This parses the beginning of the string for a number and returns { value: num, digits: num }\n\t\t// If digits is 0, then the string didn't point to a number.\n\t\tvar x = parseFloat(str);\n\t\tif (isNaN(x))\n\t\t\treturn {digits: 0};\n\t\tvar s = \"\" + x;\n\t\tvar i = str.indexOf(s);\t// This is to account for leading spaces\n\t\treturn {value: x, digits: i+s.length};\n\t};\n\n\tthis.getMeasurement = function(tokens) {\n\t\tif (tokens.length === 0) return { used: 0 };\n\t\tvar used = 1;\n\t\tvar num = '';\n\t\tif (tokens[0].token === '-') {\n\t\t\ttokens.shift();\n\t\t\tnum = '-';\n\t\t\tused++;\n\t\t}\n\t\telse if (tokens[0].type !== 'number') return { used: 0 };\n\t\tnum += tokens.shift().token;\n\t\tif (tokens.length === 0) return { used: 1, value: parseInt(num) };\n\t\tvar x = tokens.shift();\n\t\tif (x.token === '.') {\n\t\t\tused++;\n\t\t\tif (tokens.length === 0) return { used: used, value: parseInt(num) };\n\t\t\tif (tokens[0].type === 'number') {\n\t\t\t\tx = tokens.shift();\n\t\t\t\tnum = num + '.' + x.token;\n\t\t\t\tused++;\n\t\t\t\tif (tokens.length === 0) return { used: used, value: parseFloat(num) };\n\t\t\t}\n\t\t\tx = tokens.shift();\n\t\t}\n\t\tswitch (x.token) {\n\t\t\tcase 'pt': return { used: used+1, value: parseFloat(num) };\n\t\t\tcase 'px': return { used: used+1, value: parseFloat(num) };\n\t\t\tcase 'cm': return { used: used+1, value: parseFloat(num)/2.54*72 };\n\t\t\tcase 'in': return { used: used+1, value: parseFloat(num)*72 };\n\t\t\tdefault: tokens.unshift(x); return { used: used, value: parseFloat(num) };\n\t\t}\n\t};\n\tvar substInChord = function(str) {\n\t\tstr = str.replace(/\\\\n/g, \"\\n\");\n\t\tstr = str.replace(/\\\\\"/g, '\"');\n\t\treturn str;\n\t};\n\tthis.getBrackettedSubstring = function(line, i, maxErrorChars, _matchChar)\n\t{\n\t\t// This extracts the sub string by looking at the first character and searching for that\n\t\t// character later in the line (or search for the optional _matchChar).\n\t\t// For instance, if the first character is a quote it will look for\n\t\t// the end quote. If the end of the line is reached, then only up to the default number\n\t\t// of characters are returned, so that a missing end quote won't eat up the entire line.\n\t\t// It returns the substring and the number of characters consumed.\n\t\t// The number of characters consumed is normally two more than the size of the substring,\n\t\t// but in the error case it might not be.\n\t\tvar matchChar = _matchChar || line[i];\n\t\tvar pos = i+1;\n\t\tvar esc = false;\n\t\twhile ((pos < line.length) && (esc || line[pos] !== matchChar)) {\n\t\t\tesc = line[pos] === '\\\\';\n\t\t\t++pos;\n\t\t}\n\t\tif (line[pos] === matchChar)\n\t\t\treturn [pos-i+1,substInChord(line.substring(i+1, pos)), true];\n\t\telse\t// we hit the end of line, so we'll just pick an arbitrary num of chars so the line doesn't disappear.\n\t\t{\n\t\t\tpos = i+maxErrorChars;\n\t\t\tif (pos > line.length-1)\n\t\t\t\tpos = line.length-1;\n\t\t\treturn [pos-i+1, substInChord(line.substring(i+1, pos)), false];\n\t\t}\n\t};\n};\n\nTokenizer.prototype.peekLine = function() {\n\treturn this.lines[this.lineIndex]\n}\n\nTokenizer.prototype.nextLine = function() {\n\tif (this.lineIndex > 0) {\n\t\tthis.multilineVars.iChar += this.lines[this.lineIndex-1].length + 1;\n\t}\n\tif (this.lineIndex < this.lines.length) {\n\t\tvar result = this.lines[this.lineIndex]\n\t\tthis.lineIndex++\n\t\treturn result\n\t}\n\treturn null\n}\n\nmodule.exports = Tokenizer;\n","// abc_transpose.js: Handles the automatic transposition of key signatures, chord symbols, and notes.\n\nvar allNotes = require(\"./all-notes\");\nvar transposeChordName = require(\"../parse/transpose-chord\")\nvar keyAccidentals = require('../const/key-accidentals');\nvar transpose = {};\n\nvar keyIndex = {\n\t'C': 0,\n\t'C#': 1,\n\t'Db': 1,\n\t'D': 2,\n\t'D#': 3,\n\t'Eb': 3,\n\t'E': 4,\n\t'F': 5,\n\t'F#': 6,\n\t'Gb': 6,\n\t'G': 7,\n\t'G#': 8,\n\t'Ab': 8,\n\t'A': 9,\n\t'A#': 10,\n\t'Bb': 10,\n\t'B': 11\n};\nvar newKey = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab', 'A', 'Bb', 'B'];\nvar newKeyMinor = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'Bb', 'B'];\n\ntranspose.keySignature = function(multilineVars, keyName, root, acc, localTranspose) {\n\tif (multilineVars.clef.type === \"perc\" || multilineVars.clef.type === \"none\")\n\t\treturn { accidentals: keyAccidentals(keyName), root: root, acc: acc };\n\tif (!localTranspose) localTranspose = 0;\n\tmultilineVars.localTransposeVerticalMovement = 0;\n\tmultilineVars.localTransposePreferFlats = false;\n\tvar k = keyAccidentals(keyName);\n\tif (!k) return multilineVars.key; // If the key isn't in the list, it is non-standard. We won't attempt to transpose it.\n\tmultilineVars.localTranspose = (multilineVars.globalTranspose ? multilineVars.globalTranspose : 0) + localTranspose;\n\n\tif (!multilineVars.localTranspose)\n\t\treturn { accidentals: k, root: root, acc: acc };\n\tmultilineVars.globalTransposeOrigKeySig = k;\n\tif (multilineVars.localTranspose % 12 === 0) {\n\t\tmultilineVars.localTransposeVerticalMovement = (multilineVars.localTranspose / 12) * 7;\n\t\treturn { accidentals: k, root: root, acc: acc };\n\t}\n\n\tvar baseKey = keyName[0];\n\tif (keyName[1] === 'b' || keyName[1] === '#') {\n\t\tbaseKey += keyName[1];\n\t\tkeyName = keyName.substr(2);\n\t} else\n\t\tkeyName = keyName.substr(1);\n\tvar thisKeyIndex = keyIndex[baseKey]\n\tvar recognized = thisKeyIndex !== undefined\n\tif (!recognized) {\n\t\t// Either the key sig is \"none\" or we don't recognize it. Either way we don't change it, and we assume key of C for the purposes of this calculation.\n\t\tthisKeyIndex = 0\n\t\tbaseKey = \"C\"\n\t\tkeyName = \"\"\n\t}\n\tvar index = thisKeyIndex + multilineVars.localTranspose;\n\twhile (index < 0) index += 12;\n\tif (index > 11) index = index % 12;\n\tvar newKeyName = (keyName[0] === 'm' ? newKeyMinor[index] : newKey[index]);\n\tvar transposedKey = newKeyName + keyName;\n\tvar newKeySig = keyAccidentals(transposedKey);\n\tif (newKeySig.length > 0 && newKeySig[0].acc === 'flat')\n\t\tmultilineVars.localTransposePreferFlats = true;\n\tvar distance = transposedKey.charCodeAt(0) - baseKey.charCodeAt(0);\n\tif (multilineVars.localTranspose > 0) {\n\t\tif (distance < 0)\n\t\t\tdistance += 7;\n\t\telse if (distance === 0) {\n\t\t\t// There's a funny thing that happens when the key changes only an accidental's distance, for instance, from Ab to A.\n\t\t\t// If the distance is positive (we are raising pitch), and the change is higher (that is, Ab -> A), then raise an octave.\n\t\t\t// This test is easier because we know the keys are not equal (or we wouldn't get this far), so if the base key is a flat key, then\n\t\t\t// the transposed key must be higher. Likewise, if the transposed key is sharp, then the base key must be lower. And one\n\t\t\t// of those two things must be true because they are not both natural.\n\t\t\tif (baseKey[1] === '#' || transposedKey[1] === 'b')\n\t\t\t\tdistance += 7;\n\t\t}\n\t} else if (multilineVars.localTranspose < 0) {\n\t\tif (distance > 0)\n\t\t\tdistance -= 7;\n\t\telse if (distance === 0) {\n\t\t\t// There's a funny thing that happens when the key changes only an accidental's distance, for instance, from Ab to A.\n\t\t\t// If the distance is negative (we are dropping pitch), and the change is lower (that is, A -> Ab), then drop an octave.\n\t\t\tif (baseKey[1] === 'b' || transposedKey[1] === '#')\n\t\t\t\tdistance -= 7;\n\t\t}\n\t}\n\n\tif (multilineVars.localTranspose > 0)\n\t\tmultilineVars.localTransposeVerticalMovement = distance + Math.floor(multilineVars.localTranspose / 12) * 7;\n\telse\n\t\tmultilineVars.localTransposeVerticalMovement = distance + Math.ceil(multilineVars.localTranspose / 12) * 7;\n\tif (recognized)\n\t\treturn { accidentals: newKeySig, root: newKeyName[0], acc: newKeyName.length > 1 ? newKeyName[1] : \"\" };\n\telse\n\t\treturn { accidentals: [], root: root, acc: acc };\n};\n\ntranspose.chordName = function(multilineVars, chord) {\n\treturn transposeChordName(chord, multilineVars.localTranspose, multilineVars.localTransposePreferFlats, multilineVars.freegchord)\n};\n\nvar pitchToLetter = [ 'c', 'd', 'e', 'f', 'g', 'a', 'b' ];\nfunction accidentalChange(origPitch, newPitch, accidental, origKeySig, newKeySig) {\n\tvar origPitchLetter = pitchToLetter[(origPitch + 49) % 7]; // Make sure it is a positive pitch before normalizing.\n\tvar origAccidental = 0;\n\tfor (var i = 0; i < origKeySig.length; i++) {\n\t\tif (origKeySig[i].note.toLowerCase() === origPitchLetter)\n\t\t\torigAccidental = accidentals[origKeySig[i].acc];\n\t}\n\n\tvar currentAccidental = accidentals[accidental];\n\tvar delta = currentAccidental - origAccidental;\n\n\tvar newPitchLetter = pitchToLetter[(newPitch + 49) % 7]; // Make sure it is a positive pitch before normalizing.\n\tvar newAccidental = 0;\n\tfor (var j = 0; j < newKeySig.accidentals.length; j++) {\n\t\tif (newKeySig.accidentals[j].note.toLowerCase() === newPitchLetter)\n\t\t\tnewAccidental = accidentals[newKeySig.accidentals[j].acc];\n\t}\n\tvar calcAccidental = delta + newAccidental;\n\tif (calcAccidental < -2) {\n\t\tnewPitch--;\n\t\tcalcAccidental += (newPitchLetter === 'c' || newPitchLetter === 'f') ? 1 : 2;\n\t}\n\tif (calcAccidental > 2) {\n\t\tnewPitch++;\n\t\tcalcAccidental -= (newPitchLetter === 'b' || newPitchLetter === 'e') ? 1 : 2;\n\t}\n\treturn [newPitch, calcAccidental];\n}\n\nvar accidentals = {\n\tdblflat: -2,\n\tflat: -1,\n\tnatural: 0,\n\tsharp: 1,\n\tdblsharp: 2\n};\nvar accidentals2 = {\n\t\"-2\": \"dblflat\",\n\t\"-1\": \"flat\",\n\t\"0\": \"natural\",\n\t\"1\": \"sharp\",\n\t\"2\": \"dblsharp\"\n};\nvar accidentals3 = {\n\t\"-2\": \"__\",\n\t\"-1\": \"_\",\n\t\"0\": \"=\",\n\t\"1\": \"^\",\n\t\"2\": \"^^\"\n};\n//var count = 0\ntranspose.note = function(multilineVars, el) {\n\t// the \"el\" that is passed in has el.name, el.accidental, and el.pitch. \"pitch\" is the vertical position (0=middle C)\n\t// localTranspose is the number of half steps\n\t// localTransposeVerticalMovement is the vertical distance to move.\n\t//console.log(count++,multilineVars.localTranspose, el)\n\tif (!multilineVars.localTranspose || multilineVars.clef.type === \"perc\")\n\t\treturn;\n\tvar origPitch = el.pitch;\n\tif (multilineVars.localTransposeVerticalMovement) {\n\t\tel.pitch = el.pitch + multilineVars.localTransposeVerticalMovement;\n\t\tif (el.name) {\n\t\t\tvar actual = el.accidental ? el.name.substring(1) : el.name\n\t\t\tvar acc = el.accidental ? el.name[0] : ''\n\t\t\tvar p = allNotes.pitchIndex(actual)\n\t\t\tel.name = acc + allNotes.noteName(p+multilineVars.localTransposeVerticalMovement)\n\t\t}\n\t}\n\n\tif (el.accidental) {\n\t\tvar ret = accidentalChange(origPitch, el.pitch, el.accidental, multilineVars.globalTransposeOrigKeySig, multilineVars.targetKey);\n\t\tel.pitch = ret[0];\n\t\tel.accidental = accidentals2[ret[1]];\n\t\tif (el.name) {\n\t\t\tel.name = accidentals3[ret[1]] + el.name.replace(/[_^=]/g,'');\n\t\t}\n\t}\n\n};\n\nmodule.exports = transpose;\n","var allNotes = {};\n\nconst allPitches = [\n\t'C,,,', 'D,,,', 'E,,,', 'F,,,', 'G,,,', 'A,,,', 'B,,,',\n\t'C,,', 'D,,', 'E,,', 'F,,', 'G,,', 'A,,', 'B,,',\n\t'C,', 'D,', 'E,', 'F,', 'G,', 'A,', 'B,',\n\t'C', 'D', 'E', 'F', 'G', 'A', 'B',\n\t'c', 'd', 'e', 'f', 'g', 'a', 'b',\n\t\"c'\", \"d'\", \"e'\", \"f'\", \"g'\", \"a'\", \"b'\",\n\t\"c''\", \"d''\", \"e''\", \"f''\", \"g''\", \"a''\", \"b''\",\n\t\"c'''\", \"d'''\", \"e'''\", \"f'''\", \"g'''\", \"a'''\", \"b'''\",\n];\n\nallNotes.pitchIndex = function(noteName) {\n\treturn allPitches.indexOf(noteName)\n}\n\nallNotes.noteName = function(pitchIndex) {\n\treturn allPitches[pitchIndex]\n}\n\nmodule.exports = allNotes;\n","var sharpChords = ['C', 'C♯', 'D', \"D♯\", 'E', 'F', \"F♯\", 'G', 'G♯', 'A', 'A♯', 'B'];\nvar flatChords = ['C', 'D♭', 'D', 'E♭', 'E', 'F', 'G♭', 'G', 'A♭', 'A', 'B♭', 'B'];\nvar sharpChordsFree = ['C', 'C#', 'D', \"D#\", 'E', 'F', \"F#\", 'G', 'G#', 'A', 'A#', 'B'];\nvar flatChordsFree = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B'];\n\nfunction transposeChordName(chord, steps, preferFlats, freeGCchord) {\n\tif (!steps || (steps % 12 === 0)) // The chords are the same if it is an exact octave change.\n\t\treturn chord;\n\n\t// There are two things in the chord that might need to be transposed:\n\t// The chord will start with a letter from A-G, and might have one accidental after it.\n\t// That accidental might be an actual sharp or flat char, or it might be a pound sign or lower case \"b\".\n\t// Then there is a bunch of stuff that isn't transposed and should just be copied. That is stuff like \"7\" and more complicated chords.\n\t// But there is one other exception: right after a slash there will be a bass note and possibly an accidental. That should also be transposed.\n\n\twhile (steps < 0) steps += 12;\n\tif (steps > 11) steps = steps % 12;\n\n\t// (chord name w/accidental) (a bunch of stuff) (/) (bass note) (anything else)\n\tvar match = chord.match(/^([A-G][b#♭♯]?)([^\\/]+)?\\/?([A-G][b#♭♯]?)?(.+)?/)\n\tif (!match)\n\t\treturn chord; // We don't recognize the format of the chord, so skip it.\n\tvar name = match[1]\n\tvar extra1 = match[2]\n\tvar bass = match[3]\n\tvar extra2 = match[4]\n\tvar index = sharpChords.indexOf(name)\n\tif (index < 0)\n\t\tindex = flatChords.indexOf(name)\n\tif (index < 0)\n\t\tindex = sharpChordsFree.indexOf(name)\n\tif (index < 0)\n\t\tindex = flatChordsFree.indexOf(name)\n\tif (index < 0)\n\t\treturn chord; // This should never happen, but if we can't find the chord just bail.\t\n\n\tindex += steps\n\tindex = index % 12\n\n\tif (preferFlats) {\n\t\tif (freeGCchord) chord = flatChordsFree[index]\n\t\telse chord = flatChords[index]\n\t} else {\n\t\tif (freeGCchord) chord = sharpChordsFree[index]\n\t\telse chord = sharpChords[index]\n\t}\n\n\tif (extra1)\n\t\tchord += extra1\n\n\tif (bass) {\n\t\tvar index = sharpChords.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = flatChords.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = sharpChordsFree.indexOf(bass)\n\t\tif (index < 0)\n\t\t\tindex = flatChordsFree.indexOf(bass)\n\t\tchord += '/'\n\t\tif (index >= 0) {\n\t\t\tindex += steps\n\t\t\tindex = index % 12\n\t\t\tif (preferFlats) {\n\t\t\t\tif (freeGCchord) chord += flatChordsFree[index]\n\t\t\t\telse chord += flatChords[index]\n\t\t\t} else {\n\t\t\t\tif (freeGCchord) chord += sharpChordsFree[index]\n\t\t\t\telse chord += sharpChords[index]\n\t\t\t}\n\t\t} else\n\t\t\tchord += bass; // Don't know what to do so do nothing\n\t}\n\n\tif (extra2)\n\t\tchord += extra2\n\n\treturn chord;\n}\n\nmodule.exports = transposeChordName","var parseKeyVoice = require('../parse/abc_parse_key_voice');\n//var parseCommon = require('../parse/abc_common');\n//var parseDirective = require('./abc_parse_directive');\n\nvar TuneBuilder = function (tune) {\n\tvar self = this;\n\tvar voiceDefs = {}\n\tvar currentVoiceName = ''\n\ttune.reset();\n\n\tthis.setVisualTranspose = function (visualTranspose) {\n\t\tif (visualTranspose)\n\t\t\ttune.visualTranspose = visualTranspose;\n\t};\n\n\tthis.cleanUp = function (barsperstaff, staffnonote, currSlur) {\n\t\tcloseLine(tune);\t// Close the last line.\n\t\tdelete tune.runningFonts;\n\n\t\tsimplifyMetaText(tune)\n\t\t//addRichTextToAnnotationsAndLyrics(tune)\n\n\t\t// If the tempo was created with a string like \"Allegro\", then the duration of a beat needs to be set at the last moment, when it is most likely known.\n\t\tif (tune.metaText.tempo && tune.metaText.tempo.bpm && !tune.metaText.tempo.duration)\n\t\t\ttune.metaText.tempo.duration = [tune.getBeatLength()];\n\n\t\t// Remove any blank lines\n\t\tvar anyDeleted = false;\n\t\tvar i, s, v;\n\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff !== undefined) {\n\t\t\t\tvar hasAny = false;\n\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++) {\n\t\t\t\t\tif (tune.lines[i].staff[s] === undefined) {\n\t\t\t\t\t\tanyDeleted = true;\n\t\t\t\t\t\ttune.lines[i].staff[s] = null;\n\t\t\t\t\t\t//tune.lines[i].staff[s] = { voices: []};\t// TODO-PER: There was a part missing in the abc music. How should we recover?\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (v = 0; v < tune.lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\t\t\tif (tune.lines[i].staff[s].voices[v] === undefined)\n\t\t\t\t\t\t\t\ttune.lines[i].staff[s].voices[v] = [];\t// TODO-PER: There was a part missing in the abc music. How should we recover?\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tif (containsNotes(tune.lines[i].staff[s].voices[v])) hasAny = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hasAny) {\n\t\t\t\t\ttune.lines[i] = null;\n\t\t\t\t\tanyDeleted = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (anyDeleted) {\n\t\t\ttune.lines = tune.lines.filter(function (line) { return !!line });\n\t\t\ttune.lines.forEach(function (line) {\n\t\t\t\tif (line.staff)\n\t\t\t\t\tline.staff = line.staff.filter(function (line) { return !!line });\n\t\t\t});\n\t\t}\n\n\t\t// if we exceeded the number of bars allowed on a line, then force a new line\n\t\tif (barsperstaff) {\n\t\t\twhile (wrapMusicLines(tune.lines, barsperstaff)) {\n\t\t\t\t// This will keep wrapping until the end of the piece.\n\t\t\t}\n\t\t}\n\n\t\t// If we were passed staffnonote, then we want to get rid of all staffs that contain only rests.\n\t\tif (staffnonote) {\n\t\t\tanyDeleted = false;\n\t\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\t\tif (tune.lines[i].staff !== undefined) {\n\t\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++) {\n\t\t\t\t\t\tvar keepThis = false;\n\t\t\t\t\t\tfor (v = 0; v < tune.lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\t\t\tif (containsNotesStrict(tune.lines[i].staff[s].voices[v])) {\n\t\t\t\t\t\t\t\tkeepThis = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!keepThis) {\n\t\t\t\t\t\t\tanyDeleted = true;\n\t\t\t\t\t\t\ttune.lines[i].staff[s] = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (anyDeleted) {\n\t\t\t\ttune.lines.forEach(function (line) {\n\t\t\t\t\tif (line.staff)\n\t\t\t\t\t\tline.staff = line.staff.filter(function (staff) { return !!staff });\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfixTitles(tune.lines);\n\n\t\t// Remove the temporary working variables\n\t\tfor (i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff) {\n\t\t\t\tfor (s = 0; s < tune.lines[i].staff.length; s++)\n\t\t\t\t\tdelete tune.lines[i].staff[s].workingClef;\n\t\t\t}\n\t\t}\n\n\t\t// If there are overlays, create new voices for them.\n\t\twhile (resolveOverlays(tune)) {\n\t\t\t// keep resolving overlays as long as any are found.\n\t\t}\n\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tvar staff = tune.lines[i].staff;\n\t\t\tif (staff) {\n\t\t\t\tfor (tune.staffNum = 0; tune.staffNum < staff.length; tune.staffNum++) {\n\t\t\t\t\tif (staff[tune.staffNum].clef)\n\t\t\t\t\t\tparseKeyVoice.fixClef(staff[tune.staffNum].clef);\n\t\t\t\t\tfor (tune.voiceNum = 0; tune.voiceNum < staff[tune.staffNum].voices.length; tune.voiceNum++) {\n\t\t\t\t\t\tvar voice = staff[tune.staffNum].voices[tune.voiceNum];\n\t\t\t\t\t\tcleanUpSlursInLine(voice, tune.staffNum, tune.voiceNum, currSlur);\n\t\t\t\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\t\t\t\tif (voice[j].el_type === 'clef')\n\t\t\t\t\t\t\t\tparseKeyVoice.fixClef(voice[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (voice.length > 0 && voice[voice.length - 1].barNumber) {\n\t\t\t\t\t\t\t// Don't hang a bar number on the last bar line: it should go on the next line.\n\t\t\t\t\t\t\tvar nextLine = getNextMusicLine(tune.lines, i);\n\t\t\t\t\t\t\tif (nextLine)\n\t\t\t\t\t\t\t\tnextLine.staff[0].barNumber = voice[voice.length - 1].barNumber;\n\t\t\t\t\t\t\tdelete voice[voice.length - 1].barNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove temporary variables that the outside doesn't need to know about\n\t\tdelete tune.staffNum;\n\t\tdelete tune.voiceNum;\n\t\tdelete tune.lineNum;\n\t\tdelete tune.potentialStartBeam;\n\t\tdelete tune.potentialEndBeam;\n\t\tdelete tune.vskipPending;\n\n\t\treturn currSlur;\n\t};\n\n\tthis.addTieToLastNote = function (dottedTie) {\n\t\t// TODO-PER: if this is a chord, which note?\n\t\tvar el = getLastNote(tune);\n\t\tif (el && el.pitches && el.pitches.length > 0) {\n\t\t\tel.pitches[0].startTie = {};\n\t\t\tif (dottedTie)\n\t\t\t\tel.pitches[0].startTie.style = 'dotted';\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tthis.appendElement = function (type, startChar, endChar, hashParams) {\n\t\thashParams.el_type = type;\n\t\tif (startChar !== null)\n\t\t\thashParams.startChar = startChar;\n\t\tif (endChar !== null)\n\t\t\thashParams.endChar = endChar;\n\t\tif (type === 'note') { // && (hashParams.rest !== undefined || hashParams.end_beam === undefined)) {\n\t\t\t// Now, add the startBeam and endBeam where it is needed.\n\t\t\t// end_beam is already set on the places where there is a forced end_beam. We'll remove that here after using that info.\n\t\t\t// this.potentialStartBeam either points to null or the start beam.\n\t\t\t// this.potentialEndBeam either points to null or the start beam.\n\t\t\t// If we have a beam break (note is longer than a quarter, or an end_beam is on this element), then set the beam if we have one.\n\t\t\t// reset the variables for the next notes.\n\t\t\tvar dur = getDuration(hashParams);\n\t\t\tif (dur >= 0.25) {\t// The beam ends on the note before this.\n\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.force_end_beam_last && tune.potentialStartBeam !== undefined) {\n\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.end_beam && tune.potentialStartBeam !== undefined) {\t// the beam is forced to end on this note, probably because of a space in the ABC\n\t\t\t\tif (hashParams.rest === undefined)\n\t\t\t\t\tendBeamHere(hashParams, tune);\n\t\t\t\telse\n\t\t\t\t\tendBeamLast(tune);\n\t\t\t} else if (hashParams.rest === undefined) {\t// this a short note and we aren't about to end the beam\n\t\t\t\tif (tune.potentialStartBeam === undefined) {\t// We aren't collecting notes for a beam, so start here.\n\t\t\t\t\tif (!hashParams.end_beam) {\n\t\t\t\t\t\ttune.potentialStartBeam = hashParams;\n\t\t\t\t\t\tdelete tune.potentialEndBeam;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttune.potentialEndBeam = hashParams;\t// Continue the beaming, look for the end next note.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// end_beam goes on rests and notes which precede rests _except_ when a rest (or set of adjacent rests) has normal notes on both sides (no spaces)\n\t\t\t//\t\t\tif (hashParams.rest !== undefined)\n\t\t\t//\t\t\t{\n\t\t\t//\t\t\t\thashParams.end_beam = true;\n\t\t\t//\t\t\t\tvar el2 = getLastNote(tune);\n\t\t\t//\t\t\t\tif (el2) el2.end_beam = true;\n\t\t\t//\t\t\t\t// TODO-PER: implement exception mentioned in the comment.\n\t\t\t//\t\t\t}\n\t\t} else {\t// It's not a note, so there definitely isn't beaming after it.\n\t\t\tendBeamLast(tune);\n\t\t}\n\t\tdelete hashParams.end_beam;\t// We don't want this temporary variable hanging around.\n\t\tdelete hashParams.force_end_beam_last;\t// We don't want this temporary variable hanging around.\n\t\tif (hashParams.rest && hashParams.rest.type === 'invisible') {\n\t\t\tdelete hashParams.decoration // the decorations on invisible rests should be invisible, too.\n\t\t}\n\t\tif (tune.lines.length <= tune.lineNum || tune.lines[tune.lineNum].staff.length <= tune.staffNum) {\n\t\t\t//console.log(\"pushNote IGNORED\", tune.lines[tune.lineNum])\n\t\t\t// TODO-PER: This prevents a crash, but it drops the element. Need to figure out how to start a new line, or delay adding this.\n\t\t\treturn false;\n\t\t}\n\n\t\tpushNote(self, tune, hashParams, voiceDefs, currentVoiceName);\n\t\treturn true\n\t};\n\n\tthis.appendStartingElement = function (type, startChar, endChar, hashParams2) {\n\t\t//console.log('appendStartingElement', hashParams2)\n\t\t// If we're in the middle of beaming, then end the beam.\n\t\tcloseLine(tune);\n\n\t\t// We only ever want implied naturals the first time.\n\t\tvar impliedNaturals;\n\t\tif (type === 'key') {\n\t\t\timpliedNaturals = hashParams2.impliedNaturals;\n\t\t\tdelete hashParams2.impliedNaturals;\n\t\t\tdelete hashParams2.explicitAccidentals;\n\t\t}\n\n\t\t// Clone the object because it will be sticking around for the next line and we don't want the extra fields in it.\n\t\tvar hashParams = Object.assign({}, hashParams2);\n\n\t\t// be sure that we are on a music type line before doing the following.\n\t\tif (!tune.lines[tune.lineNum]) return\n\t\tvar staff = tune.lines[tune.lineNum].staff\n\t\tif (!staff) return\n\n\t\t// If tune is the first item in tune staff, then we might have to initialize the staff, first.\n\t\tif (staff.length <= tune.staffNum) {\n\t\t\tstaff[tune.staffNum] = {};\n\t\t\tstaff[tune.staffNum].clef = Object.assign({}, staff[0].clef);\n\t\t\tstaff[tune.staffNum].key = Object.assign({}, staff[0].key);\n\t\t\tif (staff[0].meter)\n\t\t\t\tstaff[tune.staffNum].meter = Object.assign({}, staff[0].meter);\n\t\t\tstaff[tune.staffNum].workingClef = Object.assign({}, staff[0].workingClef);\n\t\t\tstaff[tune.staffNum].voices = [[]];\n\t\t}\n\t\t// If tune is a clef type, then we replace the working clef on the line. This is kept separate from\n\t\t// the clef in case there is an inline clef field. We need to know what the current position for\n\t\t// the note is.\n\t\tif (type === 'clef') {\n\t\t\tstaff[tune.staffNum].workingClef = hashParams;\n\t\t}\n\n\t\t// These elements should not be added twice, so if the element exists on tune line without a note or bar before it, just replace the staff version.\n\t\tvar voice = staff[tune.staffNum].voices[tune.voiceNum];\n\t\tfor (var i = 0; i < voice.length; i++) {\n\t\t\tif (voice[i].el_type === 'note' || voice[i].el_type === 'bar') {\n\t\t\t\thashParams.el_type = type;\n\t\t\t\thashParams.startChar = startChar;\n\t\t\t\thashParams.endChar = endChar;\n\t\t\t\tif (impliedNaturals)\n\t\t\t\t\thashParams.accidentals = impliedNaturals.concat(hashParams.accidentals);\n\t\t\t\tvoice.push(hashParams);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (voice[i].el_type === type) {\n\t\t\t\thashParams.el_type = type;\n\t\t\t\thashParams.startChar = startChar;\n\t\t\t\thashParams.endChar = endChar;\n\t\t\t\tif (impliedNaturals)\n\t\t\t\t\thashParams.accidentals = impliedNaturals.concat(hashParams.accidentals);\n\t\t\t\tvoice[i] = hashParams;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// We didn't see either that type or a note, so replace the element to the staff.\n\t\tstaff[tune.staffNum][type] = hashParams2;\n\t};\n\n\tthis.addSubtitle = function (str, info) {\n\t\tpushLine(tune, { subtitle: { text: str, startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addSpacing = function (num) {\n\t\ttune.vskipPending = num;\n\t};\n\n\tthis.addNewPage = function (num) {\n\t\tpushLine(tune, { newpage: num });\n\t};\n\n\tthis.addSeparator = function (spaceAbove, spaceBelow, lineLength, info) {\n\t\tpushLine(tune, { separator: { spaceAbove: Math.round(spaceAbove), spaceBelow: Math.round(spaceBelow), lineLength: Math.round(lineLength), startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addText = function (str, info) {\n\t\tpushLine(tune, { text: { text: str, startChar: info.startChar, endChar: info.endChar } });\n\t};\n\n\tthis.addCentered = function (str) {\n\t\tpushLine(tune, { text: [{ text: str, center: true }] });\n\t};\n\n\t//\tanyVoiceContainsNotes: function(line) {\n\t//\t\tfor (var i = 0; i < line.staff.voices.length; i++) {\n\t//\t\t\tif (containsNotes(line.staff.voices[i]))\n\t//\t\t\t\treturn true;\n\t//\t\t}\n\t//\t\treturn false;\n\t//\t},\n\tthis.changeVoiceScale = function (scale) {\n\t\tself.appendElement('scale', null, null, { size: scale });\n\t};\n\tthis.changeVoiceColor = function (color) {\n\t\tself.appendElement('color', null, null, { color: color });\n\t};\n\n\tthis.startNewLine = function (params) {\n\t\t//console.log(\"startNewLine\", tune.lineNum, params, voiceDefs)\n\t\t// If the pointed to line doesn't exist, just create that. If the line does exist, but doesn't have any music on it, just use it.\n\t\t// If it does exist and has music, then increment the line number. If the new element doesn't exist, create it.\n\t\tcloseLine(tune);\t// Close the previous line.\n\t\tif (params.currentVoiceName) {\n\t\t\tcurrentVoiceName = params.currentVoiceName\n\t\t\tvoiceDefs[params.currentVoiceName] = params\n\t\t}\n\n\t\tif (tune.lines[tune.lineNum] === undefined) createLine(self, tune, params);\n\t\telse if (tune.lines[tune.lineNum].staff === undefined) {\n\t\t\ttune.lineNum++;\n\t\t\tthis.startNewLine(params);\n\t\t} else if (tune.lines[tune.lineNum].staff[tune.staffNum] === undefined) createStaff(self, tune, params);\n\t\telse if (tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum] === undefined) createVoice(self, tune, params);\n\t\telse if (!containsNotes(tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum])) {\n\t\t\t// We don't need a new line but we might need to update parts of it.\n\t\t\tif (params.part)\n\t\t\t\tself.appendElement('part', params.part.startChar, params.part.endChar, { title: params.part.title });\n\t\t} else {\n\t\t\ttune.lineNum++;\n\t\t\tthis.startNewLine(params);\n\t\t}\n\t};\n\n\tthis.setRunningFont = function (type, font) {\n\t\t// This is called at tune start to set the current default fonts so we know whether to record a change.\n\t\ttune.runningFonts[type] = font;\n\t};\n\n\tthis.setBarNumberImmediate = function (barNumber) {\n\t\t// If tune is called right at the beginning of a line, then correct the measure number that is already written.\n\t\t// If tune is called at the beginning of a measure, then correct the measure number that was just created.\n\t\t// If tune is called in the middle of a measure, then subtract one from it, because it will be incremented before applied.\n\t\tvar currentVoice = this.getCurrentVoice();\n\t\tif (currentVoice && currentVoice.length > 0) {\n\t\t\tvar lastElement = currentVoice[currentVoice.length - 1];\n\t\t\tif (lastElement.el_type === 'bar') {\n\t\t\t\tif (lastElement.barNumber !== undefined) // the measure number might not be written for tune bar, don't override that.\n\t\t\t\t\tlastElement.barNumber = barNumber;\n\t\t\t} else\n\t\t\t\treturn barNumber - 1;\n\t\t}\n\t\treturn barNumber;\n\t};\n\n\tthis.hasBeginMusic = function () {\n\t\t// return true if there exists at least one line that contains \"staff\"\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tthis.isFirstLine = function (index) {\n\t\tfor (var i = index - 1; i >= 0; i--) {\n\t\t\tif (tune.lines[i].staff !== undefined) return false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tthis.getCurrentVoice = function () {\n\t\t//console.log(\"getCurrentVoice\", tune.lineNum)\n\t\tvar currLine = tune.lines[tune.lineNum];\n\t\tif (!currLine)\n\t\t\treturn null;\n\t\tvar currStaff = currLine.staff[tune.staffNum];\n\t\tif (!currStaff)\n\t\t\treturn null;\n\t\tif (currStaff.voices[tune.voiceNum] !== undefined)\n\t\t\treturn currStaff.voices[tune.voiceNum];\n\t\telse return null;\n\t};\n\n\tthis.setCurrentVoice = function (staffNum, voiceNum, name) {\n\t\t//console.log(\"setCurrentVoice\", tune.lineNum, staffNum, voiceNum, name, voiceDefs)\n\t\ttune.staffNum = staffNum;\n\t\ttune.voiceNum = voiceNum;\n\t\tcurrentVoiceName = name\n\t\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\t\tif (tune.lines[i].staff) {\n\t\t\t\tif (tune.lines[i].staff[staffNum] === undefined || tune.lines[i].staff[staffNum].voices[voiceNum] === undefined ||\n\t\t\t\t\t!containsNotes(tune.lines[i].staff[staffNum].voices[voiceNum])) {\n\t\t\t\t\t//console.log(\"cv2\", i, tune.lines[i].staff[staffNum])\n\t\t\t\t\ttune.lineNum = i;\n\t\t\t\t\tif (!tune.lines[i].staff[staffNum] || !!tune.lines[i].staff[staffNum].voices[voiceNum]) return true\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//console.log(\"cv3\", i, tune.lineNum, tune.lines[tune.lineNum])\n\t\ttune.lineNum = i;\n\t\treturn false\n\t};\n\n\tthis.addMetaText = function (key, value, info) {\n\t\tif (tune.metaText[key] === undefined) {\n\t\t\ttune.metaText[key] = value;\n\t\t\ttune.metaTextInfo[key] = info;\n\t\t} else {\n\t\t\tif (typeof tune.metaText[key] === 'string' && typeof value === 'string')\n\t\t\t\ttune.metaText[key] += \"\\n\" + value;\n\t\t\telse {\n\t\t\t\tif (tune.metaText[key] === 'string')\n\t\t\t\t\ttune.metaText[key] = [{ text: tune.metaText[key] }]\n\t\t\t\tif (typeof value === 'string')\n\t\t\t\t\tvalue = [{ text: value }]\n\t\t\t\ttune.metaText[key] = tune.metaText[key].concat(value)\n\t\t\t}\n\t\t\ttune.metaTextInfo[key].endChar = info.endChar;\n\t\t}\n\t};\n\n\tthis.addMetaTextArray = function (key, value, info) {\n\t\tif (tune.metaText[key] === undefined) {\n\t\t\ttune.metaText[key] = [value];\n\t\t\ttune.metaTextInfo[key] = info;\n\t\t} else {\n\t\t\ttune.metaText[key].push(value);\n\t\t\ttune.metaTextInfo[key].endChar = info.endChar;\n\t\t}\n\t};\n\tthis.addMetaTextObj = function (key, value, info) {\n\t\ttune.metaText[key] = value;\n\t\ttune.metaTextInfo[key] = info;\n\t};\n};\n\nfunction isArrayOfStrings(arr) {\n\tif (!arr) return false\n\tif (typeof arr === \"string\") return false\n\t//var str = ''\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (typeof arr[i] !== 'string')\n\t\t\treturn false\n\t}\n\treturn true\n}\n\nfunction simplifyMetaText(tune) {\n\tif (isArrayOfStrings(tune.metaText.notes))\n\t\ttune.metaText.notes = tune.metaText.notes.join(\"\\n\")\n\tif (isArrayOfStrings(tune.metaText.history))\n\t\ttune.metaText.history = tune.metaText.history.join(\"\\n\")\n}\n\n// function addRichTextToAnnotationsAndLyrics(tune) {\n// \tvar lines = tune.lines\n// \tfor (var i = 0; i < lines.length; i++) {\n// \t\tif (lines[i].staff !== undefined) {\n// \t\t\tfor (var s = 0; s < lines[i].staff.length; s++) {\n// \t\t\t\tfor (var v = 0; v < lines[i].staff[s].voices.length; v++) {\n// \t\t\t\t\tvar voice = lines[i].staff[s].voices[v];\n// \t\t\t\t\tfor (var n = 0; n < voice.length; n++) {\n// \t\t\t\t\t\tvar element = voice[n]\n// \t\t\t\t\t\tif (element.chord) {\n// \t\t\t\t\t\t\tfor (var c = 0; c < element.chord.length; c++) {\n// \t\t\t\t\t\t\t\telement.chord[c].name = parseDirective.parseFontChangeLine(element.chord[c].name)\n// \t\t\t\t\t\t\t\tconsole.log(element.chord[c].name)\n// \t\t\t\t\t\t\t}\n// \t\t\t\t\t\t}\n// \t\t\t\t\t\tif (element.lyric) {\n// \t\t\t\t\t\t\tfor (var l = 0; l < element.lyric.length; l++) {\n// \t\t\t\t\t\t\t\telement.lyric[l].syllable = parseDirective.parseFontChangeLine(element.lyric[l].syllable)\n// \t\t\t\t\t\t\t\tconsole.log(element.lyric[l].syllable)\n// \t\t\t\t\t\t\t}\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t}\n// \t\t\t}\n// \t\t}\n// \t}\n\n// }\n\nfunction resolveOverlays(tune) {\n\tvar madeChanges = false;\n\tvar durationsPerLines = [];\n\tfor (var i = 0; i < tune.lines.length; i++) {\n\t\tvar line = tune.lines[i];\n\t\tif (line.staff) {\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tvar overlayVoice = [];\n\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\toverlayVoice.push({ hasOverlay: false, voice: [], snip: [] });\n\t\t\t\t\tdurationsPerLines[i] = 0;\n\t\t\t\t\tvar durationThisBar = 0;\n\t\t\t\t\tvar inOverlay = false;\n\t\t\t\t\tvar overlayDuration = 0;\n\t\t\t\t\tvar snipStart = -1;\n\t\t\t\t\tfor (var kk = 0; kk < voice.length; kk++) {\n\t\t\t\t\t\tvar event = voice[kk];\n\t\t\t\t\t\tif (event.el_type === \"overlay\" && !inOverlay) {\n\t\t\t\t\t\t\tmadeChanges = true;\n\t\t\t\t\t\t\tinOverlay = true;\n\t\t\t\t\t\t\tsnipStart = kk;\n\t\t\t\t\t\t\toverlayVoice[k].hasOverlay = true;\n\t\t\t\t\t\t\tif (overlayDuration === 0)\n\t\t\t\t\t\t\t\toverlayDuration = durationsPerLines[i];\n\t\t\t\t\t\t\t// If this isn't the first line, we also need invisible rests on the previous lines.\n\t\t\t\t\t\t\t// So, if the next voice doesn't appear in a previous line, create it\n\t\t\t\t\t\t\tfor (var ii = 0; ii < i; ii++) {\n\t\t\t\t\t\t\t\tif (durationsPerLines[ii] && tune.lines[ii].staff && staff.voices.length >= tune.lines[ii].staff[0].voices.length) {\n\t\t\t\t\t\t\t\t\ttune.lines[ii].staff[0].voices.push([{\n\t\t\t\t\t\t\t\t\t\tel_type: \"note\",\n\t\t\t\t\t\t\t\t\t\tduration: durationsPerLines[ii],\n\t\t\t\t\t\t\t\t\t\trest: { type: \"invisible\" },\n\t\t\t\t\t\t\t\t\t\tstartChar: event.startChar,\n\t\t\t\t\t\t\t\t\t\tendChar: event.endChar\n\t\t\t\t\t\t\t\t\t}]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (event.el_type === \"bar\") {\n\t\t\t\t\t\t\tif (inOverlay) {\n\t\t\t\t\t\t\t\t// delete the overlay events from this array without messing up this loop.\n\t\t\t\t\t\t\t\tinOverlay = false;\n\t\t\t\t\t\t\t\toverlayVoice[k].snip.push({ start: snipStart, len: kk - snipStart });\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event); // Also end the overlay with the barline.\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// This keeps the voices lined up: if the overlay isn't in the first measure then we need a bunch of invisible rests.\n\t\t\t\t\t\t\t\tif (durationThisBar > 0)\n\t\t\t\t\t\t\t\t\toverlayVoice[k].voice.push({ el_type: \"note\", duration: durationThisBar, rest: { type: \"invisible\" }, startChar: event.startChar, endChar: event.endChar });\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdurationThisBar = 0;\n\t\t\t\t\t\t} else if (event.el_type === \"note\") {\n\t\t\t\t\t\t\tif (inOverlay) {\n\t\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdurationThisBar += event.duration;\n\t\t\t\t\t\t\t\tdurationsPerLines[i] += event.duration;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (event.el_type === \"scale\" || event.el_type === \"stem\" || event.el_type === \"overlay\" || event.el_type === \"style\" || event.el_type === \"transpose\" || event.el_type === \"color\") {\n\t\t\t\t\t\t\t// These types of events are duplicated on the overlay layer.\n\t\t\t\t\t\t\toverlayVoice[k].voice.push(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (overlayVoice[k].hasOverlay && overlayVoice[k].snip.length === 0) {\n\t\t\t\t\t\t// there was no closing bar, so we didn't set the snip amount.\n\t\t\t\t\t\toverlayVoice[k].snip.push({ start: snipStart, len: voice.length - snipStart });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (k = 0; k < overlayVoice.length; k++) {\n\t\t\t\t\tvar ov = overlayVoice[k];\n\t\t\t\t\tif (ov.hasOverlay) {\n\t\t\t\t\t\tov.voice.splice(0, 0, { el_type: \"stem\", direction: \"down\" })\n\t\t\t\t\t\tstaff.voices.push(ov.voice);\n\t\t\t\t\t\tfor (var kkk = ov.snip.length - 1; kkk >= 0; kkk--) {\n\t\t\t\t\t\t\tvar snip = ov.snip[kkk];\n\t\t\t\t\t\t\tstaff.voices[k].splice(snip.start, snip.len);\n\t\t\t\t\t\t\tstaff.voices[k].splice(snip.start + 1, 0, { el_type: \"stem\", direction: \"auto\" });\n\t\t\t\t\t\t\tvar indexOfLastBar = findLastBar(staff.voices[k], snip.start);\n\t\t\t\t\t\t\tstaff.voices[k].splice(indexOfLastBar, 0, { el_type: \"stem\", direction: \"up\" });\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// remove ending marks from the overlay voice so they are not repeated\n\t\t\t\t\t\tfor (kkk = 0; kkk < staff.voices[staff.voices.length - 1].length; kkk++) {\n\t\t\t\t\t\t\tstaff.voices[staff.voices.length - 1][kkk] = Object.assign({}, staff.voices[staff.voices.length - 1][kkk]);\n\t\t\t\t\t\t\tvar el = staff.voices[staff.voices.length - 1][kkk];\n\t\t\t\t\t\t\tif (el.el_type === 'bar' && el.startEnding) {\n\t\t\t\t\t\t\t\tdelete el.startEnding;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (el.el_type === 'bar' && el.endEnding)\n\t\t\t\t\t\t\t\tdelete el.endEnding;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn madeChanges;\n};\n\nfunction findLastBar(voice, start) {\n\tfor (var i = start - 1; i > 0 && voice[i].el_type !== \"bar\"; i--) {\n\n\t}\n\treturn i;\n}\n\nfunction fixTitles(lines) {\n\t// We might have name and subname defined. We now know what line everything is on, so we can determine which to use.\n\tvar firstMusicLine = true;\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = lines[i];\n\t\tif (line.staff) {\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tif (staff.title) {\n\t\t\t\t\tvar hasATitle = false;\n\t\t\t\t\tfor (var k = 0; k < staff.title.length; k++) {\n\t\t\t\t\t\tif (staff.title[k]) {\n\t\t\t\t\t\t\tstaff.title[k] = (firstMusicLine) ? staff.title[k].name : staff.title[k].subname;\n\t\t\t\t\t\t\tif (staff.title[k])\n\t\t\t\t\t\t\t\thasATitle = true;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tstaff.title[k] = '';\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tstaff.title[k] = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasATitle)\n\t\t\t\t\t\tdelete staff.title;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfirstMusicLine = false;\n\t\t}\n\t}\n}\n\nfunction cleanUpSlursInLine(line, staffNum, voiceNum, currSlur) {\n\tif (!currSlur[staffNum])\n\t\tcurrSlur[staffNum] = [];\n\tif (!currSlur[staffNum][voiceNum])\n\t\tcurrSlur[staffNum][voiceNum] = [];\n\tvar x;\n\t//\t\t\tvar lyr = null;\t// TODO-PER: debugging.\n\n\tvar addEndSlur = function (obj, num, chordPos) {\n\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\t// There isn't an exact match for note position, but we'll take any other open slur.\n\t\t\tfor (x = 0; x < currSlur[staffNum][voiceNum].length; x++) {\n\t\t\t\tif (currSlur[staffNum][voiceNum][x] !== undefined) {\n\t\t\t\t\tchordPos = x;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\t\tvar offNum = chordPos * 100 + 1;\n\t\t\t\tobj.endSlur.forEach(function (x) { if (offNum === x) --offNum; });\n\t\t\t\tcurrSlur[staffNum][voiceNum][chordPos] = [offNum];\n\t\t\t}\n\t\t}\n\t\tvar slurNum;\n\t\tfor (var i = 0; i < num; i++) {\n\t\t\tslurNum = currSlur[staffNum][voiceNum][chordPos].pop();\n\t\t\tobj.endSlur.push(slurNum);\n\t\t\t//\t\t\t\t\tlyr.syllable += '<' + slurNum;\t// TODO-PER: debugging\n\t\t}\n\t\tif (currSlur[staffNum][voiceNum][chordPos].length === 0)\n\t\t\tdelete currSlur[staffNum][voiceNum][chordPos];\n\t\treturn slurNum;\n\t};\n\n\tvar addStartSlur = function (obj, num, chordPos, usedNums) {\n\t\tobj.startSlur = [];\n\t\tif (currSlur[staffNum][voiceNum][chordPos] === undefined) {\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos] = [];\n\t\t}\n\t\tvar nextNum = chordPos * 100 + 1;\n\t\tfor (var i = 0; i < num; i++) {\n\t\t\tif (usedNums) {\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t\tusedNums.forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\t}\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].forEach(function (x) { if (nextNum === x) ++nextNum; });\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].forEach(function (x) { if (nextNum === x) ++nextNum; });\n\n\t\t\tcurrSlur[staffNum][voiceNum][chordPos].push(nextNum);\n\t\t\tobj.startSlur.push({ label: nextNum });\n\t\t\tif (obj.dottedSlur) {\n\t\t\t\tobj.startSlur[obj.startSlur.length - 1].style = 'dotted';\n\t\t\t\tdelete obj.dottedSlur;\n\t\t\t}\n\t\t\t//\t\t\t\t\tlyr.syllable += ' ' + nextNum + '>';\t// TODO-PER:debugging\n\t\t\tnextNum++;\n\t\t}\n\t};\n\n\tfor (var i = 0; i < line.length; i++) {\n\t\tvar el = line[i];\n\t\t//\t\t\t\tif (el.lyric === undefined)\t// TODO-PER: debugging\n\t\t//\t\t\t\t\tel.lyric = [{ divider: '-' }];\t// TODO-PER: debugging\n\t\t//\t\t\t\tlyr = el.lyric[0];\t// TODO-PER: debugging\n\t\t//\t\t\t\tlyr.syllable = '';\t// TODO-PER: debugging\n\t\tif (el.el_type === 'note') {\n\t\t\tif (el.gracenotes) {\n\t\t\t\tfor (var g = 0; g < el.gracenotes.length; g++) {\n\t\t\t\t\tif (el.gracenotes[g].endSlur) {\n\t\t\t\t\t\tvar gg = el.gracenotes[g].endSlur;\n\t\t\t\t\t\tel.gracenotes[g].endSlur = [];\n\t\t\t\t\t\tfor (var ggg = 0; ggg < gg; ggg++)\n\t\t\t\t\t\t\taddEndSlur(el.gracenotes[g], 1, 20);\n\t\t\t\t\t}\n\t\t\t\t\tif (el.gracenotes[g].startSlur) {\n\t\t\t\t\t\tx = el.gracenotes[g].startSlur;\n\t\t\t\t\t\taddStartSlur(el.gracenotes[g], x, 20);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.endSlur) {\n\t\t\t\tx = el.endSlur;\n\t\t\t\tel.endSlur = [];\n\t\t\t\taddEndSlur(el, x, 0);\n\t\t\t}\n\t\t\tif (el.startSlur) {\n\t\t\t\tx = el.startSlur;\n\t\t\t\taddStartSlur(el, x, 0);\n\t\t\t}\n\t\t\tif (el.pitches) {\n\t\t\t\tvar usedNums = [];\n\t\t\t\tfor (var p = 0; p < el.pitches.length; p++) {\n\t\t\t\t\tif (el.pitches[p].endSlur) {\n\t\t\t\t\t\tvar k = el.pitches[p].endSlur;\n\t\t\t\t\t\tel.pitches[p].endSlur = [];\n\t\t\t\t\t\tfor (var j = 0; j < k; j++) {\n\t\t\t\t\t\t\tvar slurNum = addEndSlur(el.pitches[p], 1, p + 1);\n\t\t\t\t\t\t\tusedNums.push(slurNum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (p = 0; p < el.pitches.length; p++) {\n\t\t\t\t\tif (el.pitches[p].startSlur) {\n\t\t\t\t\t\tx = el.pitches[p].startSlur;\n\t\t\t\t\t\taddStartSlur(el.pitches[p], x, p + 1, usedNums);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Correct for the weird gracenote case where ({g}a) should match.\n\t\t\t\t// The end slur was already assigned to the note, and needs to be moved to the first note of the graces.\n\t\t\t\tif (el.gracenotes && el.pitches[0].endSlur && el.pitches[0].endSlur[0] === 100 && el.pitches[0].startSlur) {\n\t\t\t\t\tif (el.gracenotes[0].endSlur)\n\t\t\t\t\t\tel.gracenotes[0].endSlur.push(el.pitches[0].startSlur[0].label);\n\t\t\t\t\telse\n\t\t\t\t\t\tel.gracenotes[0].endSlur = [el.pitches[0].startSlur[0].label];\n\t\t\t\t\tif (el.pitches[0].endSlur.length === 1)\n\t\t\t\t\t\tdelete el.pitches[0].endSlur;\n\t\t\t\t\telse if (el.pitches[0].endSlur[0] === 100)\n\t\t\t\t\t\tel.pitches[0].endSlur.shift();\n\t\t\t\t\telse if (el.pitches[0].endSlur[el.pitches[0].endSlur.length - 1] === 100)\n\t\t\t\t\t\tel.pitches[0].endSlur.pop();\n\t\t\t\t\tif (currSlur[staffNum][voiceNum][1].length === 1)\n\t\t\t\t\t\tdelete currSlur[staffNum][voiceNum][1];\n\t\t\t\t\telse\n\t\t\t\t\t\tcurrSlur[staffNum][voiceNum][1].pop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction wrapMusicLines(lines, barsperstaff) {\n\tfor (i = 0; i < lines.length; i++) {\n\t\tif (lines[i].staff !== undefined) {\n\t\t\tfor (s = 0; s < lines[i].staff.length; s++) {\n\t\t\t\tvar permanentItems = [];\n\t\t\t\tfor (v = 0; v < lines[i].staff[s].voices.length; v++) {\n\t\t\t\t\tvar voice = lines[i].staff[s].voices[v];\n\t\t\t\t\tvar barNumThisLine = 0;\n\t\t\t\t\tfor (var n = 0; n < voice.length; n++) {\n\t\t\t\t\t\tif (voice[n].el_type === 'bar') {\n\t\t\t\t\t\t\tbarNumThisLine++;\n\t\t\t\t\t\t\tif (barNumThisLine >= barsperstaff) {\n\t\t\t\t\t\t\t\t// push everything else to the next line, if there is anything else,\n\t\t\t\t\t\t\t\t// and there is a next line. If there isn't a next line, create one.\n\t\t\t\t\t\t\t\tif (n < voice.length - 1) {\n\t\t\t\t\t\t\t\t\tvar nextLine = getNextMusicLine(lines, i);\n\t\t\t\t\t\t\t\t\tif (!nextLine) {\n\t\t\t\t\t\t\t\t\t\tvar cp = JSON.parse(JSON.stringify(lines[i]));\n\t\t\t\t\t\t\t\t\t\tlines.push(Object.assign({}, cp));\n\t\t\t\t\t\t\t\t\t\tnextLine = lines[lines.length - 1];\n\t\t\t\t\t\t\t\t\t\tfor (var ss = 0; ss < nextLine.staff.length; ss++) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var vv = 0; vv < nextLine.staff[ss].voices.length; vv++)\n\t\t\t\t\t\t\t\t\t\t\t\tnextLine.staff[ss].voices[vv] = [];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar startElement = n + 1;\n\t\t\t\t\t\t\t\t\tvar section = lines[i].staff[s].voices[v].slice(startElement);\n\t\t\t\t\t\t\t\t\tlines[i].staff[s].voices[v] = lines[i].staff[s].voices[v].slice(0, startElement);\n\t\t\t\t\t\t\t\t\tnextLine.staff[s].voices[v] = permanentItems.concat(section.concat(nextLine.staff[s].voices[v]));\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (!voice[n].duration) {\n\t\t\t\t\t\t\tpermanentItems.push(voice[n]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getNextMusicLine(lines, currentLine) {\n\tcurrentLine++;\n\twhile (lines.length > currentLine) {\n\t\tif (lines[currentLine].staff)\n\t\t\treturn lines[currentLine];\n\t\tcurrentLine++;\n\t}\n\treturn null;\n}\n\nfunction getLastNote(tune) {\n\tif (!tune.lines[tune.lineNum]) return null\n\tif (!tune.lines[tune.lineNum].staff) return null\n\tif (!tune.lines[tune.lineNum].staff[tune.staffNum]) return null\n\tvar voice = tune.lines[tune.lineNum].staff[tune.staffNum].voices[tune.voiceNum]\n\tif (!voice) return null\n\tfor (var i = voice.length - 1; i >= 0; i--) {\n\t\tvar el = voice[i];\n\t\tif (el.el_type === 'note') {\n\t\t\treturn el;\n\t\t}\n\t}\n\treturn null;\n};\n\nfunction getDuration(el) {\n\tif (el.duration) return el.duration;\n\treturn 0;\n};\n\nfunction closeLine(tune) {\n\tif (tune.potentialStartBeam && tune.potentialEndBeam) {\n\t\ttune.potentialStartBeam.startBeam = true;\n\t\ttune.potentialEndBeam.endBeam = true;\n\t}\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n};\n\nfunction containsNotes(voice) {\n\tfor (var i = 0; i < voice.length; i++) {\n\t\tif (voice[i].el_type === 'note' || voice[i].el_type === 'bar')\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nfunction containsNotesStrict(voice) {\n\tfor (var i = 0; i < voice.length; i++) {\n\t\tif (voice[i].el_type === 'note' && (voice[i].rest === undefined || voice[i].chord !== undefined))\n\t\t\treturn true;\n\t}\n\treturn false;\n};\n\nfunction pushLine(tune, hash) {\n\tif (tune.vskipPending) {\n\t\thash.vskip = tune.vskipPending;\n\t\tdelete tune.vskipPending;\n\t}\n\ttune.lines.push(hash);\n};\n\nfunction pushNote(self, tune, hp, voiceDefs, currentVoiceName) {\n\t//console.log(\"pushNote\", tune.lineNum, tune.staffNum, hp.pitches ? JSON.stringify(hp.pitches) : hp.pitches)\n\tvar currStaff = tune.lines[tune.lineNum].staff[tune.staffNum];\n\n\tif (hp.pitches !== undefined) {\n\t\tvar mid = currStaff.workingClef.verticalPos;\n\t\thp.pitches.forEach(function (p) { p.verticalPos = p.pitch - mid; });\n\t}\n\tif (hp.gracenotes !== undefined) {\n\t\tvar mid2 = currStaff.workingClef.verticalPos;\n\t\thp.gracenotes.forEach(function (p) { p.verticalPos = p.pitch - mid2; });\n\t}\n\tif (currStaff.voices.length <= tune.voiceNum) {\n\t\t//console.log(\"should create?\", currentVoiceName, voiceDefs)\n\t\tif (!voiceDefs[currentVoiceName])\n\t\t\tvoiceDefs[currentVoiceName] = {}\n\t\tcreateVoice(self, tune, voiceDefs[currentVoiceName])\n\t}\n\tcurrStaff.voices[tune.voiceNum].push(hp);\n}\n\nfunction endBeamHere(hashParams, tune) {\n\ttune.potentialStartBeam.startBeam = true;\n\thashParams.endBeam = true;\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n}\nfunction endBeamLast(tune) {\n\tif (tune.potentialStartBeam !== undefined && tune.potentialEndBeam !== undefined) {\t// Do we have a set of notes to beam?\n\t\ttune.potentialStartBeam.startBeam = true;\n\t\ttune.potentialEndBeam.endBeam = true;\n\t}\n\tdelete tune.potentialStartBeam;\n\tdelete tune.potentialEndBeam;\n}\n\nfunction setLineFont(tune, type, font) {\n\t// If we haven't encountered the font type yet then we are using the default font so it doesn't\n\t// need to be noted. If we have encountered it, then only record it if it is different from the last time.\n\tif (tune.runningFonts[type]) {\n\t\tvar isDifferent = false;\n\t\tvar keys = Object.keys(font);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tif (tune.runningFonts[type][keys[i]] !== font[keys[i]])\n\t\t\t\tisDifferent = true;\n\t\t}\n\t\tif (isDifferent) {\n\t\t\ttune.lines[tune.lineNum].staff[tune.staffNum][type] = font;\n\t\t}\n\t}\n\ttune.runningFonts[type] = font;\n}\n\nfunction createVoice(self, tune, params) {\n\t//console.log(\"createVoice\", params)\n\tvar thisStaff = tune.lines[tune.lineNum].staff[tune.staffNum];\n\tthisStaff.voices[tune.voiceNum] = [];\n\tif (!thisStaff.title)\n\t\tthisStaff.title = [];\n\tthisStaff.title[tune.voiceNum] = { name: params.name, subname: params.subname };\n\tif (params.style)\n\t\tself.appendElement('style', null, null, { head: params.style });\n\tif (params.stem)\n\t\tself.appendElement('stem', null, null, { direction: params.stem });\n\telse if (tune.voiceNum > 0) {\n\t\tif (thisStaff.voices[0] !== undefined) {\n\t\t\tvar found = false;\n\t\t\tfor (var i = 0; i < thisStaff.voices[0].length; i++) {\n\t\t\t\tif (thisStaff.voices[0].el_type === 'stem')\n\t\t\t\t\tfound = true;\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tvar stem = { el_type: 'stem', direction: 'up' };\n\t\t\t\tthisStaff.voices[0].splice(0, 0, stem);\n\t\t\t}\n\t\t}\n\t\tself.appendElement('stem', null, null, { direction: 'down' });\n\t}\n\tif (params.scale)\n\t\tself.appendElement('scale', null, null, { size: params.scale });\n\tif (params.color)\n\t\tself.appendElement('color', null, null, { color: params.color });\n}\n\nfunction createStaff(self, tune, params) {\n\tif (params.key && params.key.impliedNaturals) {\n\t\tparams.key.accidentals = params.key.accidentals.concat(params.key.impliedNaturals);\n\t\tdelete params.key.impliedNaturals;\n\t}\n\n\ttune.lines[tune.lineNum].staff[tune.staffNum] = { voices: [], clef: params.clef, key: params.key, workingClef: params.clef };\n\tvar staff = tune.lines[tune.lineNum].staff[tune.staffNum]\n\tif (params.stafflines !== undefined) {\n\t\tstaff.clef.stafflines = params.stafflines;\n\t\tstaff.workingClef.stafflines = params.stafflines;\n\t}\n\tif (params.staffscale) {\n\t\tstaff.staffscale = params.staffscale;\n\t}\n\tif (params.annotationfont) setLineFont(tune, \"annotationfont\", params.annotationfont);\n\tif (params.gchordfont) setLineFont(tune, \"gchordfont\", params.gchordfont);\n\tif (params.tripletfont) setLineFont(tune, \"tripletfont\", params.tripletfont);\n\tif (params.vocalfont) setLineFont(tune, \"vocalfont\", params.vocalfont);\n\tif (params.bracket) staff.bracket = params.bracket;\n\tif (params.brace) staff.brace = params.brace;\n\tif (params.connectBarLines) staff.connectBarLines = params.connectBarLines;\n\tif (params.barNumber) staff.barNumber = params.barNumber;\n\tcreateVoice(self, tune, params);\n\t// Some stuff just happens for the first voice\n\tif (params.part)\n\t\tself.appendElement('part', params.part.startChar, params.part.endChar, { title: params.part.title });\n\tif (params.meter !== undefined) staff.meter = params.meter;\n\tif (tune.vskipPending) {\n\t\ttune.lines[tune.lineNum].vskip = tune.vskipPending;\n\t\tdelete tune.vskipPending;\n\t}\n}\n\nfunction createLine(self, tune, params) {\n\ttune.lines[tune.lineNum] = { staff: [] };\n\tcreateStaff(self, tune, params);\n}\n\nmodule.exports = TuneBuilder;\n","// wrap_lines.js: does line wrap on an already parsed tune.\n\nfunction wrapLines(tune, lineBreaks, barNumbers) {\n\tif (!lineBreaks || tune.lines.length === 0)\n\t\treturn;\n\n\t// tune.lines contains nested arrays: there is an array of lines (that's the part this function rewrites),\n\t// there is an array of staffs per line (for instance, piano will have 2, orchestra will have many)\n\t// there is an array of voices per staff (for instance, 4-part harmony might have bass and tenor on a single staff)\n\tvar lines = tune.deline({lineBreaks: false});\n\tvar linesBreakElements = findLineBreaks(lines, lineBreaks);\n\t//console.log(JSON.stringify(linesBreakElements))\n\ttune.lines = addLineBreaks(lines, linesBreakElements, barNumbers);\n\ttune.lineBreaks = linesBreakElements;\n}\n\nfunction addLineBreaks(lines, linesBreakElements, barNumbers) {\n\t// linesBreakElements is an array of all of the elements that break for a new line\n\t// The objects in the array look like:\n\t// {\"ogLine\":0,\"line\":0,\"staff\":0,\"voice\":0,\"start\":0, \"end\":21}\n\t// ogLine is the original line that it came from,\n\t// line is the target line.\n\t// then copy all the elements from start to end for the staff and voice specified.\n\t// If the item doesn't contain \"staff\" then it is a non music line and should just be copied.\n\tvar outputLines = [];\n\tvar lastKeySig = []; // This is per staff - if the key changed then this will be populated.\n\tvar lastStem = [];\n\tvar currentBarNumber = 1;\n\tfor (var i = 0; i < linesBreakElements.length; i++) {\n\t\tvar action = linesBreakElements[i];\n\t\tif (lines[action.ogLine].staff) {\n\t\t\tvar inputStaff = lines[action.ogLine].staff[action.staff];\n\t\t\tif (!outputLines[action.line]) {\n\t\t\t\toutputLines[action.line] = {staff: []}\n\t\t\t}\n\t\t\tif (!outputLines[action.line].staff[action.staff]) {\n\t\t\t\toutputLines[action.line].staff[action.staff] = {voices: []};\n\t\t\t\tif (barNumbers !== undefined && action.staff === 0 && action.line > 0) {\n\t\t\t\t\toutputLines[action.line].staff[action.staff].barNumber = currentBarNumber;\n\t\t\t\t}\n\t\t\t\tvar keys = Object.keys(inputStaff)\n\t\t\t\tfor (var k = 0; k < keys.length; k++) {\n\t\t\t\t\tvar skip = keys[k] === \"voices\";\n\t\t\t\t\tif (keys[k] === \"meter\" && action.line !== 0)\n\t\t\t\t\t\tskip = true;\n\t\t\t\t\tif (!skip)\n\t\t\t\t\t\toutputLines[action.line].staff[action.staff][keys[k]] = inputStaff[keys[k]];\n\t\t\t\t}\n\t\t\t\tif (lastKeySig[action.staff])\n\t\t\t\t\toutputLines[action.line].staff[action.staff].key = lastKeySig[action.staff];\n\n\t\t\t}\n\t\t\tif (!outputLines[action.line].staff[action.staff].voices[action.voice]) {\n\t\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice] = [];\n\t\t\t}\n\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice] =\n\t\t\t\tlines[action.ogLine].staff[action.staff].voices[action.voice].slice(action.start, action.end+1);\n\t\t\tif (lastStem[action.staff*10+action.voice])\n\t\t\t\toutputLines[action.line].staff[action.staff].voices[action.voice].unshift({el_type: \"stem\", direction: lastStem[action.staff*10+action.voice].direction})\n\t\t\tvar currVoice = outputLines[action.line].staff[action.staff].voices[action.voice];\n\t\t\tfor (var kk = currVoice.length-1; kk >= 0; kk--) {\n\t\t\t\tif (currVoice[kk].el_type === \"key\") {\n\t\t\t\t\tlastKeySig[action.staff] = {\n\t\t\t\t\t\troot: currVoice[kk].root,\n\t\t\t\t\t\tacc: currVoice[kk].acc,\n\t\t\t\t\t\tmode: currVoice[kk].mode,\n\t\t\t\t\t\taccidentals: currVoice[kk].accidentals.filter(function (acc) { return acc.acc !== 'natural' })\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (kk = currVoice.length-1; kk >= 0; kk--) {\n\t\t\t\tif (currVoice[kk].el_type === \"stem\") {\n\t\t\t\t\tlastStem[action.staff*10+action.voice] = {\n\t\t\t\t\t\tdirection: currVoice[kk].direction,\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (barNumbers !== undefined && action.staff === 0 && action.voice === 0) {\n\t\t\t\tfor (kk = 0; kk < currVoice.length; kk++) {\n\t\t\t\t\tif (currVoice[kk].el_type === 'bar') {\n\t\t\t\t\t\tcurrentBarNumber++\n\t\t\t\t\t\tif (kk === currVoice.length-1)\n\t\t\t\t\t\t\tdelete currVoice[kk].barNumber\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcurrVoice[kk].barNumber = currentBarNumber\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\toutputLines[action.line] = lines[action.ogLine];\n\t\t}\n\t}\n\t// There could be some missing info - if the tune passed in was incomplete or had different lengths for different voices or was missing a voice altogether - just fill in the gaps.\n\tfor (var ii = 0; ii < outputLines.length; ii++) {\n\t\tif (outputLines[ii].staff) {\n\t\t\toutputLines[ii].staff = outputLines[ii].staff.filter(function (el) {\n\t\t\t\treturn el != null;\n\t\t\t});\n\t\t}\n\t}\n\treturn outputLines;\n}\n\n\nfunction findLineBreaks(lines, lineBreakArray) {\n\t// lineBreakArray is an array of all of the sections of the tune - often there will just be one\n\t// section unless there is a subtitle or other non-music lines. Each of the elements of\n\t// Each element of lineBreakArray is an array of the zero-based last measure of the line.\n\tvar lineBreakIndexes = [];\n\tvar lbai = 0;\n\tvar lineCounter = 0;\n\tvar outputLine = 0;\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = lines[i];\n\t\tif (line.staff) {\n\t\t\tvar lineStart = lineCounter;\n\t\t\tvar lineBreaks = lineBreakArray[lbai];\n\t\t\tlbai++;\n\t\t\tfor (var j = 0; j < line.staff.length; j++) {\n\t\t\t\tvar staff = line.staff[j];\n\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\toutputLine = lineStart;\n\t\t\t\t\tvar measureNumber = 0;\n\t\t\t\t\tvar lbi = 0;\n\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\tvar start = 0;\n\t\t\t\t\tfor (var e = 0; e < voice.length; e++) {\n\t\t\t\t\t\tvar el = voice[e];\n\n\t\t\t\t\t\tif (el.el_type === 'bar') {\n\t\t\t\t\t\t\tif (lineBreaks[lbi] === measureNumber) {\n\t\t\t\t\t\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine, staff: j, voice: k, start: start, end: e})\n\t\t\t\t\t\t\t\tstart = e + 1;\n\t\t\t\t\t\t\t\toutputLine++;\n\t\t\t\t\t\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t\t\t\t\t\t\tlbi++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmeasureNumber++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine, staff: j, voice: k, start: start, end: voice.length})\n\t\t\t\t\toutputLine++;\n\t\t\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlineBreakIndexes.push({ ogLine: i, line: outputLine })\n\t\t\toutputLine++;\n\t\t\tlineCounter = Math.max(lineCounter, outputLine)\n\t\t}\n\t}\n\treturn lineBreakIndexes;\n}\n\n\nfunction freeFormLineBreaks(widths, lineBreakPoint) {\n\tvar lineBreaks = [];\n\tvar totals = [];\n\tvar totalThisLine = 0;\n\t// run through each measure and see if the accumulation is less than the ideal.\n\t// if it passes the ideal, then see whether the last or this one is closer to the ideal.\n\tfor (var i = 0; i < widths.length; i++) {\n\t\tvar width = widths[i];\n\t\tvar attemptedWidth = totalThisLine + width;\n\t\tif (attemptedWidth < lineBreakPoint)\n\t\t\ttotalThisLine = attemptedWidth;\n\t\telse {\n\t\t\t// This just passed the ideal, so see whether the previous or the current number of measures is closer.\n\t\t\tvar oldDistance = lineBreakPoint - totalThisLine;\n\t\t\tvar newDistance = attemptedWidth - lineBreakPoint;\n\t\t\tif (oldDistance < newDistance && totalThisLine > 0) {\n\t\t\t\tlineBreaks.push(i - 1);\n\t\t\t\ttotals.push(Math.round(totalThisLine - width));\n\t\t\t\ttotalThisLine = width;\n\t\t\t} else {\n\t\t\t\tif (i < widths.length-1) {\n\t\t\t\t\tlineBreaks.push(i);\n\t\t\t\t\ttotals.push(Math.round(totalThisLine));\n\t\t\t\t\ttotalThisLine = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\ttotals.push(Math.round(totalThisLine));\n\treturn { lineBreaks: lineBreaks, totals: totals };\n}\n\nfunction clone(arr) {\n\tvar newArr = [];\n\tfor (var i = 0; i < arr.length; i++)\n\t\tnewArr.push(arr[i]);\n\treturn newArr;\n}\n\nfunction oneTry(measureWidths, idealWidths, accumulator, lineAccumulator, lineWidths, lastVariance, highestVariance, currLine, lineBreaks, startIndex, otherTries) {\n\tfor (var i = startIndex; i < measureWidths.length; i++) {\n\t\tvar measureWidth = measureWidths[i];\n\t\taccumulator += measureWidth;\n\t\tlineAccumulator += measureWidth;\n\t\tvar thisVariance = Math.abs(accumulator - idealWidths[currLine]);\n\t\tvar varianceIsClose = Math.abs(thisVariance - lastVariance) < idealWidths[0] / 10; // see if the difference is less than 10%, if so, run the test both ways.\n\t\tif (varianceIsClose) {\n\t\t\tif (thisVariance < lastVariance) {\n\t\t\t\t// Also attempt one less measure on the current line - sometimes that works out better.\n\t\t\t\tvar newWidths = clone(lineWidths);\n\t\t\t\tvar newBreaks = clone(lineBreaks);\n\t\t\t\tnewBreaks.push(i-1);\n\t\t\t\tnewWidths.push(lineAccumulator - measureWidth);\n\t\t\t\totherTries.push({\n\t\t\t\t\taccumulator: accumulator,\n\t\t\t\t\tlineAccumulator: measureWidth,\n\t\t\t\t\tlineWidths: newWidths,\n\t\t\t\t\tlastVariance: Math.abs(accumulator - idealWidths[currLine+1]),\n\t\t\t\t\thighestVariance: Math.max(highestVariance, lastVariance),\n\t\t\t\t\tcurrLine: currLine+1,\n\t\t\t\t\tlineBreaks: newBreaks,\n\t\t\t\t\tstartIndex: i+1});\n\t\t\t} else if (thisVariance > lastVariance && i < measureWidths.length-1) {\n\t\t\t\t// Also attempt one extra measure on this line.\n\t\t\t\tnewWidths = clone(lineWidths);\n\t\t\t\tnewBreaks = clone(lineBreaks);\n\t\t\t\t// newBreaks[newBreaks.length-1] = i;\n\t\t\t\t// newWidths[newWidths.length-1] = lineAccumulator;\n\t\t\t\totherTries.push({\n\t\t\t\t\taccumulator: accumulator,\n\t\t\t\t\tlineAccumulator: lineAccumulator,\n\t\t\t\t\tlineWidths: newWidths,\n\t\t\t\t\tlastVariance: thisVariance,\n\t\t\t\t\thighestVariance: Math.max(highestVariance, thisVariance),\n\t\t\t\t\tcurrLine: currLine,\n\t\t\t\t\tlineBreaks: newBreaks,\n\t\t\t\t\tstartIndex: i+1});\n\t\t\t}\n\t\t}\n\t\tif (thisVariance > lastVariance) {\n\t\t\tlineBreaks.push(i - 1);\n\t\t\tcurrLine++;\n\t\t\thighestVariance = Math.max(highestVariance, lastVariance);\n\t\t\tlastVariance = Math.abs(accumulator - idealWidths[currLine]);\n\t\t\tlineWidths.push(lineAccumulator - measureWidth);\n\t\t\tlineAccumulator = measureWidth;\n\t\t} else {\n\t\t\tlastVariance = thisVariance;\n\t\t}\n\t}\n\tlineWidths.push(lineAccumulator);\n}\n\nfunction optimizeLineWidths(widths, lineBreakPoint, lineBreaks, explanation) {\n\t//\tfigure out how many lines\n\tvar numLines = Math.ceil(widths.total / lineBreakPoint); // + 1 TODO-PER: this used to be plus one - not sure why\n\n\t//\tget the ideal width for a line (cumulative width / num lines) - approx the same as lineBreakPoint except for rounding\n\tvar idealWidth = Math.floor(widths.total / numLines);\n\n\t//\tget each ideal line width (1*ideal, 2*ideal, 3*ideal, etc)\n\tvar idealWidths = [];\n\tfor (var i = 0; i < numLines; i++)\n\t\tidealWidths.push(idealWidth*(i+1));\n\n\t//\tfrom first measure, step through accum. Widths until the abs of the ideal is greater than the last one.\n\t// This can sometimes look funny in edge cases, so when the length is within 10%, try one more or one less to see which is better.\n\t// This is better than trying all the possibilities because that would get to be a huge number for even a medium size piece.\n\t// This method seems to never generate more than about 16 tries and it is usually 4 or less.\n\tvar otherTries = [];\n\totherTries.push({\n\t\taccumulator: 0,\n\t\tlineAccumulator: 0,\n\t\tlineWidths: [],\n\t\tlastVariance: 999999,\n\t\thighestVariance: 0,\n\t\tcurrLine: 0,\n\t\tlineBreaks: [], // These are the zero-based last measure on each line\n\t\tstartIndex: 0});\n\tvar index = 0;\n\twhile (index < otherTries.length) {\n\t\toneTry(widths.measureWidths,\n\t\t\tidealWidths,\n\t\t\totherTries[index].accumulator,\n\t\t\totherTries[index].lineAccumulator,\n\t\t\totherTries[index].lineWidths,\n\t\t\totherTries[index].lastVariance,\n\t\t\totherTries[index].highestVariance,\n\t\t\totherTries[index].currLine,\n\t\t\totherTries[index].lineBreaks,\n\t\t\totherTries[index].startIndex,\n\t\t\totherTries);\n\t\tindex++;\n\t}\n\tfor (i = 0; i < otherTries.length; i++) {\n\t\tvar otherTry = otherTries[i];\n\t\totherTry.variances = [];\n\t\totherTry.aveVariance = 0;\n\t\tfor (var j = 0; j < otherTry.lineWidths.length; j++) {\n\t\t\tvar lineWidth = otherTry.lineWidths[j];\n\t\t\totherTry.variances.push(lineWidth - idealWidths[0]);\n\t\t\totherTry.aveVariance += Math.abs(lineWidth - idealWidths[0]);\n\t\t}\n\t\totherTry.aveVariance = otherTry.aveVariance / otherTry.lineWidths.length;\n\t\texplanation.attempts.push({ type: \"optimizeLineWidths\", lineBreaks: otherTry.lineBreaks, variances: otherTry.variances, aveVariance: otherTry.aveVariance, widths: widths.measureWidths });\n\t}\n\tvar smallest = 9999999;\n\tvar smallestIndex = -1;\n\tfor (i = 0; i < otherTries.length; i++) {\n\t\totherTry = otherTries[i];\n\t\tif (otherTry.aveVariance < smallest) {\n\t\t\tsmallest = otherTry.aveVariance;\n\t\t\tsmallestIndex = i;\n\t\t}\n\t}\n\treturn { failed: false, lineBreaks: otherTries[smallestIndex].lineBreaks, variance: otherTries[smallestIndex].highestVariance };\n}\n\nfunction fixedMeasureLineBreaks(widths, lineBreakPoint, preferredMeasuresPerLine) {\n\tvar lineBreaks = [];\n\tvar totals = [];\n\tvar thisWidth = 0;\n\tvar failed = false;\n\tfor (var i = 0; i < widths.length; i++) {\n\t\tthisWidth += widths[i];\n\t\tif (thisWidth > lineBreakPoint) {\n\t\t\tfailed = true;\n\t\t}\n\t\tif (i % preferredMeasuresPerLine === (preferredMeasuresPerLine-1)) {\n\t\t\tif (i !== widths.length-1) // Don't bother putting a line break for the last line - it's already a break.\n\t\t\t\tlineBreaks.push(i);\n\t\t\ttotals.push(Math.round(thisWidth));\n\t\t\tthisWidth = 0;\n\t\t}\n\t}\n\treturn { failed: failed, totals: totals, lineBreaks: lineBreaks };\n}\n\nfunction getRevisedTuneParams(lineBreaks, staffWidth, params) {\n\n\tvar revisedParams = {\n\t\tlineBreaks: lineBreaks,\n\t\tstaffwidth: staffWidth\n\t};\n\tfor (var key in params) {\n\t\tif (params.hasOwnProperty(key) && key !== 'wrap' && key !== 'staffwidth') {\n\t\t\trevisedParams[key] = params[key];\n\t\t}\n\t}\n\n\treturn { revisedParams: revisedParams };\n}\n\nfunction calcLineWraps(tune, widths, params) {\n\t// For calculating how much can go on the line, it depends on the width of the line. It is a convenience to just divide it here\n\t// by the minimum spacing instead of multiplying the min spacing later.\n\t// The scaling works differently: this is done by changing the scaling of the outer SVG, so the scaling needs to be compensated\n\t// for here, because the actual width will be different from the calculated numbers.\n\n\t// If the desired width is less than the margin, just punt and return the original tune\n\t//console.log(widths)\n\tif (widths.length === 0 || params.staffwidth < widths[0].left) {\n\t\treturn {\n\t\t\treParse: false,\n\t\t\texplanation: \"Staff width is narrower than the margin\",\n\t\t\trevisedParams: params\n\t\t};\n\t}\n\tvar scale = params.scale ? Math.max(params.scale, 0.1) : 1;\n\tvar minSpacing = params.wrap.minSpacing ? Math.max(parseFloat(params.wrap.minSpacing), 1) : 1;\n\tvar minSpacingLimit = params.wrap.minSpacingLimit ? Math.max(parseFloat(params.wrap.minSpacingLimit), 1) : minSpacing - 0.1;\n\tvar maxSpacing = params.wrap.maxSpacing ? Math.max(parseFloat(params.wrap.maxSpacing), 1) : undefined;\n\tif (params.wrap.lastLineLimit && !maxSpacing)\n\t\tmaxSpacing = Math.max(parseFloat(params.wrap.lastLineLimit), 1);\n\t// var targetHeight = params.wrap.targetHeight ? Math.max(parseInt(params.wrap.targetHeight, 10), 100) : undefined;\n\tvar preferredMeasuresPerLine = params.wrap.preferredMeasuresPerLine ? Math.max(parseInt(params.wrap.preferredMeasuresPerLine, 10), 0) : undefined;\n\n\tvar accumulatedLineBreaks = [];\n\tvar explanations = [];\n\tfor (var s = 0; s < widths.length; s++) {\n\t\tvar section = widths[s];\n\t\tvar usableWidth = params.staffwidth - section.left;\n\t\tvar lineBreakPoint = usableWidth / minSpacing / scale;\n\t\tvar minLineSize = usableWidth / maxSpacing / scale;\n\t\tvar allowableVariance = usableWidth / minSpacingLimit / scale;\n\t\tvar explanation = {\n\t\t\twidths: section,\n\t\t\tlineBreakPoint: lineBreakPoint,\n\t\t\tminLineSize: minLineSize,\n\t\t\tattempts: [],\n\t\t\tstaffWidth: params.staffwidth,\n\t\t\tminWidth: Math.round(allowableVariance)\n\t\t};\n\n\t\t// If there is a preferred number of measures per line, test that first. If none of the lines is too long, then we're finished.\n\t\tvar lineBreaks = null;\n\t\tif (preferredMeasuresPerLine) {\n\t\t\tvar f = fixedMeasureLineBreaks(section.measureWidths, lineBreakPoint, preferredMeasuresPerLine);\n\t\t\texplanation.attempts.push({\n\t\t\t\ttype: \"Fixed Measures Per Line\",\n\t\t\t\tpreferredMeasuresPerLine: preferredMeasuresPerLine,\n\t\t\t\tlineBreaks: f.lineBreaks,\n\t\t\t\tfailed: f.failed,\n\t\t\t\ttotals: f.totals\n\t\t\t});\n\t\t\tif (!f.failed)\n\t\t\t\tlineBreaks = f.lineBreaks;\n\t\t}\n\n\t\t// If we don't have lineBreaks yet, use the free form method of line breaks.\n\t\t// This will be called either if Preferred Measures is not used, or if the music is just weird - like a single measure is way too crowded.\n\t\tif (!lineBreaks) {\n\t\t\tvar ff = freeFormLineBreaks(section.measureWidths, lineBreakPoint);\n\t\t\texplanation.attempts.push({type: \"Free Form\", lineBreaks: ff.lineBreaks, totals: ff.totals});\n\t\t\tlineBreaks = ff.lineBreaks;\n\n\t\t\t// We now have an acceptable number of lines, but the measures may not be optimally distributed. See if there is a better distribution.\n\t\t\tif (lineBreaks.length > 0 && section.measureWidths.length < 25) {\n\t\t\t\t// Only do this if everything doesn't fit on one line.\n\t\t\t\t// This is an intensive operation and it is optional so just do it for shorter music.\n\t\t\t\tff = optimizeLineWidths(section, lineBreakPoint, lineBreaks, explanation);\n\t\t\t\texplanation.attempts.push({\n\t\t\t\t\ttype: \"Optimize\",\n\t\t\t\t\tfailed: ff.failed,\n\t\t\t\t\treason: ff.reason,\n\t\t\t\t\tlineBreaks: ff.lineBreaks,\n\t\t\t\t\ttotals: ff.totals\n\t\t\t\t});\n\t\t\t\tif (!ff.failed)\n\t\t\t\t\tlineBreaks = ff.lineBreaks;\n\t\t\t}\n\t\t}\n\t\taccumulatedLineBreaks.push(lineBreaks);\n\t\texplanations.push(explanation);\n\t}\n\t// If the vertical space exceeds targetHeight, remove a line and try again. If that is too crowded, then don't use it.\n\tvar staffWidth = params.staffwidth;\n\tvar ret = getRevisedTuneParams(accumulatedLineBreaks, staffWidth, params);\n\tret.explanation = explanations;\n\tret.reParse = true;\n\treturn ret;\n}\n\nmodule.exports = { wrapLines: wrapLines, calcLineWraps: calcLineWraps };\n","var keyAccidentals = require(\"../const/key-accidentals\");\nvar { relativeMajor, transposeKey, relativeMode } = require(\"../const/relative-major\");\nvar transposeChordName = require(\"../parse/transpose-chord\")\n\nvar strTranspose;\n\n(function () {\n\t\"use strict\";\n\tstrTranspose = function (abc, abcTune, steps) {\n\t\tif (abcTune === \"TEST\") // Backdoor way to get entry points for unit tests\n\t\t\treturn { keyAccidentals: keyAccidentals, relativeMajor: relativeMajor, transposeKey: transposeKey, relativeMode: relativeMode, transposeChordName: transposeChordName}\n\t\tsteps = parseInt(steps, 10)\n\t\tvar changes = [];\n\t\tvar i;\n\t\tfor (i = 0; i < abcTune.length; i++)\n\t\t\tchanges = changes.concat(transposeOneTune(abc, abcTune[i], steps))\n\n\t\t// Reverse sort so that we are replacing strings from the end to the beginning so that the indexes aren't invalidated as we go.\n\t\t// (Because voices can be written in different ways we can't count on the notes being encountered in the order they appear in the string.)\n\t\tchanges = changes.sort(function (a, b) {\n\t\t\treturn b.start - a.start\n\t\t})\n\t\tvar output = abc.split('')\n\t\tfor (i = 0; i < changes.length; i++) {\n\t\t\tvar ch = changes[i]\n\t\t\toutput.splice(ch.start, ch.end - ch.start, ch.note)\n\t\t}\n\t\treturn output.join('')\n\t}\n\n\tfunction transposeOneTune(abc, abcTune, steps) {\n\t\tvar changes = []\n\n\t\t// Don't transpose bagpipe music - that is a special case and is always a particular key\n\t\tvar key = abcTune.getKeySignature()\n\t\tif (key.root === 'Hp' || key.root === \"HP\")\n\t\t\treturn changes;\n\n\t\tchanges = changes.concat(changeAllKeySigs(abc, steps))\n\n\t\tfor (var i = 0; i < abcTune.lines.length; i++) {\n\t\t\tvar staves = abcTune.lines[i].staff\n\t\t\tif (staves) {\n\t\t\t\tfor (var j = 0; j < staves.length; j++) {\n\t\t\t\t\tvar staff = staves[j]\n\t\t\t\t\tif (staff.clef.type !== \"perc\")\n\t\t\t\t\t\tchanges = changes.concat(transposeVoices(abc, staff.voices, staff.key, steps))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction changeAllKeySigs(abc, steps) {\n\t\tvar changes = [];\n\t\tvar arr = abc.split(\"K:\")\n\t\t// now each line except the first one will start with whatever is right after \"K:\"\n\t\tvar count = arr[0].length\n\t\tfor (var i = 1; i < arr.length; i++) {\n\t\t\tvar segment = arr[i]\n\t\t\tvar match = segment.match(/^( *)([A-G])([#b]?)(\\w*)/)\n\t\t\tif (match) {\n\t\t\t\tvar start = count + 2 + match[1].length // move past the 'K:' and optional white space\n\t\t\t\tvar key = match[2] + match[3] + match[4] // key name, accidental, and mode\n\t\t\t\tvar destinationKey = newKey({ root: match[2], acc: match[3], mode: match[4] }, steps)\n\t\t\t\tvar dest = destinationKey.root + destinationKey.acc + destinationKey.mode\n\t\t\t\tchanges.push({ start: start, end: start + key.length, note: dest })\n\t\t\t}\n\t\t\tcount += segment.length + 2\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction transposeVoices(abc, voices, key, steps) {\n\t\tvar changes = [];\n\t\tvar destinationKey = newKey(key, steps)\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tchanges = changes.concat(transposeVoice(abc, voices[i], key.root, createKeyAccidentals(key), destinationKey, steps))\n\t\t}\n\t\treturn changes\n\t}\n\n\tfunction createKeyAccidentals(key) {\n\t\tvar ret = {}\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tvar acc = key.accidentals[i];\n\t\t\tif (acc.acc === 'flat')\n\t\t\t\tret[acc.note.toUpperCase()] = '_'\n\t\t\telse if (acc.acc === 'sharp')\n\t\t\t\tret[acc.note.toUpperCase()] = '^'\n\t\t}\n\t\treturn ret\n\t}\n\n\tfunction setLetterDistance(destinationKey, keyRoot, steps) {\n\t\tvar letterDistance = letters.indexOf(destinationKey.root) - letters.indexOf(keyRoot)\n\t\tif (keyRoot === \"none\")\n\t\t\tletterDistance = letters.indexOf(destinationKey.root)\n\t\tif (letterDistance === 0) {\n\t\t\t// This could either be a half step (like Eb => E) or almost an octave (like E => Eb)\n\t\t\tif (steps > 2) // If it is a large leap, then we are going up an octave\n\t\t\t\tletterDistance += 7\n\t\t\telse if (steps === -12) // If it is a large leap, then we are going down an octave\t\n\t\t\t \tletterDistance -= 7\n\t\t} else if (steps > 0 && letterDistance < 0) \n\t\t\tletterDistance += 7\n\t\telse if (steps < 0 && letterDistance > 0) \n\t\t\tletterDistance -= 7\n\n\t\tif (steps > 12)\n\t\t\tletterDistance += 7\n\t\telse if (steps < -12)\n\t\t\tletterDistance -= 7\n\n\t\treturn letterDistance\n\t}\n\n\tfunction transposeVoice(abc, voice, keyRoot, keyAccidentals, destinationKey, steps) {\n\t\tvar changes = []\n\t\tvar letterDistance = setLetterDistance(destinationKey, keyRoot, steps)\n\n\t\tvar measureAccidentals = {}\n\t\tvar transposedMeasureAccidentals = {}\n\t\tfor (var i = 0; i < voice.length; i++) {\n\t\t\tvar el = voice[i];\n\t\t\tif (el.chord) {\n\t\t\t\tfor (var c = 0; c < el.chord.length; c++) {\n\t\t\t\t\tvar ch = el.chord[c]\n\t\t\t\t\tif (ch.position === 'default') {\n\t\t\t\t\t\tvar prefersFlats = destinationKey.accidentals.length && destinationKey.accidentals[0].acc === 'flat'\n\t\t\t\t\t\tvar newChord = transposeChordName(ch.name, steps, prefersFlats, true)\n\t\t\t\t\t\tnewChord = newChord.replace(/♭/g, \"b\").replace(/♯/g, \"#\")\n\t\t\t\t\t\tif (newChord !== ch.name) // If we didn't recognize the chord the input is returned unchanged and there is nothing to replace\n\t\t\t\t\t\t\tchanges.push(replaceChord(abc, el.startChar, el.endChar, newChord))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (el.el_type === 'note' && el.pitches) {\n\t\t\t\tfor (var j = 0; j < el.pitches.length; j++) {\n\t\t\t\t\tvar note = parseNote(el.pitches[j].name, keyRoot, keyAccidentals, measureAccidentals)\n\t\t\t\t\tif (note.acc)\n\t\t\t\t\t\tmeasureAccidentals[note.name.toUpperCase()] = note.acc\n\t\t\t\t\tvar newPitch = transposePitch(note, destinationKey, letterDistance, transposedMeasureAccidentals)\n\t\t\t\t\tif (newPitch.acc)\n\t\t\t\t\t\ttransposedMeasureAccidentals[newPitch.upper] = newPitch.acc\n\t\t\t\t\tchanges.push(replaceNote(abc, el.startChar, el.endChar, newPitch.acc + newPitch.name, j))\n\t\t\t\t}\n\t\t\t\tif (el.gracenotes) {\n\t\t\t\t\tfor (var g = 0; g < el.gracenotes.length; g++) {\n\t\t\t\t\t\tvar grace = parseNote(el.gracenotes[g].name, keyRoot, keyAccidentals, measureAccidentals)\n\t\t\t\t\t\tif (grace.acc)\n\t\t\t\t\t\t\tmeasureAccidentals[grace.name.toUpperCase()] = grace.acc\n\t\t\t\t\t\tvar newGrace = transposePitch(grace, destinationKey, letterDistance, measureAccidentals)\n\t\t\t\t\t\tif (newGrace.acc)\n\t\t\t\t\t\t\ttransposedMeasureAccidentals[newGrace.upper] = newGrace.acc\n\t\t\t\t\t\tchanges.push(replaceGrace(abc, el.startChar, el.endChar, newGrace.acc + newGrace.name, g))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (el.el_type === \"bar\") {\n\t\t\t\tmeasureAccidentals = {}\n\t\t\t\ttransposedMeasureAccidentals = {}\n\t\t\t} else if (el.el_type === \"keySignature\") {\n\t\t\t\tkeyRoot = el.root\n\t\t\t\tkeyAccidentals = createKeyAccidentals(el)\n\t\t\t\tdestinationKey = newKey(el, steps)\n\t\t\t\tletterDistance = setLetterDistance(destinationKey, keyRoot, steps)\n\t\t\t}\n\t\t}\n\t\treturn changes\n\t}\n\n\tvar letters = \"CDEFGAB\"\n\tvar octaves = [\",,,,\", \",,,\", \",,\", \",\", \"\", \"'\", \"''\", \"'''\", \"''''\"]\n\n\tfunction newKey(key, steps) {\n\t\tif (key.root === \"none\") {\n\t\t\treturn { root: transposeKey(\"C\", steps), mode: \"\", acc: \"\", accidentals: [] }\n\t\t}\n\t\tvar major = relativeMajor(key.root + key.acc + key.mode)\n\t\tvar newMajor = transposeKey(major, steps)\n\t\tvar newMode = relativeMode(newMajor, key.mode)\n\t\tvar acc = keyAccidentals(newMajor)\n\t\treturn { root: newMode[0], mode: key.mode, acc: newMode.length > 1 ? newMode[1] : '', accidentals: acc }\n\t}\n\n\tfunction transposePitch(note, key, letterDistance, measureAccidentals) {\n\t\t// Depending on what the current note and new note are, the octave might have changed\n\t\t// The letterDistance is how far the change is to see if we passed \"C\" when transposing.\n\n\t\tvar pitch = note.pitch\n\t\tvar origDistFromC = letters.indexOf(note.name)\n\t\tvar root = letters.indexOf(key.root)\n\t\tvar index = (root + pitch) % 7\n\t\t// if the note crosses \"c\" then the octave changes, so that is true of \"B\" when going up one step, \"A\" and \"B\" when going up two steps, etc., and reverse when going down.\n\t\tvar newDistFromC = origDistFromC + letterDistance\n\t\tvar oct = note.oct\n\t\twhile (newDistFromC > 6) {\n\t\t\toct++\n\t\t\tnewDistFromC -= 7\n\t\t}\n\t\twhile (newDistFromC < 0) {\n\t\t\toct--\n\t\t\tnewDistFromC += 7\n\t\t}\n\n\t\tvar name = letters[index]\n\n\t\tvar acc = '';\n\t\tvar adj = note.adj\n\t\t// the amount of adjustment depends on the key - if there is a sharp in the key sig, then -1 is a natural, if there isn't, then -1 is a flat.\n\t\tvar keyAcc = '=';\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tif (key.accidentals[i].note.toLowerCase() === name.toLowerCase()) {\n\t\t\t\tadj = adj + (key.accidentals[i].acc === 'flat' ? -1 : 1)\n\t\t\t\tkeyAcc = (key.accidentals[i].acc === 'flat' ? '_' : '^')\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tswitch (adj) {\n\t\t\tcase -2: acc = \"__\"; break;\n\t\t\tcase -1: acc = \"_\"; break;\n\t\t\tcase 0: acc = \"=\"; break;\n\t\t\tcase 1: acc = \"^\"; break;\n\t\t\tcase 2: acc = \"^^\"; break;\n\t\t\tcase -3:\n\t\t\t\t// This requires a triple flat, so bump down the pitch and try again\n\t\t\t\tvar newNote = {}\n\t\t\t\tnewNote.pitch = note.pitch - 1\n\t\t\t\tnewNote.oct = note.oct\n\t\t\t\tnewNote.name = letters[letters.indexOf(note.name) - 1]\n\t\t\t\tif (!newNote.name) {\n\t\t\t\t\tnewNote.name = \"B\"\n\t\t\t\t\tnewNote.oct--\n\t\t\t\t}\n\t\t\t\tif (newNote.name === \"B\" || newNote.name === \"E\")\n\t\t\t\t\tnewNote.adj = note.adj + 1;\n\t\t\t\telse\n\t\t\t\t\tnewNote.adj = note.adj + 2;\n\t\t\t\treturn transposePitch(newNote, key, letterDistance + 1, measureAccidentals)\n\t\t\tcase 3:\n\t\t\t\t// This requires a triple sharp, so bump up the pitch and try again\n\t\t\t\tvar newNote = {}\n\t\t\t\tnewNote.pitch = note.pitch + 1\n\t\t\t\tnewNote.oct = note.oct\n\t\t\t\tnewNote.name = letters[letters.indexOf(note.name) + 1]\n\t\t\t\tif (!newNote.name) {\n\t\t\t\t\tnewNote.name = \"C\"\n\t\t\t\t\tnewNote.oct++\n\t\t\t\t}\n\t\t\t\tif (newNote.name === \"C\" || newNote.name === \"F\")\n\t\t\t\t\tnewNote.adj = note.adj - 1;\n\t\t\t\telse\n\t\t\t\t\tnewNote.adj = note.adj - 2;\n\t\t\t\treturn transposePitch(newNote, key, letterDistance + 1, measureAccidentals)\n\t\t}\n\t\tif ((measureAccidentals[name] === acc || (!measureAccidentals[name] && acc === keyAcc)) && !note.courtesy)\n\t\t\tacc = \"\"\n\n\t\tswitch (oct) {\n\t\t\tcase 0: name = name + \",,,\"; break;\n\t\t\tcase 1: name = name + \",,\"; break;\n\t\t\tcase 2: name = name + \",\"; break;\n\t\t\t// case 3: it is already correct\n\t\t\tcase 4: name = name.toLowerCase(); break;\n\t\t\tcase 5: name = name.toLowerCase() + \"'\"; break;\n\t\t\tcase 6: name = name.toLowerCase() + \"''\"; break;\n\t\t\tcase 7: name = name.toLowerCase() + \"'''\"; break;\n\t\t\tcase 8: name = name.toLowerCase() + \"''''\"; break;\n\t\t}\n\t\tif (oct > 4)\n\t\t\tname = name.toLowerCase();\n\n\t\treturn { acc: acc, name: name, upper: name.toUpperCase() }\n\t}\n\n\tvar regPitch = /([_^=]*)([A-Ga-g])([,']*)/\n\tvar regNote = /([_^=]*[A-Ga-g][,']*)(\\d*\\/*\\d*)([\\>\\<\\-\\)\\.\\s\\\\]*)/\n\tvar regOptionalNote = /([_^=]*[A-Ga-g][,']*)?(\\d*\\/*\\d*)?([\\>\\<\\-\\)]*)?/\n\tvar regSpace = /(\\s*)$/\n\n\t// This the relationship of the note to the tonic and an octave. So what is returned is a distance in steps from the tonic and the amount of adjustment from\n\t// a normal scale. That is - in the key of D an F# is two steps from the tonic and no adjustment. A G# is three steps from the tonic and one half-step higher.\n\t// I don't think there is any adjustment needed for minor keys since the adjustment is based on the key signature and the accidentals.\n\tfunction parseNote(note, keyRoot, keyAccidentals, measureAccidentals) {\n\t\tvar root = keyRoot === \"none\" ? 0 : letters.indexOf(keyRoot)\n\t\tvar reg = note.match(regPitch)\n\t\t// reg[1] : \"__\", \"_\", \"\", \"=\", \"^\", or \"^^\"\n\t\t// reg[2] : A-G a-g\n\t\t// reg[3] : commas or apostrophes\n\t\tvar name = reg[2].toUpperCase()\n\t\tvar pos = letters.indexOf(name) - root;\n\t\tif (pos < 0) pos += 7\n\t\tvar oct = octaves.indexOf(reg[3])\n\t\tif (name === reg[2]) // See if it is a capital letter and subtract an octave if so.\n\t\t\toct--;\n\t\tvar currentAcc = measureAccidentals[name] || keyAccidentals[name] || \"=\" // use the key accidentals if they exist, but override with the measure accidentals, and if neither of them exist, use a natural.\n\t\treturn { acc: reg[1], name: name, pitch: pos, oct: oct, adj: calcAdjustment(reg[1], keyAccidentals[name], measureAccidentals[name]), courtesy: reg[1] === currentAcc }\n\t}\n\n\tfunction replaceNote(abc, start, end, newPitch, index) {\n\t\t// There may be more than just the note between the start and end - there could be spaces, there could be a chord symbol, there could be a decoration.\n\t\t// This could also be a part of a chord. If so, then the particular note needs to be teased out.\n\t\tvar note = abc.substring(start, end)\n\t\tvar match = note.match(new RegExp(regNote.source + regSpace.source), '')\n\t\tif (match) {\n\t\t\t// This will match a single note\n\t\t\tvar noteLen = match[1].length\n\t\t\tvar trailingLen = match[2].length + match[3].length + match[4].length\n\t\t\tvar leadingLen = end - start - noteLen - trailingLen\n\t\t\tstart += leadingLen\n\t\t\tend -= trailingLen\n\t\t} else {\n\t\t\t// I don't know how to capture more than one note, so I'm separating them. There is a limit of the number of notes in a chord depending on the repeats I have here, but it is unlikely to happen in real music.\n\t\t\tvar regPreBracket = /([^\\[]*)/\n\t\t\tvar regOpenBracket = /\\[/\n\t\t\tvar regCloseBracket = /\\-?](\\d*\\/*\\d*)?([\\>\\<\\-\\)]*)/\n\t\t\tmatch = note.match(new RegExp(regPreBracket.source + regOpenBracket.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regOptionalNote.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regOptionalNote.source + regOptionalNote.source +\n\t\t\t\tregOptionalNote.source + regCloseBracket.source + regSpace.source))\n\n\t\t\tif (match) {\n\t\t\t\t// This will match a chord\n\t\t\t\t// Get the number of chars used by the previous notes in this chord\n\t\t\t\tvar count = 1 + match[1].length // one character for the open bracket\n\t\t\t\tfor (var i = 0; i < index; i++) { // index is the iteration through the chord. This function gets called for each one.\n\t\t\t\t\tif (match[i * 3 + 2])\n\t\t\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\t\t\tif (match[i * 3 + 3])\n\t\t\t\t\t\tcount += match[i * 3 + 3].length\n\t\t\t\t\tif (match[i * 3 + 4])\n\t\t\t\t\t\tcount += match[i * 3 + 4].length\n\t\t\t\t}\n\t\t\t\tstart += count\n\t\t\t\tvar endLen = match[index * 3 + 2] ? match[index * 3 + 2].length : 0\n\t\t\t\t// endLen += match[index * 3 + 3] ? match[index * 3 + 3].length : 0\n\t\t\t\t// endLen += match[index * 3 + 4] ? match[index * 3 + 4].length : 0\n\n\t\t\t\tend = start + endLen\n\t\t\t}\n\t\t}\n\t\treturn { start: start, end: end, note: newPitch }\n\t}\n\n\tfunction replaceGrace(abc, start, end, newGrace, index) {\n\t\tvar note = abc.substring(start, end)\n\t\t// I don't know how to capture more than one note, so I'm separating them. There is a limit of the number of notes in a chord depending on the repeats I have here, but it is unlikely to happen in real music.\n\t\tvar regOpenBrace = /\\{/\n\t\tvar regCloseBrace = /\\}/\n\t\tvar regPreBrace = /([^\\{]*)/\n\t\tvar regPreNote = /(\\/*)/\n\t\tvar match = note.match(new RegExp(regPreBrace.source + regOpenBrace.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source + regPreNote.source + regOptionalNote.source +\n\t\t\tregPreNote.source + regOptionalNote.source + regCloseBrace.source))\n\t\tif (match) {\n\t\t\t// This will match all notes inside a grace symbol\n\t\t\t// Get the number of chars used by the previous graces\n\t\t\tvar count = 1 + match[1].length // one character for the open brace, and whatever comes before the brace\n\t\t\tfor (var i = 0; i < index; i++) { // index is the iteration through the chord. This function gets called for each one.\n\t\t\t\tif (match[i * 3 + 2])\n\t\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\t\tif (match[i * 3 + 3])\n\t\t\t\t\tcount += match[i * 3 + 3].length\n\t\t\t\tif (match[i * 3 + 4])\n\t\t\t\t\tcount += match[i * 3 + 4].length\n\t\t\t\tif (match[i * 3 + 5])\n\t\t\t\t\tcount += match[i * 3 + 5].length\n\t\t\t}\n\t\t\tif (match[index * 3 + 2])\n\t\t\t\tcount += match[i * 3 + 2].length\n\t\t\tstart += count\n\t\t\tvar endLen = match[index * 3 + 3] ? match[index * 3 + 3].length : 0\n\t\t\tendLen += match[index * 3 + 4] ? match[index * 3 + 4].length : 0\n\t\t\tendLen += match[index * 3 + 5] ? match[index * 3 + 5].length : 0\n\n\t\t\tend = start + endLen\n\t\t}\n\t\treturn { start: start, end: end, note: newGrace }\n\t}\n\n\tfunction replaceChord(abc, start, end, newChord) {\n\t\t// Isolate the chord and just replace that\n\t\tvar match = abc.substring(start, end).match(/([^\"]+)?(\".+\")+/)\n\t\tif (match[1])\n\t\t\tstart += match[1].length\n\t\tend = start + match[2].length\n\t\t// leave the quote in, so skip one more\n\t\treturn { start: start + 1, end: end - 1, note: newChord }\n\t}\n\n\tfunction calcAdjustment(thisAccidental, keyAccidental, measureAccidental) {\n\t\tif (!thisAccidental && measureAccidental) {\n\t\t\t// There was no accidental on this note, but there was earlier in the measure, so we'll use that\n\t\t\tthisAccidental = measureAccidental\n\t\t}\n\t\tif (!thisAccidental)\n\t\t\treturn 0; // there is no deviation from the key.\n\n\t\tswitch (keyAccidental) {\n\t\t\tcase undefined:\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -2;\n\t\t\t\t\tcase '_': return -1;\n\t\t\t\t\tcase '=': return 0;\n\t\t\t\t\tcase '^': return 1;\n\t\t\t\t\tcase '^^': return 2;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t\tcase '_':\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -1;\n\t\t\t\t\tcase '_': return 0;\n\t\t\t\t\tcase '=': return 1;\n\t\t\t\t\tcase '^': return 2;\n\t\t\t\t\tcase '^^': return 3;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t\tcase '^':\n\t\t\t\tswitch (thisAccidental) {\n\t\t\t\t\tcase '__': return -3;\n\t\t\t\t\tcase '_': return -2;\n\t\t\t\t\tcase '=': return -1;\n\t\t\t\t\tcase '^': return 0;\n\t\t\t\t\tcase '^^': return 1;\n\t\t\t\t\tdefault: return 0; // this should never happen\n\t\t\t\t}\n\t\t}\n\t\treturn 0// this should never happen\n\t}\n})();\n\nmodule.exports = strTranspose;\n","// abc_midi_flattener.js: Turn a linear series of events into a series of MIDI commands.\n\n// We input a set of voices, but the notes are still complex. This pass changes the logical definitions\n// of the grace notes, decorations, ties, triplets, rests, transpositions, keys, and accidentals into actual note durations.\n// It also extracts guitar chords to a separate voice and resolves their rhythm.\n\nvar flatten;\nvar ChordTrack = require(\"./chord-track\");\nvar pitchesToPerc = require('./pitches-to-perc');\n\n(function() {\n\t\"use strict\";\n\n\tvar barAccidentals;\n\tvar accidentals;\n\tvar transpose;\n\tvar bagpipes;\n\tvar tracks;\n\tvar startingTempo;\n\tvar startingMeter;\n\tvar tempoChangeFactor = 1;\n\tvar instrument;\n\tvar currentInstrument;\n\t// var channel;\n\tvar currentTrack;\n\tvar lastNoteDurationPosition;\n\tvar currentTrackName;\n\tvar lastEventTime;\n\tvar chordTrack;\n\n\tvar meter = { num: 4, den: 4 };\n\tvar drumInstrument = 128;\n\tvar lastBarTime;\n\tvar doBeatAccents = true;\n\tvar stressBeat1 = 105;\n\tvar stressBeatDown = 95;\n\tvar stressBeatUp = 85;\n\tvar beatFraction = 0.25;\n\tvar nextVolume;\n\tvar nextVolumeDelta;\n\tvar slurCount = 0;\n\n\tvar drumTrack;\n\tvar drumTrackFinished;\n\tvar drumDefinition = {};\n\tvar drumBars;\n\n\tvar pickupLength = 0;\n\tvar percmap;\n\n\t// The gaps per beat. The first two are in seconds, the third is in fraction of a duration.\n\tvar normalBreakBetweenNotes = 0; //0.000520833333325*1.5; // for articulation (matches muse score value)\n\tvar slurredBreakBetweenNotes = -0.001; // make the slurred notes actually overlap\n\tvar staccatoBreakBetweenNotes = 0.4; // some people say staccato is half duration, some say 3/4 so this splits it\n\n\tflatten = function(voices, options, percmap_, midiOptions) {\n\t\tif (!options) options = {};\n\t\tif (!midiOptions) midiOptions = {};\n\t\tbarAccidentals = [];\n\t\taccidentals = [0,0,0,0,0,0,0];\n\t\tbagpipes = false;\n\t\ttracks = [];\n\t\tstartingTempo = options.qpm;\n\t\tstartingMeter = undefined;\n\t\ttempoChangeFactor = 1;\n\t\tinstrument = undefined;\n\t\tcurrentInstrument = undefined;\n\t\t// channel = undefined;\n\t\tcurrentTrack = undefined;\n\t\tcurrentTrackName = undefined;\n\t\tlastEventTime = 0;\n\t\tpercmap = percmap_;\n\n\t\tmeter = { num: 4, den: 4 };\n\n\t\tdoBeatAccents = true;\n\t\tstressBeat1 = 105;\n\t\tstressBeatDown = 95;\n\t\tstressBeatUp = 85;\n\t\tbeatFraction = 0.25;\n\t\tnextVolume = undefined;\n\t\tnextVolumeDelta = undefined;\n\t\tslurCount = 0;\n\n\t\t// For the drum/metronome track.\n\t\tdrumTrack = [];\n\t\tdrumTrackFinished = false;\n\t\tdrumDefinition = {};\n\t\tdrumBars = 1;\n\n\t\tif (voices.length > 0 && voices[0].length > 0)\n\t\t\tpickupLength = voices[0][0].pickupLength;\n\n\t\t// For resolving chords.\n\t\tif (options.bassprog !== undefined && !midiOptions.bassprog)\n\t\t\tmidiOptions.bassprog = [options.bassprog]\n\t\tif (options.bassvol !== undefined && !midiOptions.bassvol)\n\t\t\tmidiOptions.bassvol = [options.bassvol]\n\t\tif (options.chordprog !== undefined && !midiOptions.chordprog)\n\t\t\tmidiOptions.chordprog = [options.chordprog]\n\t\tif (options.chordvol !== undefined && !midiOptions.chordvol)\n\t\t\tmidiOptions.chordvol = [options.chordvol]\n\t\tif (options.gchord !== undefined && !midiOptions.gchord)\n\t\t\tmidiOptions.gchord = [options.gchord]\n\t\tchordTrack = new ChordTrack(voices.length, options.chordsOff, midiOptions, meter)\n\n\t\t// First adjust the input to resolve ties, set the starting time for each note, etc. That will make the rest of the logic easier\n\t\tpreProcess(voices, options);\n\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\ttranspose = 0;\n\t\t\tchordTrack.setTranspose(transpose)\n\t\t\tlastNoteDurationPosition = -1;\n\t\t\tvar voice = voices[i];\n\t\t\tcurrentTrack = [{ cmd: 'program', channel: i, instrument: instrument }];\n\t\t\tcurrentTrackName = undefined;\n\t\t\tlastBarTime = 0;\n\t\t\tchordTrack.setLastBarTime(0)\n\t\t\tvar voiceOff = false;\n\t\t\tif (options.voicesOff === true)\n\t\t\t\tvoiceOff = true;\n\t\t\telse if (options.voicesOff && options.voicesOff.length && options.voicesOff.indexOf(i) >= 0)\n\t\t\t\tvoiceOff = true;\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar element = voice[j];\n\t\t\t\tswitch (element.el_type) {\n\t\t\t\t\tcase \"name\":\n\t\t\t\t\t\tcurrentTrackName = {cmd: 'text', type: \"name\", text: element.trackName };\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"note\":\n\t\t\t\t\t\twriteNote(element, voiceOff);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"key\":\n\t\t\t\t\t\taccidentals = setKeySignature(element);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"meter\":\n\t\t\t\t\t\tif (!startingMeter)\n\t\t\t\t\t\t\tstartingMeter = element;\n\t\t\t\t\t\tmeter = element;\n\t\t\t\t\t\tchordTrack.setMeter(meter)\n\t\t\t\t\t\tbeatFraction = getBeatFraction(meter);\n\t\t\t\t\t\talignDrumToMeter();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"tempo\":\n\t\t\t\t\t\tif (!startingTempo)\n\t\t\t\t\t\t\tstartingTempo = element.qpm;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttempoChangeFactor = element.qpm ? startingTempo / element.qpm : 1;\n\t\t\t\t\t\tchordTrack.setTempoChangeFactor(tempoChangeFactor)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"transpose\":\n\t\t\t\t\t\ttranspose = element.transpose;\n\t\t\t\t\t\tchordTrack.setTranspose(transpose)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bar\":\n\t\t\t\t\t\tchordTrack.barEnd(element)\n\n\t\t\t\t\t\tbarAccidentals = [];\n\t\t\t\t\t\tif (i === 0) // Only write the drum part on the first voice so that it is not duplicated.\n\t\t\t\t\t\t\twriteDrum(voices.length+1);\n\t\t\t\t\t\t\tchordTrack.setRhythmHead(false) // decide whether there are rhythm heads each measure.\n\t\t\t\t\t\tlastBarTime = timeToRealTime(element.time);\n\t\t\t\t\t\tchordTrack.setLastBarTime(lastBarTime)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bagpipes\":\n\t\t\t\t\t\tbagpipes = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"instrument\":\n\t\t\t\t\t\tif (instrument === undefined)\n\t\t\t\t\t\t\tinstrument = element.program;\n\t\t\t\t\t\tcurrentInstrument = element.program;\n\t\t\t\t\t\tif (currentTrack.length > 0 && currentTrack[currentTrack.length-1].cmd === 'program')\n\t\t\t\t\t\t\tcurrentTrack[currentTrack.length-1].instrument = element.program;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar ii;\n\t\t\t\t\t\t\tfor (ii = currentTrack.length-1; ii >= 0 && currentTrack[ii].cmd !== 'program'; ii--)\n\t\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\tif (ii < 0 || currentTrack[ii].instrument !== element.program)\n\t\t\t\t\t\t\t\tcurrentTrack.push({cmd: 'program', channel: 0, instrument: element.program});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"channel\":\n\t\t\t\t\t\tsetChannel(element.channel);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"drum\":\n\t\t\t\t\t\tdrumDefinition = normalizeDrumDefinition(element.params);\n\t\t\t\t\t\talignDrumToMeter();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"gchordOn\":\n\t\t\t\t\t\tchordTrack.gChordOn(element)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"beat\":\n\t\t\t\t\t\tstressBeat1 = element.beats[0];\n\t\t\t\t\t\tstressBeatDown = element.beats[1];\n\t\t\t\t\t\tstressBeatUp = element.beats[2];\n\t\t\t\t\t\t// TODO-PER: also use the last parameter - which changes which beats are strong.\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vol\":\n\t\t\t\t\t\tnextVolume = element.volume;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"volinc\":\n\t\t\t\t\t\tnextVolumeDelta = element.volume;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"beataccents\":\n\t\t\t\t\t\tdoBeatAccents = element.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"gchord\":\n\t\t\t\t\tcase \"bassprog\":\n\t\t\t\t\tcase \"chordprog\":\n\t\t\t\t\tcase \"bassvol\":\n\t\t\t\t\tcase \"chordvol\":\n\t\t\t\t\tcase \"gchordbars\":\n\t\t\t\t\t\tchordTrack.paramChange(element)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// This should never happen\n\t\t\t\t\t\tconsole.log(\"MIDI creation. Unknown el_type: \" + element.el_type + \"\\n\");// jshint ignore:line\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentTrack[0].instrument === undefined)\n\t\t\t\tcurrentTrack[0].instrument = instrument ? instrument : 0;\n\t\t\tif (currentTrackName)\n\t\t\t\tcurrentTrack.unshift(currentTrackName);\n\t\t\ttracks.push(currentTrack);\n\t\t\tchordTrack.finish()\n\t\t\tif (drumTrack.length > 0) // Don't do drums on more than one track, so turn off drum after we create it.\n\t\t\t\tdrumTrackFinished = true;\n\t\t}\n\t\t// See if any notes are octaves played at the same time. If so, raise the pitch of the higher one.\n\t\tif (options.detuneOctave)\n\t\t\tfindOctaves(tracks, parseInt(options.detuneOctave, 10));\n\n\t\tchordTrack.addTrack(tracks)\n\t\tif (drumTrack.length > 0)\n\t\t\ttracks.push(drumTrack);\n\n\t\treturn { tempo: startingTempo, instrument: instrument, tracks: tracks, totalDuration: lastEventTime };\n\t};\n\n\tfunction setChannel(channel) {\n\t\tfor (var i = currentTrack.length-1; i>=0; i--) {\n\t\t\tif (currentTrack[i].cmd === \"program\") {\n\t\t\t\tcurrentTrack[i].channel = channel;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction timeToRealTime(time) {\n\t\treturn time/1000000;\n\t}\n\n\tfunction durationRounded(duration) {\n\t\treturn Math.round(duration*tempoChangeFactor*1000000)/1000000;\n\t}\n\n\tfunction preProcess(voices, options) {\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar ties = {};\n\t\t\tvar startingTempo = options.qpm;\n\t\t\tvar timeCounter = 0;\n\t\t\tvar tempoMultiplier = 1;\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar element = voice[j];\n\n\t\t\t\tif (element.el_type === 'tempo') {\n\t\t\t\t\tif (!startingTempo)\n\t\t\t\t\t\tstartingTempo = element.qpm;\n\t\t\t\t\telse\n\t\t\t\t\t\ttempoMultiplier = element.qpm ? startingTempo / element.qpm : 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// For convenience, put the current time in each event so that it doesn't have to be calculated in the complicated stuff that follows.\n\t\t\t\telement.time = timeCounter;\n\t\t\t\tvar thisDuration = element.duration ? element.duration : 0;\n\t\t\t\ttimeCounter += Math.round(thisDuration*tempoMultiplier*1000000); // To compensate for JS rounding problems, do all intermediate calcs on integers.\n\n\t\t\t\t// If there are pitches then put the duration in the pitch object and if there are ties then change the duration of the first note in the tie.\n\t\t\t\tif (element.pitches) {\n\t\t\t\t\tfor (var k = 0; k < element.pitches.length; k++) {\n\t\t\t\t\t\tvar pitch = element.pitches[k];\n\t\t\t\t\t\tif (pitch) {\n\t\t\t\t\t\t\tpitch.duration = element.duration;\n\t\t\t\t\t\t\tif (pitch.startTie) {\n\t\t\t\t\t\t\t\t//console.log(element)\n\t\t\t\t\t\t\t\tif (ties[pitch.pitch] === undefined) // We might have three notes tied together - if so just add this duration.\n\t\t\t\t\t\t\t\t\tties[pitch.pitch] = {el: j, pitch: k};\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvoice[ties[pitch.pitch].el].pitches[ties[pitch.pitch].pitch].duration += pitch.duration;\n\t\t\t\t\t\t\t\t\telement.pitches[k] = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//console.log(\">>> START\", JSON.stringify(ties));\n\t\t\t\t\t\t\t} else if (pitch.endTie) {\n\t\t\t\t\t\t\t\t//console.log(element)\n\t\t\t\t\t\t\t\tvar tie = ties[pitch.pitch];\n\t\t\t\t\t\t\t\t//console.log(\">>> END\", pitch.pitch, tie, JSON.stringify(ties));\n\t\t\t\t\t\t\t\tif (tie) {\n\t\t\t\t\t\t\t\t\tvar dur = pitch.duration;\n\t\t\t\t\t\t\t\t\tdelete voice[tie.el].pitches[tie.pitch].startTie;\n\t\t\t\t\t\t\t\t\tvoice[tie.el].pitches[tie.pitch].duration += dur;\n\t\t\t\t\t\t\t\t\telement.pitches[k] = null;\n\t\t\t\t\t\t\t\t\tdelete ties[pitch.pitch];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdelete pitch.endTie;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdelete element.duration;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var key in ties) {\n\t\t\t\tif (ties.hasOwnProperty(key)) {\n\t\t\t\t\tvar item = ties[key];\n\t\t\t\t\tdelete voice[item.el].pitches[item.pitch].startTie;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// voices[0].forEach(v => delete v.elem)\n\t\t\t// voices[1].forEach(v => delete v.elem)\n\t\t\t// console.log(JSON.stringify(voices))\n\t\t}\n\t}\n\n\tfunction getBeatFraction(meter) {\n\t\tswitch (parseInt(meter.den,10)) {\n\t\t\tcase 2: return 0.5;\n\t\t\tcase 4: return 0.25;\n\t\t\tcase 8:\n\t\t\t\tif (meter.num % 3 === 0)\n\t\t\t\t\treturn 0.375;\n\t\t\t\telse\n\t\t\t\t\treturn 0.125;\n\t\t\tcase 16: return 0.125;\n\t\t}\n\t\treturn 0.25;\n\t}\n\n\tfunction calcBeat(measureStart, beatLength, currTime) {\n\t\tvar distanceFromStart = currTime - measureStart;\n\t\treturn distanceFromStart / beatLength;\n\t}\n\n\tfunction processVolume(beat, voiceOff) {\n\t\tif (voiceOff)\n\t\t\treturn 0;\n\n\t\tvar volume;\n \t// MAE 21 Jun 2024 - This previously wasn't allowing zero volume to be applied\n\t\tif (nextVolume != undefined) {\n\t\t\tvolume = nextVolume;\n\t\t\tnextVolume = undefined;\n\t\t} else if (!doBeatAccents) {\n\t\t\tvolume = stressBeatDown;\n\t\t} else if (pickupLength > beat) {\n\t\t\tvolume = stressBeatUp;\n\t\t} else {\n\t\t\t//var barLength = meter.num / meter.den;\n\t\t\tvar barBeat = calcBeat(lastBarTime, getBeatFraction(meter), beat);\n\t\t\tif (barBeat === 0)\n\t\t\t\tvolume = stressBeat1;\n\t\t\telse if (parseInt(barBeat,10) === barBeat)\n\t\t\t\tvolume = stressBeatDown;\n\t\t\telse\n\t\t\t\tvolume = stressBeatUp;\n\t\t}\n\t\tif (nextVolumeDelta) {\n\t\t\tvolume += nextVolumeDelta;\n\t\t\tnextVolumeDelta = undefined;\n\t\t}\n\t\tif (volume < 0)\n\t\t\tvolume = 0;\n\t\tif (volume > 127)\n\t\t\tvolume = 127;\n\t\treturn voiceOff ? 0 : volume;\n\t}\n\n\n\tfunction findNoteModifications(elem, velocity) {\n\t\tvar ret = { };\n\t\tif (elem.decoration) {\n\t\t\tfor (var d = 0; d < elem.decoration.length; d++) {\n\t\t\t\tif (elem.decoration[d] === 'staccato')\n\t\t\t\t\tret.thisBreakBetweenNotes = 'staccato';\n\t\t\t\telse if (elem.decoration[d] === 'tenuto')\n\t\t\t\t\tret.thisBreakBetweenNotes = 'tenuto';\n\t\t\t\telse if (elem.decoration[d] === 'accent')\n\t\t\t\t\tret.velocity = Math.min(127, velocity * 1.5);\n\t\t\t\telse if (elem.decoration[d] === 'trill')\n\t\t\t\t\tret.noteModification = \"trill\";\n\t\t\t\telse if (elem.decoration[d] === 'lowermordent')\n\t\t\t\t\tret.noteModification = \"lowermordent\";\n\t\t\t\telse if (elem.decoration[d] === 'uppermordent')\n\t\t\t\t\tret.noteModification = \"mordent\";\n\t\t\t\telse if (elem.decoration[d] === 'mordent')\n\t\t\t\t\tret.noteModification = \"mordent\";\n\t\t\t\telse if (elem.decoration[d] === 'turn')\n\t\t\t\t\tret.noteModification = \"turn\";\n\t\t\t\telse if (elem.decoration[d] === 'roll')\n\t\t\t\t\tret.noteModification = \"roll\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction doModifiedNotes(noteModification, p) {\n\t\tvar noteTime;\n\t\tvar numNotes;\n\t\tvar start = p.start;\n\t\tvar pp;\n\t\tvar runningDuration = p.duration;\n\t\tvar shortestNote = durationRounded(1.0 / 32);\n\n\t\tswitch (noteModification) {\n\t\t\tcase \"trill\":\n\t\t\t\tvar note = 1;\n\t\t\t\twhile (runningDuration > 0) {\n\t\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+note, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\t\tnote = (note === 1) ? 0 : 1;\n\t\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\t\tstart += shortestNote;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"mordent\":\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+1, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: runningDuration, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"lowermordent\":\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch-1, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\trunningDuration -= shortestNote;\n\t\t\t\tstart += shortestNote;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: runningDuration, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"turn\":\n\t\t\t\tshortestNote = p.duration / 5;\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+1, volume: p.volume, start: start+shortestNote, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start+shortestNote*2, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch+1, volume: p.volume, start: start+shortestNote*3, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start+shortestNote*4, duration: shortestNote, gap: 0, instrument: currentInstrument });\n\t\t\t\tbreak;\n\t\t\tcase \"roll\":\n\t\t\t\twhile (runningDuration > 0) {\n\t\t\t\t\tcurrentTrack.push({ cmd: 'note', pitch: p.pitch, volume: p.volume, start: start, duration: shortestNote, gap: 0, instrument: currentInstrument, style: 'decoration' });\n\t\t\t\t\trunningDuration -= shortestNote*2;\n\t\t\t\t\tstart += shortestNote*2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tfunction writeNote(elem, voiceOff) {\n\t\t//\n\t\t// Create a series of note events to append to the current track.\n\t\t// The output event is one of: { pitchStart: pitch_in_abc_units, volume: from_1_to_64 }\n\t\t// { pitchStop: pitch_in_abc_units }\n\t\t// { moveTime: duration_in_abc_units }\n\t\t// If there are guitar chords, then they are put in a separate track, but they have the same format.\n\t\t//\n\n\t\t//var trackStartingIndex = currentTrack.length;\n\n\t\tvar velocity = processVolume(timeToRealTime(elem.time), voiceOff);\n\t\tchordTrack.processChord(elem)\n\n\t\t// if there are grace notes, then also play them.\n\t\t// I'm not sure there is an exact rule for the length of the notes. My rule, unless I find\n\t\t// a better one is: the grace notes cannot take more than 1/2 of the main note's value.\n\t\t// A grace note (of 1/8 note duration) takes 1/8 of the main note's value.\n\t\tvar graces;\n\t\tif (elem.gracenotes && elem.pitches && elem.pitches.length > 0 && elem.pitches[0]) {\n\t\t\tgraces = processGraceNotes(elem.gracenotes, elem.pitches[0].duration);\n\t\t\tif (elem.elem)\n\t\t\t\telem.elem.midiGraceNotePitches = writeGraceNotes(graces, timeToRealTime(elem.time), velocity*2/3, currentInstrument); // make the graces a little quieter.\n\t\t}\n\n\t\t// The beat fraction is the note that gets a beat (.25 is a quarter note)\n\t\t// The tempo is in minutes and we want to get to milliseconds.\n\t\t// If the element is inside a repeat, there may be more than one value. If there is one value,\n\t\t// then just store that as a number. If there are more than one value, then change that to\n\t\t// an array and return all of them.\n\t\tif (elem.elem) {\n\t\t\tvar rt = timeToRealTime(elem.time);\n\t\t\tvar ms = rt / beatFraction / startingTempo * 60 * 1000;\n\t\t\tif (elem.elem.currentTrackMilliseconds === undefined) {\n\t\t\t\telem.elem.currentTrackMilliseconds = ms;\n\t\t\t\telem.elem.currentTrackWholeNotes = rt;\n\t\t\t} else {\n\t\t\t\tif (elem.elem.currentTrackMilliseconds.length === undefined) {\n\t\t\t\t\tif (elem.elem.currentTrackMilliseconds !== ms) {\n\t\t\t\t\t\telem.elem.currentTrackMilliseconds = [elem.elem.currentTrackMilliseconds, ms];\n\t\t\t\t\t\telem.elem.currentTrackWholeNotes = [elem.elem.currentTrackWholeNotes, rt];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// There can be duplicates if there are multiple voices\n\t\t\t\t\tvar found = false;\n\t\t\t\t\tfor (var j = 0; j < elem.elem.currentTrackMilliseconds.length; j++) {\n\t\t\t\t\t\tif (elem.elem.currentTrackMilliseconds[j] === ms)\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (!found) {\n\t\t\t\t\t\telem.elem.currentTrackMilliseconds.push(ms);\n\t\t\t\t\t\telem.elem.currentTrackWholeNotes.push(rt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//var tieAdjustment = 0;\n\t\tif (elem.pitches) {\n\t\t\tvar thisBreakBetweenNotes = '';\n\t\t\tvar ret = findNoteModifications(elem, velocity);\n\t\t\tif (ret.thisBreakBetweenNotes)\n\t\t\t\tthisBreakBetweenNotes = ret.thisBreakBetweenNotes;\n\t\t\tif (ret.velocity)\n\t\t\t\tvelocity = ret.velocity;\n\n\t\t\t// TODO-PER: Can also make a different sound on style=x and style=harmonic\n\t\t\tvar ePitches = elem.pitches;\n\t\t\tif (elem.style === \"rhythm\") {\n\t\t\t\tePitches = chordTrack.setRhythmHead(true, elem)\n\t\t\t}\n\n\t\t\tif (elem.elem)\n\t\t\t\telem.elem.midiPitches = [];\n\t\t\tfor (var i=0; i 0)\n\t\t\t\t\t\tp.endType = 'tenuto';\n\t\t\t\t\telse if (thisBreakBetweenNotes)\n\t\t\t\t\t\tp.endType = thisBreakBetweenNotes;\n\n\t\t\t\t\tswitch (p.endType) {\n\t\t\t\t\t\tcase \"tenuto\":\n\t\t\t\t\t\t\tp.gap = slurredBreakBetweenNotes;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"staccato\":\n\t\t\t\t\t\t\tvar d = p.duration * staccatoBreakBetweenNotes;\n\t\t\t\t\t\t\tp.gap = startingTempo / 60 * d;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tp.gap = normalBreakBetweenNotes;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcurrentTrack.push(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlastNoteDurationPosition = currentTrack.length-1;\n\n\t\t}\n\t\tvar realDur = getRealDuration(elem);\n\t\tlastEventTime = Math.max(lastEventTime, timeToRealTime(elem.time)+durationRounded(realDur));\n\t}\n\tfunction getRealDuration(elem) {\n\t\tif (elem.pitches && elem.pitches.length > 0 && elem.pitches[0])\n\t\t\treturn elem.pitches[0].duration;\n\t\tif (elem.elem)\n\t\t\treturn elem.elem.duration;\n\t\treturn elem.duration;\n\t}\n\n\tvar scale = [0,2,4,5,7,9,11];\n\tfunction adjustPitch(note) {\n\t\tif (note.midipitch !== undefined)\n\t\t\treturn note.midipitch; // The pitch might already be known, for instance if there is a drummap.\n\t\tvar pitch = note.pitch;\n\t\tif (note.accidental) {\n\t\t\tswitch(note.accidental) { // change that pitch (not other octaves) for the rest of the bar\n\t\t\t\tcase \"sharp\":\n\t\t\t\t\tbarAccidentals[pitch]=1; break;\n\t\t\t\tcase \"flat\":\n\t\t\t\t\tbarAccidentals[pitch]=-1; break;\n\t\t\t\tcase \"natural\":\n\t\t\t\t\tbarAccidentals[pitch]=0; break;\n\t\t\t\tcase \"dblsharp\":\n\t\t\t\t\tbarAccidentals[pitch]=2; break;\n\t\t\t\tcase \"dblflat\":\n\t\t\t\t\tbarAccidentals[pitch]=-2; break;\n\t\t\t\tcase \"quartersharp\":\n\t\t\t\t\tbarAccidentals[pitch]=0.25; break;\n\t\t\t\tcase \"quarterflat\":\n\t\t\t\t\tbarAccidentals[pitch]=-0.25; break;\n\t\t\t}\n\t\t}\n\n\t\tvar actualPitch = extractOctave(pitch) *12 + scale[extractNote(pitch)] + 60;\n\n\t\tif ( barAccidentals[pitch]!==undefined) {\n\t\t\t// An accidental is always taken at face value and supersedes the key signature.\n\t\t\tactualPitch += barAccidentals[pitch];\n\t\t} else { // use normal accidentals\n\t\t\tactualPitch += accidentals[extractNote(pitch)];\n\t\t}\n\t\tactualPitch += transpose;\n\t\treturn actualPitch;\n\t}\n\n\tfunction setKeySignature(elem) {\n\t\tvar accidentals = [0,0,0,0,0,0,0];\n\t\tif (!elem.accidentals) return accidentals;\n\t\tfor (var i = 0; i < elem.accidentals.length; i++) {\n\t\t\tvar acc = elem.accidentals[i];\n\t\t\tvar d;\n\t\t\tswitch (acc.acc) {\n\t\t\t\tcase \"flat\": d = -1; break;\n\t\t\t\tcase \"quarterflat\": d = -0.25; break;\n\t\t\t\tcase \"sharp\": d = 1; break;\n\t\t\t\tcase \"quartersharp\": d = 0.25; break;\n\t\t\t\tdefault: d = 0; break;\n\t\t\t}\n\n\t\t\tvar lowercase = acc.note.toLowerCase();\n\t\t\tvar note = extractNote(lowercase.charCodeAt(0)-'c'.charCodeAt(0));\n\t\t\taccidentals[note]+=d;\n\t\t}\n\t\treturn accidentals;\n\t}\n\n\tfunction processGraceNotes(graces, companionDuration) {\n\t\t// Grace notes take up half of the note value. So if there are many of them they are all real short.\n\t\tvar graceDuration = 0;\n\t\tvar ret = [];\n\t\tvar grace;\n\t\tfor (var g = 0; g < graces.length; g++) {\n\t\t\tgrace = graces[g];\n\t\t\tgraceDuration += grace.duration;\n\t\t}\n\t\tvar multiplier = companionDuration/2 / graceDuration;\n\n\t\tfor (g = 0; g < graces.length; g++) {\n\t\t\tgrace = graces[g];\n\t\t\tvar actualPitch = adjustPitch(grace);\n\t\t\tif (currentInstrument === drumInstrument && percmap) {\n\t\t\t\tvar name = pitchesToPerc(grace)\n\t\t\t\tif (name && percmap[name])\n\t\t\t\t\tactualPitch = percmap[name].sound;\n\t\t\t}\n\t\t\tvar pitch = { pitch: actualPitch, duration: grace.duration*multiplier };\n\t\t\tpitch = adjustForMicroTone(pitch);\n\t\t\tret.push(pitch);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction writeGraceNotes(graces, start, velocity, currentInstrument) {\n\t\tvar midiGrace = [];\n\t\tvelocity = Math.round(velocity)\n\t\tfor (var g = 0; g < graces.length; g++) {\n\t\t\tvar gp = graces[g];\n\t\t\tcurrentTrack.push({cmd: 'note', pitch: gp.pitch, volume: velocity, start: start, duration: gp.duration, gap: 0, instrument:currentInstrument, style: 'grace'});\n\t\t\tmidiGrace.push({\n\t\t\t\tpitch: gp.pitch,\n\t\t\t\tdurationInMeasures: gp.duration,\n\t\t\t\tvolume: velocity,\n\t\t\t\tinstrument: currentInstrument\n\t\t\t});\n\t\t\tstart += gp.duration;\n\t\t}\n\t\treturn midiGrace;\n\t}\n\n\tvar quarterToneFactor = 0.02930223664349;\n\tfunction adjustForMicroTone(description) {\n\t\t// if the pitch is not a whole number then make it a whole number and add a tuning factor\n\t\tvar pitch = ''+description.pitch;\n\t\tif (pitch.indexOf(\".75\") >= 0) {\n\t\t\tdescription.pitch = Math.round(description.pitch);\n\t\t\tdescription.cents = -50;\n\t\t} else if (pitch.indexOf(\".25\") >= 0) {\n\t\t\tdescription.pitch = Math.round(description.pitch);\n\t\t\tdescription.cents = 50;\n\t\t}\n\n\t\treturn description;\n\t}\n\n\tfunction extractOctave(pitch) {\n\t\treturn Math.floor(pitch/7);\n\t}\n\n\tfunction extractNote(pitch) {\n\t\tpitch = pitch%7;\n\t\tif (pitch<0) pitch+=7;\n\t\treturn pitch;\n\t}\n\n\n\tfunction normalizeDrumDefinition(params) {\n\t\t// Be very strict with the drum definition. If anything is not perfect,\n\t\t// just turn the drums off.\n\t\t// Perhaps all of this logic belongs in the parser instead.\n\t\tif (params.pattern.length === 0 || params.on === false)\n\t\t\treturn { on: false };\n\n\t\tvar str = params.pattern[0];\n\t\tvar events = [];\n\t\tvar event = \"\";\n\t\tvar totalPlay = 0;\n\t\tfor (var i = 0; i < str.length; i++) {\n\t\t\tif (str[i] === 'd')\n\t\t\t\ttotalPlay++;\n\t\t\tif (str[i] === 'd' || str[i] === 'z') {\n\t\t\t\tif (event.length !== 0) {\n\t\t\t\t\tevents.push(event);\n\t\t\t\t\tevent = str[i];\n\t\t\t\t} else\n\t\t\t\t\tevent = event + str[i];\n\t\t\t} else {\n\t\t\t\tif (event.length === 0) {\n\t\t\t\t\t// there was an error: the string should have started with d or z\n\t\t\t\t\treturn {on: false};\n\t\t\t\t}\n\t\t\t\tevent = event + str[i];\n\t\t\t}\n\t\t}\n\n\t\tif (event.length !== 0)\n\t\t\tevents.push(event);\n\n\t\t// Now the events array should have one item per event.\n\t\t// There should be two more params for each event: the volume and the pitch.\n\t\tif (params.pattern.length !== totalPlay*2 + 1)\n\t\t\treturn { on: false };\n\n\t\tvar ret = { on: true, bars: params.bars, pattern: []};\n\t\tvar beatLength = getBeatFraction(meter);\n\t\tvar playCount = 0;\n\t\tfor (var j = 0; j < events.length; j++) {\n\t\t\tevent = events[j];\n\t\t\tvar len = 1;\n\t\t\tvar div = false;\n\t\t\tvar num = 0;\n\t\t\tfor (var k = 1; k < event.length; k++) {\n\t\t\t\tswitch(event[k]) {\n\t\t\t\t\tcase \"/\":\n\t\t\t\t\t\tif (num !== 0)\n\t\t\t\t\t\t\tlen *= num;\n\t\t\t\t\t\tnum = 0;\n\t\t\t\t\t\tdiv = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\tcase \"8\":\n\t\t\t\t\tcase \"9\":\n\t\t\t\t\t\tnum = num*10 +event[k];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn { on: false };\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (div) {\n\t\t\t\tif (num === 0) num = 2; // a slash by itself is interpreted as \"/2\"\n\t\t\t\tlen /= num;\n\t\t\t} else if (num)\n\t\t\t\tlen *= num;\n\t\t\tif (event[0] === 'd') {\n\t\t\t\tret.pattern.push({ len: len * beatLength, pitch: params.pattern[1 + playCount], velocity: params.pattern[1 + playCount + totalPlay]});\n\t\t\t\tplayCount++;\n\t\t\t} else\n\t\t\t\tret.pattern.push({ len: len * beatLength, pitch: null});\n\t\t}\n\t\tdrumBars = params.bars ? params.bars : 1;\n\t\treturn ret;\n\t}\n\n\tfunction alignDrumToMeter() {\n\t\tif (!drumDefinition ||!drumDefinition.pattern) {\n\t\t\treturn;\n\t\t}\n\t\tvar ret = drumDefinition;\n\t\t// Now normalize the pattern to cover the correct number of measures. The note lengths passed are relative to each other and need to be scaled to fit a measure.\n\t\tvar totalTime = 0;\n\t\tvar measuresPerBeat = meter.num/meter.den;\n\t\tfor (var ii = 0; ii < ret.pattern.length; ii++)\n\t\t\ttotalTime += ret.pattern[ii].len;\n\t\tvar factor = totalTime / drumBars / measuresPerBeat;\n\t\tfor (ii = 0; ii < ret.pattern.length; ii++)\n\t\t\tret.pattern[ii].len = ret.pattern[ii].len / factor;\n\t\tdrumDefinition = ret;\n\t}\n\n\tfunction writeDrum(channel) {\n\t\tif (drumTrack.length === 0 && !drumDefinition.on)\n\t\t\treturn;\n\n\t\tvar measureLen = meter.num/meter.den;\n\t\tif (drumTrack.length === 0) {\n\t\t\tif (lastEventTime < measureLen)\n\t\t\t\treturn; // This is true if there are pickup notes. The drum doesn't start until the first full measure.\n\t\t\tdrumTrack.push({cmd: 'program', channel: channel, instrument: drumInstrument});\n\t\t}\n\n\t\tif (!drumDefinition.on) {\n\t\t\t// this is the case where there has been a drum track, but it was specifically turned off.\n\t\t\treturn;\n\t\t}\n\t\tvar start = lastBarTime;\n\t\tfor (var i = 0; i < drumDefinition.pattern.length; i++) {\n\t\t\tvar len = durationRounded(drumDefinition.pattern[i].len);\n\t\t\tif (drumDefinition.pattern[i].pitch) {\n\t\t\t\tdrumTrack.push({\n\t\t\t\t\tcmd: 'note',\n\t\t\t\t\tpitch: drumDefinition.pattern[i].pitch,\n\t\t\t\t\tvolume: drumDefinition.pattern[i].velocity,\n\t\t\t\t\tstart: start,\n\t\t\t\t\tduration: len,\n\t\t\t\t\tgap: 0,\n\t\t\t\t\tinstrument: drumInstrument});\n\t\t\t}\n\t\t\tstart += len;\n\t\t}\n\t}\n\n\tfunction findOctaves(tracks, detuneCents) {\n\t\tvar timing = {};\n\t\tfor (var i = 0; i < tracks.length; i++) {\n\t\t\tfor (var j = 0; j < tracks[i].length; j++) {\n\t\t\t\tvar note = tracks[i][j];\n\t\t\t\tif (note.cmd === \"note\") {\n\t\t\t\t\tif (timing[note.start] === undefined)\n\t\t\t\t\t\ttiming[note.start] = [];\n\t\t\t\t\ttiming[note.start].push({track: i, event: j, pitch: note.pitch});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tvar keys = Object.keys(timing);\n\t\tfor (i = 0; i < keys.length; i++) {\n\t\t\tvar arr = timing[keys[i]];\n\t\t\tif (arr.length > 1) {\n\t\t\t\tarr = arr.sort(function(a,b) {\n\t\t\t\t\treturn a.pitch - b.pitch;\n\t\t\t\t});\n\t\t\t\tvar topEvent = arr[arr.length-1];\n\t\t\t\tvar topNote = topEvent.pitch % 12;\n\t\t\t\tvar found = false;\n\t\t\t\tfor (j = 0; !found && j < arr.length-1; j++) {\n\t\t\t\t\tif (arr[j].pitch % 12 === topNote)\n\t\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tif (found) {\n\t\t\t\t\tvar event = tracks[topEvent.track][topEvent.event];\n\t\t\t\t\tif (!event.cents)\n\t\t\t\t\t\tevent.cents = 0;\n\t\t\t\t\tevent.cents += detuneCents;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n})();\n\nmodule.exports = flatten;\n","// abc_midi_renderer.js: Create the actual format for the midi.\n\nvar centsToFactor = require(\"./cents-to-factor\");\nvar rendererFactory;\n\n(function() {\n\t\"use strict\";\n\tfunction setAttributes(elm, attrs) {\n\t\tfor (var attr in attrs)\n\t\t\tif (attrs.hasOwnProperty(attr))\n\t\t\t\telm.setAttribute(attr, attrs[attr]);\n\t\treturn elm;\n\t}\n\n\tfunction Midi() {\n\t\tthis.trackstrings = \"\";\n\t\tthis.trackcount = 0;\n\t\tthis.noteOnAndChannel = \"%90\";\n\t\tthis.noteOffAndChannel = \"%80\";\n\t}\n\n\tMidi.prototype.setTempo = function(qpm) {\n\t\tif (this.trackcount === 0) {\n\t\t\tthis.startTrack();\n\t\t\tthis.track += \"%00%FF%51%03\" + toHex(Math.round(60000000 / qpm), 6);\n\t\t\tthis.endTrack();\n\t\t}\n\t};\n\n\tMidi.prototype.setGlobalInfo = function(qpm, name, key, time) {\n\t\tif (this.trackcount === 0) {\n\t\t\tthis.startTrack();\n\t\t\tvar divisions = Math.round(60000000 / qpm);\n\t\t\t// Add the tempo\n\t\t\tthis.track += \"%00%FF%51%03\" + toHex(divisions, 6);\n\n\t\t\tif (key)\n\t\t\t\tthis.track += keySignature(key);\n\t\t\tif (time)\n\t\t\t\tthis.track += timeSignature(time);\n\t\t\tif (name) {\n\t\t\t\tthis.track += encodeString(name, \"%01\");\n\t\t\t}\n\t\t\tthis.endTrack();\n\t\t}\n\t};\n\n\tMidi.prototype.startTrack = function() {\n\t\tthis.noteWarped = {};\n\t\tthis.track = \"\";\n\t\tthis.trackName = \"\";\n\t\tthis.trackInstrument = \"\";\n\t\tthis.silencelength = 0;\n\t\tthis.trackcount++;\n\t\tif (this.instrument) {\n\t\t\tthis.setInstrument(this.instrument);\n\t\t}\n\t};\n\n\tMidi.prototype.endTrack = function() {\n\t\tthis.track = this.trackName + this.trackInstrument + this.track;\n\t\tvar tracklength = toHex(this.track.length / 3 + 4, 8);\n\t\tthis.track = \"MTrk\" + tracklength + // track header\n\t\t\tthis.track +\n\t\t\t'%00%FF%2F%00'; // track end\n\t\tthis.trackstrings += this.track;\n\t};\n\n\tMidi.prototype.setText = function(type, text) {\n\t\t// MIDI defines the following types of events:\n\t\t//FF 01 len text Text Event\n\t\t//FF 02 len text Copyright Notice\n\t\t//FF 03 len text Sequence/Track Name\n\t\t//FF 04 len text Instrument Name\n\t\t//FF 05 len text Lyric\n\t\t//FF 06 len text Marker\n\t\t//FF 07 len text Cue Point\n\t\tswitch(type) {\n\t\t\tcase 'name':\n\t\t\t\tthis.trackName = encodeString(text, \"%03\");\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tMidi.prototype.setInstrument = function(number) {\n\t\tthis.trackInstrument = \"%00%C0\" + toHex(number, 2);\n\t\tthis.instrument = number;\n\t};\n\n\tMidi.prototype.setChannel = function(number, pan) {\n\t\tthis.channel = number;\n\t\tvar ccPrefix = \"%00%B\" + this.channel.toString(16);\n\t\t// Reset midi, in case it was set previously.\n\t\tthis.track += ccPrefix + \"%79%00\"; // Reset All Controllers\n\t\tthis.track += ccPrefix + \"%40%00\"; // Damper pedal\n\t\tthis.track += ccPrefix + \"%5B%30\"; // Effect 1 Depth (reverb)\n\t\t// Translate pan as -1 to 1 to 0 to 127\n\t\tif (!pan)\n\t\t\tpan = 0;\n\t\tpan = Math.round((pan + 1) * 64);\n\t\tthis.track += ccPrefix + \"%0A\" + toHex(pan, 2); // Pan\n\t\tthis.track += ccPrefix + \"%07%64\"; // Channel Volume\n\n\t\tthis.noteOnAndChannel = \"%9\" + this.channel.toString(16);\n\t\tthis.noteOffAndChannel = \"%8\" + this.channel.toString(16);\n\t};\n\n\tvar HALF_STEP = 4096; // For the pitch wheel - (i.e. the distance from C to C#)\n\tMidi.prototype.startNote = function(pitch, loudness, cents) {\n\t\tthis.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any)\n\t\tthis.silencelength = 0;\n\t\tif (cents) {\n\t\t\t// the pitch is altered so send a midi pitch wheel event\n\t\t\tthis.track += \"%e\" + this.channel.toString(16);\n\t\t\tvar bend = Math.round(centsToFactor(cents)*HALF_STEP);\n\t\t\tthis.track += to7BitHex(0x2000 + bend);\n\t\t\tthis.track += toDurationHex(0); // this all happens at once so there is a zero length here\n\t\t\tthis.noteWarped[pitch] = true;\n\t\t}\n\t\tthis.track += this.noteOnAndChannel;\n\t\tthis.track += \"%\" + pitch.toString(16) + toHex(loudness, 2); //note\n\t};\n\n\tMidi.prototype.endNote = function(pitch) {\n\t\tthis.track += toDurationHex(this.silencelength); // only need to shift by amount of silence (if there is any)\n\t\tthis.silencelength = 0;\n\t\tif (this.noteWarped[pitch]) {\n\t\t\t// the pitch was altered so alter it back.\n\t\t\tthis.track += \"%e\" + this.channel.toString(16);\n\t\t\tthis.track += to7BitHex(0x2000);\n\t\t\tthis.track += toDurationHex(0); // this all happens at once so there is a zero length here\n\t\t\tthis.noteWarped[pitch] = false;\n\t\t}\n\t\tthis.track += this.noteOffAndChannel;\n\t\tthis.track += \"%\" + pitch.toString(16) + \"%00\";//end note\n\t};\n\n\tMidi.prototype.addRest = function(length) {\n\t\tthis.silencelength += length;\n\t\tif (this.silencelength < 0)\n\t\t\tthis.silencelength = 0;\n\t};\n\n\tMidi.prototype.getData = function() {\n\t\treturn \"data:audio/midi,\" +\n\t\t\t\"MThd%00%00%00%06%00%01\" + toHex(this.trackcount, 4) + \"%01%e0\" + // header\n\t\t\tthis.trackstrings;\n\t};\n\n\tMidi.prototype.embed = function(parent, noplayer) {\n\n\t\tvar data = this.getData();\n\n\t\tvar link = setAttributes(document.createElement('a'), {\n\t\t\thref: data\n\t\t});\n\t\tlink.innerHTML = \"download midi\";\n\t\tparent.insertBefore(link, parent.firstChild);\n\n\t\tif (noplayer) return;\n\n\t\tvar embed = setAttributes(document.createElement('embed'), {\n\t\t\tsrc: data,\n\t\t\ttype: 'video/quicktime',\n\t\t\tcontroller: 'true',\n\t\t\tautoplay: 'false',\n\t\t\tloop: 'false',\n\t\t\tenablejavascript: 'true',\n\t\t\tstyle: 'display:block; height: 20px;'\n\t\t});\n\t\tparent.insertBefore(embed, parent.firstChild);\n\t};\n\n\tfunction encodeString(str, cmdType) {\n\t\t// If there are multi-byte chars, we don't know how long the string will be until we create it.\n\t\tvar nameArray = \"\";\n\t\tfor (var i = 0; i < str.length; i++)\n\t\t\tnameArray += toHex(str.charCodeAt(i), 2);\n\t\treturn \"%00%FF\" + cmdType + toHex(nameArray.length/3, 2) + nameArray; // Each byte is represented by three chars \"%XX\", so divide by 3 to get the length.\n\t}\n\n\tfunction keySignature(key) {\n\t\t//00 FF 5902 03 00 - key signature\n\t\tif (!key || !key.accidentals)\n\t\t\treturn \"\";\n\t\tvar hex = \"%00%FF%59%02\";\n\t\tvar sharpCount = 0;\n\t\tvar flatCount = 256;\n\t\tfor (var i = 0; i < key.accidentals.length; i++) {\n\t\t\tif (key.accidentals[i].acc === \"sharp\") sharpCount++;\n\t\t\telse if (key.accidentals[i].acc === \"flat\") flatCount--;\n\t\t}\n\t\tvar sig = flatCount !== 256 ? toHex(flatCount, 2) : toHex(sharpCount, 2);\n\t\tvar mode = (key.mode === \"m\") ? \"%01\" : \"%00\";\n\t\treturn hex + sig + mode;\n\t}\n\n\tfunction timeSignature(time) {\n\t\t//00 FF 58 04 04 02 30 08 - time signature\n\t\tvar hex = \"%00%FF%58%04\" + toHex(time.num,2);\n\t\tvar dens = { 1: 0, 2: 1, 4: 2, 8: 3, 16: 4, 32: 5 };\n\t\tvar den = dens[time.den];\n\t\tif (!den)\n\t\t\treturn \"\"; // the denominator is not supported, so just don't include this.\n\t\thex += toHex(den, 2);\n\n\t\tvar clocks;\n\t\tswitch (time.num+\"/\"+time.den) {\n\t\t\tcase \"2/4\":\n\t\t\tcase \"3/4\":\n\t\t\tcase \"4/4\":\n\t\t\tcase \"5/4\":\n\t\t\t\tclocks = 24;\n\t\t\t\tbreak;\n\t\t\tcase \"6/4\":\n\t\t\t\tclocks = 72;\n\t\t\t\tbreak;\n\t\t\tcase \"2/2\":\n\t\t\tcase \"3/2\":\n\t\t\tcase \"4/2\":\n\t\t\t\tclocks = 48;\n\t\t\t\tbreak;\n\t\t\tcase \"3/8\":\n\t\t\tcase \"6/8\":\n\t\t\tcase \"9/8\":\n\t\t\tcase \"12/8\":\n\t\t\t\tclocks = 36;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!clocks)\n\t\t\treturn \"\"; // time sig is not supported.\n\t\thex += toHex(clocks, 2);\n\t\treturn hex + \"%08\";\n\t}\n\n\t// s is assumed to be of even length\n\tfunction encodeHex(s) {\n\t\tvar ret = \"\";\n\t\tfor (var i = 0; i < s.length; i += 2) {\n\t\t\tret += \"%\";\n\t\t\tret += s.substr(i, 2);\n\t\t}\n\t\treturn ret;\n\t}\n\n\tfunction toHex(n, padding) {\n\t\tvar s = n.toString(16);\n\t\ts = s.split(\".\")[0];\n\t\twhile (s.length < padding) {\n\t\t\ts = \"0\" + s;\n\t\t}\n\t\tif (s.length > padding)\n\t\t\ts = s.substring(0,padding)\n\t\treturn encodeHex(s);\n\t}\n\n\tfunction to7BitHex(n) {\n\t\t// this takes a number and shifts all digits from the 7th one to the left.\n\t\tn = Math.round(n);\n\t\tvar lower = n % 128;\n\t\tvar higher = n - lower;\n\t\treturn toHex(higher*2+lower, 4);\n\t}\n\n\tfunction toDurationHex(n) {\n\t\tvar res = 0;\n\t\tvar a = [];\n\n\t\t// cut up into 7 bit chunks;\n\t\tn = Math.round(n);\n\t\twhile (n !== 0) {\n\t\t\ta.push(n & 0x7F);\n\t\t\tn = n >> 7;\n\t\t}\n\n\t\t// join the 7 bit chunks together, all but last chunk get leading 1\n\t\tfor (var i = a.length - 1; i >= 0; i--) {\n\t\t\tres = res << 8;\n\t\t\tvar bits = a[i];\n\t\t\tif (i !== 0) {\n\t\t\t\tbits = bits | 0x80;\n\t\t\t}\n\t\t\tres = res | bits;\n\t\t}\n\n\t\tvar padding = res.toString(16).length;\n\t\tpadding += padding % 2;\n\n\t\treturn toHex(res, padding);\n\t}\n\n\trendererFactory = function() {\n\t\treturn new Midi();\n\t};\n})();\n\nmodule.exports = rendererFactory;\n","// abc_midi_sequencer.js: Turn parsed abc into a linear series of events.\n\nvar sequence;\nvar parseCommon = require(\"../parse/abc_common\");\n\n(function() {\n\t\"use strict\";\n\n\tvar measureLength = 1; // This should be set by the meter, but just in case that is missing, we'll take a guess.\n\t// The abc is provided to us line by line. It might have repeats in it. We want to re arrange the elements to\n\t// be an array of voices with all the repeats embedded, and no lines. Then it is trivial to go through the events\n\t// one at a time and turn it into midi.\n\n\tvar PERCUSSION_PROGRAM = 128;\n\n\tsequence = function(abctune, options) {\n\t\t// Global options\n\t\toptions = options || {};\n\t\tvar qpm;\n\t\tvar program = options.program || 0;\t// The program if there isn't a program specified.\n\t\tvar transpose = options.midiTranspose || 0;\n\t\t// If the tune has a visual transpose then that needs to be subtracted out because we are getting the visual object.\n\t\tif (abctune.visualTranspose)\n\t\t\ttranspose -= abctune.visualTranspose;\n\t\tvar channel = options.channel || 0;\n\t\tvar channelExplicitlySet = false;\n\t\tvar drumPattern = options.drum || \"\";\n\t\tvar drumBars = options.drumBars || 1;\n\t\tvar drumIntro = options.drumIntro || 0;\n\t\tvar drumOn = drumPattern !== \"\";\n\t\tvar drumOffAfterIntro = !!options.drumOff\n\t\tvar style = []; // The note head style for each voice.\n\t\tvar rhythmHeadThisBar = false; // Rhythm notation was detected.\n\t\tvar crescendoSize = 50; // how much to increase or decrease volume when crescendo/diminuendo is encountered.\n\n\t\t// All of the above overrides need to be integers\n\t\tprogram = parseInt(program, 10);\n\t\ttranspose = parseInt(transpose, 10);\n\t\tchannel = parseInt(channel, 10);\n\t\tif (channel === 10)\n\t\t\tprogram = PERCUSSION_PROGRAM;\n\t\tdrumPattern = drumPattern.split(\" \");\n\t\tdrumBars = parseInt(drumBars, 10);\n\t\tdrumIntro = parseInt(drumIntro, 10);\n\n\t\tvar bagpipes = abctune.formatting.bagpipes; // If it is bagpipes, then the gracenotes are played on top of the main note.\n\t\tif (bagpipes)\n\t\t\tprogram = 71;\n\n\t\t// %%MIDI fermatafixed\n\t\t// %%MIDI fermataproportional\n\t\t// %%MIDI deltaloudness n\n\t\t// %%MIDI gracedivider b\n\t\t// %%MIDI ratio n m\n\t\t// %%MIDI beat a b c n\n\t\t// %%MIDI grace a/b\n\t\t// %%MIDI trim x/y\n\n\t\t// %MIDI gchordon\n\t\t// %MIDI gchordoff\n\t\t// %%MIDI bassprog 45\n\t\t// %%MIDI chordprog 24\n\t\t// %%MIDI chordname name n1 n2 n3 n4 n5 n6\n\n\t\t//%%MIDI beat ⟨int1⟩ ⟨int2⟩ ⟨int3⟩ ⟨int4⟩: controls the volumes of the notes in a measure. The first note in a bar has volume ⟨int1⟩; other ‘strong’ notes have volume ⟨int2⟩ and all the rest have volume ⟨int3⟩. These values must be in the range 0–127. The parameter ⟨int4⟩ determines which notes are ‘strong’. If the time signature is x/y, then each note is given a position number k = 0, 1, 2. . . x-1 within each bar. If k is a multiple of ⟨int4⟩, then the note is ‘strong’.\n\n\t\tvar startingMidi = [];\n\t\tif (abctune.formatting.midi) {\n\t\t\t//console.log(\"MIDI Formatting:\", abctune.formatting.midi);\n\t\t\tvar globals = abctune.formatting.midi;\n\t\t\tif (globals.program && globals.program.length > 0) {\n\t\t\t\tprogram = globals.program[0];\n\t\t\t\tif (globals.program.length > 1) {\n\t\t\t\t\tprogram = globals.program[1];\n\t\t\t\t\tchannel = globals.program[0];\n\t\t\t\t}\n\t\t\t\tchannelExplicitlySet = true;\n\t\t\t}\n\t\t\tif (globals.transpose)\n\t\t\t\ttranspose = globals.transpose[0];\n\t\t\tif (globals.channel) {\n\t\t\t\tchannel = globals.channel[0];\n\t\t\t\tchannelExplicitlySet = true;\n\t\t\t}\n\t\t\tif (globals.drum)\n\t\t\t\tdrumPattern = globals.drum;\n\t\t\tif (globals.drumbars)\n\t\t\t\tdrumBars = globals.drumbars[0];\n\t\t\tif (globals.drumon)\n\t\t\t\tdrumOn = true;\n\t\t\tif (channel === 10)\n\t\t\t\tprogram = PERCUSSION_PROGRAM;\n\t\t\tif (globals.beat)\n\t\t\t\tstartingMidi.push({ el_type: 'beat', beats: globals.beat })\n\t\t\tif (globals.nobeataccents)\n\t\t\t\tstartingMidi.push({ el_type: 'beataccents', value: false });\n\n\t\t}\n\n\t\t// Specified options in abc string.\n\n\t\t// If the tempo was passed in, use that.\n\t\t// If the tempo is specified, use that.\n\t\t// If there is a default, use that.\n\t\t// Otherwise, use the default.\n\t\tif (options.qpm)\n\t\t\tqpm = parseInt(options.qpm, 10);\n\t\telse if (abctune.metaText.tempo)\n\t\t\tqpm = interpretTempo(abctune.metaText.tempo, abctune.getBeatLength());\n\t\telse if (options.defaultQpm)\n\t\t\tqpm = options.defaultQpm;\n\t\telse\n\t\t\tqpm = 180; \t// The tempo if there isn't a tempo specified.\n\n\t\tvar startVoice = [];\n\t\tif (bagpipes)\n\t\t\tstartVoice.push({ el_type: 'bagpipes' });\n\t\tstartVoice.push({ el_type: 'instrument', program: program });\n\t\tif (channel)\n\t\t\tstartVoice.push({ el_type: 'channel', channel: channel });\n\t\tif (transpose)\n\t\t\tstartVoice.push({ el_type: 'transpose', transpose: transpose });\n\t\tstartVoice.push({ el_type: 'tempo', qpm: qpm });\n\t\tfor (var ss = 0; ss < startingMidi.length;ss++)\n\t\t\tstartVoice.push(startingMidi[ss]);\n\n\t\t// the relevant part of the input structure is:\n\t\t// abctune\n\t\t//\t\tarray lines\n\t\t//\t\t\tarray staff\n\t\t//\t\t\t\tobject key\n\t\t//\t\t\t\tobject meter\n\t\t//\t\t\t\tarray voices\n\t\t//\t\t\t\t\tarray abcelem\n\n\t\t// visit each voice completely in turn\n\t\tvar voices = [];\n\t\tvar inCrescendo = [];\n\t\tvar inDiminuendo = [];\n\t\tvar durationCounter = [0];\n\t\tvar tempoChanges = {};\n\t\ttempoChanges[\"0\"] = { el_type: 'tempo', qpm: qpm, timing: 0 };\n\t\tvar currentVolume;\n\t\tvar startRepeatPlaceholder = []; // There is a place holder for each voice.\n\t\tvar skipEndingPlaceholder = []; // This is the place where the first ending starts.\n\t\tvar startingDrumSet = false;\n\t\tvar lines = abctune.lines; //abctune.deline(); TODO-PER: can switch to this, then simplify the loops below.\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\t// For each group of staff lines in the tune.\n\t\t\tvar line = lines[i];\n\t\t\tif (line.staff) {\n\t\t\t\tvar staves = line.staff;\n\t\t\t\tvar voiceNumber = 0;\n\t\t\t\tfor (var j = 0; j < staves.length; j++) {\n\t\t\t\t\tvar staff = staves[j];\n\t\t\t\t\tif (staff.clef && staff.clef.type === \"TAB\")\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// For each staff line\n\t\t\t\t\tfor (var k = 0; k < staff.voices.length; k++) {\n\t\t\t\t\t\t// For each voice in a staff line\n\t\t\t\t\t\tvar voice = staff.voices[k];\n\t\t\t\t\t\tif (!voices[voiceNumber]) {\n\t\t\t\t\t\t\tvoices[voiceNumber] = [].concat(JSON.parse(JSON.stringify(startVoice)));\n\t\t\t\t\t\t\tvar voiceName = getTrackTitle(line.staff, voiceNumber);\n\t\t\t\t\t\t\tif (voiceName)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].unshift({el_type: \"name\", trackName: voiceName});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Negate any transposition for the percussion staff.\n\t\t\t\t\t\tif (transpose && staff.clef.type === \"perc\")\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 0 });\n\n\t\t\t\t\t\tif (staff.clef && staff.clef.type === 'perc' && !channelExplicitlySet) {\n\t\t\t\t\t\t\tfor (var cl = 0; cl < voices[voiceNumber].length; cl++) {\n\t\t\t\t\t\t\t\tif (voices[voiceNumber][cl].el_type === 'instrument')\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber][cl].program = PERCUSSION_PROGRAM;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (staff.key) {\n\t\t\t\t\t\t\taddKey(voices[voiceNumber], staff.key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.meter) {\n\t\t\t\t\t\t\taddMeter(voices[voiceNumber], staff.meter);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!startingDrumSet && drumOn) { // drum information is only needed once, so use the first line and track 0.\n\t\t\t\t\t\t\tvoices[voiceNumber].push({el_type: 'drum', params: {pattern: drumPattern, bars: drumBars, on: drumOn, intro: drumIntro}});\n\t\t\t\t\t\t\tstartingDrumSet = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.clef && staff.clef.type !== \"perc\" && staff.clef.transpose) {\n\t\t\t\t\t\t\tstaff.clef.el_type = 'clef';\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: staff.clef.transpose });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (staff.clef && staff.clef.type) {\n\t\t\t\t\t\t\tif (staff.clef.type.indexOf(\"-8\") >= 0)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: -12 });\n\t\t\t\t\t\t\telse if (staff.clef.type.indexOf(\"+8\") >= 0)\n\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 12 });\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (abctune.formatting.midi && abctune.formatting.midi.drumoff) {\n\t\t\t\t\t\t\t// If there is a drum off command right at the beginning it is put in the metaText instead of the stream,\n\t\t\t\t\t\t\t// so we will just insert it here.\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'bar' });\n\t\t\t\t\t\t\tvoices[voiceNumber].push({el_type: 'drum', params: {pattern: \"\", on: false }});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar noteEventsInBar = 0;\n\t\t\t\t\t\tvar tripletMultiplier = 0;\n\t\t\t\t\t\tvar tripletDurationTotal = 0; // try to mitigate the js rounding problems.\n\t\t\t\t\t\tvar tripletDurationCount = 0;\n\t\t\t\t\t\tcurrentVolume = [105, 95, 85, 1];\n\n\t\t\t\t\t\tfor (var v = 0; v < voice.length; v++) {\n\t\t\t\t\t\t\t// For each element in a voice\n\t\t\t\t\t\t\tvar elem = voice[v];\n\t\t\t\t\t\t\tswitch (elem.el_type) {\n\t\t\t\t\t\t\t\tcase \"note\":\n\t\t\t\t\t\t\t\t\tif (inCrescendo[k]) {\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[0] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[1] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[2] += inCrescendo[k];\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (inDiminuendo[k]) {\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[0] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[1] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tcurrentVolume[2] += inDiminuendo[k];\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsetDynamics(elem);\n\n\t\t\t\t\t\t\t\t\t// regular items are just pushed.\n\t\t\t\t\t\t\t\t\tif (!elem.rest || elem.rest.type !== 'spacer') {\n\t\t\t\t\t\t\t\t\t\tvar noteElem = { elem: elem, el_type: \"note\", timing: durationCounter[voiceNumber] }; // Make a copy so that modifications aren't kept except for adding the midiPitches\n\t\t\t\t\t\t\t\t\t\tif (elem.style)\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.style = elem.style;\n\t\t\t\t\t\t\t\t\t\telse if (style[voiceNumber])\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.style = style[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tnoteElem.duration = (elem.duration === 0) ? 0.25 : elem.duration;\n\t\t\t\t\t\t\t\t\t\tif (elem.startTriplet) {\n\t\t\t\t\t\t\t\t\t\t\ttripletMultiplier = elem.tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\ttripletDurationTotal = elem.startTriplet * tripletMultiplier * elem.duration;\n\t\t\t\t\t\t\t\t\t\t\tif (elem.startTriplet !== elem.tripletR) { // most commonly (3:2:2\n\t\t\t\t\t\t\t\t\t\t\t\tif (v + elem.tripletR <= voice.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar durationTotal = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor (var w = v; w < v + elem.tripletR; w++) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdurationTotal += voice[w].duration;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttripletDurationTotal = tripletMultiplier * durationTotal;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = noteElem.duration * tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round(noteElem.duration*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\ttripletDurationCount = noteElem.duration;\n\t\t\t\t\t\t\t\t\t\t} else if (tripletMultiplier) {\n\t\t\t\t\t\t\t\t\t\t\tif (elem.endTriplet) {\n\t\t\t\t\t\t\t\t\t\t\t\ttripletMultiplier = 0;\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round((tripletDurationTotal - tripletDurationCount)*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = noteElem.duration * tripletMultiplier;\n\t\t\t\t\t\t\t\t\t\t\t\tnoteElem.duration = Math.round(noteElem.duration*1000000)/1000000;\n\t\t\t\t\t\t\t\t\t\t\t\ttripletDurationCount += noteElem.duration;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (elem.rest) noteElem.rest = elem.rest;\n\t\t\t\t\t\t\t\t\t\tif (elem.decoration) noteElem.decoration = elem.decoration.slice(0);\n\t\t\t\t\t\t\t\t\t\tif (elem.pitches) noteElem.pitches = parseCommon.cloneArray(elem.pitches);\n\t\t\t\t\t\t\t\t\t\tif (elem.gracenotes) noteElem.gracenotes = parseCommon.cloneArray(elem.gracenotes);\n\t\t\t\t\t\t\t\t\t\tif (elem.chord) noteElem.chord = parseCommon.cloneArray(elem.chord);\n\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(noteElem);\n\t\t\t\t\t\t\t\t\t\tif (elem.style === \"rhythm\") {\n\t\t\t\t\t\t\t\t\t\t\trhythmHeadThisBar = true;\n\t\t\t\t\t\t\t\t\t\t\tchordVoiceOffThisBar(voices)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tnoteEventsInBar++;\n\t\t\t\t\t\t\t\t\t\tdurationCounter[voiceNumber] += noteElem.duration;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"key\":\n\t\t\t\t\t\t\t\tcase \"keySignature\":\n\t\t\t\t\t\t\t\t\taddKey(voices[voiceNumber], elem);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"meter\":\n\t\t\t\t\t\t\t\t\taddMeter(voices[voiceNumber], elem);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"clef\": // need to keep this to catch the \"transpose\" element.\n\t\t\t\t\t\t\t\t\tif (elem.transpose)\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: elem.transpose });\n\t\t\t\t\t\t\t\t\tif (elem.type) {\n\t\t\t\t\t\t\t\t\t\tif (elem.type.indexOf(\"-8\") >= 0)\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: -12 });\n\t\t\t\t\t\t\t\t\t\telse if (elem.type.indexOf(\"+8\") >= 0)\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: 12 });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"tempo\":\n\t\t\t\t\t\t\t\t\tqpm = interpretTempo(elem, abctune.getBeatLength());\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'tempo', qpm: qpm, timing: durationCounter[voiceNumber] });\n\t\t\t\t\t\t\t\t\ttempoChanges[''+durationCounter[voiceNumber]] = { el_type: 'tempo', qpm: qpm, timing: durationCounter[voiceNumber] };\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"bar\":\n\t\t\t\t\t\t\t\t\tif (noteEventsInBar > 0) // don't add two bars in a row.\n\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'bar' }); // We need the bar marking to reset the accidentals.\n\t\t\t\t\t\t\t\t\tsetDynamics(elem);\n\t\t\t\t\t\t\t\t\tnoteEventsInBar = 0;\n\t\t\t\t\t\t\t\t\t// figure out repeats and endings --\n\t\t\t\t\t\t\t\t\t// The important part is where there is a start repeat, and end repeat, or a first ending.\n\t\t\t\t\t\t\t\t\tvar endRepeat = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\");\n\t\t\t\t\t\t\t\t\tvar startEnding = (elem.startEnding === '1');\n\t\t\t\t\t\t\t\t\tvar startRepeat = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_dbl_repeat\" || elem.type === \"bar_right_repeat\");\n\t\t\t\t\t\t\t\t\tif (endRepeat) {\n\t\t\t\t\t\t\t\t\t\tvar s = startRepeatPlaceholder[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tif (!s) s = 0; // If there wasn't a left repeat, then we repeat from the beginning.\n\t\t\t\t\t\t\t\t\t\tvar e = skipEndingPlaceholder[voiceNumber];\n\t\t\t\t\t\t\t\t\t\tif (!e) e = voices[voiceNumber].length; // If there wasn't a first ending marker, then we copy everything.\n\t\t\t\t\t\t\t\t\t\t// duplicate each of the elements - this has to be a deep copy.\n\t\t\t\t\t\t\t\t\t\tfor (var z = s; z < e; z++) {\n\t\t\t\t\t\t\t\t\t\t\tvar item = Object.assign({},voices[voiceNumber][z]);\n\t\t\t\t\t\t\t\t\t\t\tif (item.pitches)\n\t\t\t\t\t\t\t\t\t\t\t\titem.pitches = parseCommon.cloneArray(item.pitches);\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(item);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// reset these in case there is a second repeat later on.\n\t\t\t\t\t\t\t\t\t\tskipEndingPlaceholder[voiceNumber] = undefined;\n\t\t\t\t\t\t\t\t\t\tstartRepeatPlaceholder[voiceNumber] = undefined;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (startEnding)\n\t\t\t\t\t\t\t\t\t\tskipEndingPlaceholder[voiceNumber] = voices[voiceNumber].length;\n\t\t\t\t\t\t\t\t\tif (startRepeat)\n\t\t\t\t\t\t\t\t\t\tstartRepeatPlaceholder[voiceNumber] = voices[voiceNumber].length;\n\t\t\t\t\t\t\t\t\trhythmHeadThisBar = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'style':\n\t\t\t\t\t\t\t\t\tstyle[voiceNumber] = elem.head;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'timeSignature':\n\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push(interpretMeter(elem));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'part':\n\t\t\t\t\t\t\t\t\t// TODO-PER: If there is a part section in the header, then this should probably affect the repeats.\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'stem':\n\t\t\t\t\t\t\t\tcase 'scale':\n\t\t\t\t\t\t\t\tcase 'break':\n\t\t\t\t\t\t\t\tcase 'font':\n\t\t\t\t\t\t\t\t\t// These elements don't affect sound\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'midi':\n\t\t\t\t\t\t\t\t\t//console.log(\"MIDI inline\", elem); // TODO-PER: for debugging. Remove this.\n\t\t\t\t\t\t\t\t\tvar drumChange = false;\n\t\t\t\t\t\t\t\t\tswitch (elem.cmd) {\n\t\t\t\t\t\t\t\t\t\tcase \"drumon\": drumOn = true; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drumoff\": drumOn = false; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drum\": drumPattern = elem.params; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drumbars\": drumBars = elem.params[0]; drumChange = true; break;\n\t\t\t\t\t\t\t\t\t\tcase \"drummap\":\n\t\t\t\t\t\t\t\t\t\t\t// This is handled before getting here so it can be ignored.\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"channel\":\n\t\t\t\t\t\t\t\t\t\t\t// There's not much needed for the channel except to look out for the percussion channel\n\t\t\t\t\t\t\t\t\t\t\tif (elem.params[0] === 10)\n\t\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'instrument', program: PERCUSSION_PROGRAM });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"program\":\n\t\t\t\t\t\t\t\t\t\t\taddIfDifferent(voices[voiceNumber], { el_type: 'instrument', program: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tchannelExplicitlySet = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"transpose\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'transpose', transpose: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"gchordoff\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'gchordOn', tacet: true });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"gchordon\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'gchordOn', tacet: false });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"beat\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: elem.params });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"nobeataccents\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beataccents', value: false });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"beataccents\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beataccents', value: true });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"vol\":\n\t\t\t\t\t\t\t\t\t\tcase \"volinc\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: elem.cmd, volume: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase \"swing\":\n\t\t\t\t\t\t\t\t\t\tcase \"gchord\":\n\t\t\t\t\t\t\t\t\t\tcase \"bassvol\":\n\t\t\t\t\t\t\t\t\t\tcase \"chordvol\":\n\t\t\t\t\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: elem.cmd, param: elem.params[0] });\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase \"bassprog\": // MAE 22 May 2024\n\t\t\t\t\t\t\t\t\t\tcase \"chordprog\": // MAE 22 May 2024\n\t\t\t\t\t voices[voiceNumber].push({\n\t\t\t\t\t el_type: elem.cmd,\n\t\t\t\t\t value: elem.params[0],\n\t\t\t\t\t octaveShift: elem.params[1]\n\t\t\t\t\t });\n\t\t\t\t\t break;\n\n\t\t\t\t\t // MAE 23 Jun 2024\n\t\t\t\t\t case \"gchordbars\":\n\t\t\t\t\t voices[voiceNumber].push({\n\t\t\t\t\t el_type: elem.cmd,\n\t\t\t\t\t param: elem.params[0]\n\t\t\t\t\t });\n\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"MIDI seq: midi cmd not handled: \", elem.cmd, elem);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (drumChange) {\n\t\t\t\t\t\t\t\t\t\tvoices[0].push({el_type: 'drum', params: { pattern: drumPattern, bars: drumBars, intro: drumIntro, on: drumOn}});\n\t\t\t\t\t\t\t\t\t\tstartingDrumSet = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tconsole.log(\"MIDI: element type \" + elem.el_type + \" not handled.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvoiceNumber++;\n\t\t\t\t\t\tif (!durationCounter[voiceNumber])\n\t\t\t\t\t\t\tdurationCounter[voiceNumber] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction setDynamics(elem) {\n\t\t\t\t\tvar volumes = {\n\t\t\t\t\t\t'pppp': [15, 10, 5, 1],\n\t\t\t\t\t\t'ppp': [30, 20, 10, 1],\n\t\t\t\t\t\t'pp': [45, 35, 20, 1],\n\t\t\t\t\t\t'p': [60, 50, 35, 1],\n\t\t\t\t\t\t'mp': [75, 65, 50, 1],\n\t\t\t\t\t\t'mf': [90, 80, 65, 1],\n\t\t\t\t\t\t'f': [105, 95, 80, 1],\n\t\t\t\t\t\t'ff': [120, 110, 95, 1],\n\t\t\t\t\t\t'fff': [127, 125, 110, 1],\n\t\t\t\t\t\t'ffff': [127, 125, 110, 1]\n\t\t\t\t\t};\n\n\t\t\t\t\tvar dynamicType;\n\t\t\t\t\tif (elem.decoration) {\n\t\t\t\t\t\tif (elem.decoration.indexOf('pppp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'pppp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ppp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ppp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('pp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'pp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('p') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'p';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('mp') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'mp';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('mf') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'mf';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('f') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'f';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ff';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('fff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'fff';\n\t\t\t\t\t\telse if (elem.decoration.indexOf('ffff') >= 0)\n\t\t\t\t\t\t\tdynamicType = 'ffff';\n\n\t\t\t\t\t\tif (dynamicType) {\n\t\t\t\t\t\t\tcurrentVolume = volumes[dynamicType].slice(0);\n\t\t\t\t\t\t\tvoices[voiceNumber].push({ el_type: 'beat', beats: currentVolume.slice(0) });\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (elem.decoration.indexOf(\"crescendo(\") >= 0) {\n\t\t\t\t\t\t\tvar n = numNotesToDecoration(voice, v, \"crescendo)\");\n\t\t\t\t\t\t\tvar top = Math.min(127, currentVolume[0] + crescendoSize);\n\t\t\t\t\t\t\tvar endDec = endingVolume(voice, v+n+1, Object.keys(volumes));\n\t\t\t\t\t\t\tif (endDec)\n\t\t\t\t\t\t\t\ttop = volumes[endDec][0];\n\t\t\t\t\t\t\tif (n > 0)\n\t\t\t\t\t\t\t\tinCrescendo[k] = Math.floor((top - currentVolume[0]) / n);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"crescendo)\") >= 0) {\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"diminuendo(\") >= 0) {\n\t\t\t\t\t\t\tvar n2 = numNotesToDecoration(voice, v, \"diminuendo)\");\n\t\t\t\t\t\t\tvar bottom = Math.max(15, currentVolume[0] - crescendoSize);\n\t\t\t\t\t\t\tvar endDec2 = endingVolume(voice, v+n2+1, Object.keys(volumes));\n\t\t\t\t\t\t\tif (endDec2)\n\t\t\t\t\t\t\t\tbottom = volumes[endDec2][0];\n\t\t\t\t\t\t\tinCrescendo[k] = false;\n\t\t\t\t\t\t\tif (n2 > 0)\n\t\t\t\t\t\t\t\tinDiminuendo[k] = Math.floor((bottom - currentVolume[0]) / n2);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t} else if (elem.decoration.indexOf(\"diminuendo)\") >= 0) {\n\t\t\t\t\t\t\tinDiminuendo[k] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// If there are tempo changes, make sure they are in all the voices. This must be done post process because all the elements in all the voices need to be created first.\n\t\tinsertTempoChanges(voices, tempoChanges);\n\n\t\tif (drumIntro) {\n\t\t\tvar pickups = abctune.getPickupLength();\n\t\t\t// add some measures of rests to the start of each track.\n\t\t\tfor (var vv = 0; vv < voices.length; vv++) {\n\t\t\t\tvar insertPoint = 0;\n\t\t\t\twhile (voices[vv][insertPoint].el_type !== \"note\" && voices[vv].length > insertPoint)\n\t\t\t\t\tinsertPoint++;\n\t\t\t\tif (voices[vv].length > insertPoint) {\n\t\t\t\t\tfor (var w = 0; w < drumIntro; w++) {\n\t\t\t\t\t\t// If it is the last measure of intro, subtract the pickups.\n\t\t\t\t\t\tif (pickups === 0 || w < drumIntro-1) {\n\t\t\t\t\t\t\tvoices[vv].splice(insertPoint, 0, \n\t\t\t\t\t\t\t\t{el_type: \"note\", rest: {type: \"rest\"}, duration: measureLength},\n\t\t\t\t\t\t\t\t{ el_type: \"bar\" }\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tinsertPoint += 2\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvoices[vv].splice(insertPoint++, 0, {el_type: \"note\", rest: {type: \"rest\"}, duration: measureLength-pickups});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (drumOffAfterIntro) {\n\t\t\t\t\t\tdrumOn = false\n\t\t\t\t\t\tvoices[vv].splice(insertPoint++, 0, {el_type: 'drum', params: { pattern: drumPattern, bars: drumBars, intro: drumIntro, on: drumOn}});\n\t\t\t\t\t\tdrumOffAfterIntro = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (voices.length > 0 && voices[0].length > 0) {\n\t\t\tvoices[0][0].pickupLength = abctune.getPickupLength();\n\t\t}\n\t\treturn voices;\n\t};\n\n\tfunction numNotesToDecoration(voice, start, decoration) {\n\t\tvar counter = 0;\n\t\tfor (var i = start+1; i < voice.length; i++) {\n\t\t\tif (voice[i].el_type === \"note\")\n\t\t\t\tcounter++;\n\t\t\tif (voice[i].decoration && voice[i].decoration.indexOf(decoration) >= 0)\n\t\t\t\treturn counter;\n\t\t}\n\t\treturn counter;\n\t}\n\tfunction endingVolume(voice, start, volumeDecorations) {\n\t\tvar end = Math.min(voice.length, start + 3); // If we have a volume within a couple notes of the end then assume that is the destination.\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tif (voice[i].el_type === \"note\") {\n\t\t\t\tif (voice[i].decoration) {\n\t\t\t\t\tfor (var j = 0; j < voice[i].decoration.length; j++) {\n\t\t\t\t\t\tif (volumeDecorations.indexOf(voice[i].decoration[j]) >= 0)\n\t\t\t\t\t\t\treturn voice[i].decoration[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction insertTempoChanges(voices, tempoChanges) {\n\t\tif (!tempoChanges || tempoChanges.length === 0)\n\t\t\treturn;\n\t\tvar changePositions = Object.keys(tempoChanges);\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar lastTempo = tempoChanges['0'] ? tempoChanges['0'].qpm : 0; // Don't insert redundant changes. This happens normally when repeating from the beginning, but could happen anywhere that there is a tempo marking that is the same as the last one.\n\t\t\tfor (var j = 0; j < voice.length; j++) {\n\t\t\t\tvar el = voice[j];\n\t\t\t\tif (el.el_type === \"tempo\")\n\t\t\t\t\tlastTempo = el.qpm;\n\t\t\t\tif (changePositions.indexOf(''+el.timing) >= 0 && lastTempo !== tempoChanges[''+el.timing].qpm) {\n\t\t\t\t\tlastTempo = tempoChanges[''+el.timing].qpm;\n\t\t\t\t\tif (el.el_type === \"tempo\") {\n\t\t\t\t\t\tel.qpm = tempoChanges[''+el.timing].qpm;\n\t\t\t\t\t\tj++; // when there is a tempo element the next element has the same timing and we don't want it to match the second time.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//console.log(\"tempo position\", i, j, el);\n\t\t\t\t\t\tvoices[i].splice(j, 0, {el_type: \"tempo\", qpm: tempoChanges[''+el.timing].qpm, timing: el.timing});\n\t\t\t\t\t\tj +=2; // skip the element we just inserted.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction chordVoiceOffThisBar(voices) {\n\t\tfor (var i = 0; i < voices.length; i++) {\n\t\t\tvar voice = voices[i];\n\t\t\tvar j = voice.length-1;\n\t\t\twhile (j >= 0 && voice[j].el_type !== 'bar') {\n\t\t\t\tvoice[j].noChordVoice = true;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction getTrackTitle(staff, voiceNumber) {\n\t\tif (!staff || staff.length <= voiceNumber || !staff[voiceNumber].title)\n\t\t\treturn undefined;\n\t\treturn staff[voiceNumber].title.join(\" \");\n\t}\n\n\tfunction interpretTempo(element, beatLength) {\n\t\tvar duration = 1/4;\n\t\tif (element.duration) {\n\t\t\tduration = element.duration[0];\n\t\t}\n\t\tvar bpm = 60;\n\t\tif (element.bpm) {\n\t\t\tbpm = element.bpm;\n\t\t}\n\t\t// The tempo is defined with a beat length of \"duration\". If that isn't the natural beat length then there is a translation.\n\t\treturn duration * bpm / beatLength;\n\t}\n\n\tfunction interpretMeter(element) {\n\t\tvar meter;\n\t\tswitch (element.type) {\n\t\t\tcase \"common_time\":\n\t\t\t\tmeter = { el_type: 'meter', num: 4, den: 4 };\n\t\t\t\tbreak;\n\t\t\tcase \"cut_time\":\n\t\t\t\tmeter = { el_type: 'meter', num: 2, den: 2 };\n\t\t\t\tbreak;\n\t\t\tcase \"specified\":\n\t\t\t\t// TODO-PER: only taking the first meter, so the complex meters are not handled.\n\t\t\t\tmeter = { el_type: 'meter', num: element.value[0].num, den: element.value[0].den };\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// This should never happen.\n\t\t\t\tmeter = { el_type: 'meter' };\n\t\t}\n\t\tmeasureLength = meter.num/meter.den;\n\t\treturn meter;\n\t}\n\n\tfunction removeNaturals(accidentals) {\n\t\tvar acc = [];\n\t\tfor (var i = 0; i < accidentals.length; i++) {\n\t\t\tif (accidentals[i].acc !== \"natural\")\n\t\t\t\tacc.push(accidentals[i])\n\t\t}\n\t\treturn acc;\n\t}\n\tfunction addKey(arr, key) {\n\t\tvar newKey;\n\t\tif (key.root === 'HP')\n\t\t\tnewKey = {el_type: 'key', accidentals: [{acc: 'natural', note: 'g'}, {acc: 'sharp', note: 'f'}, {acc: 'sharp', note: 'c'}]};\n\t\telse\n\t\t\tnewKey = {el_type: 'key', accidentals: removeNaturals(key.accidentals) };\n\t\taddIfDifferent(arr, newKey);\n\t}\n\tfunction addMeter(arr, meter) {\n\t\tvar newMeter = interpretMeter(meter);\n\t\taddIfDifferent(arr, newMeter);\n\t}\n\tfunction addIfDifferent(arr, item) {\n\t\tfor (var i = arr.length-1; i >= 0; i--) {\n\t\t\tif (arr[i].el_type === item.el_type) {\n\t\t\t\tif (JSON.stringify(arr[i]) !== JSON.stringify(item))\n\t\t\t\t\tarr.push(item);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tarr.push(item);\n\t}\n\n})();\n\nmodule.exports = sequence;\n","var registerAudioContext = require('./register-audio-context.js');\n\nfunction activeAudioContext() {\n\tif (!window.abcjsAudioContext)\n\t\tregisterAudioContext();\n\treturn window.abcjsAudioContext;\n}\n\nmodule.exports = activeAudioContext;\n","// This turns the number of cents to detune into a value that is convenient to use in pitch calculations\n// A cent is 1/100 of a musical half step and is calculated exponentially over the course of an octave.\n// The equation is:\n// Two to the power of cents divided by 1200\n\nfunction centsToFactor(cents) {\n\treturn Math.pow(2, cents/1200);\n}\n\nmodule.exports = centsToFactor;\n","//\n// The algorithm for chords is:\n// - The chords are done in a separate track.\n// - If there are notes before the first chord, then put that much silence to start the track.\n// - The pattern of chord expression depends on the meter, and how many chords are in a measure.\n// - There is a possibility that a measure will have an incorrect number of beats, if that is the case, then\n// start the pattern anew on the next measure number.\n// - If a chord root is not A-G, then ignore it as if the chord wasn't there at all.\n// - If a chord modification isn't in our supported list, change it to a major triad.\n//\n// - There is a standard pattern of boom-chick for each time sig, or it can be overridden.\n// - For any unrecognized meter, play the full chord on each beat.\n//\n//\t- If there is a chord specified that is not on a beat, move it earlier to the previous beat, unless there is already a chord on that beat.\n//\t- Otherwise, move it later, unless there is already a chord on that beat.\n// \t- Otherwise, ignore it. (TODO-PER: expand this as more support is added.)\n//\n// If there is any note in the melody that has a rhythm head, then assume the melody controls the rhythm, so there is no chord added for that entire measure.\n\nvar ChordTrack = function ChordTrack(numVoices, chordsOff, midiOptions, meter) {\n\tthis.chordTrack = [];\n\tthis.chordTrackFinished = false;\n\tthis.chordChannel = numVoices; // first free channel for chords\n\tthis.currentChords = [];\n\tthis.lastChord;\n\tthis.chordLastBar;\n\tthis.chordsOff = !!chordsOff\n\tthis.gChordTacet = this.chordsOff;\n\tthis.hasRhythmHead = false;\n\tthis.transpose = 0;\n\tthis.lastBarTime = 0;\n\tthis.meter = meter;\n\tthis.tempoChangeFactor = 1;\n\n\t// MAE 17 Jun 2024 - To allow for bass and chord instrument octave shifts\n\tthis.bassInstrument = midiOptions.bassprog && midiOptions.bassprog.length >= 1 ? midiOptions.bassprog[0] : 0;\n\tthis.chordInstrument = midiOptions.chordprog && midiOptions.chordprog.length >= 1 ? midiOptions.chordprog[0] : 0;\n\n\t// MAE For octave shifted bass and chords\n\tthis.bassOctaveShift = midiOptions.bassprog && midiOptions.bassprog.length === 2 ? midiOptions.bassprog[1] : 0;\n\tthis.chordOctaveShift = midiOptions.chordprog && midiOptions.chordprog.length === 2 ? midiOptions.chordprog[1] : 0;\n\n\tthis.boomVolume = midiOptions.bassvol && midiOptions.bassvol.length === 1 ? midiOptions.bassvol[0] : 64;\n\tthis.chickVolume = midiOptions.chordvol && midiOptions.chordvol.length === 1 ? midiOptions.chordvol[0] : 48;\n\n\t// This allows for an initial %%MIDI gchord with no string\n\tif (midiOptions.gchord && (midiOptions.gchord.length > 0)) {\n\t\tthis.overridePattern = parseGChord(midiOptions.gchord[0])\n\t}\n\telse {\n\t\tthis.overridePattern = undefined;\n\t}\n};\n\nChordTrack.prototype.setMeter = function (meter) {\n\tthis.meter = meter\n};\n\nChordTrack.prototype.setTempoChangeFactor = function (tempoChangeFactor) {\n\tthis.tempoChangeFactor = tempoChangeFactor\n};\n\nChordTrack.prototype.setLastBarTime = function (lastBarTime) {\n\tthis.lastBarTime = lastBarTime\n};\n\nChordTrack.prototype.setTranspose = function (transpose) {\n\tthis.transpose = transpose\n};\n\nChordTrack.prototype.setRhythmHead = function (isRhythmHead, elem) {\n\tthis.hasRhythmHead = isRhythmHead\n\tvar ePitches = [];\n\tif (isRhythmHead) {\n\t\tif (this.lastChord && this.lastChord.chick) {\n\t\t\tfor (var i2 = 0; i2 < this.lastChord.chick.length; i2++) {\n\t\t\t\tvar note2 = Object.assign({},elem.pitches[0]);\n\t\t\t\tnote2.actualPitch = this.lastChord.chick[i2];\n\t\t\t\tePitches.push(note2);\n\t\t\t}\n\t\t}\n\t}\n\treturn ePitches\n};\n\nChordTrack.prototype.barEnd = function (element) {\n\tif (this.chordTrack.length > 0 && !this.chordTrackFinished) {\n\t\tthis.resolveChords(this.lastBarTime, timeToRealTime(element.time));\n\t\tthis.currentChords = [];\n\t}\n\tthis.chordLastBar = this.lastChord;\n};\n\nChordTrack.prototype.gChordOn = function (element) {\n\tif (!this.chordsOff)\n\t\tthis.gChordTacet = element.tacet;\n};\n\nChordTrack.prototype.paramChange = function (element) {\n\tswitch (element.el_type) {\n\t\tcase \"gchord\":\n\t\t\t// Skips gchord elements that don't have pattern strings\n\t\t\tif (element.param && element.param.length > 0) {\n\t\t\t\tthis.overridePattern = parseGChord(element.param);\n\n\t\t\t\t// Generate a default duration scale based on the pattern\n\t\t\t\t//this.gchordduration = generateDefaultDurationScale(element.param);\n\t\t\t} else\n\t\t\t\tthis.overridePattern = undefined;\n\t\t\tbreak;\n\t\tcase \"bassprog\":\n\t\t\tthis.bassInstrument = element.value;\n\t\t\tif ((element.octaveShift != undefined) && (element.octaveShift != null)) {\n\t\t\t\tthis.bassOctaveShift = element.octaveShift;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.bassOctaveShift = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"chordprog\":\n\t\t\tthis.chordInstrument = element.value;\n\t\t\tif ((element.octaveShift != undefined) && (element.octaveShift != null)) {\n\t\t\t\tthis.chordOctaveShift = element.octaveShift;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.chordOctaveShift = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"bassvol\":\n\t\t\tthis.boomVolume = element.param;\n\t\t\tbreak;\n\t\tcase \"chordvol\":\n\t\t\tthis.chickVolume = element.param;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconsole.log(\"unhandled midi param\", element)\t\n\t}\n};\n\nChordTrack.prototype.finish = function () {\n\tif (!this.chordTrackEmpty()) // Don't do chords on more than one track, so turn off chord detection after we create it.\n\t\tthis.chordTrackFinished = true;\n};\n\nChordTrack.prototype.addTrack = function (tracks) {\n\tif (!this.chordTrackEmpty())\n\t\ttracks.push(this.chordTrack);\n};\n\nChordTrack.prototype.findChord = function (elem) {\n\tif (this.gChordTacet)\n\t\treturn 'break';\n\n\t// TODO-PER: Just using the first chord if there are more than one.\n\tif (this.chordTrackFinished || !elem.chord || elem.chord.length === 0)\n\t\treturn null;\n\n\t// Return the first annotation that is a regular chord: that is, it is in the default place or is a recognized \"tacet\" phrase.\n\tfor (var i = 0; i < elem.chord.length; i++) {\n\t\tvar ch = elem.chord[i];\n\t\tif (ch.position === 'default')\n\t\t\treturn ch.name;\n\t\tif (this.breakSynonyms.indexOf(ch.name.toLowerCase()) >= 0)\n\t\t\treturn 'break';\n\t}\n\treturn null;\n}\n\nChordTrack.prototype.interpretChord = function (name) {\n\t// chords have the format:\n\t// [root][acc][modifier][/][bass][acc]\n\t// (The chord might be surrounded by parens. Just ignore them.)\n\t// root must be present and must be from A-G.\n\t// acc is optional and can be # or b\n\t// The modifier can be a wide variety of things, like \"maj7\". As they are discovered, more are supported here.\n\t// If there is a slash, then there is a bass note, which can be from A-G, with an optional acc.\n\t// If the root is unrecognized, then \"undefined\" is returned and there is no chord.\n\t// If the modifier is unrecognized, a major triad is returned.\n\t// If the bass notes is unrecognized, it is ignored.\n\tif (name.length === 0)\n\t\treturn undefined;\n\tif (name === 'break')\n\t\treturn { chick: [] };\n\tvar root = name.substring(0, 1);\n\tif (root === '(') {\n\t\tname = name.substring(1, name.length - 2);\n\t\tif (name.length === 0)\n\t\t\treturn undefined;\n\t\troot = name.substring(0, 1);\n\t}\n\tvar bass = this.basses[root];\n\tif (!bass)\t// If the bass note isn't listed, then this was an unknown root. Only A-G are accepted.\n\t\treturn undefined;\n\t// Don't transpose the chords more than an octave.\n\tvar chordTranspose = this.transpose;\n\twhile (chordTranspose < -8)\n\t\tchordTranspose += 12;\n\twhile (chordTranspose > 8)\n\t\tchordTranspose -= 12;\n\tbass += chordTranspose;\n\t\n \t// MAE 31 Aug 2024 - For visual transpose backup range issue\n \t// If transposed below A or above G, bring it back in the normal backup range\n \tif (bass < 33){\n \t\tbass += 12;\n \t}\n \telse if (bass > 44){\n\t \t bass -= 12;\n \t}\n\n\t// MAE 17 Jun 2024 - Supporting octave shifted bass and chords\n\tvar unshiftedBass = bass;\n\n\tbass += this.bassOctaveShift * 12;\n\n\tvar bass2 = bass - 5;\t// The alternating bass is a 4th below\n\tvar chick;\n\tif (name.length === 1)\n\t\tchick = this.chordNotes(bass, '');\n\tvar remaining = name.substring(1);\n\tvar acc = remaining.substring(0, 1);\n\tif (acc === 'b' || acc === '♭') {\n\t\tunshiftedBass--;\n\t\tbass--;\n\t\tbass2--;\n\t\tremaining = remaining.substring(1);\n\t} else if (acc === '#' || acc === '♯') {\n\t\tunshiftedBass++;\n\t\tbass++;\n\t\tbass2++;\n\t\tremaining = remaining.substring(1);\n\t}\n\tvar arr = remaining.split('/');\n\tchick = this.chordNotes(unshiftedBass, arr[0]);\n\t// If the 5th is altered then the bass is altered. Normally the bass is 7 from the root, so adjust if it isn't.\n\tif (chick.length >= 3) {\n\t\tvar fifth = chick[2] - chick[0];\n\t\tbass2 = bass2 + fifth - 7;\n\t}\n\n\tif (arr.length === 2) {\n\t\tvar explicitBass = this.basses[arr[1].substring(0, 1)];\n\t\tif (explicitBass) {\n\t\t\tvar bassAcc = arr[1].substring(1);\n\t\t\tvar bassShift = { '#': 1, '♯': 1, 'b': -1, '♭': -1 }[bassAcc] || 0;\n\t\t\tbass = this.basses[arr[1].substring(0, 1)] + bassShift + chordTranspose;\n\n\t\t\t// MAE 22 May 2024 - Supporting octave shifted bass and chords\n\t\t\tbass += this.bassOctaveShift * 12;\n\n\t\t\tbass2 = bass;\n\t\t}\n\t}\n\treturn { boom: bass, boom2: bass2, chick: chick };\n}\n\nChordTrack.prototype.chordNotes = function (bass, modifier) {\n\tvar intervals = this.chordIntervals[modifier];\n\tif (!intervals) {\n\t\tif (modifier.slice(0, 2).toLowerCase() === 'ma' || modifier[0] === 'M')\n\t\t\tintervals = this.chordIntervals.M;\n\t\telse if (modifier[0] === 'm' || modifier[0] === '-')\n\t\t\tintervals = this.chordIntervals.m;\n\t\telse\n\t\t\tintervals = this.chordIntervals.M;\n\t}\n\tbass += 12;\t// the chord is an octave above the bass note.\n\n\t// MAE 22 May 2024 - For chick octave shift\n\tbass += (this.chordOctaveShift * 12);\n\n\tvar notes = [];\n\tfor (var i = 0; i < intervals.length; i++) {\n\t\tnotes.push(bass + intervals[i]);\n\t}\n\treturn notes;\n}\n\nChordTrack.prototype.writeNote = function (note, beatLength, volume, beat, noteLength, instrument) {\n\t// undefined means there is a stop time.\n\tif (note !== undefined)\n\t\tthis.chordTrack.push({ cmd: 'note', pitch: note, volume: volume, start: this.lastBarTime + beat * durationRounded(beatLength, this.tempoChangeFactor), duration: durationRounded(noteLength, this.tempoChangeFactor), gap: 0, instrument: instrument });\n}\n\nChordTrack.prototype.chordTrackEmpty = function () {\n\tvar isEmpty = true;\n\tfor (var i = 0; i < this.chordTrack.length && isEmpty; i++) {\n\t\tif (this.chordTrack[i].cmd === 'note')\n\t\t\tisEmpty = false\n\t}\n\treturn isEmpty;\n}\n\nChordTrack.prototype.resolveChords = function (startTime, endTime) {\n\t// If there is a rhythm head anywhere in the measure then don't add a separate rhythm track\n\tif (this.hasRhythmHead)\n\t\treturn\n\n\tvar num = this.meter.num;\n\tvar den = this.meter.den;\n\tvar beatLength = 1 / den;\n\tvar noteLength = beatLength / 2;\n\tvar thisMeasureLength = parseInt(num, 10) / parseInt(den, 10);\n\tvar portionOfAMeasure = thisMeasureLength - (endTime - startTime) / this.tempoChangeFactor;\n\tif (Math.abs(portionOfAMeasure) < 0.00001)\n\t\tportionOfAMeasure = 0;\n\n\t // there wasn't a new chord this measure, so use the last chord declared.\n\t // also the case where there is a chord declared in the measure, but not on its first beat.\n\tif (this.currentChords.length === 0 || this.currentChords[0].beat !== 0) {\n\t\tthis.currentChords.unshift({ beat: 0, chord: this.chordLastBar });\n\t}\n\n\t//console.log(this.currentChords)\n\tvar currentChordsExpanded = expandCurrentChords(this.currentChords, 8*num/den, beatLength)\n\t//console.log(currentChordsExpanded)\n\tvar thisPattern = this.overridePattern ? this.overridePattern : this.rhythmPatterns[num + '/' + den]\n\tif (portionOfAMeasure) {\n\t\tthisPattern = [];\n\t\tvar beatsPresent = ((endTime - startTime) / this.tempoChangeFactor) * 8;\n\t\tfor (var p = 0; p < beatsPresent/2; p += 2) {\n\t\t\tthisPattern.push(\"chick\");\n\t\t\tthisPattern.push(\"\");\n\t\t}\n\t}\n\tif (!thisPattern) {\n\t\tthisPattern = []\n\t\tfor (var p = 0; p < (8*num/den)/2; p++) {\n\t\t\tthisPattern.push('chick')\n\t\t\tthisPattern.push(\"\");\n\t\t}\n\t}\n\tvar firstBoom = true\n\t// If the pattern is overridden, it might be longer than the length of a measure. If so, then ignore the rest of it\n\tvar minLength = Math.min(thisPattern.length, currentChordsExpanded.length)\n\tfor (var p = 0; p < minLength; p++) {\n\t\tif (p > 0 && currentChordsExpanded[p-1] && currentChordsExpanded[p] && currentChordsExpanded[p-1].boom !== currentChordsExpanded[p].boom)\n\t\t\tfirstBoom = true\n\t\tvar type = thisPattern[p]\n\t\tvar isBoom = type.indexOf('boom') >= 0\n\t\t// If we changed chords at a time when we're not expecting a bass note, then add an extra bass note in if the first thing in the pattern is a bass note.\n\t\tvar newBass = !isBoom &&\n\t\t\tp !== 0 &&\n\t\t\tthisPattern[0].indexOf('boom') >= 0 &&\n\t\t\t(!currentChordsExpanded[p-1] || currentChordsExpanded[p-1].boom !== currentChordsExpanded[p].boom)\n\t\tvar pitches = resolvePitch(currentChordsExpanded[p], type, firstBoom, newBass)\n\t\tif (isBoom)\n\t\t\tfirstBoom = false\n\t\tfor (var oo = 0; oo < pitches.length; oo++) {\n\t\t\tthis.writeNote(pitches[oo], \n\t\t\t\t0.125,\n\t\t\t\tisBoom || newBass ? this.boomVolume : this.chickVolume,\n\t\t\t\tp,\n\t\t\t\tnoteLength,\n\t\t\t\tisBoom || newBass ? this.bassInstrument : this.chordInstrument\n\t\t\t)\n\t\t\tif (newBass)\n\t\t\t\tnewBass = false\n\t\t\telse\n\t\t\t\tisBoom = false // only the first note in a chord is a bass note. This handles the case where bass and chord are played at the same time.\n\t\t}\n\t}\n\treturn\n}\n\nChordTrack.prototype.processChord = function (elem) {\n\tif (this.chordTrackFinished)\n\t\treturn\n\tvar chord = this.findChord(elem);\n\tif (chord) {\n\t\tvar c = this.interpretChord(chord);\n\t\t// If this isn't a recognized chord, just completely ignore it.\n\t\tif (c) {\n\t\t\t// If we ever have a chord in this voice, then we add the chord track.\n\t\t\t// However, if there are chords on more than one voice, then just use the first voice.\n\t\t\tif (this.chordTrack.length === 0) {\n\t\t\t\tthis.chordTrack.push({ cmd: 'program', channel: this.chordChannel, instrument: this.chordInstrument });\n\t\t\t}\n\n\t\t\tthis.lastChord = c;\n\t\t\tvar barBeat = calcBeat(this.lastBarTime, timeToRealTime(elem.time));\n\t\t\tthis.currentChords.push({ chord: this.lastChord, beat: barBeat, start: timeToRealTime(elem.time) });\n\t\t}\n\t}\n}\n\nfunction resolvePitch(currentChord, type, firstBoom, newBass) {\n\tvar ret = []\n\tif (!currentChord)\n\t\treturn ret\n\tif (type.indexOf('boom') >= 0)\n\t\tret.push(firstBoom ? currentChord.boom : currentChord.boom2)\n\telse if (newBass)\n\t\tret.push(currentChord.boom)\n\tvar numChordNotes = currentChord.chick.length\n\tif (type.indexOf('chick') >= 0) {\n\t\tfor (var i = 0; i < numChordNotes; i++)\n\t\t\tret.push(currentChord.chick[i])\n\t}\n\tswitch (type) {\n\t\tcase 'DO': ret.push(currentChord.chick[0]); break;\n\t\tcase 'MI': ret.push(currentChord.chick[1]); break;\n\t\tcase 'SOL': ret.push(extractNote(currentChord,2)); break;\n\t\tcase 'TI': ret.push(extractNote(currentChord,3)); break;\n\t\tcase 'TOP': ret.push(extractNote(currentChord,4)); break;\n\t\tcase 'do': ret.push(currentChord.chick[0]+12); break;\n\t\tcase 'mi': ret.push(currentChord.chick[1]+12); break;\n\t\tcase 'sol': ret.push(extractNote(currentChord,2)+12); break;\n\t\tcase 'ti': ret.push(extractNote(currentChord,3)+12); break;\n\t\tcase 'top': ret.push(extractNote(currentChord,4)+12); break;\n\t}\n\treturn ret\n}\n\nfunction extractNote(chord, index) {\n\t// This creates an arpeggio note no matter how many notes are in the chord - if it runs out of notes it continues in the next octave\n\tvar octave = Math.floor(index / chord.chick.length)\n\tvar note = chord.chick[index % chord.chick.length]\n\t//console.log(chord.chick, {index, octave, note}, index % chord.chick.length)\n\treturn note + octave * 12\n}\n\nfunction parseGChord(gchord) {\n\t// TODO-PER: The spec is more complicated than this but for now this will not try to do anything with error cases like the wrong number of beats.\n\tvar pattern = []\n\tfor (var i = 0; i < gchord.length; i++) {\n\t\tvar ch = gchord[i]\n\t\tswitch(ch) {\n\t\t\tcase 'z' : pattern.push(''); break;\n\t\t\tcase '2' : pattern.push(''); break; // TODO-PER: This should extend the last note, but that's a small effect\n\t\t\tcase 'c' : pattern.push('chick'); break;\n\t\t\tcase 'b' : pattern.push('boom&chick'); break;\n\t\t\tcase 'f' : pattern.push('boom'); break;\n\t\t\tcase 'G' : pattern.push('DO'); break;\n\t\t\tcase 'H' : pattern.push('MI'); break;\n\t\t\tcase 'I' : pattern.push('SOL'); break;\n\t\t\tcase 'J' : pattern.push('TI'); break;\n\t\t\tcase 'K' : pattern.push('TOP'); break;\n\t\t\tcase 'g' : pattern.push('do'); break;\n\t\t\tcase 'h' : pattern.push('mi'); break;\n\t\t\tcase 'i' : pattern.push('sol'); break;\n\t\t\tcase 'j' : pattern.push('ti'); break;\n\t\t\tcase 'k' : pattern.push('top'); break;\n\t\t}\n\t}\n\treturn pattern\n}\n\n// This returns an array that has a chord for each 1/8th note position in the current measure\nfunction expandCurrentChords(currentChords, num8thNotes, beatLength) {\n\tbeatLength = beatLength * 8 // this is expressed as a fraction, so that 0.25 is a quarter notes. We want it to be the number of 8th notes\n\tvar chords = []\n\tif (currentChords.length === 0)\n\t\treturn chords\n\n\tvar currentChord = currentChords[0].chord\n\tfor (var i = 1; i < currentChords.length; i++) {\n\t\tvar current = currentChords[i]\n\t\twhile (chords.length < current.beat) {\n\t\t\tchords.push(currentChord)\n\t\t}\n\t\tcurrentChord = current.chord\n\t}\n\twhile (chords.length < num8thNotes)\n\t\tchords.push(currentChord)\n\treturn chords\n}\n\nfunction calcBeat(measureStart, currTime) {\n\tvar distanceFromStart = currTime - measureStart;\n\treturn distanceFromStart * 8;\n}\n\nChordTrack.prototype.breakSynonyms = ['break', '(break)', 'no chord', 'n.c.', 'tacet'];\n\nChordTrack.prototype.basses = {\n\t'A': 33, 'B': 35, 'C': 36, 'D': 38, 'E': 40, 'F': 41, 'G': 43\n};\n\nChordTrack.prototype.chordIntervals = {\n\t// diminished (all flat 5 chords)\n\t'dim': [0, 3, 6],\n\t'°': [0, 3, 6],\n\t'˚': [0, 3, 6],\n\n\t'dim7': [0, 3, 6, 9],\n\t'°7': [0, 3, 6, 9],\n\t'˚7': [0, 3, 6, 9],\n\n\t'ø7': [0, 3, 6, 10],\n\t'm7(b5)': [0, 3, 6, 10],\n\t'm7b5': [0, 3, 6, 10],\n\t'm7♭5': [0, 3, 6, 10],\n\t'-7(b5)': [0, 3, 6, 10],\n\t'-7b5': [0, 3, 6, 10],\n\n\t'7b5': [0, 4, 6, 10],\n\t'7(b5)': [0, 4, 6, 10],\n\t'7♭5': [0, 4, 6, 10],\n\n\t'7(b9,b5)': [0, 4, 6, 10, 13],\n\t'7b9,b5': [0, 4, 6, 10, 13],\n\t'7(#9,b5)': [0, 4, 6, 10, 15],\n\t'7#9b5': [0, 4, 6, 10, 15],\n\t'maj7(b5)': [0, 4, 6, 11],\n\t'maj7b5': [0, 4, 6, 11],\n\t'13(b5)': [0, 4, 6, 10, 14, 21],\n\t'13b5': [0, 4, 6, 10, 14, 21],\n\n\t// minor (all normal 5, minor 3 chords)\n\t'm': [0, 3, 7],\n\t'-': [0, 3, 7],\n\t'm6': [0, 3, 7, 9],\n\t'-6': [0, 3, 7, 9],\n\t'm7': [0, 3, 7, 10],\n\t'-7': [0, 3, 7, 10],\n\n\t'-(b6)': [0, 3, 7, 8],\n\t'-b6': [0, 3, 7, 8],\n\t'-6/9': [0, 3, 7, 9, 14],\n\t'-7(b9)': [0, 3, 7, 10, 13],\n\t'-7b9': [0, 3, 7, 10, 13],\n\t'-maj7': [0, 3, 7, 11],\n\t'-9+7': [0, 3, 7, 11, 13],\n\t'-11': [0, 3, 7, 11, 14, 17],\n\t'm11': [0, 3, 7, 11, 14, 17],\n\t'-maj9': [0, 3, 7, 11, 14],\n\t'-∆9': [0, 3, 7, 11, 14],\n\t'mM9': [0, 3, 7, 11, 14],\n\n\t// major (all normal 5, major 3 chords)\n\t'M': [0, 4, 7],\n\t'6': [0, 4, 7, 9],\n\t'6/9': [0, 4, 7, 9, 14],\n\t'6add9': [0, 4, 7, 9, 14],\n\t'69': [0, 4, 7, 9, 14],\n\n\t'7': [0, 4, 7, 10],\n\t'9': [0, 4, 7, 10, 14],\n\t'11': [0, 7, 10, 14, 17],\n\t'13': [0, 4, 7, 10, 14, 21],\n\t'7b9': [0, 4, 7, 10, 13],\n\t'7♭9': [0, 4, 7, 10, 13],\n\t'7(b9)': [0, 4, 7, 10, 13],\n\t'7(#9)': [0, 4, 7, 10, 15],\n\t'7#9': [0, 4, 7, 10, 15],\n\t'(13)': [0, 4, 7, 10, 14, 21],\n\t'7(9,13)': [0, 4, 7, 10, 14, 21],\n\t'7(#9,b13)': [0, 4, 7, 10, 15, 20],\n\t'7(#11)': [0, 4, 7, 10, 14, 18],\n\t'7#11': [0, 4, 7, 10, 14, 18],\n\t'7(b13)': [0, 4, 7, 10, 20],\n\t'7b13': [0, 4, 7, 10, 20],\n\t'9(#11)': [0, 4, 7, 10, 14, 18],\n\t'9#11': [0, 4, 7, 10, 14, 18],\n\t'13(#11)': [0, 4, 7, 10, 18, 21],\n\t'13#11': [0, 4, 7, 10, 18, 21],\n\n\t'maj7': [0, 4, 7, 11],\n\t'∆7': [0, 4, 7, 11],\n\t'Δ7': [0, 4, 7, 11],\n\t'maj9': [0, 4, 7, 11, 14],\n\t'maj7(9)': [0, 4, 7, 11, 14],\n\t'maj7(11)': [0, 4, 7, 11, 17],\n\t'maj7(#11)': [0, 4, 7, 11, 18],\n\t'maj7(13)': [0, 4, 7, 14, 21],\n\t'maj7(9,13)': [0, 4, 7, 11, 14, 21],\n\n\t'7sus4': [0, 5, 7, 10],\n\t'm7sus4': [0, 3, 7, 10, 17],\n\t'sus4': [0, 5, 7],\n\t'sus2': [0, 2, 7],\n\t'7sus2': [0, 2, 7, 10],\n\t'9sus4': [0, 5, 7, 10, 14],\n\t'13sus4': [0, 5, 7, 10, 14, 21],\n\n\t// augmented (all sharp 5 chords)\n\t'aug7': [0, 4, 8, 10],\n\t'+7': [0, 4, 8, 10],\n\t'+': [0, 4, 8],\n\t'7#5': [0, 4, 8, 10],\n\t'7♯5': [0, 4, 8, 10],\n\t'7+5': [0, 4, 8, 10],\n\t'9#5': [0, 4, 8, 10, 14],\n\t'9♯5': [0, 4, 8, 10, 14],\n\t'9+5': [0, 4, 8, 10, 14],\n\t'-7(#5)': [0, 3, 8, 10],\n\t'-7#5': [0, 3, 8, 10],\n\t'7(#5)': [0, 4, 8, 10],\n\t'7(b9,#5)': [0, 4, 8, 10, 13],\n\t'7b9#5': [0, 4, 8, 10, 13],\n\t'maj7(#5)': [0, 4, 8, 11],\n\t'maj7#5': [0, 4, 8, 11],\n\t'maj7(#5,#11)': [0, 4, 8, 11, 18],\n\t'maj7#5#11': [0, 4, 8, 11, 18],\n\t'9(#5)': [0, 4, 8, 10, 14],\n\t'13(#5)': [0, 4, 8, 10, 14, 21],\n\t'13#5': [0, 4, 8, 10, 14, 21],\n\t// MAE Power chords added 10 April 2024\n\t'5': [0, 7],\n\t'5(8)': [0, 7, 12],\n\t'5add8': [0, 7, 12]\n\n};\n\nChordTrack.prototype.rhythmPatterns = {\n\t\"2/2\": ['boom', '', '', '', 'chick', '', '', ''],\n\t\"3/2\": ['boom', '', '', '', 'chick', '', '', '', 'chick', '', '', ''],\n\t\"4/2\": ['boom', '', '', '', 'chick', '', '', '', 'boom', '', '', '', 'chick', '', '', ''],\n\n\t\"2/4\": ['boom', '', 'chick', ''],\n\t\"3/4\": ['boom', '', 'chick', '', 'chick', ''],\n\t\"4/4\": ['boom', '', 'chick', '', 'boom', '', 'chick', ''],\n\t\"5/4\": ['boom', '', 'chick', '', 'chick', '', 'boom', '', 'chick', ''],\n\t\"6/4\": ['boom', '', 'chick', '', 'boom', '', 'chick', '', 'boom', '', 'chick', ''],\n\n\t\"3/8\": ['boom', '', 'chick'],\n\t\"5/8\": ['boom', 'chick', 'chick', 'boom', 'chick'],\n\t\"6/8\": ['boom', '', 'chick', 'boom', '', 'chick'],\n\t\"7/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick'],\n\t\"9/8\": ['boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick'],\n\t\"10/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick'],\n\t\"11/8\": ['boom', 'chick', 'chick', 'boom', 'chick', 'chick', 'boom', 'chick', 'boom', 'chick', 'chick'],\n\t\"12/8\": ['boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick', 'boom', '', 'chick'],\n};\n\n// TODO-PER: these are repeated in flattener. Can it be shared?\n\nfunction timeToRealTime(time) {\n\treturn time / 1000000;\n}\n\nfunction durationRounded(duration, tempoChangeFactor) {\n\treturn Math.round(duration * tempoChangeFactor * 1000000) / 1000000;\n}\n\nmodule.exports = ChordTrack;\n","// Convert the input structure to a more useful structure where each item has a length of its own.\n\nvar instrumentIndexToName = require('./instrument-index-to-name');\n\nvar createNoteMap = function(sequence) {\n\tvar map = [];\n\tfor (var i = 0; i < sequence.tracks.length; i++)\n\t\tmap.push([]);\n\n\t// TODO-PER: handle more than one note in a track\n\tvar nextNote = {};\n\tvar currentInstrument = instrumentIndexToName[0];\n\t// ev.start and ev.duration are in whole notes. Need to turn them into\n\tsequence.tracks.forEach(function(track, i) {\n\t\ttrack.forEach(function(ev) {\n\t\t\tswitch (ev.cmd) {\n\t\t\t\tcase \"note\":\n\t\t\t\t\t// ev contains:\n\t\t\t\t\t// {\"cmd\":\"note\",\"pitch\":72,\"volume\":95,\"start\":0.125,\"duration\":0.25,\"instrument\":0,\"gap\":0}\n\t\t\t\t\t// where start and duration are in whole notes, gap is in 1/1920 of a second (i.e. MIDI ticks)\n\t\t\t\t\tvar inst = ev.instrument !== undefined ? instrumentIndexToName[ev.instrument] : currentInstrument\n\t\t\t\t\tif (ev.duration > 0) {\n\t\t\t\t\t\tvar gap = ev.gap ? ev.gap : 0;\n\t\t\t\t\t\tvar len = ev.duration;\n\t\t\t\t\t\tgap = Math.min(gap, len * 2 / 3);\n\t\t\t\t\t\tvar obj = {\n\t\t\t\t\t\t\tpitch: ev.pitch,\n\t\t\t\t\t\t\tinstrument: inst,\n\t\t\t\t\t\t\tstart: Math.round((ev.start) * 1000000)/1000000,\n\t\t\t\t\t\t\tend: Math.round((ev.start + len - gap) * 1000000)/1000000,\n\t\t\t\t\t\t\tvolume: ev.volume\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (ev.startChar)\n\t\t\t\t\t\t\tobj.startChar = ev.startChar;\n\t\t\t\t\t\tif (ev.endChar)\n\t\t\t\t\t\t\tobj.endChar = ev.endChar;\n\t\t\t\t\t\tif (ev.style)\n\t\t\t\t\t\t\tobj.style = ev.style;\n\t\t\t\t\t\tif (ev.cents)\n\t\t\t\t\t\t\tobj.cents = ev.cents;\n\t\t\t\t\t\tmap[i].push(obj);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"program\":\n\t\t\t\t\tcurrentInstrument = instrumentIndexToName[ev.instrument];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"text\":\n\t\t\t\t\t// Ignore the track names - that is just for midi files.\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// TODO-PER: handle other event types\n\t\t\t\t\tconsole.log(\"Unhandled midi event\", ev);\n\t\t\t}\n\t\t});\n\t});\n\treturn map;\n};\n\nmodule.exports = createNoteMap;\n","var supportsAudio = require('./supports-audio');\nvar registerAudioContext = require('./register-audio-context');\nvar activeAudioContext = require('./active-audio-context');\n\nvar loopImage = require('./images/loop.svg.js');\nvar playImage = require('./images/play.svg.js');\nvar pauseImage = require('./images/pause.svg.js');\nvar loadingImage = require('./images/loading.svg.js');\nvar resetImage = require('./images/reset.svg.js');\n\nfunction CreateSynthControl(parent, options) {\n\tvar self = this;\n\t// parent is either an element or a selector.\n\tif (typeof parent === \"string\") {\n\t\tvar selector = parent;\n\t\tparent = document.querySelector(selector);\n\t\tif (!parent)\n\t\t\tthrow new Error(\"Cannot find element \\\"\" + selector + \"\\\" in the DOM.\");\n\t} else if (!(parent instanceof HTMLElement))\n\t\tthrow new Error(\"The first parameter must be a valid element or selector in the DOM.\");\n\n\tself.parent = parent;\n\tself.options = {};\n\tif (options)\n\t\tself.options = Object.assign({},options);\n\n\t// This can be called in the following cases:\n\t// AC already registered and not suspended\n\t// AC already registered and suspended\n\t// AC not registered and not passed in\n\t// AC not registered but passed in (but suspended)\n\t// AC not registered but passed in (not suspended)\n\t// If the AC is already registered, then just use it - ignore what is passed in\n\t// Create the AC if necessary if there isn't one already.\n\t// We don't care right now if the AC is suspended - whenever a button is clicked then we check it.\n\tif (self.options.ac)\n\t\tregisterAudioContext(self.options.ac);\n\tbuildDom(self.parent, self.options);\n\tattachListeners(self);\n\n\tself.disable = function(isDisabled) {\n\t\tvar el = self.parent.querySelector(\".abcjs-inline-audio\");\n\t\tif (isDisabled)\n\t\t\tel.classList.add(\"abcjs-disabled\");\n\t\telse\n\t\t\tel.classList.remove(\"abcjs-disabled\");\n\t};\n\tself.setWarp = function(tempo, warp) {\n\t\tvar el = self.parent.querySelector(\".abcjs-midi-tempo\");\n\t\tel.value = Math.round(warp);\n\t\tself.setTempo(tempo)\n\t};\n\tself.setTempo = function(tempo) {\n\t\tvar el = self.parent.querySelector(\".abcjs-midi-current-tempo\");\n\t\tif (el)\n\t\t\tel.innerHTML = Math.round(tempo);\n\t};\n\tself.resetAll = function() {\n\t\tvar pushedButtons = self.parent.querySelectorAll(\".abcjs-pushed\");\n\t\tfor (var i = 0; i < pushedButtons.length; i++) {\n\t\t\tvar button = pushedButtons[i];\n\t\t\tbutton.classList.remove(\"abcjs-pushed\");\n\t\t}\n\t};\n\tself.pushPlay = function(push) {\n\t\tvar startButton = self.parent.querySelector(\".abcjs-midi-start\");\n\t\tif (!startButton)\n\t\t\treturn;\n\t\tif (push)\n\t\t\tstartButton.classList.add(\"abcjs-pushed\");\n\t\telse\n\t\t\tstartButton.classList.remove(\"abcjs-pushed\");\n\t};\n\tself.pushLoop = function(push) {\n\t\tvar loopButton = self.parent.querySelector(\".abcjs-midi-loop\");\n\t\tif (!loopButton)\n\t\t\treturn;\n\t\tif (push)\n\t\t\tloopButton.classList.add(\"abcjs-pushed\");\n\t\telse\n\t\t\tloopButton.classList.remove(\"abcjs-pushed\");\n\t};\n\n\tself.setProgress = function (percent, totalTime) {\n\t\tvar progressBackground = self.parent.querySelector(\".abcjs-midi-progress-background\");\n\t\tvar progressThumb = self.parent.querySelector(\".abcjs-midi-progress-indicator\");\n\t\tif (!progressBackground || !progressThumb)\n\t\t\treturn;\n\t\tvar width = progressBackground.clientWidth;\n\t\tvar left = width * percent;\n\t\tprogressThumb.style.left = left + \"px\";\n\n\t\tvar clock = self.parent.querySelector(\".abcjs-midi-clock\");\n\t\tif (clock) {\n\t\t\tvar totalSeconds = (totalTime * percent) / 1000;\n\t\t\tvar minutes = Math.floor(totalSeconds / 60);\n\t\t\tvar seconds = Math.floor(totalSeconds % 60);\n\t\t\tvar secondsFormatted = seconds < 10 ? \"0\" + seconds : seconds;\n\t\t\tclock.innerHTML = minutes + \":\" + secondsFormatted;\n\t\t}\n\t};\n\n\tif (self.options.afterResume) {\n\t\tvar isResumed = false;\n\t\tif (self.options.ac) {\n\t\t\tisResumed = self.options.ac.state !== \"suspended\";\n\t\t} else if (activeAudioContext()) {\n\t\t\tisResumed = activeAudioContext().state !== \"suspended\";\n\t\t}\n\t\tif (isResumed)\n\t\t\tself.options.afterResume();\n\t}\n}\n\nfunction buildDom(parent, options) {\n\tvar hasLoop = !!options.loopHandler;\n\tvar hasRestart = !!options.restartHandler;\n\tvar hasPlay = !!options.playHandler || !!options.playPromiseHandler;\n\tvar hasProgress = !!options.progressHandler;\n\tvar hasWarp = !!options.warpHandler;\n\tvar hasClock = options.hasClock !== false;\n\n\tvar html = '
\\n';\n\tif (hasLoop) {\n\t\tvar repeatTitle = options.repeatTitle ? options.repeatTitle : \"Click to toggle play once/repeat.\";\n\t\tvar repeatAria = options.repeatAria ? options.repeatAria : repeatTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasRestart) {\n\t\tvar restartTitle = options.restartTitle ? options.restartTitle : \"Click to go to beginning.\";\n\t\tvar restartAria = options.restartAria ? options.restartAria : restartTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasPlay) {\n\t\tvar playTitle = options.playTitle ? options.playTitle : \"Click to play/pause.\";\n\t\tvar playAria = options.playAria ? options.playAria : playTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasProgress) {\n\t\tvar randomTitle = options.randomTitle ? options.randomTitle : \"Click to change the playback position.\";\n\t\tvar randomAria = options.randomAria ? options.randomAria : randomTitle;\n\t\thtml += '\\n';\n\t}\n\tif (hasClock) {\n\t\thtml += '\\n';\n\t}\n\tif (hasWarp) {\n\t\tvar warpTitle = options.warpTitle ? options.warpTitle : \"Change the playback speed.\";\n\t\tvar warpAria = options.warpAria ? options.warpAria : warpTitle;\n\t\tvar bpm = options.bpm ? options.bpm : \"BPM\";\n\t\thtml += ' ( ' + bpm + ')\\n';\n\t}\n\thtml += '
CSS required: load abcjs-audio.css
';\n\thtml += '
\\n';\n\tparent.innerHTML = html;\n}\n\nfunction acResumerMiddleWare(next, ev, playBtn, afterResume, isPromise) {\n\tvar needsInit = true;\n\tif (!activeAudioContext()) {\n\t\tregisterAudioContext();\n\t} else {\n\t\tneedsInit = activeAudioContext().state === \"suspended\";\n\t}\n\tif (!supportsAudio()) {\n\t\tthrow { status: \"NotSupported\", message: \"This browser does not support audio.\"};\n\t}\n\n\tif ((needsInit || isPromise) && playBtn)\n\t\tplayBtn.classList.add(\"abcjs-loading\");\n\n\tif (needsInit) {\n\t\tactiveAudioContext().resume().then(function () {\n\t\t\tif (afterResume) {\n\t\t\t\tafterResume().then(function (response) {\n\t\t\t\t\tdoNext(next, ev, playBtn, isPromise);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdoNext(next, ev, playBtn, isPromise);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tdoNext(next, ev, playBtn, isPromise);\n\t}\n}\n\nfunction doNext(next, ev, playBtn, isPromise) {\n\tif (isPromise) {\n\t\tnext(ev).then(function() {\n\t\t\tif (playBtn)\n\t\t\t\tplayBtn.classList.remove(\"abcjs-loading\");\n\t\t});\n\t} else {\n\t\tnext(ev);\n\t\tif (playBtn)\n\t\t\tplayBtn.classList.remove(\"abcjs-loading\");\n\t}\n}\n\nfunction attachListeners(self) {\n\tvar hasLoop = !!self.options.loopHandler;\n\tvar hasRestart = !!self.options.restartHandler;\n\tvar hasPlay = !!self.options.playHandler || !!self.options.playPromiseHandler;\n\tvar hasProgress = !!self.options.progressHandler;\n\tvar hasWarp = !!self.options.warpHandler;\n\tvar playBtn = self.parent.querySelector(\".abcjs-midi-start\");\n\n\tif (hasLoop)\n\t\tself.parent.querySelector(\".abcjs-midi-loop\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.loopHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasRestart)\n\t\tself.parent.querySelector(\".abcjs-midi-reset\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.restartHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasPlay)\n\t\tplayBtn.addEventListener(\"click\", function(ev){\n\t\t\tacResumerMiddleWare(\n\t\t\t\tself.options.playPromiseHandler || self.options.playHandler,\n\t\t\t\tev,\n\t\t\t\tplayBtn,\n\t\t\t\tself.options.afterResume,\n\t\t\t\t!!self.options.playPromiseHandler)\n\t\t});\n\tif (hasProgress)\n\t\tself.parent.querySelector(\".abcjs-midi-progress-background\").addEventListener(\"click\", function(ev){acResumerMiddleWare(self.options.progressHandler, ev, playBtn, self.options.afterResume)});\n\tif (hasWarp)\n\t\tself.parent.querySelector(\".abcjs-midi-tempo\").addEventListener(\"change\", function(ev){acResumerMiddleWare(self.options.warpHandler, ev, playBtn, self.options.afterResume)});\n}\nmodule.exports = CreateSynthControl;\n","var getNote = require('./load-note');\nvar createNoteMap = require('./create-note-map');\nvar registerAudioContext = require('./register-audio-context');\nvar activeAudioContext = require('./active-audio-context');\nvar supportsAudio = require('./supports-audio');\nvar pitchToNoteName = require('./pitch-to-note-name');\nvar instrumentIndexToName = require('./instrument-index-to-name');\nvar downloadBuffer = require('./download-buffer');\nvar placeNote = require('./place-note');\nvar soundsCache = require('./sounds-cache');\n\n// TODO-PER: remove the midi tests from here: I don't think the object can be constructed unless it passes.\nvar notSupportedMessage = \"MIDI is not supported in this browser.\";\n\nvar originalSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/abcjs/\";\n// These are the original soundfonts supplied. They will need a volume boost:\nvar defaultSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/\";\nvar alternateSoundFontUrl = \"https://paulrosen.github.io/midi-js-soundfonts/MusyngKite/\";\n\nfunction CreateSynth() {\n\tvar self = this;\n\tself.audioBufferPossible = undefined;\n\tself.directSource = []; // type: AudioBufferSourceNode\n\tself.startTimeSec = undefined; // the time (in seconds) that the audio started: used for pause to get the pausedTimeSec.\n\tself.pausedTimeSec = undefined; // the position (in seconds) that the audio was paused: used for resume.\n\tself.audioBuffers = []; // cache of the buffers so starting play can be fast.\n\tself.duration = undefined; // the duration of the tune in seconds.\n\tself.isRunning = false; // whether there is currently a sound buffer running.\n\tself.options = undefined\n\tself.pickupLength = 0\n\n\t// Load and cache all needed sounds\n\tself.init = function(options) {\n\t\tif (!options)\n\t\t\toptions = {};\n\t\tif (options.options)\n\t\t\tself.options = options.options\n\t\tregisterAudioContext(options.audioContext); // This works no matter what - if there is already an ac it is a nop; if the context is not passed in, then it creates one.\n\t\tvar startTime = activeAudioContext().currentTime;\n\t\tself.debugCallback = options.debugCallback;\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"init called\");\n\t\tself.audioBufferPossible = self._deviceCapable();\n\t\tif (!self.audioBufferPossible)\n\t\t\treturn Promise.reject({ status: \"NotSupported\", message: notSupportedMessage});\n\t\tvar params = options.options ? options.options : {};\n\t\tself.soundFontUrl = params.soundFontUrl ? params.soundFontUrl : defaultSoundFontUrl;\n\t\tif (self.soundFontUrl[self.soundFontUrl.length-1] !== '/')\n\t\t\tself.soundFontUrl += '/';\n\t\tif (params.soundFontVolumeMultiplier || params.soundFontVolumeMultiplier === 0)\n\t\t\tself.soundFontVolumeMultiplier = params.soundFontVolumeMultiplier;\n\t\telse if (self.soundFontUrl === defaultSoundFontUrl || self.soundFontUrl === alternateSoundFontUrl)\n\t\t\tself.soundFontVolumeMultiplier = 3.0;\n\t\telse if (self.soundFontUrl === originalSoundFontUrl)\n\t\t\tself.soundFontVolumeMultiplier = 0.4;\n\t\telse\n\t\t\tself.soundFontVolumeMultiplier = 1.0;\n\t\tif (params.programOffsets)\n\t\t\tself.programOffsets = params.programOffsets;\n\t\telse if (self.soundFontUrl === originalSoundFontUrl)\n\t\t\tself.programOffsets = {\n\t\t\t\t\"bright_acoustic_piano\": 20,\n\t\t\t\t\"honkytonk_piano\": 20,\n\t\t\t\t\"electric_piano_1\": 30,\n\t\t\t\t\"electric_piano_2\": 30,\n\t\t\t\t\"harpsichord\": 40,\n\t\t\t\t\"clavinet\": 20,\n\t\t\t\t\"celesta\": 20,\n\t\t\t\t\"glockenspiel\": 40,\n\t\t\t\t\"vibraphone\": 30,\n\t\t\t\t\"marimba\": 35,\n\t\t\t\t\"xylophone\": 30,\n\t\t\t\t\"tubular_bells\": 35,\n\t\t\t\t\"dulcimer\": 30,\n\t\t\t\t\"drawbar_organ\": 20,\n\t\t\t\t\"percussive_organ\": 25,\n\t\t\t\t\"rock_organ\": 20,\n\t\t\t\t\"church_organ\": 40,\n\t\t\t\t\"reed_organ\": 40,\n\t\t\t\t\"accordion\": 40,\n\t\t\t\t\"harmonica\": 40,\n\t\t\t\t\"acoustic_guitar_nylon\": 20,\n\t\t\t\t\"acoustic_guitar_steel\": 30,\n\t\t\t\t\"electric_guitar_jazz\": 25,\n\t\t\t\t\"electric_guitar_clean\": 15,\n\t\t\t\t\"electric_guitar_muted\": 35,\n\t\t\t\t\"overdriven_guitar\": 25,\n\t\t\t\t\"distortion_guitar\": 20,\n\t\t\t\t\"guitar_harmonics\": 30,\n\t\t\t\t\"electric_bass_finger\": 15,\n\t\t\t\t\"electric_bass_pick\": 30,\n\t\t\t\t\"fretless_bass\": 40,\n\t\t\t\t\"violin\": 105,\n\t\t\t\t\"viola\": 50,\n\t\t\t\t\"cello\": 40,\n\t\t\t\t\"contrabass\": 60,\n\t\t\t\t\"trumpet\": 10,\n\t\t\t\t\"trombone\": 90,\n\t\t\t\t\"alto_sax\": 20,\n\t\t\t\t\"tenor_sax\": 20,\n\t\t\t\t\"clarinet\": 20,\n\t\t\t\t\"flute\": 50,\n\t\t\t\t\"banjo\": 50,\n\t\t\t\t\"woodblock\": 20,\n\t\t\t};\n\t\telse\n\t\t\tself.programOffsets = {};\n\t\tvar p = params.fadeLength !== undefined ? parseInt(params.fadeLength,10) : NaN;\n\t\tself.fadeLength = isNaN(p) ? 200 : p;\n\t\tp = params.noteEnd !== undefined ? parseInt(params.noteEnd,10) : NaN;\n\t\tself.noteEnd = isNaN(p) ? 0 : p;\n\n\t\tself.pan = params.pan;\n\t\tself.meterSize = 1;\n\t\tif (options.visualObj) {\n\t\t\tself.flattened = options.visualObj.setUpAudio(params);\n\t\t\tvar meter = options.visualObj.getMeterFraction();\n\t\t\tif (meter.den)\n\t\t\t\tself.meterSize = options.visualObj.getMeterFraction().num / options.visualObj.getMeterFraction().den;\n\t\t\tself.pickupLength = options.visualObj.getPickupLength()\n\t\t} else if (options.sequence)\n\t\t\tself.flattened = options.sequence;\n\t\telse\n\t\t\treturn Promise.reject(new Error(\"Must pass in either a visualObj or a sequence\"));\n\t\tself.millisecondsPerMeasure = options.millisecondsPerMeasure ? options.millisecondsPerMeasure : (options.visualObj ? options.visualObj.millisecondsPerMeasure(self.flattened.tempo) : 1000);\n\t\tself.beatsPerMeasure = options.visualObj ? options.visualObj.getBeatsPerMeasure() : 4;\n\t\tself.sequenceCallback = params.sequenceCallback;\n\t\tself.callbackContext = params.callbackContext;\n\t\tself.onEnded = params.onEnded;\n\t\tself.meterFraction = options.visualObj ? options.visualObj.getMeterFraction() : {den: 1} // If we are given a sequence instead of a regular visual obj, then don't do the swing\n\n\t\tvar allNotes = {};\n\t\tvar cached = [];\n\t\tvar errorNotes = [];\n\t\tvar currentInstrument = instrumentIndexToName[0];\n\t\tself.flattened.tracks.forEach(function(track) {\n\t\t\ttrack.forEach(function(event) {\n\t\t\t\tif (event.cmd === \"program\" && instrumentIndexToName[event.instrument])\n\t\t\t\t\tcurrentInstrument = instrumentIndexToName[event.instrument];\n\t\t\t\tif (event.pitch !== undefined) {\n\t\t\t\t\tvar pitchNumber = event.pitch;\n\t\t\t\t\tvar noteName = pitchToNoteName[pitchNumber];\n\t\t\t\t\tvar inst = event.instrument !== undefined ? instrumentIndexToName[event.instrument] : currentInstrument\n\t\t\t\t\tif (noteName) {\n\t\t\t\t\t\tif (!allNotes[inst])\n\t\t\t\t\t\t\tallNotes[inst] = {};\n\t\t\t\t\t\tif (!soundsCache[inst] || !soundsCache[inst][noteName])\n\t\t\t\t\t\t\tallNotes[inst][noteName] = true;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar label2 = inst+\":\"+noteName\n\t\t\t\t\t\t\tif (cached.indexOf(label2) < 0)\n\t\t\t\t\t\t\t\tcached.push(label2);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar label = inst+\":\"+noteName\n\t\t\t\t\t\tconsole.log(\"Can't find note: \", pitchNumber, label);\n\t\t\t\t\t\tif (errorNotes.indexOf(label) < 0)\n\t\t\t\t\t\t\terrorNotes.push(label)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"note gathering time = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000)+\"ms\");\n\t\tstartTime = activeAudioContext().currentTime;\n\n\t\tvar notes = [];\n\t\tObject.keys(allNotes).forEach(function(instrument) {\n\t\t\tObject.keys(allNotes[instrument]).forEach(function(note) {\n\t\t\t\tnotes.push({ instrument: instrument, note: note });\n\t\t\t});\n\t\t});\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"notes \"+JSON.stringify(notes));\n\n\t\t// If there are lots of notes, load them in batches\n\t\tvar batches = [];\n\t\tvar CHUNK = 256;\n\t\tfor (var i=0; i < notes.length; i += CHUNK) {\n\t\t\tbatches.push(notes.slice(i, i + CHUNK));\n\t\t}\n\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\tvar results = {\n\t\t\t\tcached: cached,\n\t\t\t\terror: errorNotes,\n\t\t\t\tloaded: []\n\t\t\t};\n\n\t\t\tvar index = 0;\n\t\t\tvar next = function() {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"loadBatch idx=\"+index+ \" len=\"+batches.length);\n\t\n\t\t\t\tif (index < batches.length) {\n\t\t\t\t\tself._loadBatch(batches[index], self.soundFontUrl, startTime).then(function(data) {\n\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\tself.debugCallback(\"loadBatch then\");\n\t\t\t\t\t\tstartTime = activeAudioContext().currentTime;\n\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\tif (data.error)\n\t\t\t\t\t\t\t\tresults.error = results.error.concat(data.error);\n\t\t\t\t\t\t\tif (data.loaded)\n\t\t\t\t\t\t\t\tresults.loaded = results.loaded.concat(data.loaded);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tnext();\n\t\t\t\t\t}, reject);\n\t\t\t\t} else {\n\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\tself.debugCallback(\"resolve init\");\n\t\t\n\t\t\t\t\tresolve(results);\n\t\t\t\t}\n\t\t\t};\n\t\t\tnext();\n\t\t});\n\t};\n\n\tself._loadBatch = (function(batch, soundFontUrl, startTime, delay) {\n\t\t// This is called recursively to see if the sounds have loaded. The \"delay\" parameter is how long it has been since the original call.\n\t\tvar promises = [];\n\t\tbatch.forEach(function(item) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"getNote \" + item.instrument+':'+item.note);\n\t\t\tpromises.push(getNote(soundFontUrl, item.instrument, item.note, activeAudioContext()));\n\t\t});\n\t\treturn Promise.all(promises).then(function(response) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"mp3 load time = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000)+\"ms\");\n\t\t\tvar loaded = [];\n\t\t\tvar cached = [];\n\t\t\tvar pending = [];\n\t\t\tvar error = [];\n\t\t\tfor (var i = 0; i < response.length; i++) {\n\t\t\t\tvar oneResponse = response[i];\n\t\t\t\tvar which = oneResponse.instrument + \":\" + oneResponse.name;\n\t\t\t\tif (oneResponse.status === \"loaded\")\n\t\t\t\t\tloaded.push(which);\n\t\t\t\telse if (oneResponse.status === \"pending\")\n\t\t\t\t\tpending.push(which);\n\t\t\t\telse if (oneResponse.status === \"cached\")\n\t\t\t\t\tcached.push(which);\n\t\t\t\telse\n\t\t\t\t\terror.push(which + ' ' + oneResponse.message);\n\t\t\t}\n\t\t\tif (pending.length > 0) {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"pending \" + JSON.stringify(pending));\n\t\t\t\t// There was probably a second call for notes before the first one finished, so just retry a few times to see if they stop being pending.\n\t\t\t\t// Retry quickly at first so that there isn't an unnecessary delay, but increase the delay each time.\n\t\t\t\tif (!delay)\n\t\t\t\t\tdelay = 50;\n\t\t\t\telse\n\t\t\t\t\tdelay = delay * 2;\n\t\t\t\tif (delay < 90000) {\n\t\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\tvar newBatch = [];\n\t\t\t\t\t\t\tfor (i = 0; i < pending.length; i++) {\n\t\t\t\t\t\t\t\twhich = pending[i].split(\":\");\n\t\t\t\t\t\t\t\tnewBatch.push({instrument: which[0], note: which[1]});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\t\tself.debugCallback(\"retry \" + JSON.stringify(newBatch));\n\t\t\t\t\t\t\t\t\tself._loadBatch(newBatch, soundFontUrl, startTime, delay).then(function (response) {\n\t\t\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, delay);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar list = [];\n\t\t\t\t\tfor (var j = 0; j < batch.length; j++)\n\t\t\t\t\t\tlist.push(batch[j].instrument+'/'+batch[j].note)\n\t\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\t\tself.debugCallback(\"loadBatch timeout\")\n\t\t\t\t\t\treturn Promise.reject(new Error(\"timeout attempting to load: \" + list.join(\", \")));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (self.debugCallback)\n\t\t\t\t\tself.debugCallback(\"loadBatch resolve\")\n\t\t\t\treturn Promise.resolve({loaded: loaded, cached: cached, error: error});\n\t\t\t}\n\t\t}).catch(function (error) {\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(\"loadBatch catch \"+error.message)\n\t\t});\n\t});\n\n\tself.prime = function() {\n\t\t// At this point all of the notes are loaded. This function writes them into the output buffer.\n\t\t// Most music has a lot of repeating notes. If a note is the same pitch, volume, length, etc. as another one,\n\t\t// It saves a lot of time to just create it once and place it repeatedly where ever it needs to be.\n\t\tvar fadeTimeSec = self.fadeLength/1000;\n\t\tself.isRunning = false;\n\t\tif (!self.audioBufferPossible)\n\t\t\treturn Promise.reject(new Error(notSupportedMessage));\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"prime called\");\n\t\treturn new Promise(function(resolve) {\n\t\t\tvar startTime = activeAudioContext().currentTime;\n\t\t\tvar tempoMultiplier = self.millisecondsPerMeasure / 1000 / self.meterSize;\n\t\t\tself.duration = self.flattened.totalDuration * tempoMultiplier;\n\t\t\tif(self.duration <= 0) {\n\t\t\t\tself.audioBuffers = [];\n\t\t\t\treturn resolve({ status: \"empty\", seconds: 0});\n\t\t\t}\n\t\t\tself.duration += fadeTimeSec;\n\t\t\tvar totalSamples = Math.floor(activeAudioContext().sampleRate * self.duration);\n\n\t\t\t// There might be a previous run that needs to be turned off.\n\t\t\tself.stop();\n\n\t\t\tvar noteMapTracks = createNoteMap(self.flattened);\n\n\t\t\tif (self.options.swing)\n\t\t\t\taddSwing(noteMapTracks, self.options.swing, self.meterFraction, self.pickupLength)\n\n\t\t\tif (self.sequenceCallback)\n\t\t\t\tself.sequenceCallback(noteMapTracks, self.callbackContext);\n\n\t\t\tvar panDistances = setPan(noteMapTracks.length, self.pan);\n\n\t\t\t// Create a simple list of all the unique sounds in this music and where they should be placed.\n\t\t\t// There appears to be a limit on how many audio buffers can be created at once so this technique limits the number needed.\n\t\t\tvar uniqueSounds = {};\n\t\t\tnoteMapTracks.forEach(function(noteMap, trackNumber) {\n\t\t\t\tvar panDistance = panDistances && panDistances.length > trackNumber ? panDistances[trackNumber] : 0;\n\t\t\t\tnoteMap.forEach(function(note) {\n\t\t\t\t\tvar key = note.instrument + ':' + note.pitch + ':' +note.volume + ':' + Math.round((note.end-note.start)*1000)/1000 + ':' + panDistance + ':' + tempoMultiplier + ':' + (note.cents ? note.cents : 0);\n\t\t\t\t\tif (self.debugCallback)\n\t\t\t\t\t\tself.debugCallback(\"noteMapTrack \"+key)\n\t\t\t\t\tif (!uniqueSounds[key])\n\t\t\t\t\t\tuniqueSounds[key] = [];\n\t\t\t\t\tuniqueSounds[key].push(note.start);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// Now that we know what we are trying to create, construct the audio buffer by creating each sound and placing it.\n\t\t\tvar allPromises = [];\n\t\t\tvar audioBuffer = activeAudioContext().createBuffer(2, totalSamples, activeAudioContext().sampleRate);\n\t\t\tfor (var key2 = 0; key2 < Object.keys(uniqueSounds).length; key2++) {\n\t\t\t\tvar k = Object.keys(uniqueSounds)[key2];\n\t\t\t\tvar parts = k.split(\":\");\n\t\t\t\tvar cents = parts[6] !== undefined ? parseFloat(parts[6]) : 0;\n\t\t\t\tparts = {instrument: parts[0], pitch: parseInt(parts[1], 10), volume: parseInt(parts[2], 10), len: parseFloat(parts[3]), pan: parseFloat(parts[4]), tempoMultiplier: parseFloat(parts[5]), cents: cents};\n\t\t\t\tallPromises.push(placeNote(audioBuffer, activeAudioContext().sampleRate, parts, uniqueSounds[k], self.soundFontVolumeMultiplier, self.programOffsets[parts.instrument], fadeTimeSec, self.noteEnd/1000, self.debugCallback));\n\t\t\t}\n\t\t\tself.audioBuffers = [audioBuffer];\n\n\t\t\tif (self.debugCallback) {\n\t\t\t\tself.debugCallback(\"sampleRate = \" + activeAudioContext().sampleRate);\n\t\t\t\tself.debugCallback(\"totalSamples = \" + totalSamples);\n\t\t\t\tself.debugCallback(\"creationTime = \" + Math.floor((activeAudioContext().currentTime - startTime)*1000) + \"ms\");\n\t\t\t}\n\t\t\tfunction resolveData(me) {\n\t\t\t\tvar duration = me && me.audioBuffers && me.audioBuffers.length > 0 ? me.audioBuffers[0].duration : 0;\n\t\t\t\treturn { status: activeAudioContext().state, duration: duration}\n\t\t\t}\n\t\t\tPromise.all(allPromises).then(function() {\n\t\t\t\t// Safari iOS can mess with the audioContext state, so resume if needed.\n\t\t\t\tif (activeAudioContext().state === \"suspended\") {\n\t\t\t\t\tactiveAudioContext().resume().then(function () {\n\t\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t\t})\n\t\t\t\t} else if (activeAudioContext().state === \"interrupted\") {\n\t\t\t\t\tactiveAudioContext().suspend().then(function () {\n\t\t\t\t\t\tactiveAudioContext().resume().then(function () {\n\t\t\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tresolve(resolveData(self));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\n\tfunction setPan(numTracks, panParam) {\n\t\t// panParam, if it is set, can be either a number representing the separation between each track,\n\t\t// or an array, which is the absolute pan position for each track.\n\t\tif (panParam === null || panParam === undefined)\n\t\t\treturn null;\n\n\t\tvar panDistances = [];\n\t\tif (panParam.length) {\n\t\t\t// We received an array. If there are the same number of items in the pan array as the number of tracks,\n\t\t\t// it all lines up perfectly. If there are more items in the pan array than the tracks then the excess items are ignored.\n\t\t\t// If there are more tracks than items in the pan array then the remaining tracks are placed in the middle.\n\t\t\t// If any of the pan numbers are out of range then they are adjusted.\n\t\t\tfor (var pp = 0; pp < numTracks; pp++) {\n\t\t\t\tif (pp < panParam.length) {\n\t\t\t\t\tvar x = parseFloat(panParam[pp]);\n\t\t\t\t\tif (x < -1)\n\t\t\t\t\t\tx = -1;\n\t\t\t\t\telse if (x > 1)\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\tpanDistances.push(x);\n\t\t\t\t} else\n\t\t\t\t\tpanDistances.push(0)\n\t\t\t}\n\t\t\treturn panDistances;\n\t\t} else {\n\t\t\tvar panNumber = parseFloat(panParam);\n\t\t\t// the separation needs to be no further than 2 (i.e. -1 to 1) so test to see if there are too many tracks for the passed in distance\n\t\t\tif (panNumber*(numTracks-1) > 2)\n\t\t\t\treturn null;\n\n\t\t\t// If there are an even number of tracks, then offset so that the first two are centered around the middle\n\t\t\tvar even = numTracks % 2 === 0;\n\t\t\tvar currLow = even ? 0 - panNumber/2 : 0;\n\t\t\tvar currHigh = currLow+panNumber;\n\t\t\t// Now add the tracks to either side\n\t\t\tfor (var p = 0; p < numTracks; p++) {\n\t\t\t\teven = p % 2 === 0;\n\t\t\t\tif (even) {\n\t\t\t\t\tpanDistances.push(currLow);\n\t\t\t\t\tcurrLow -= panNumber;\n\t\t\t\t} else {\n\t\t\t\t\tpanDistances.push(currHigh);\n\t\t\t\t\tcurrHigh += panNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn panDistances;\n\t\t}\n\t\t// There was either no panning, or the parameters were illegal\n\t\treturn null;\n\t}\n\n\t// This is called after everything is set up, so it can quickly make sound\n\tself.start = function() {\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"start called\");\n\n\t\tvar resumePosition = self.pausedTimeSec ? self.pausedTimeSec : 0;\n\t\tself._kickOffSound(resumePosition);\n\t\tself.startTimeSec = activeAudioContext().currentTime - resumePosition;\n\t\tself.pausedTimeSec = undefined;\n\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"MIDI STARTED\", self.startTimeSec);\n\t};\n\n\tself.pause = function() {\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"pause called\");\n\n\t\tself.pausedTimeSec = self.stop();\n\t\treturn self.pausedTimeSec;\n\t};\n\n\tself.resume = function() {\n\t\tself.start();\n\t};\n\n\tself.seek = function(position, units) {\n\t\tvar offset;\n\t\tswitch (units) {\n\t\t\tcase \"seconds\":\n\t\t\t\toffset = position;\n\t\t\t\tbreak;\n\t\t\tcase \"beats\":\n\t\t\t\toffset = position * self.millisecondsPerMeasure / self.beatsPerMeasure / 1000;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// this is \"percent\" or any illegal value\n\t\t\t\toffset = (self.duration-self.fadeLength/1000) * position;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// TODO-PER: can seek when paused or when playing\n\t\tif (!self.audioBufferPossible)\n\t\t\tthrow new Error(notSupportedMessage);\n\t\tif (self.debugCallback)\n\t\t\tself.debugCallback(\"seek called sec=\" + offset);\n\n\t\tif (self.isRunning) {\n\t\t\tself.stop();\n\t\t\tself._kickOffSound(offset);\n\t\t} else {\n\t\t\tself.pausedTimeSec = offset;\n\t\t}\n\t\tself.pausedTimeSec = offset;\n\t};\n\n\tself.stop = function() {\n\t\tself.isRunning = false;\n\t\tself.pausedTimeSec = undefined;\n\t\tself.directSource.forEach(function(source) {\n\t\t\ttry {\n\t\t\t\tsource.stop();\n\t\t\t} catch (error) {\n\t\t\t\t// We don't care if self succeeds: it might fail if something else turned off the sound or it ended for some reason.\n\t\t\t\tconsole.log(\"direct source didn't stop:\", error)\n\t\t\t}\n\t\t});\n\t\tself.directSource = [];\n\t\tvar elapsed = activeAudioContext().currentTime - self.startTimeSec;\n\t\treturn elapsed;\n\t};\n\tself.finished = function() {\n\t\tself.startTimeSec = undefined;\n\t\tself.pausedTimeSec = undefined;\n\t\tself.isRunning = false;\n\t};\n\n\tself.download = function() {\n\t\treturn downloadBuffer(self);\n\t};\n\n\tself.getAudioBuffer = function() {\n\t\treturn self.audioBuffers[0];\n\t};\n\n\tself.getIsRunning = function() {\n\t\treturn self.isRunning;\n\t}\n\n\t/////////////// Private functions //////////////\n\n\tself._deviceCapable = function() {\n\t\tif (!supportsAudio()) {\n\t\t\tconsole.warn(notSupportedMessage);\n\t\t\tif (self.debugCallback)\n\t\t\t\tself.debugCallback(notSupportedMessage);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t};\n\n\tself._kickOffSound = function(seconds) {\n\t\tself.isRunning = true;\n\t\tself.directSource = [];\n\t\tself.audioBuffers.forEach(function(audioBuffer, trackNum) {\n\t\t\tself.directSource[trackNum] = activeAudioContext().createBufferSource(); // creates a sound source\n\t\t\tself.directSource[trackNum].buffer = audioBuffer; // tell the source which sound to play\n\t\t\tself.directSource[trackNum].connect(activeAudioContext().destination); // connect the source to the context's destination (the speakers)\n\t\t});\n\t\tself.directSource.forEach(function(source) {\n\t\t\tsource.start(0, seconds);\n\t\t});\n\t\tif (self.onEnded) {\n\t\t\tself.directSource[0].onended = function () {\n\t\t\t\tself.onEnded(self.callbackContext);\n\t\t\t};\n\t\t}\n\t};\n\n\tfunction addSwing(noteMapTracks, swing, meterFraction, pickupLength) {\n\n\t\t// we can only swing in X/4 and X/8 meters.\n\t\tif (meterFraction.den != 4 && meterFraction.den != 8)\n\t\t\treturn;\n\n\t\tswing = parseFloat(swing);\n\n\t\t// 50 (or less) is no swing, \n\t\tif (isNaN(swing) || swing <= 50)\n\t\t\treturn;\n\n\t\t// 66 is triplet swing 2:1, and \n\t\t// 60 is swing with a ratio of 3:2. \n\t\t// 75 is the maximum swing where the first eight is played as a dotted eight and the second as a sixteenth. \n\t\tif (swing > 75)\n\t\t\tswing = 75;\n\n\t\t// convert the swing percentage to a percentage of increase for the first half of the beat\n\t\tswing = swing/50 - 1;\n\n\t\t// The volume of the swung notes is increased by this factor\n\t\t// could be also in the settings. Try out values such 0.1, 0.2\n\t\tvar volumeIncrease = 0.0;\n\n\t\t// the beatLength in X/8 meters\n\t\tvar beatLength = 0.25; \n\n\t\t// in X/8 meters the 16s swing so the beatLength is halved\n\t\tif (meterFraction.den === 8) \n\t\t\tbeatLength = beatLength/2; \n\n\t\t// duration of a half beat\n\t\tvar halfbeatLength = beatLength/2;\n\n\t\t// the extra duration of the first swung notes and the delay of the second notes\n\t\tvar swingDuration = halfbeatLength * swing;\n\n\t\tfor (var t = 0; t < noteMapTracks.length; t++) {\n\t\t\tvar track = noteMapTracks[t];\n\t\t\tfor (var i = 0; i < track.length; i++) {\n\t\t\t\tvar event = track[i];\n\t\t\t\tif (\n\t\t\t\t\t// is halfbeat\n\t\t\t\t\t(event.start-pickupLength) % halfbeatLength == 0 && (event.start-pickupLength) % beatLength != 0 \n\t\t\t\t\t&& (\n\t\t\t\t\t\t// the previous note is on the beat or before OR there is no previous note \n\t\t\t\t\t\ti == 0 \n\t\t\t\t\t\t|| track[i-1].start <= track[i].start - halfbeatLength\n\t\t\t\t\t)\n\t\t\t\t\t&& (\n\t\t\t\t\t\t// the next note is on the beat or after OR there is no next note\n\t\t\t\t\t\ti == track.length - 1 \n\t\t\t\t\t\t|| track[i+1].start >= track[i].start + halfbeatLength\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tvar oldEventStart = event.start;\n\n\t\t\t\t\tevent.start += swingDuration;\n\n\t\t\t\t\t// Increase volume of swung notes\n\t\t\t\t\tevent.volume *= 1 + volumeIncrease;\n\n\t\t\t\t\t// if there is a previous note ending at the start of this note, extend its end\n\t\t\t\t\t// and decrease its volume\n\t\t\t\t\tif (i > 0 && track[i-1].end == oldEventStart) {\n\t\t\t\t\t\ttrack[i-1].end = event.start;\n\t\t\t\t\t\ttrack[i-1].volume *= 1 - volumeIncrease;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n}\n\nmodule.exports = CreateSynth;\n","var downloadBuffer = function(buffer) {\n\treturn window.URL.createObjectURL(bufferToWave(buffer.audioBuffers));\n};\n\n// Convert an AudioBuffer to a Blob using WAVE representation\nfunction bufferToWave(audioBuffers) {\n\tvar audioBuffer = audioBuffers[0];\n\tvar numOfChan = audioBuffer.numberOfChannels;\n\tvar length = audioBuffer.length * numOfChan * 2 + 44;\n\tvar buffer = new ArrayBuffer(length);\n\tvar view = new DataView(buffer);\n\tvar channels = [];\n\tvar i;\n\tvar sample;\n\tvar offset = 0;\n\tvar pos = 0;\n\n\t// write WAVE header\n\tsetUint32(0x46464952); // \"RIFF\"\n\tsetUint32(length - 8); // file length - 8\n\tsetUint32(0x45564157); // \"WAVE\"\n\n\tsetUint32(0x20746d66); // \"fmt \" chunk\n\tsetUint32(16); // length = 16\n\tsetUint16(1); // PCM (uncompressed)\n\tsetUint16(numOfChan);\n\tsetUint32(audioBuffer.sampleRate);\n\tsetUint32(audioBuffer.sampleRate * 2 * numOfChan); // avg. bytes/sec\n\tsetUint16(numOfChan * 2); // block-align\n\tsetUint16(16); // 16-bit (hardcoded in this demo)\n\n\tsetUint32(0x61746164); // \"data\" - chunk\n\tsetUint32(length - pos - 4); // chunk length\n\n\t// write interleaved data\n\tfor(i = 0; i < numOfChan; i++)\n\t\tchannels.push(audioBuffer.getChannelData(i));\n\n\twhile(pos < length) {\n\t\tfor(i = 0; i < channels.length; i++) { // interleave channels\n\t\t\tsample = Math.max(-1, Math.min(1, channels[i][offset])); // clamp\n\t\t\tsample = (0.5 + sample < 0 ? sample * 32768 : sample * 32767)|0; // scale to 16-bit signed int\n\t\t\tview.setInt16(pos, sample, true); // write 16-bit sample\n\t\t\tpos += 2;\n\t\t}\n\t\toffset++; // next source sample\n\t}\n\n\t// create Blob\n\treturn new Blob([buffer], {type: \"audio/wav\"});\n\n\tfunction setUint16(data) {\n\t\tview.setUint16(pos, data, true);\n\t\tpos += 2;\n\t}\n\n\tfunction setUint32(data) {\n\t\tview.setUint32(pos, data, true);\n\t\tpos += 4;\n\t}\n}\n\nmodule.exports = downloadBuffer;\n","var tunebook = require('../api/abc_tunebook');\nvar midiCreate = require('../midi/abc_midi_create');\n\nvar getMidiFile = function(source, options) {\n\tvar params = {};\n\tif (options) {\n\t\tfor (var key in options) {\n\t\t\tif (options.hasOwnProperty(key)) {\n\t\t\t\tparams[key] = options[key];\n\t\t\t}\n\t\t}\n\t}\n\tparams.generateInline = false;\n\n\tfunction callback(div, tune, index) {\n\t\tvar downloadMidi = midiCreate(tune, params);\n\t\tswitch (params.midiOutputType) {\n\t\t\tcase \"encoded\":\n\t\t\t\treturn downloadMidi;\n\t\t\tcase \"binary\":\n\t\t\t\tvar decoded = downloadMidi.replace(\"data:audio/midi,\", \"\");\n\t\t\t\tdecoded = decoded.replace(/MThd/g,\"%4d%54%68%64\");\n\t\t\t\tdecoded = decoded.replace(/MTrk/g,\"%4d%54%72%6b\");\n\t\t\t\tvar buffer = new ArrayBuffer(decoded.length/3);\n\t\t\t\tvar output = new Uint8Array(buffer);\n\t\t\t\tfor (var i = 0; i < decoded.length/3; i++) {\n\t\t\t\t\tvar p = i*3+1;\n\t\t\t\t\tvar d = parseInt(decoded.substring(p, p+2), 16);\n\t\t\t\t\toutput[i] = d;\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\tcase \"link\":\n\t\t\tdefault:\n\t\t\t\treturn generateMidiDownloadLink(tune, params, downloadMidi, index);\n\t\t}\n\t}\n\n\tif (typeof source === \"string\")\n\t\treturn tunebook.renderEngine(callback, \"*\", source, params);\n\telse\n\t\treturn callback(null, source, 0);\n};\n\nfunction isFunction(functionToCheck) {\n\tvar getType = {};\n\treturn functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\nvar generateMidiDownloadLink = function(tune, midiParams, midi, index) {\n\tvar divClasses = ['abcjs-download-midi', 'abcjs-midi-' + index]\n\tif (midiParams.downloadClass)\n\t\tdivClasses.push(midiParams.downloadClass)\n\tvar html = '
';\n\tif (midiParams.preTextDownload)\n\t\thtml += midiParams.preTextDownload;\n\tvar title = tune.metaText && tune.metaText.title ? tune.metaText.title : 'Untitled';\n\tvar label;\n\tif (midiParams.downloadLabel && isFunction(midiParams.downloadLabel))\n\t\tlabel = midiParams.downloadLabel(tune, index);\n\telse if (midiParams.downloadLabel)\n\t\tlabel = midiParams.downloadLabel.replace(/%T/, title);\n\telse\n\t\tlabel = \"Download MIDI for \\\"\" + title + \"\\\"\";\n\ttitle = title.toLowerCase().replace(/'/g, '').replace(/\\W/g, '_').replace(/__/g, '_');\n\tvar filename = (midiParams.fileName) ? midiParams.fileName : title + '.midi';\n\thtml += '' + label + '';\n\tif (midiParams.postTextDownload)\n\t\thtml += midiParams.postTextDownload;\n\treturn html + \"
\";\n};\n\n\nmodule.exports = getMidiFile;\n","var svg = `\n\n \n\n`\n\nmodule.exports = svg\n","var svg = `\n\n\t\n\t\n\t\n\t\n\n`\n\nmodule.exports = svg\n","var svg = `\n\n \n \n \n \n\n`\n\nmodule.exports = svg\n","var svg = `\n\n \n \n \n\n`\n\nmodule.exports = svg\n","var svg = `\n\n \n \n \n \n\n`\n\nmodule.exports = svg\n","var instrumentIndexToName = [\n\t\"acoustic_grand_piano\",\n\t\"bright_acoustic_piano\",\n\t\"electric_grand_piano\",\n\t\"honkytonk_piano\",\n\t\"electric_piano_1\",\n\t\"electric_piano_2\",\n\t\"harpsichord\",\n\t\"clavinet\",\n\n\t\"celesta\",\n\t\"glockenspiel\",\n\t\"music_box\",\n\t\"vibraphone\",\n\t\"marimba\",\n\t\"xylophone\",\n\t\"tubular_bells\",\n\t\"dulcimer\",\n\n\t\"drawbar_organ\",\n\t\"percussive_organ\",\n\t\"rock_organ\",\n\t\"church_organ\",\n\t\"reed_organ\",\n\t\"accordion\",\n\t\"harmonica\",\n\t\"tango_accordion\",\n\n\t\"acoustic_guitar_nylon\",\n\t\"acoustic_guitar_steel\",\n\t\"electric_guitar_jazz\",\n\t\"electric_guitar_clean\",\n\t\"electric_guitar_muted\",\n\t\"overdriven_guitar\",\n\t\"distortion_guitar\",\n\t\"guitar_harmonics\",\n\n\t\"acoustic_bass\",\n\t\"electric_bass_finger\",\n\t\"electric_bass_pick\",\n\t\"fretless_bass\",\n\t\"slap_bass_1\",\n\t\"slap_bass_2\",\n\t\"synth_bass_1\",\n\t\"synth_bass_2\",\n\n\t\"violin\",\n\t\"viola\",\n\t\"cello\",\n\t\"contrabass\",\n\t\"tremolo_strings\",\n\t\"pizzicato_strings\",\n\t\"orchestral_harp\",\n\t\"timpani\",\n\n\t\"string_ensemble_1\",\n\t\"string_ensemble_2\",\n\t\"synth_strings_1\",\n\t\"synth_strings_2\",\n\t\"choir_aahs\",\n\t\"voice_oohs\",\n\t\"synth_choir\",\n\t\"orchestra_hit\",\n\n\t\"trumpet\",\n\t\"trombone\",\n\t\"tuba\",\n\t\"muted_trumpet\",\n\t\"french_horn\",\n\t\"brass_section\",\n\t\"synth_brass_1\",\n\t\"synth_brass_2\",\n\n\t\"soprano_sax\",\n\t\"alto_sax\",\n\t\"tenor_sax\",\n\t\"baritone_sax\",\n\t\"oboe\",\n\t\"english_horn\",\n\t\"bassoon\",\n\t\"clarinet\",\n\n\t\"piccolo\",\n\t\"flute\",\n\t\"recorder\",\n\t\"pan_flute\",\n\t\"blown_bottle\",\n\t\"shakuhachi\",\n\t\"whistle\",\n\t\"ocarina\",\n\n\t\"lead_1_square\",\n\t\"lead_2_sawtooth\",\n\t\"lead_3_calliope\",\n\t\"lead_4_chiff\",\n\t\"lead_5_charang\",\n\t\"lead_6_voice\",\n\t\"lead_7_fifths\",\n\t\"lead_8_bass_lead\",\n\n\t\"pad_1_new_age\",\n\t\"pad_2_warm\",\n\t\"pad_3_polysynth\",\n\t\"pad_4_choir\",\n\t\"pad_5_bowed\",\n\t\"pad_6_metallic\",\n\t\"pad_7_halo\",\n\t\"pad_8_sweep\",\n\n\t\"fx_1_rain\",\n\t\"fx_2_soundtrack\",\n\t\"fx_3_crystal\",\n\t\"fx_4_atmosphere\",\n\t\"fx_5_brightness\",\n\t\"fx_6_goblins\",\n\t\"fx_7_echoes\",\n\t\"fx_8_scifi\",\n\n\t\"sitar\",\n\t\"banjo\",\n\t\"shamisen\",\n\t\"koto\",\n\t\"kalimba\",\n\t\"bagpipe\",\n\t\"fiddle\",\n\t\"shanai\",\n\n\t\"tinkle_bell\",\n\t\"agogo\",\n\t\"steel_drums\",\n\t\"woodblock\",\n\t\"taiko_drum\",\n\t\"melodic_tom\",\n\t\"synth_drum\",\n\t\"reverse_cymbal\",\n\n\t\"guitar_fret_noise\",\n\t\"breath_noise\",\n\t\"seashore\",\n\t\"bird_tweet\",\n\t\"telephone_ring\",\n\t\"helicopter\",\n\t\"applause\",\n\t\"gunshot\",\n\n\t\"percussion\"\n];\n\nmodule.exports = instrumentIndexToName;\n","// Load one mp3 file for one note.\n// url = the base url for the soundfont\n// instrument = the instrument name (e.g. \"acoustic_grand_piano\")\n// name = the pitch name (e.g. \"A3\")\nvar soundsCache = require(\"./sounds-cache\");\n\nvar getNote = function (url, instrument, name, audioContext) {\n\tif (!soundsCache[instrument]) soundsCache[instrument] = {};\n\tvar instrumentCache = soundsCache[instrument];\n\n\tif (!instrumentCache[name])\n\t\tinstrumentCache[name] = new Promise(function (resolve, reject) {\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\tlet noteUrl = url + instrument + \"-mp3/\" + name + \".mp3\";\n\t\t\txhr.open(\"GET\", noteUrl, true);\n\t\t\txhr.responseType = \"arraybuffer\";\n\t\t\txhr.onload = function () {\n\t\t\t\tif (xhr.status !== 200) {\n\t\t\t\t\treject(Error(\"Can't load sound at \" + noteUrl + ' status=' + xhr.status));\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tvar noteDecoded = function(audioBuffer) {\n\t\t\t\t\tresolve({instrument: instrument, name: name, status: \"loaded\", audioBuffer: audioBuffer})\n\t\t\t\t}\n\t\t\t\tvar maybePromise = audioContext.decodeAudioData(xhr.response, noteDecoded, function () {\n\t\t\t\t\treject(Error(\"Can't decode sound at \" + noteUrl));\n\t\t\t\t});\n\t\t\t\t// In older browsers `BaseAudioContext.decodeAudio()` did not return a promise\n\t\t\t\tif (maybePromise && typeof maybePromise.catch === \"function\") maybePromise.catch(reject);\n\t\t\t};\n\t\t\txhr.onerror = function () {\n\t\t\t\treject(Error(\"Can't load sound at \" + noteUrl));\n\t\t\t};\n\t\t\txhr.send();\n\t\t})\n\t\t\t.catch(err => {\n\t\t\t\tconsole.error(\"Didn't load note\", instrument, name, \":\", err.message);\n\t\t\t\tthrow err;\n\t\t\t});\n\n\treturn instrumentCache[name];\n};\n\nmodule.exports = getNote;\n","var accidentals = {\n\t\"__\": -2,\n\t\"_\": -1,\n\t\"_/\": -0.5,\n\t\"=\": 0,\n\t\"\": 0,\n\t\"^/\": 0.5,\n\t\"^\": 1,\n\t\"^^\": 2\n}\n\nvar notesInOrder = ['C', '-', 'D', '-', 'E', 'F', '-', 'G', '-', 'A', '-', 'B', 'c', '-', 'd', '-', 'e', 'f', '-', 'g', '-', 'a', '-', 'b']\n\nfunction noteToMidi(note) {\n\tvar reg = note.match(/([_^\\/]*)([ABCDEFGabcdefg])(,*)('*)/)\n\tif (reg && reg.length === 5) {\n\t\tvar acc = accidentals[reg[1]]\n\t\tvar pitch = notesInOrder.indexOf(reg[2])\n\t\tvar octave = reg[4].length - reg[3].length\n\t\treturn 48 + pitch + acc + octave * 12;\n\t}\n\treturn 0;\n}\n\nfunction midiToNote(midi) {\n\tmidi = parseInt(midi, 10) // TODO-PER: not sure how to handle quarter sharps and flats, so strip them for now.\n\tvar octave = Math.floor(midi / 12)\n\tvar pitch = midi % 12\n\tvar name = notesInOrder[pitch]\n\tif (name === '-') {\n\t\tname = '^' + notesInOrder[pitch-1]\n\t}\n\t\n\tif (octave > 4) {\n\t\tname = name.toLowerCase()\n\t\toctave -= 5\n\t\twhile (octave > 0) {\n\t\t\tname += \"'\"\n\t\t\toctave--\n\t\t}\n\t} else {\n\t\twhile (octave < 4) {\n\t\t\tname += ','\n\t\t\toctave++\n\t\t}\n\t}\t\n\treturn name\n}\n\nmodule.exports = {noteToMidi: noteToMidi, midiToNote: midiToNote};\n","var pitchToNoteName = {\n\t21: 'A0',\n\t22: 'Bb0',\n\t23: 'B0',\n\t24: 'C1',\n\t25: 'Db1',\n\t26: 'D1',\n\t27: 'Eb1',\n\t28: 'E1',\n\t29: 'F1',\n\t30: 'Gb1',\n\t31: 'G1',\n\t32: 'Ab1',\n\t33: 'A1',\n\t34: 'Bb1',\n\t35: 'B1',\n\t36: 'C2',\n\t37: 'Db2',\n\t38: 'D2',\n\t39: 'Eb2',\n\t40: 'E2',\n\t41: 'F2',\n\t42: 'Gb2',\n\t43: 'G2',\n\t44: 'Ab2',\n\t45: 'A2',\n\t46: 'Bb2',\n\t47: 'B2',\n\t48: 'C3',\n\t49: 'Db3',\n\t50: 'D3',\n\t51: 'Eb3',\n\t52: 'E3',\n\t53: 'F3',\n\t54: 'Gb3',\n\t55: 'G3',\n\t56: 'Ab3',\n\t57: 'A3',\n\t58: 'Bb3',\n\t59: 'B3',\n\t60: 'C4',\n\t61: 'Db4',\n\t62: 'D4',\n\t63: 'Eb4',\n\t64: 'E4',\n\t65: 'F4',\n\t66: 'Gb4',\n\t67: 'G4',\n\t68: 'Ab4',\n\t69: 'A4',\n\t70: 'Bb4',\n\t71: 'B4',\n\t72: 'C5',\n\t73: 'Db5',\n\t74: 'D5',\n\t75: 'Eb5',\n\t76: 'E5',\n\t77: 'F5',\n\t78: 'Gb5',\n\t79: 'G5',\n\t80: 'Ab5',\n\t81: 'A5',\n\t82: 'Bb5',\n\t83: 'B5',\n\t84: 'C6',\n\t85: 'Db6',\n\t86: 'D6',\n\t87: 'Eb6',\n\t88: 'E6',\n\t89: 'F6',\n\t90: 'Gb6',\n\t91: 'G6',\n\t92: 'Ab6',\n\t93: 'A6',\n\t94: 'Bb6',\n\t95: 'B6',\n\t96: 'C7',\n\t97: 'Db7',\n\t98: 'D7',\n\t99: 'Eb7',\n\t100: 'E7',\n\t101: 'F7',\n\t102: 'Gb7',\n\t103: 'G7',\n\t104: 'Ab7',\n\t105: 'A7',\n\t106: 'Bb7',\n\t107: 'B7',\n\t108: 'C8',\n\t109: 'Db8',\n\t110: 'D8',\n\t111: 'Eb8',\n\t112: 'E8',\n\t113: 'F8',\n\t114: 'Gb8',\n\t115: 'G8',\n\t116: 'Ab8',\n\t117: 'A8',\n\t118: 'Bb8',\n\t119: 'B8',\n\t120: 'C9',\n\t121: 'Db9'\n};\n\nmodule.exports = pitchToNoteName;\n","var pitchMap = {\n\tf0: \"_C\",\n\tn0: \"=C\",\n\ts0: \"^C\",\n\tx0: \"C\",\n\tf1: \"_D\",\n\tn1: \"=D\",\n\ts1: \"^D\",\n\tx1: \"D\",\n\tf2: \"_E\",\n\tn2: \"=E\",\n\ts2: \"^E\",\n\tx2: \"E\",\n\tf3: \"_F\",\n\tn3: \"=F\",\n\ts3: \"^F\",\n\tx3: \"F\",\n\tf4: \"_G\",\n\tn4: \"=G\",\n\ts4: \"^G\",\n\tx4: \"G\",\n\tf5: \"_A\",\n\tn5: \"=A\",\n\ts5: \"^A\",\n\tx5: \"A\",\n\tf6: \"_B\",\n\tn6: \"=B\",\n\ts6: \"^B\",\n\tx6: \"B\",\n\tf7: \"_c\",\n\tn7: \"=c\",\n\ts7: \"^c\",\n\tx7: \"c\",\n\tf8: \"_d\",\n\tn8: \"=d\",\n\ts8: \"^d\",\n\tx8: \"d\",\n\tf9: \"_e\",\n\tn9: \"=e\",\n\ts9: \"^e\",\n\tx9: \"e\",\n\tf10: \"_f\",\n\tn10: \"=f\",\n\ts10: \"^f\",\n\tx10: \"f\",\n\tf11: \"_g\",\n\tn11: \"=g\",\n\ts11: \"^g\",\n\tx11: \"g\",\n\tf12: \"_a\",\n\tn12: \"=a\",\n\ts12: \"^a\",\n\tx12: \"a\",\n\tf13: \"_b\",\n\tn13: \"=b\",\n\ts13: \"^b\",\n\tx13: \"b\",\n\tf14: \"_c'\",\n\tn14: \"=c'\",\n\ts14: \"^c'\",\n\tx14: \"c'\",\n\tf15: \"_d'\",\n\tn15: \"=d'\",\n\ts15: \"^d'\",\n\tx15: \"d'\",\n\tf16: \"_e'\",\n\tn16: \"=e'\",\n\ts16: \"^e'\",\n\tx16: \"e'\",\n}\n\nfunction pitchesToPerc(pitchObj) {\n\tvar pitch = (pitchObj.accidental ? pitchObj.accidental[0] : 'x') + pitchObj.verticalPos;\n\treturn pitchMap[pitch];\n}\nmodule.exports = pitchesToPerc;\n","var soundsCache = require('./sounds-cache');\nvar pitchToNoteName = require('./pitch-to-note-name');\nvar centsToFactor = require(\"./cents-to-factor\");\n\nfunction placeNote(outputAudioBuffer, sampleRate, sound, startArray, volumeMultiplier, ofsMs, fadeTimeSec, noteEndSec, debugCallback) {\n\t// sound contains { instrument, pitch, volume, len, pan, tempoMultiplier\n\t// len is in whole notes. Multiply by tempoMultiplier to get seconds.\n\t// ofsMs is an offset to subtract from the note to line up programs that have different length onsets.\n\tvar OfflineAC = window.OfflineAudioContext ||\n\t\twindow.webkitOfflineAudioContext;\n\n\tvar len = sound.len * sound.tempoMultiplier;\n\tif (ofsMs)\n\t\tlen +=ofsMs/1000;\n\tlen -= noteEndSec;\n\tif (len < 0)\n\t\tlen = 0.005; // Have some small audible length no matter how short the note is.\n\tvar offlineCtx = new OfflineAC(2,Math.floor((len+fadeTimeSec)*sampleRate),sampleRate);\n\tvar noteName = pitchToNoteName[sound.pitch];\n\tif (!soundsCache[sound.instrument]) {\n\t\t// It shouldn't happen that the entire instrument cache wasn't created, but this has been seen in practice, so guard against it.\n\t\tif (debugCallback)\n\t\t\tdebugCallback('placeNote skipped (instrument empty): '+sound.instrument+':'+noteName)\n\t\treturn Promise.resolve();\n\t}\n\tvar noteBufferPromise = soundsCache[sound.instrument][noteName];\n\n\tif (!noteBufferPromise) {\n\t\t// if the note isn't present then just skip it - it will leave a blank spot in the audio.\n\t\tif (debugCallback)\n\t\t\tdebugCallback('placeNote skipped: '+sound.instrument+':'+noteName)\n\t\treturn Promise.resolve();\n\t}\n\n\treturn noteBufferPromise\n\t\t.then(function (response) {\n\t\t\t// create audio buffer\n\t\t\tvar source = offlineCtx.createBufferSource();\n\t\t\tsource.buffer = response.audioBuffer;\n\n\t\t\t// add gain\n\t\t\t// volume can be between 1 to 127. This translation to gain is just trial and error.\n\t\t\t// The smaller the first number, the more dynamic range between the quietest to loudest.\n\t\t\t// The larger the second number, the louder it will be in general.\n\t\t\tvar volume = (sound.volume / 96) * volumeMultiplier;\n\t\t\tsource.gainNode = offlineCtx.createGain();\n\n\t\t\t// add pan if supported and present\n\t\t\tif (sound.pan && offlineCtx.createStereoPanner) {\n\t\t\t\tsource.panNode = offlineCtx.createStereoPanner();\n\t\t\t\tsource.panNode.pan.setValueAtTime(sound.pan, 0);\n\t\t\t}\n\t\t\tsource.gainNode.gain.value = volume; // Math.min(2, Math.max(0, volume));\n\t\t\tsource.gainNode.gain.linearRampToValueAtTime(source.gainNode.gain.value, len);\n\t\t\tsource.gainNode.gain.linearRampToValueAtTime(0.0, len + fadeTimeSec);\n\n\t\t\tif (sound.cents) {\n\t\t\t\tsource.playbackRate.value = centsToFactor(sound.cents);\n\t\t\t}\n\n\t\t\t// connect all the nodes\n\t\t\tif (source.panNode) {\n\t\t\t\tsource.panNode.connect(offlineCtx.destination);\n\t\t\t\tsource.gainNode.connect(source.panNode);\n\t\t\t} else {\n\t\t\t\tsource.gainNode.connect(offlineCtx.destination);\n\t\t\t}\n\t\t\tsource.connect(source.gainNode);\n\n\t\t\t// Do the process of creating the sound and placing it in the buffer\n\t\t\tsource.start(0);\n\n\t\t\tif (source.noteOff) {\n\t\t\t\tsource.noteOff(len + fadeTimeSec);\n\t\t\t} else {\n\t\t\t\tsource.stop(len + fadeTimeSec);\n\t\t\t}\n\t\t\tvar fnResolve;\n\t\t\tofflineCtx.oncomplete = function(e) {\n\t\t\t\tif (e.renderedBuffer && e.renderedBuffer.getChannelData) { // If the system gets overloaded or there are network problems then this can start failing. Just drop the note if so.\n\t\t\t\t\tfor (var i = 0; i < startArray.length; i++) {\n\t\t\t\t\t\t//Math.floor(startArray[i] * sound.tempoMultiplier * sampleRate)\n\t\t\t\t\t\tvar start = startArray[i] * sound.tempoMultiplier;\n\t\t\t\t\t\tif (ofsMs)\n\t\t\t\t\t\t\tstart -=ofsMs/1000;\n\t\t\t\t\t\tif (start < 0)\n\t\t\t\t\t\t\tstart = 0; // If the item that is moved back is at the very beginning of the buffer then don't move it back. To do that would be to push everything else forward. TODO-PER: this should probably be done at some point but then it would change timing in existing apps.\n\t\t\t\t\t\tstart = Math.floor(start*sampleRate);\n\t\t\t\t\t\tcopyToChannel(outputAudioBuffer, e.renderedBuffer, start);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (debugCallback)\n\t\t\t\t\tdebugCallback('placeNote: '+sound.instrument+':'+noteName)\n\t\t\t\tfnResolve();\n\t\t\t};\n\t\t\tofflineCtx.startRendering();\n\t\t\treturn new Promise(function(resolve) {\n\t\t\t\tfnResolve = resolve;\n\t\t\t});\n\t\t})\n\t\t.catch(function (error) {\n\t\t\tif (debugCallback)\n\t\t\t\tdebugCallback('placeNote catch: '+error.message)\n\t\t\treturn Promise.resolve()\n\t\t});\n}\n\nvar copyToChannel = function(toBuffer, fromBuffer, start) {\n\tfor (var ch = 0; ch < 2; ch++) {\n\t\tvar fromData = fromBuffer.getChannelData(ch);\n\t\tvar toData = toBuffer.getChannelData(ch);\n\n\t\t// Mix the current note into the existing track\n\t\tfor (var n = 0; n < fromData.length; n++) {\n\t\t\ttoData[n + start] += fromData[n];\n\t\t}\n\t}\n};\n\nmodule.exports = placeNote;\n","var SynthSequence = require('./synth-sequence');\nvar CreateSynth = require('./create-synth');\nvar activeAudioContext = require(\"./active-audio-context\");\n\nfunction playEvent(midiPitches, midiGracePitches, millisecondsPerMeasure, soundFontUrl, debugCallback) {\n\tvar sequence = new SynthSequence();\n\n\tfor (var i = 0; i < midiPitches.length; i++) {\n\t\tvar note = midiPitches[i];\n\t\tvar trackNum = sequence.addTrack();\n\t\tsequence.setInstrument(trackNum, note.instrument);\n\t\tif (i === 0 && midiGracePitches) {\n\t\t\tfor (var j = 0; j < midiGracePitches.length; j++) {\n\t\t\t\tvar grace = midiGracePitches[j];\n\t\t\t\tsequence.appendNote(trackNum, grace.pitch, 1 / 64, grace.volume, grace.cents);\n\t\t\t}\n\t\t}\n\t\tsequence.appendNote(trackNum, note.pitch, note.duration, note.volume, note.cents);\n\t}\n\n\tvar ac = activeAudioContext();\n\tif (ac.state === \"suspended\") {\n\t\treturn ac.resume().then(function () {\n\t\t\treturn doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback);\n\t\t});\n\t} else {\n\t\treturn doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback);\n\t}\n}\n\nfunction doPlay(sequence, millisecondsPerMeasure, soundFontUrl, debugCallback) {\n\tvar buffer = new CreateSynth();\n\treturn buffer.init({\n\t\tsequence: sequence,\n\t\tmillisecondsPerMeasure: millisecondsPerMeasure,\n\t\toptions: { soundFontUrl: soundFontUrl },\n\t\tdebugCallback: debugCallback,\n\t}).then(function () {\n\t\treturn buffer.prime();\n\t}).then(function () {\n\t\tbuffer.start();\n\t\treturn Promise.resolve();\n\t});\n}\n\nmodule.exports = playEvent;\n","// Call this when it is safe for the abcjs to produce sound. This is after the first user gesture on the page.\n// If you call it with no parameters, then an AudioContext is created and stored.\n// If you call it with a parameter, that is used as an already created AudioContext.\n\nfunction registerAudioContext(ac) {\n\t// If one is passed in, that is the one to use even if there was already one created.\n\tif (ac)\n\t\twindow.abcjsAudioContext = ac;\n\telse {\n\t\t// no audio context passed in, so create it unless there is already one from before.\n\t\tif (!window.abcjsAudioContext) {\n\t\t\tvar AudioContext = window.AudioContext || window.webkitAudioContext;\n\t\t\tif (AudioContext)\n\t\t\t\twindow.abcjsAudioContext = new AudioContext();\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\treturn window.abcjsAudioContext.state !== \"suspended\";\n}\n\nmodule.exports = registerAudioContext;\n","var soundsCache = {\n};\n\nmodule.exports = soundsCache;\n","var activeAudioContext = require('./active-audio-context');\n\n//\n// Support for audio depends on three things: support for Promise, support for AudioContext, and support for AudioContext.resume.\n// Unfortunately, AudioContext.resume cannot be detected unless an AudioContext is created, and creating an AudioContext can't\n// be done until a user click, so there is no way to know for sure if audio is supported until the user tries.\n// We can get close, though - we can test for Promises and AudioContext - there are just a few evergreen browsers that supported\n// that before supporting resume, so we'll test what we can.\n\n// The best use of this routine is to call it before doing any audio related stuff to decide whether to bother.\n// But then, call it again after a user interaction to test for resume.\n\nfunction supportsAudio() {\n\tif (!window.Promise)\n\t\treturn false;\n\n\tif (!window.AudioContext &&\n\t\t!window.webkitAudioContext &&\n\t\t!navigator.mozAudioContext &&\n\t\t!navigator.msAudioContext)\n\t\treturn false;\n\n\tvar aac = activeAudioContext();\n\tif (aac)\n\t\treturn aac.resume !== undefined;\n}\n\nmodule.exports = supportsAudio;\n","var CreateSynthControl = require('./create-synth-control');\nvar CreateSynth = require('./create-synth');\nvar TimingCallbacks = require('../api/abc_timing_callbacks');\nvar activeAudioContext = require('./active-audio-context');\n\nfunction SynthController() {\n\tvar self = this;\n\tself.warp = 100;\n\tself.cursorControl = null;\n\tself.visualObj = null;\n\tself.timer = null;\n\tself.midiBuffer = null;\n\tself.options = null;\n\tself.currentTempo = null;\n\tself.control = null;\n\tself.isLooping = false;\n\tself.isStarted = false;\n\tself.isLoaded = false;\n\tself.isLoading = false;\n\n\tself.load = function (selector, cursorControl, visualOptions) {\n\t\tif (!visualOptions)\n\t\t\tvisualOptions = {};\n\t\tif (visualOptions.displayPlay === undefined)\n\t\t\tvisualOptions.displayPlay = true\n\t\tif (visualOptions.displayProgress === undefined)\n\t\t\tvisualOptions.displayProgress = true\n\t\tself.control = new CreateSynthControl(selector, {\n\t\t\tloopHandler: visualOptions.displayLoop ? self.toggleLoop : undefined,\n\t\t\trestartHandler: visualOptions.displayRestart ? self.restart : undefined,\n\t\t\tplayPromiseHandler: visualOptions.displayPlay ? self.play : undefined,\n\t\t\tprogressHandler: visualOptions.displayProgress ? self.randomAccess : undefined,\n\t\t\twarpHandler: visualOptions.displayWarp ? self.onWarp : undefined,\n\t\t\tafterResume: self.init\n\t\t});\n\t\tself.cursorControl = cursorControl;\n\t\tself.disable(true);\n\t};\n\n\tself.disable = function(isDisabled) {\n\t\tif (self.control)\n\t\t\tself.control.disable(isDisabled);\n\t};\n\n\tself.setTune = function(visualObj, userAction, audioParams) {\n\t\tself.visualObj = visualObj;\n\t\tself.disable(false);\n\t\tself.options = audioParams ? audioParams : {};\n\n\t\tif (self.control) {\n\t\t\tself.pause();\n\t\t\tself.setProgress(0, 1);\n\t\t\tself.control.resetAll();\n\t\t\tself.restart();\n\t\t\tself.isStarted = false;\n\t\t}\n\t\tself.isLooping = false;\n\n\t\tif (userAction)\n\t\t\treturn self.go();\n\t\telse {\n\t\t\treturn Promise.resolve({status: \"no-audio-context\"});\n\t\t}\n\t};\n\n\tself.go = function () {\n\t\tself.isLoading = true;\n\t\tvar millisecondsPerMeasure = self.visualObj.millisecondsPerMeasure() * 100 / self.warp;\n\t\tself.currentTempo = Math.round(self.visualObj.getBeatsPerMeasure() / millisecondsPerMeasure * 60000);\n\t\tif (self.control)\n\t\t\tself.control.setTempo(self.currentTempo);\n\t\tself.percent = 0;\n\t\tvar loadingResponse;\n\n\t\tif (!self.midiBuffer)\n\t\t\tself.midiBuffer = new CreateSynth();\n\t\treturn activeAudioContext().resume().then(function (response) {\n\t\t\treturn self.midiBuffer.init({\n\t\t\t\tvisualObj: self.visualObj,\n\t\t\t\toptions: self.options,\n\t\t\t\tmillisecondsPerMeasure: millisecondsPerMeasure\n\t\t\t});\n\t\t}).then(function (response) {\n\t\t\tloadingResponse = response;\n\t\t\treturn self.midiBuffer.prime();\n\t\t}).then(function () {\n\t\t\tvar subdivisions = 16;\n\t\t\tif (self.cursorControl &&\n\t\t\t\tself.cursorControl.beatSubdivisions !== undefined &&\n\t\t\t\tparseInt(self.cursorControl.beatSubdivisions, 10) >= 1 &&\n\t\t\t\tparseInt(self.cursorControl.beatSubdivisions, 10) <= 64)\n\t\t\t\tsubdivisions = parseInt(self.cursorControl.beatSubdivisions, 10);\n\n\t\t\t// Need to create the TimingCallbacks after priming the midi so that the midi data is available for the callbacks.\n\t\t\tself.timer = new TimingCallbacks(self.visualObj, {\n\t\t\t\tbeatCallback: self.beatCallback,\n\t\t\t\teventCallback: self.eventCallback,\n\t\t\t\tlineEndCallback: self.lineEndCallback,\n\t\t\t\tqpm: self.currentTempo,\n\n\t\t\t\textraMeasuresAtBeginning: self.cursorControl ? self.cursorControl.extraMeasuresAtBeginning : undefined,\n\t\t\t\tlineEndAnticipation: self.cursorControl ? self.cursorControl.lineEndAnticipation : 0,\n\t\t\t\tbeatSubdivisions: subdivisions,\n\t\t\t});\n\t\t\tif (self.cursorControl && self.cursorControl.onReady && typeof self.cursorControl.onReady === 'function')\n\t\t\t\tself.cursorControl.onReady(self);\n\t\t\tself.isLoaded = true;\n\t\t\tself.isLoading = false;\n\t\t\treturn Promise.resolve({ status: \"created\", notesStatus: loadingResponse });\n\t\t});\n\t};\n\n\tself.destroy = function () {\n\t\tif (self.timer) {\n\t\t\tself.timer.reset();\n\t\t\tself.timer.stop();\n\t\t\tself.timer = null;\n\t\t}\n\t\tif (self.midiBuffer) {\n\t\t\tself.midiBuffer.stop();\n\t\t\tself.midiBuffer = null;\n\t\t}\n\t\tself.setProgress(0, 1);\n\t\tif (self.control)\n\t\t\tself.control.resetAll();\n\t};\n\n\tself.play = function () {\n\t\treturn self.runWhenReady(self._play, undefined);\n\t};\n\n\tfunction sleep(ms) {\n\t\treturn new Promise(function (resolve) {\n\t\t\tsetTimeout(resolve, ms)\n\t\t});\n\t}\n\n\tself.runWhenReady = function(fn, arg1) {\n\t\tif (!self.visualObj)\n\t\t\treturn Promise.resolve({status: \"loading\"});\n\t\tif (self.isLoading) {\n\t\t\t// Some other promise is waiting for the tune to be loaded, so just wait.\n\t\t\treturn sleep(500).then(function() {\n\t\t\t\tif (self.isLoading)\n\t\t\t\t\treturn self.runWhenReady(fn, arg1);\n\t\t\t\treturn fn(arg1);\n\t\t\t})\n\t\t} else if (!self.isLoaded) {\n\t\t\treturn self.go().then(function () {\n\t\t\t\treturn fn(arg1);\n\t\t\t});\n\t\t} else {\n\t\t\treturn fn(arg1);\n\t\t}\n\t};\n\n\tself._play = function () {\n\t\treturn activeAudioContext().resume().then(function () {\n\t\t\tself.isStarted = !self.isStarted;\n\t\t\tif (self.isStarted) {\n\t\t\t\tif (self.cursorControl && self.cursorControl.onStart && typeof self.cursorControl.onStart === 'function')\n\t\t\t\t\tself.cursorControl.onStart();\n\t\t\t\tself.midiBuffer.start();\n\t\t\t\tself.timer.start(self.percent);\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.pushPlay(true);\n\t\t\t} else {\n\t\t\t\tself.pause();\n\t\t\t}\n\t\t\treturn Promise.resolve({status: \"ok\"});\n\t\t})\n\t};\n\n\tself.pause = function() {\n\t\tif (self.timer) {\n\t\t\tself.timer.pause();\n\t\t\tself.midiBuffer.pause();\n\t\t\tif (self.control)\n\t\t\t\tself.control.pushPlay(false);\n\t\t}\n\t};\n\n\tself.toggleLoop = function () {\n\t\tself.isLooping = !self.isLooping;\n\t\tif (self.control)\n\t\t\tself.control.pushLoop(self.isLooping);\n\t};\n\n\tself.restart = function () {\n\t\tif (self.timer) {\n\t\t\tself.timer.setProgress(0);\n\t\t\tself.midiBuffer.seek(0);\n\t\t}\n\t};\n\n\tself.randomAccess = function (ev) {\n\t\treturn self.runWhenReady(self._randomAccess, ev);\n\t};\n\n\tself._randomAccess = function (ev) {\n\t\tvar background = (ev.target.classList.contains('abcjs-midi-progress-indicator')) ? ev.target.parentNode : ev.target;\n\t\tvar percent = (ev.x - background.getBoundingClientRect().left) / background.offsetWidth;\n\t\tif (percent < 0)\n\t\t\tpercent = 0;\n\t\tif (percent > 1)\n\t\t\tpercent = 1;\n\t\tself.seek(percent);\n\t\treturn Promise.resolve({status: \"ok\"});\n\t};\n\n\tself.seek = function (percent, units) {\n\t\tif (self.timer && self.midiBuffer) {\n\t\t\tself.timer.setProgress(percent, units);\n\t\t\tself.midiBuffer.seek(percent, units);\n\t\t}\n\t};\n\n\tself.setWarp = function (newWarp) {\n\t\tif (parseInt(newWarp, 10) > 0) {\n\t\t\tself.warp = parseInt(newWarp, 10);\n\t\t\tvar wasPlaying = self.isStarted;\n\t\t\tvar startPercent = self.percent;\n\t\t\tself.destroy();\n\t\t\tself.isStarted = false;\n\t\t\treturn self.go().then(function () {\n\t\t\t\tself.setProgress(startPercent, self.midiBuffer.duration * 1000);\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.setWarp(self.currentTempo, self.warp);\n\t\t\t\tif (wasPlaying) {\n\t\t\t\t\treturn self.play().then(function () {\n\t\t\t\t\t\tself.seek(startPercent);\n\t\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tself.seek(startPercent);\n\t\t\t\treturn Promise.resolve();\n\t\t\t});\n\t\t}\n\t\treturn Promise.resolve();\n\t};\n\n\tself.onWarp = function (ev) {\n\t\tvar newWarp = ev.target.value;\n\t\treturn self.setWarp(newWarp);\n\t};\n\n\tself.setProgress = function (percent, totalTime) {\n\t\tself.percent = percent;\n\t\tif (self.control)\n\t\t\tself.control.setProgress(percent, totalTime);\n\t};\n\n\tself.finished = function () {\n\t\tself.timer.reset();\n\t\tif (self.isLooping) {\n\t\t\tself.timer.start(0);\n\t\t\tself.midiBuffer.finished();\n\t\t\tself.midiBuffer.start();\n\t\t\treturn \"continue\";\n\t\t} else {\n\t\t\tself.timer.stop();\n\t\t\tif (self.isStarted) {\n\t\t\t\tif (self.control)\n\t\t\t\t\tself.control.pushPlay(false);\n\t\t\t\tself.isStarted = false;\n\t\t\t\tself.midiBuffer.finished();\n\t\t\t\tif (self.cursorControl && self.cursorControl.onFinished && typeof self.cursorControl.onFinished === 'function')\n\t\t\t\t\tself.cursorControl.onFinished();\n\t\t\t\tself.setProgress(0, 1);\n\t\t\t}\n\t\t}\n\t};\n\n\tself.beatCallback = function (beatNumber, totalBeats, totalTime, position) {\n\t\tvar percent = beatNumber / totalBeats;\n\t\tself.setProgress(percent, totalTime);\n\t\tif (self.cursorControl && self.cursorControl.onBeat && typeof self.cursorControl.onBeat === 'function')\n\t\t\tself.cursorControl.onBeat(beatNumber, totalBeats, totalTime, position);\n\t};\n\n\tself.eventCallback = function (event) {\n\t\tif (event) {\n\t\t\tif (self.cursorControl && self.cursorControl.onEvent && typeof self.cursorControl.onEvent === 'function')\n\t\t\t\tself.cursorControl.onEvent(event);\n\t\t} else {\n\t\t\treturn self.finished();\n\t\t}\n\t};\n\n\tself.lineEndCallback = function (lineEvent, leftEvent) {\n\t\tif (self.cursorControl && self.cursorControl.onLineEnd && typeof self.cursorControl.onLineEnd === 'function')\n\t\t\tself.cursorControl.onLineEnd(lineEvent, leftEvent);\n\t};\n\n\tself.getUrl = function () {\n\t\treturn self.midiBuffer.download();\n\t};\n\n\tself.download = function(fileName) {\n\t\tvar url = self.getUrl();\n\t\tvar link = document.createElement('a');\n\t\tdocument.body.appendChild(link);\n\t\tlink.setAttribute(\"style\",\"display: none;\");\n\t\tlink.href = url;\n\t\tlink.download = fileName ? fileName : 'output.wav';\n\t\tlink.click();\n\t\twindow.URL.revokeObjectURL(url);\n\t\tdocument.body.removeChild(link);\n\t};\n}\n\nmodule.exports = SynthController;\n","var SynthSequence = function() {\n\tvar self = this;\n\tself.tracks = [];\n\tself.totalDuration = 0;\n\tself.currentInstrument = [];\n\tself.starts = [];\n\n\tself.addTrack = function() {\n\t\tself.tracks.push([]);\n\t\tself.currentInstrument.push(0);\n\t\tself.starts.push(0);\n\t\treturn self.tracks.length - 1;\n\t};\n\n\tself.setInstrument = function(trackNumber, instrumentNumber) {\n\t\tself.tracks[trackNumber].push({\n\t\t\tchannel: 0,\n\t\t\tcmd: \"program\",\n\t\t\tinstrument: instrumentNumber\n\t\t});\n\t\tself.currentInstrument[trackNumber] = instrumentNumber;\n\t};\n\n\tself.appendNote = function(trackNumber, pitch, durationInMeasures, volume, cents) {\n\t\tvar note = {\n\t\t\tcmd: \"note\",\n\t\t\tduration: durationInMeasures,\n\t\t\tgap: 0,\n\t\t\tinstrument: self.currentInstrument[trackNumber],\n\t\t\tpitch: pitch,\n\t\t\tstart: self.starts[trackNumber],\n\t\t\tvolume: volume\n\t\t};\n\t\tif (cents)\n\t\t\tnote.cents = cents;\n\t\tself.tracks[trackNumber].push(note);\n\t\tself.starts[trackNumber] += durationInMeasures;\n\n\t\tself.totalDuration = Math.max(self.totalDuration, self.starts[trackNumber]);\n\t};\n};\n\nmodule.exports = SynthSequence;\n","/*\n * Tablature Plugins\n * tablature are defined dynamically and registered inside abcjs\n * by calling abcTablatures.register(plugin) \n * where plugin represents a plugin instance \n * \n */\n\n// This is the only entry point to the tablatures. It is called both after parsing a tune and just before engraving\n\nvar TabString = require('./instruments/tab-string');\n\n/* extend the table below when adding a new instrument plugin */\n\n// Existing tab classes \nvar pluginTab = {\n\t'violin': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'fiddle': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'mandolin': { name: 'StringTab', defaultTuning: ['G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: 0 },\n\t'guitar': { name: 'StringTab', defaultTuning: ['E,', 'A,', 'D', 'G', 'B', 'e'], isTabBig: true, tabSymbolOffset: 0 },\n\t'fiveString': { name: 'StringTab', defaultTuning: ['C,', 'G,', 'D', 'A', 'e'], isTabBig: false, tabSymbolOffset: -.95 },\n};\n\nvar abcTablatures = {\n\n\tinited: false,\n\tplugins: {},\n\n\n\t/**\n\t * to be called once per plugin for registration \n\t * @param {*} plugin \n\t */\n\tregister: function (plugin) {\n\t\tvar name = plugin.name;\n\t\tvar tablature = plugin.tablature;\n\t\tthis.plugins[name] = tablature;\n\t},\n\n\tsetError: function (tune, msg) {\n\t\tif (tune.warnings) {\n\t\t\ttune.warning.push(msg);\n\t\t} else {\n\t\t\ttune.warnings = [msg];\n\t\t}\n\t},\n\n\t/**\n\t * handle params for current processed score\n\t * @param {*} tune current tune \n\t * @param {*} tuneNumber number in tune list\n\t * @param {*} params params to be processed for tablature\n\t * @return prepared tablatures plugin instances for current tune\n\t */\n\tpreparePlugins: function (tune, tuneNumber, params) {\n\t\t// Called after parsing a tune and before engraving it\n\t\tif (!this.inited) {\n\t\t\t// TODO-PER: I don't think this is needed - the plugin array can be hard coded, right?\n\t\t\tthis.register(new TabString());\n\t\t\tthis.inited = true;\n\t\t}\n\t\tvar returned = null;\n\t\tvar nbPlugins = 0;\n\t\tif (params.tablature) {\n\t\t\t// validate requested plugins \n\t\t\tvar tabs = params.tablature;\n\t\t\treturned = [];\n\t\t\tfor (var ii = 0; ii < tabs.length; ii++) {\n\t\t\t\tvar args = tabs[ii];\n\t\t\t\tvar instrument = args['instrument'];\n\t\t\t\tif (instrument == null) {\n\t\t\t\t\tthis.setError(tune, \"tablature 'instrument' is missing\");\n\t\t\t\t\treturn returned;\n\t\t\t\t}\n\t\t\t\tvar tabName = pluginTab[instrument];\n\t\t\t\tvar plugin = null;\n\t\t\t\tif (tabName) {\n\t\t\t\t\tplugin = this.plugins[tabName.name];\n\t\t\t\t}\n\t\t\t\tif (plugin) {\n\t\t\t\t\tif (params.visualTranspose != 0) {\n\t\t\t\t\t\t// populate transposition request to tabs\n\t\t\t\t\t\targs.visualTranspose = params.visualTranspose;\n\t\t\t\t\t}\n\t\t\t\t\targs.abcSrc = params.tablature.abcSrc;\n\t\t\t\t\tvar pluginInstance = {\n\t\t\t\t\t\tclassz: plugin,\n\t\t\t\t\t\ttuneNumber: tuneNumber,\n\t\t\t\t\t\tparams: args,\n\t\t\t\t\t\tinstance: null,\n\t\t\t\t\t\ttabType: tabName,\n\t\t\t\t\t};\n\t\t\t\t\t// proceed with tab plugin init \n\t\t\t\t\t// plugin.init(tune, tuneNumber, args, ii);\n\t\t\t\t\treturned.push(pluginInstance);\n\t\t\t\t\tnbPlugins++;\n\t\t\t\t} else if (instrument === '') {\n\t\t\t\t\t// create a placeholder - there is no tab for this staff\n\t\t\t\t\treturned.push(null)\n\t\t\t\t} else {\n\t\t\t\t\t// unknown tab plugin \n\t\t\t\t\t//this.emit_error('Undefined tablature plugin: ' + tabName)\n\t\t\t\t\tthis.setError(tune, 'Undefined tablature plugin: ' + instrument);\n\t\t\t\t\treturn returned;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returned;\n\t},\n\n\t/**\n\t * Call requested plugin\n\t * @param {*} renderer \n\t * @param {*} abcTune \n\t */\n\tlayoutTablatures: function layoutTablatures(renderer, abcTune) {\n\t\tvar tabs = abcTune.tablatures;\n\n\t\t// chack tabs request for each staffs\n\t\tvar staffLineCount = 0;\n\n\t\t// Clear the suppression flag\n\t\tif (tabs && (tabs.length > 0)) {\n\t\t\tvar nTabs = tabs.length;\n\t\t\tfor (var kk = 0; kk < nTabs; ++kk) {\n\t\t\t\tif (tabs[kk] && tabs[kk].params.firstStaffOnly) {\n\t\t\t\t\ttabs[kk].params.suppress = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (var ii = 0; ii < abcTune.lines.length; ii++) {\n\t\t\tvar line = abcTune.lines[ii];\n\n\t\t\tif (line.staff) {\n\t\t\t\tstaffLineCount++;\n\t\t\t}\n\n\t\t\t// MAE 27Nov2023\n\t\t\t// If tab param \"firstStaffOnly\", remove the tab label after the first staff\n\t\t\tif (staffLineCount > 1) {\n\t\t\t\tif (tabs && (tabs.length > 0)) {\n\t\t\t\t\tvar nTabs = tabs.length;\n\t\t\t\t\tfor (var kk = 0; kk < nTabs; ++kk) {\n\t\t\t\t\t\tif (tabs[kk].params.firstStaffOnly) {\n\t\t\t\t\t\t\t// Set the staff draw suppression flag\n\t\t\t\t\t\t\ttabs[kk].params.suppress = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar curStaff = line.staff;\n\t\t\tif (curStaff) {\n\t\t\t\tvar maxStaves = curStaff.length\n\t\t\t\tfor (var jj = 0; jj < curStaff.length; jj++) {\n\n\t\t\t\t\tif (tabs[jj] && jj < maxStaves) {\n\t\t\t\t\t\t// tablature requested for staff\n\t\t\t\t\t\tvar tabPlugin = tabs[jj];\n\t\t\t\t\t\tif (tabPlugin.instance == null) {\n\t\t\t\t\t\t\t//console.log(\"★★★★ Tab Init line: \" + ii + \" staff: \" + jj)\n\t\t\t\t\t\t\ttabPlugin.instance = new tabPlugin.classz();\n\t\t\t\t\t\t\t// plugin.init(tune, tuneNumber, args, ii);\n\t\t\t\t\t\t\t// call initer first\n\t\t\t\t\t\t\ttabPlugin.instance.init(abcTune,\n\t\t\t\t\t\t\t\ttabPlugin.tuneNumber,\n\t\t\t\t\t\t\t\ttabPlugin.params,\n\t\t\t\t\t\t\t\ttabPlugin.tabType\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// render next\n\t\t\t\t\t\t//console.log(\"★★★★ Tab Render line: \" + ii + \" staff: \" + jj)\n\t\t\t\t\t\ttabPlugin.instance.render(renderer, line, jj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n};\n\n\nmodule.exports = abcTablatures;\n","const { noteToMidi } = require('../../synth/note-to-midi');\nvar TabNote = require('./tab-note');\nvar tabNotes = require('./tab-notes');\n\n\nfunction buildCapo(self) {\n\tvar capoTuning = null;\n\tvar tuning = self.tuning;\n\tif (self.capo > 0) {\n\t\tcapoTuning = [];\n\t\tfor (var iii = 0; iii < tuning.length; iii++) {\n\t\t\tvar curNote = new TabNote(tuning[iii]);\n\t\t\tfor (var jjj = 0; jjj < self.capo; jjj++) {\n\t\t\t\tcurNote = curNote.nextNote();\n\t\t\t}\n\t\t\tcapoTuning[iii] = curNote.emit();\n\t\t}\n\t}\n\treturn capoTuning;\n}\n\nfunction buildPatterns(self) {\n\tvar strings = [];\n\tvar tuning = self.tuning;\n\tif (self.capo > 0) {\n\t\ttuning = self.capoTuning;\n\t}\n\tvar pos = tuning.length - 1;\n\tfor (var iii = 0; iii < tuning.length; iii++) {\n\t\tvar nextNote = self.highestNote; // highest handled note\n\t\tif (iii != tuning.length - 1) {\n\t\t\tnextNote = tuning[iii + 1];\n\t\t}\n\t\tvar stringNotes = tabNotes(tuning[iii], nextNote);\n\t\tif (stringNotes.error) {\n\t\t\treturn stringNotes;\n\t\t}\n\t\tstrings[pos--] = stringNotes;\n\t}\n\treturn strings;\n}\n\n\nfunction buildSecond(first) {\n\tvar seconds = [];\n\tseconds[0] = [];\n\tvar strings = first.strings;\n\tfor (var iii = 1; iii < strings.length; iii++) {\n\t\tseconds[iii] = strings[iii - 1];\n\t}\n\treturn seconds;\n}\n\nfunction sameString(self, chord) {\n\tfor (var jjjj = 0; jjjj < chord.length - 1; jjjj++) {\n\t\tvar curPos = chord[jjjj];\n\t\tvar nextPos = chord[jjjj + 1];\n\t\tif (curPos.str == nextPos.str) {\n\t\t\t// same String\n\t\t\t// => change lower pos \n\t\t\tif (curPos.str == self.strings.length - 1) {\n\t\t\t\t// Invalid tab Chord position for instrument\n\t\t\t\tcurPos.num = \"?\";\n\t\t\t\tnextPos.num = \"?\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// change lower pitch on lowest string\n\t\t\tif (nextPos.num < curPos.num) {\n\t\t\t\tnextPos.str++;\n\t\t\t\tnextPos = noteToNumber(self,\n\t\t\t\t\tnextPos.note,\n\t\t\t\t\tnextPos.str,\n\t\t\t\t\tself.secondPos,\n\t\t\t\t\tself.strings[nextPos.str].length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcurPos.str++;\n\t\t\t\tcurPos = noteToNumber(self,\n\t\t\t\t\tcurPos.note,\n\t\t\t\t\tcurPos.str,\n\t\t\t\t\tself.secondPos,\n\t\t\t\t\tself.strings[curPos.str].length\n\t\t\t\t);\n\t\t\t}\n\t\t\t// update table\n\t\t\tchord[jjjj] = curPos;\n\t\t\tchord[jjjj + 1] = nextPos;\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction handleChordNotes(self, notes) {\n\tvar retNotes = [];\n\tfor (var iiii = 0; iiii < notes.length; iiii++) {\n\t\tif (notes[iiii].endTie)\n\t\t\tcontinue;\n\t\tvar note = new TabNote(notes[iiii].name, self.clefTranspose);\n\t\tnote.checkKeyAccidentals(self.accidentals, self.measureAccidentals)\n\t\tvar curPos = toNumber(self, note);\n\t\tretNotes.push(curPos);\n\t}\n\tsameString(self, retNotes);\n\treturn retNotes;\n}\n\nfunction noteToNumber(self, note, stringNumber, secondPosition, firstSize) {\n\tvar strings = self.strings;\n\tnote.checkKeyAccidentals(self.accidentals, self.measureAccidentals);\n\tif (secondPosition) {\n\t\tstrings = secondPosition;\n\t}\n\tvar noteName = note.emitNoAccidentals();\n\tvar num = strings[stringNumber].indexOf(noteName);\n\tvar acc = note.acc;\n\tif (num != -1) {\n\t\tif (secondPosition) {\n\t\t\tnum += firstSize;\n\t\t}\n\t\tif ((note.isFlat || note.acc == -1) && (num == 0)) {\n\t\t\t// flat on 0 pos => previous string 7th position\n\t\t\tvar noteEquiv = note.getAccidentalEquiv();\n\t\t\tstringNumber++;\n\t\t\tnum = strings[stringNumber].indexOf(noteEquiv.emit());\n\t\t\tacc = 0;\n\t\t}\n\t\treturn {\n\t\t\tnum: (num + acc),\n\t\t\tstr: stringNumber,\n\t\t\tnote: note\n\t\t};\n\t}\n\treturn null;\n}\n\nfunction toNumber(self, note) {\n\tif (note.isAltered || note.natural) {\n\t\tvar acc;\n\t\tif (note.isFlat) {\n\t\t\tif (note.isDouble)\n\t\t\t\tacc = \"__\"\n\t\t\telse\n\t\t\t\tacc = \"_\"\n\t\t} else if (note.isSharp) {\n\t\t\tif (note.isDouble)\n\t\t\t\tacc = \"^^\"\n\t\t\telse\n\t\t\t\tacc = \"^\"\n\t\t} else if (note.natural)\n\t\t\tacc = \"=\"\n\t\tself.measureAccidentals[note.name.toUpperCase()] = acc\n\t}\n\tfor (var i = self.stringPitches.length - 1; i >= 0; i--) {\n\t\tif (note.pitch + note.pitchAltered >= self.stringPitches[i]) {\n\t\t\tvar num = note.pitch + note.pitchAltered - self.stringPitches[i]\n\t\t\tif (note.quarter === '^') num -= 0.5\n\t\t\telse if (note.quarter === \"v\") num += 0.5\n\t\t\treturn {\n\t\t\t\tnum: Math.round(num),\n\t\t\t\tstr: self.stringPitches.length - 1 - i, // reverse the strings because string 0 is on the bottom\n\t\t\t\tnote: note\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tnum: \"?\",\n\t\tstr: self.stringPitches.length - 1,\n\t\tnote: note,\n\t};\n}\n\nStringPatterns.prototype.stringToPitch = function (stringNumber) {\n\tvar startingPitch = 5.3;\n\tvar bottom = this.strings.length - 1;\n\treturn startingPitch + ((bottom - stringNumber) * this.linePitch);\n};\n\nfunction invalidNumber(retNotes, note) {\n\tvar number = {\n\t\tnum: \"?\",\n\t\tstr: 0,\n\t\tnote: note\n\t};\n\tretNotes.push(number);\n\tretNotes.error = note.emit() + ': unexpected note for instrument';\n}\n\nStringPatterns.prototype.notesToNumber = function (notes, graces) {\n\tvar note;\n\tvar number;\n\tvar error = null;\n\tvar retNotes = null;\n\tif (notes) {\n\t\tretNotes = [];\n\t\tif (notes.length > 1) {\n\t\t\tretNotes = handleChordNotes(this, notes);\n\t\t\tif (retNotes.error) {\n\t\t\t\terror = retNotes.error;\n\t\t\t}\n\t\t} else {\n\t\t\tif (!notes[0].endTie) {\n\t\t\t\tnote = new TabNote(notes[0].name, this.clefTranspose);\n\t\t\t\tnote.checkKeyAccidentals(this.accidentals, this.measureAccidentals)\n\t\t\t\tnumber = toNumber(this, note);\n\t\t\t\tif (number) {\n\t\t\t\t\tretNotes.push(number);\n\t\t\t\t} else {\n\t\t\t\t\tinvalidNumber(retNotes, note);\n\t\t\t\t\terror = retNotes.error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (error) return retNotes;\n\tvar retGraces = null;\n\tif (graces) {\n\t\tretGraces = [];\n\t\tfor (var iiii = 0; iiii < graces.length; iiii++) {\n\t\t\tnote = new TabNote(graces[iiii].name, this.clefTranspose);\n\t\t\tnote.checkKeyAccidentals(this.accidentals, this.measureAccidentals)\n\t\t\tnumber = toNumber(this, note);\n\t\t\tif (number) {\n\t\t\t\tretGraces.push(number);\n\t\t\t} else {\n\t\t\t\tinvalidNumber(retGraces, note);\n\t\t\t\terror = retNotes.error;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tnotes: retNotes,\n\t\tgraces: retGraces,\n\t\terror: error\n\t};\n};\n\nStringPatterns.prototype.toString = function () {\n\tvar arr = []\n\tfor (var i = 0; i < this.tuning.length; i++) {\n\t\tvar str = this.tuning[i].replaceAll(',', '').replaceAll(\"'\", '').toUpperCase();\n\t\tif (str[0] === '_') str = str[1] + 'b '\n\t\telse if (str[0] === '^') str = str[1] + \"# \"\n\t\tarr.push(str)\n\t}\n\treturn arr.join('');\n};\n\nStringPatterns.prototype.tabInfos = function (plugin) {\n\tvar name = plugin.params.label;\n\tif (name) {\n\t\tvar tunePos = name.indexOf('%T');\n\t\tvar tuning = \"\";\n\t\tif (tunePos != -1) {\n\t\t\ttuning = this.toString();\n\t\t\tif (plugin.capo > 0) {\n\t\t\t\ttuning += ' capo:' + plugin.capo;\n\t\t\t}\n\t\t\tname = name.replace('%T', tuning);\n\t\t}\n\t\treturn name;\n\t}\n\treturn '';\n};\n\n// MAE 27 Nov 2023\nStringPatterns.prototype.suppress = function (plugin) {\n\tvar suppress = plugin.params.suppress;\n\tif (suppress) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n// MAE 27 Nov 2023 End\n\n/**\n * Common patterns for all string instruments\n * @param {} plugin\n * @param {} tuning\n * @param {*} capo\n * @param {*} highestNote \n */\nfunction StringPatterns(plugin) {\n\t//console.log(\"INIT StringPatterns constructor\")\n\tvar tuning = plugin.tuning;\n\tvar capo = plugin.capo;\n\tvar highestNote = plugin.params.highestNote;\n\tthis.linePitch = plugin.linePitch;\n\tthis.highestNote = \"a'\";\n\tif (highestNote) {\n\t\t// override default\n\t\tthis.highestNote = highestNote;\n\t}\n\tthis.measureAccidentals = {}\n\tthis.capo = 0;\n\tif (capo) {\n\t\tthis.capo = parseInt(capo, 10);\n\t}\n\tthis.transpose = plugin.transpose ? plugin.transpose : 0\n\tthis.tuning = tuning;\n\tthis.stringPitches = []\n\tfor (var i = 0; i < this.tuning.length; i++) {\n\t\tvar pitch = noteToMidi(this.tuning[i]) + this.capo\n\t\tthis.stringPitches.push(pitch)\n\t}\n\tif (this.capo > 0) {\n\t\tthis.capoTuning = buildCapo(this);\n\t}\n\tthis.strings = buildPatterns(this);\n\tif (this.strings.error) {\n\t\tplugin.setError(this.strings.error);\n\t\tplugin.inError = true;\n\t\treturn;\n\t}\n\t// second position pattern per string\n\tthis.secondPos = buildSecond(this);\n}\n\n\n\nmodule.exports = StringPatterns;","\n/**\n * Layout tablature informations for draw\n * @param {*} numLines \n * @param {*} lineSpace \n */\n\nfunction StringTablature(numLines, lineSpace) {\n\t//console.log(\"INIT StringTablature constructor\")\n\tthis.numLines = numLines;\n\tthis.lineSpace = lineSpace;\n\tthis.verticalSize = this.numLines * this.lineSpace;\n\tvar pitch = 3;\n\tthis.bar = {\n\t\tpitch: pitch,\n\t\tpitch2: lineSpace * numLines,\n\t\theight: 5,\n\t};\n}\n\n/**\n * return true if current line should not produce a tab\n * @param {} line \n */\nStringTablature.prototype.bypass = function (line) {\n\t//console.log(\"RENDER StringTablature bypass\")\n\tvar voices = line.staffGroup.voices;\n\tif (voices.length > 0) {\n\t\tif (voices[0].isPercussion) return true;\n\t}\n\treturn false;\n};\n\n\nStringTablature.prototype.setRelative = function (child, relative, first) {\n\t//console.log(\"RENDER StringTablature setRelative\")\n\tswitch (child.type) {\n\t\tcase 'bar':\n\t\t\trelative.pitch = this.bar.pitch;\n\t\t\trelative.pitch2 = this.bar.pitch2;\n\t\t\trelative.height = this.height;\n\t\t\tbreak;\n\t\tcase 'symbol':\n\t\t\tvar top = this.bar.pitch2 / 2;\n\t\t\tif (child.name == 'dots.dot') {\n\t\t\t\tif (first) {\n\t\t\t\t\trelative.pitch = top;\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\trelative.pitch = top + this.lineSpace;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn first;\n};\n\nmodule.exports = StringTablature;","var { noteToMidi, midiToNote } = require('../../synth/note-to-midi');\n\n/**\n * \n * Note structure for Tabs\n * \n */\n\n\nfunction TabNote(note, clefTranspose) {\n\t//console.log(\"INIT/RENDER TabNote constructor\")\n\tvar pitch = noteToMidi(note)\n\tif (clefTranspose)\n\t\tpitch += clefTranspose\n\tvar newNote = midiToNote(pitch);\n\tvar isFlat = false;\n\tvar isSharp = false;\n\tvar isAltered = false;\n\tvar natural = null;\n\tvar quarter = null;\n\tvar isDouble = false;\n\tvar acc = 0;\n\n\tif (note.startsWith('_')) {\n\t\tisFlat = true;\n\t\tacc = -1;\n\t\t// check quarter flat\n\t\tif (note[1] == '/') {\n\t\t\tisFlat = false;\n\t\t\tquarter = \"v\";\n\t\t\tacc = 0;\n\t\t} else if (note[1] == '_') {\n\t\t\t// double flat\n\t\t\tisDouble = true;\n\t\t\tacc -= 1;\n\t\t}\n\t} else if (note.startsWith('^')) {\n\t\tisSharp = true;\n\t\tacc = +1;\n\t\t// check quarter sharp\n\t\tif (note[1] == '/') {\n\t\t\tisSharp = false;\n\t\t\tquarter = \"^\";\n\t\t\tacc = 0;\n\t\t} else if (note[1] == '^') {\n\t\t\t// double sharp\n\t\t\tisDouble = true;\n\t\t\tacc += 1;\n\t\t}\n\t} else if (note.startsWith('=')) {\n\t\tnatural = true;\n\t\tacc = 0;\n\t}\n\tisAltered = isFlat || isSharp || (quarter != null);\n\tif (isAltered || natural) {\n\t\tif ((quarter != null) || (isDouble)) {\n\t\t\tnewNote = note.slice(2);\n\t\t} else {\n\t\t\tnewNote = note.slice(1);\n\t\t}\n\t}\n\tvar hasComma = (newNote.match(/,/g) || []).length;\n\tvar hasQuote = (newNote.match(/'/g) || []).length;\n\n\tthis.pitch = pitch\n\tthis.pitchAltered = 0\n\tthis.name = newNote;\n\tthis.acc = acc;\n\tthis.isSharp = isSharp;\n\tthis.isKeySharp = false;\n\tthis.isDouble = isDouble;\n\tthis.isAltered = isAltered;\n\tthis.isFlat = isFlat;\n\tthis.isKeyFlat = false;\n\tthis.natural = natural;\n\tthis.quarter = quarter;\n\tthis.isLower = (this.name == this.name.toLowerCase());\n\tthis.name = this.name[0].toUpperCase();\n\tthis.hasComma = hasComma;\n\tthis.isQuoted = hasQuote;\n}\n\nfunction cloneNote(self) {\n\tvar newNote = self.name;\n\tvar newTabNote = new TabNote(newNote);\n\tnewTabNote.pitch = self.pitch;\n\tnewTabNote.hasComma = self.hasComma;\n\tnewTabNote.isLower = self.isLower;\n\tnewTabNote.isQuoted = self.isQuoted;\n\tnewTabNote.isSharp = self.isSharp;\n\tnewTabNote.isKeySharp = self.isKeySharp;\n\tnewTabNote.isFlat = self.isFlat;\n\tnewTabNote.isKeyFlat = self.isKeyFlat;\n\treturn newTabNote;\n}\nTabNote.prototype.sameNoteAs = function (note) {\n\t//console.log(\"INIT TabNote sameNoteAs\")\n\treturn note.pitch === this.pitch\n};\n\nTabNote.prototype.isLowerThan = function (note) {\n\t//console.log(\"INIT TabNote isLowerThan\")\n\treturn note.pitch > this.pitch\n};\n\nTabNote.prototype.checkKeyAccidentals = function (accidentals, measureAccidentals) {\n\t//console.log(\"RENDER TabNote checkKeyAccidentals\")\n\tif (this.isAltered || this.natural)\n\t\treturn\n\tif (measureAccidentals[this.name.toUpperCase()]) {\n\t\tswitch (measureAccidentals[this.name.toUpperCase()]) {\n\t\t\tcase \"__\": this.acc = -2; this.pitchAltered = -2; return;\n\t\t\tcase \"_\": this.acc = -1; this.pitchAltered = -1; return;\n\t\t\tcase \"=\": this.acc = 0; this.pitchAltered = 0; return;\n\t\t\tcase \"^\": this.acc = 1; this.pitchAltered = 1; return;\n\t\t\tcase \"^^\": this.acc = 2; this.pitchAltered = 2; return;\n\t\t}\n\t} else if (accidentals) {\n\t\tvar curNote = this.name;\n\t\tfor (var iii = 0; iii < accidentals.length; iii++) {\n\t\t\tvar curAccidentals = accidentals[iii];\n\t\t\tif (curNote == curAccidentals.note.toUpperCase()) {\n\t\t\t\tif (curAccidentals.acc == 'flat') {\n\t\t\t\t\tthis.acc = -1;\n\t\t\t\t\tthis.isKeyFlat = true;\n\t\t\t\t\tthis.pitchAltered = -1\n\t\t\t\t}\n\t\t\t\tif (curAccidentals.acc == 'sharp') {\n\t\t\t\t\tthis.acc = +1;\n\t\t\t\t\tthis.isKeySharp = true;\n\t\t\t\t\tthis.pitchAltered = 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nTabNote.prototype.getAccidentalEquiv = function () {\n\t//console.log(\"TabNote getAccidentalEquiv\")\n\tvar cloned = cloneNote(this);\n\tif (cloned.isSharp || cloned.isKeySharp) {\n\t\tcloned = cloned.nextNote();\n\t\tcloned.isFlat = true;\n\t\tcloned.isSharp = false;\n\t\tcloned.isKeySharp = false;\n\t} else if (cloned.isFlat || cloned.isKeyFlat) {\n\t\tcloned = cloned.prevNote();\n\t\tcloned.isSharp = true;\n\t\tcloned.isFlat = false;\n\t\tcloned.isKeyFlat = false;\n\t}\n\treturn cloned;\n};\n\n\nTabNote.prototype.nextNote = function () {\n\t//console.log(\"INIT TabNote nextNote\")\n\tvar note = midiToNote(this.pitch + 1 + this.pitchAltered)\n\treturn new TabNote(note)\n};\n\nTabNote.prototype.prevNote = function () {\n\t//console.log(\"TabNote prevNote\")\n\tvar note = midiToNote(this.pitch - 1 + this.pitchAltered)\n\treturn new TabNote(note)\n};\n\nTabNote.prototype.emitNoAccidentals = function () {\n\t//console.log(\"TabNote emitNoAccidentals\")\n\tvar returned = this.name;\n\tif (this.isLower) {\n\t\treturned = returned.toLowerCase();\n\t}\n\tfor (var ii = 0; ii < this.isQuoted; ii++) {\n\t\treturned += \"'\";\n\t}\n\tfor (var jj = 0; jj < this.hasComma; jj++) {\n\t\treturned += \",\";\n\t}\n\treturn returned;\n};\n\nTabNote.prototype.emit = function () {\n\t//console.log(\"INIT/RENDER TabNote emit\")\n\tvar returned = this.name;\n\tif (this.isSharp || this.isKeySharp) {\n\t\treturned = '^' + returned;\n\t\tif (this.isDouble) {\n\t\t\treturned = '^' + returned;\n\t\t}\n\t}\n\tif (this.isFlat || this.isKeyFlat) {\n\t\treturned = '_' + returned;\n\t\tif (this.isDouble) {\n\t\t\treturned = '_' + returned;\n\t\t}\n\t}\n\tif (this.quarter) {\n\t\tif (this.quarter == \"^\") {\n\t\t\treturned = \"^/\" + returned;\n\t\t} else {\n\t\t\treturned = \"_/\" + returned;\n\t\t}\n\t}\n\tif (this.natural) {\n\t\treturned = '=' + returned;\n\t}\n\tfor (var ii = 1; ii <= this.hasComma; ii++) {\n\t\treturned += ',';\n\t}\n\n\tif (this.isLower) {\n\t\treturned = returned.toLowerCase();\n\t\tfor (var jj = 1; jj <= this.isQuoted; jj++) {\n\t\t\treturned += \"'\";\n\t\t}\n\t}\n\treturn returned;\n};\n\nmodule.exports = TabNote\n","\nvar TabNote = require('./tab-note');\n\nvar notes = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];\n\nfunction tabNotes(fromNote, toNote) {\n\t//console.log(\"INIT TabNotes\")\n\tvar fromN = new TabNote(fromNote);\n\tvar toN = new TabNote(toNote);\n\t// check that toN is not lower than fromN\n\tif (toN.isLowerThan(fromN)) {\n\t\tvar from = fromN.emit();\n\t\tvar tn = toN.emit();\n\t\treturn {\n\t\t\terror: 'Invalid string Instrument tuning : ' +\n\t\t\t\ttn + ' string lower than ' + from + ' string'\n\t\t};\n\t}\n\tvar buildReturned = [];\n\tvar startIndex = notes.indexOf(fromN.name);\n\tvar toIndex = notes.indexOf(toN.name);\n\tif ((startIndex == -1) || (toIndex == -1)) {\n\t\treturn buildReturned;\n\t}\n\tvar finished = false;\n\twhile (!finished) {\n\t\tbuildReturned.push(fromN.emit());\n\t\tfromN = fromN.nextNote();\n\t\tif (fromN.sameNoteAs(toN)) {\n\t\t\tfinished = true;\n\t\t}\n\t}\n\treturn buildReturned;\n}\n\nmodule.exports = tabNotes;\n","\nvar StringTablature = require('./string-tablature');\nvar tabRenderer = require('../render/tab-renderer');\nvar StringPatterns = require('./string-patterns');\n\n\n/**\n * upon init mainly store provided instances for later usage\n * @param {*} abcTune the parsed tune AST tree\n * @param {*} tuneNumber the parsed tune AST tree\n * @param {*} params complementary args provided to Tablature Plugin\n */\nPlugin.prototype.init = function (abcTune, tuneNumber, params, tabSettings) {\n\t//console.log(\"INIT AbcStringTab Plugin.init\")\n\tthis.tune = abcTune;\n\tthis.params = params;\n\tthis.tuneNumber = tuneNumber;\n\tthis.inError = false;\n\tthis.abcTune = abcTune;\n\tthis.linePitch = 3;\n\tthis.nbLines = tabSettings.defaultTuning.length;\n\tthis.isTabBig = tabSettings.isTabBig;\n\tthis.tabSymbolOffset = tabSettings.tabSymbolOffset;\n\tthis.capo = params.capo;\n\tthis.transpose = params.visualTranspose;\n\tthis.hideTabSymbol = params.hideTabSymbol;\n\tthis.tablature = new StringTablature(this.nbLines, this.linePitch);\n\tvar tuning = params.tuning;\n\tif (!tuning) {\n\t\ttuning = tabSettings.defaultTuning;\n\t}\n\tthis.tuning = tuning;\n\tthis.semantics = new StringPatterns(this);\n};\n\nPlugin.prototype.setError = function (error) {\n\t//console.log(\"Plugin setError\")\n\tif (error) {\n\t\tthis.error = error;\n\t\tthis.inError = true;\n\t\tif (this.tune.warnings) {\n\t\t\tthis.tune.warnings.push(error);\n\t\t} else {\n\t\t\tthis.tune.warnings = [error];\n\t\t}\n\t}\n};\n\nPlugin.prototype.render = function (renderer, line, staffIndex) {\n\t//console.log(\"RENDER AbcStringTab Plugin.render\")\n\tif (this.inError) return;\n\tif (this.tablature.bypass(line)) return;\n\ttabRenderer(this, renderer, line, staffIndex);\n};\n\nfunction Plugin() { }\n\n//\n// Tablature plugin definition\n//\nvar AbcStringTab = function () {\n\treturn { name: 'StringTab', tablature: Plugin };\n};\n\nmodule.exports = AbcStringTab;\n","/**\n * Tablature Absolute elements factory\n */\nvar AbsoluteElement = require('../../write/creation/elements/absolute-element');\nvar RelativeElement = require('../../write/creation/elements/relative-element');\n\nfunction isObject(a) { return a != null && a.constructor === Object; }\nfunction cloneObject(dest, src) {\n\tfor (var prop in src) {\n\t\tif (src.hasOwnProperty(prop)) {\n\t\t\tif (!(Array.isArray(src[prop]) || isObject(src[prop]))) {\n\t\t\t\tdest[prop] = src[prop];\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction cloneAbsolute(absSrc) {\n\tvar returned = new AbsoluteElement('', 0, 0, '', 0);\n\tcloneObject(returned, absSrc);\n\treturned.top = 0;\n\treturned.bottom = -1;\n\tif (absSrc.abcelem) {\n\t\treturned.abcelem = {};\n\t\tcloneObject(returned.abcelem, absSrc.abcelem);\n\t\tif (returned.abcelem.el_type === \"note\")\n\t\t\treturned.abcelem.el_type = 'tabNumber';\n\t}\n\t// TODO-PER: This fixes the classes because the element isn't created at the right time.\n\tabsSrc.cloned = returned\n\treturn returned;\n}\n\nfunction cloneAbsoluteAndRelatives(absSrc, plugin) {\n\tvar returned = cloneAbsolute(absSrc);\n\tif (plugin) {\n\t\tvar children = absSrc.children;\n\t\t// proceed with relative as well\n\t\tvar first = true;\n\t\tfor (var ii = 0; ii < children.length; ii++) {\n\t\t\tvar child = children[ii];\n\t\t\tvar relative = new RelativeElement('', 0, 0, 0, '');\n\t\t\tcloneObject(relative, child);\n\t\t\tfirst = plugin.tablature.setRelative(child, relative, first);\n\t\t\treturned.children.push(relative);\n\t\t}\n\t}\n\treturn returned;\n}\n\nfunction buildTabAbsolute(plugin, absX, relX) {\n\tvar tabIcon = 'tab.tiny';\n\tvar tabYPos = 7.5;\n\tif (plugin.isTabBig) {\n\t\ttabIcon = 'tab.big';\n\t\ttabYPos = 10;\n\t}\n\tvar element = {\n\t\tel_type: \"tab\",\n\t\ticon: tabIcon,\n\t\tYpos: tabYPos\n\t};\n\n\t// Offset the TAB symbol position if specified in the tab description\n\ttabYPos += plugin.tabSymbolOffset;\n\n\t// For tablature like whistle tab where you want the TAB symbol hidden\n\tif (!plugin.hideTabSymbol) {\n\n\t\tvar tabAbsolute = new AbsoluteElement(element, 0, 0, \"symbol\", 0);\n\t\ttabAbsolute.x = absX;\n\t\tvar tabRelative = new RelativeElement(tabIcon, 0, 0, 7.5, \"tab\");\n\t\ttabRelative.x = relX;\n\t\ttabAbsolute.children.push(tabRelative);\n\t\tif (tabAbsolute.abcelem.el_type == 'tab') {\n\t\t\ttabRelative.pitch = tabYPos;\n\t\t}\n\n\t}\n\treturn tabAbsolute;\n}\n\nfunction lyricsDim(abs) {\n\tif (abs.extra) {\n\t\tfor (var ii = 0; ii < abs.extra.length; ii++) {\n\t\t\tvar extra = abs.extra[ii];\n\t\t\tif (extra.type == 'lyric') {\n\t\t\t\treturn {\n\t\t\t\t\tbottom: extra.bottom,\n\t\t\t\t\theight: extra.height\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n}\nfunction TabAbsoluteElements() {\n\t//console.log(\"RENDER TabAbsoluteElements constructor\")\n\tthis.accidentals = null;\n}\n\nfunction getInitialStaffSize(staffGroup) {\n\tvar returned = 0;\n\tfor (var ii = 0; ii < staffGroup.length; ii++) {\n\t\tif (!staffGroup[ii].tabNameInfos) returned++;\n\t}\n\treturn returned;\n}\n\nfunction buildRelativeTabNote(plugin, relX, def, curNote, isGrace) {\n\tvar strNote = curNote.num;\n\tif (curNote.note.quarter != null) {\n\t\t// add tab quarter => needs to string conversion then \n\t\tstrNote = strNote.toString();\n\t\tstrNote += curNote.note.quarter;\n\t}\n\tvar pitch = plugin.semantics.stringToPitch(curNote.str);\n\tdef.notes.push({ num: strNote, str: curNote.str, pitch: curNote.note.emit() });\n\tvar opt = {\n\t\ttype: 'tabNumber'\n\t};\n\tvar tabNoteRelative = new RelativeElement(\n\t\tstrNote, 0, 0, pitch + 0.3, opt);\n\ttabNoteRelative.x = relX;\n\ttabNoteRelative.isGrace = isGrace;\n\ttabNoteRelative.isAltered = curNote.note.isAltered;\n\treturn tabNoteRelative;\n}\n\nfunction getXGrace(abs, index) {\n\tvar found = 0;\n\tif (abs.extra) {\n\t\tfor (var ii = 0; ii < abs.extra.length; ii++) {\n\t\t\tif (abs.extra[ii].c.indexOf('noteheads') >= 0) {\n\t\t\t\tif (found === index) {\n\t\t\t\t\treturn abs.extra[ii].x + abs.extra[ii].w / 2;\n\t\t\t\t} else {\n\t\t\t\t\tfound++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn -1;\n}\n\nfunction graceInRest(absElem) {\n\tif (absElem.abcelem) {\n\t\tvar elem = absElem.abcelem;\n\t\tif (elem.rest) {\n\t\t\treturn elem.gracenotes;\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction convertToNumber(plugin, pitches, graceNotes) {\n\tvar tabPos = plugin.semantics.notesToNumber(pitches, graceNotes);\n\tif (tabPos.error) {\n\t\tplugin.setError(tabPos.error);\n\t\treturn tabPos; // give up on error here\n\t}\n\tif (tabPos.graces && tabPos.notes) {\n\t\t// add graces to last note in notes\n\t\tvar posNote = tabPos.notes.length - 1;\n\t\ttabPos.notes[posNote].graces = tabPos.graces;\n\t}\n\treturn tabPos;\n}\n\nfunction buildGraceRelativesForRest(plugin, abs, absChild, graceNotes, tabVoice) {\n\tfor (var mm = 0; mm < graceNotes.length; mm++) {\n\t\tvar defGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\tvar graceX = getXGrace(absChild, mm);\n\t\tvar curGrace = graceNotes[mm];\n\t\tvar tabGraceRelative = buildRelativeTabNote(plugin, graceX, defGrace, curGrace, true);\n\t\tabs.children.push(tabGraceRelative);\n\t\ttabVoice.push(defGrace);\n\t}\n}\n\n/**\n * Build tab absolutes by scanning current staff line absolute array\n * @param {*} staffAbsolute\n */\nTabAbsoluteElements.prototype.build = function (plugin,\n\tstaffAbsolute,\n\ttabVoice,\n\tvoiceIndex,\n\tstaffIndex,\n\tkeySig,\n\ttabVoiceIndex) {\n\t//console.log(\"RENDER TabAbsoluteElements build\")\n\tvar staffSize = getInitialStaffSize(staffAbsolute);\n\tvar source = staffAbsolute[staffIndex + voiceIndex];\n\tvar dest = staffAbsolute[tabVoiceIndex];\n\tvar tabPos = null;\n\tvar defNote = null;\n\tif (source.children[0].abcelem.el_type != 'clef') {\n\t\t// keysig missing => provide one for tabs\n\t\tif (keySig != 'none') {\n\t\t\tsource.children.splice(0, 0, keySig);\n\t\t}\n\t}\n\tfor (var ii = 0; ii < source.children.length; ii++) {\n\t\tvar absChild = source.children[ii];\n\t\tvar absX = absChild.x;\n\t\tvar relX = absX;\n\t\t// if (absChild.children.length > 0) {\n\t\t// relX = absChild.children[0].x;\n\t\t// }\n\t\tif ((absChild.isClef)) {\n\t\t\tdest.children.push(buildTabAbsolute(plugin, absX, relX));\n\t\t\tif (absChild.abcelem.type.indexOf('-8') >= 0) plugin.semantics.clefTranspose = -12\n\t\t\tif (absChild.abcelem.type.indexOf('+8') >= 0) plugin.semantics.clefTranspose = 12\n\t\t}\n\t\tswitch (absChild.type) {\n\t\t\tcase 'staff-extra key-signature':\n\t\t\t\t// refresh key accidentals\n\t\t\t\tthis.accidentals = absChild.abcelem.accidentals;\n\t\t\t\tplugin.semantics.accidentals = this.accidentals;\n\t\t\t\tbreak;\n\t\t\tcase 'bar':\n\t\t\t\tplugin.semantics.measureAccidentals = {}\n\t\t\t\tvar lastBar = false;\n\t\t\t\tif (ii === source.children.length - 1) {\n\t\t\t\t\t// used for final line bar drawing\n\t\t\t\t\t// for multi tabs / multi staves\n\t\t\t\t\tlastBar = true;\n\t\t\t\t}\n\t\t\t\tvar cloned = cloneAbsoluteAndRelatives(absChild, plugin);\n\t\t\t\tif (cloned.abcelem.barNumber) {\n\t\t\t\t\tdelete cloned.abcelem.barNumber;\n\t\t\t\t\tfor (var bn = 0; bn < cloned.children.length; bn++) {\n\t\t\t\t\t\tif (cloned.children[bn].type === \"barNumber\") {\n\t\t\t\t\t\t\tcloned.children.splice(bn, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcloned.abcelem.lastBar = lastBar;\n\t\t\t\tdest.children.push(cloned);\n\t\t\t\ttabVoice.push({\n\t\t\t\t\tel_type: absChild.abcelem.el_type,\n\t\t\t\t\ttype: absChild.abcelem.type,\n\t\t\t\t\tendChar: absChild.abcelem.endChar,\n\t\t\t\t\tstartChar: absChild.abcelem.startChar,\n\t\t\t\t\tabselem: cloned\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'rest':\n\t\t\t\tvar restGraces = graceInRest(absChild);\n\t\t\t\tif (restGraces) {\n\t\t\t\t\t// to number conversion \n\t\t\t\t\ttabPos = convertToNumber(plugin, null, restGraces);\n\t\t\t\t\tif (tabPos.error) return;\n\t\t\t\t\t// build relative for grace\n\t\t\t\t\tdefGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\t\t\t\tbuildGraceRelativesForRest(plugin, abs, absChild, tabPos.graces, tabVoice);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'note':\n\t\t\t\tvar abs = cloneAbsolute(absChild);\n\t\t\t\tabs.x = absChild.heads[0].x + absChild.heads[0].w / 2; // center the number\n\t\t\t\tabs.lyricDim = lyricsDim(absChild);\n\t\t\t\tvar pitches = absChild.abcelem.pitches;\n\t\t\t\tvar graceNotes = absChild.abcelem.gracenotes;\n\t\t\t\tabs.type = 'tabNumber';\n\t\t\t\t// to number conversion \n\t\t\t\ttabPos = convertToNumber(plugin, pitches, graceNotes);\n\t\t\t\tif (tabPos.error) return;\n\t\t\t\tif (tabPos.graces) {\n\t\t\t\t\t// add graces to last note in notes\n\t\t\t\t\tvar posNote = tabPos.notes.length - 1;\n\t\t\t\t\ttabPos.notes[posNote].graces = tabPos.graces;\n\t\t\t\t}\n\t\t\t\t// build relative\n\t\t\t\tdefNote = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [] };\n\t\t\t\tfor (var ll = 0; ll < tabPos.notes.length; ll++) {\n\t\t\t\t\tvar curNote = tabPos.notes[ll];\n\t\t\t\t\tif (curNote.graces) {\n\t\t\t\t\t\tfor (var mm = 0; mm < curNote.graces.length; mm++) {\n\t\t\t\t\t\t\tvar defGrace = { el_type: \"note\", startChar: absChild.abcelem.startChar, endChar: absChild.abcelem.endChar, notes: [], grace: true };\n\t\t\t\t\t\t\tvar graceX = getXGrace(absChild, mm);\n\t\t\t\t\t\t\tvar curGrace = curNote.graces[mm];\n\t\t\t\t\t\t\tvar tabGraceRelative = buildRelativeTabNote(plugin, graceX, defGrace, curGrace, true);\n\t\t\t\t\t\t\tabs.children.push(tabGraceRelative);\n\t\t\t\t\t\t\ttabVoice.push(defGrace);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar tabNoteRelative = buildRelativeTabNote(plugin, abs.x + absChild.heads[ll].dx, defNote, curNote, false);\n\t\t\t\t\tabs.children.push(tabNoteRelative);\n\t\t\t\t}\n\t\t\t\tif (defNote.notes.length > 0) {\n\t\t\t\t\tdefNote.abselem = abs;\n\t\t\t\t\ttabVoice.push(defNote);\n\t\t\t\t\tdest.children.push(abs);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n};\n\nmodule.exports = TabAbsoluteElements;\n","/* eslint-disable no-debugger */\nvar VoiceElement = require('../../write/creation/elements/voice-element');\nvar TabAbsoluteElements = require('./tab-absolute-elements');\nvar spacing = require('../../write/helpers/spacing');\n\nfunction initSpecialY() {\n\treturn {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n}\n\nfunction getLyricHeight(voice) {\n\tvar maxLyricHeight = 0;\n\tfor (var ii = 0; ii < voice.children.length; ii++) {\n\t\tvar curAbs = voice.children[ii];\n\t\tif (curAbs.specialY) {\n\t\t\tif (curAbs.specialY.lyricHeightBelow > maxLyricHeight) {\n\t\t\t\tmaxLyricHeight = curAbs.specialY.lyricHeightBelow;\n\t\t\t}\n\t\t}\n\t}\n\treturn maxLyricHeight; // add spacing\n}\n\nfunction buildTabName(plugin, renderer, dest) {\n\tvar stringSemantics = plugin.semantics;\n\tvar textSize = renderer.controller.getTextSize;\n\tvar tabName = stringSemantics.tabInfos(plugin);\n\tvar suppress = stringSemantics.suppress(plugin);\n\tvar doDraw = true;\n\n\tif (suppress) {\n\t\tdoDraw = false\n\t}\n\n\n\tif (doDraw) {\n\t\tvar size = textSize.calc(tabName, 'tablabelfont', 'text instrumentname');\n\t\tdest.tabNameInfos = {\n\t\t\ttextSize: { height: size.height, width: size.width },\n\t\t\tname: tabName\n\t\t};\n\t\treturn size.height;\n\t}\n\treturn 0\n\n}\n\nfunction islastTabInStaff(index, staffGroup) {\n\tif (staffGroup[index].isTabStaff) {\n\t\tif (index === staffGroup.length - 1) return true;\n\t\tif (staffGroup[index + 1].isTabStaff) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getStaffNumbers(staffs) {\n\tvar nbStaffs = 0;\n\tfor (var ii = 0; ii < staffs.length; ii++) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\tnbStaffs++;\n\t\t}\n\t}\n\treturn nbStaffs;\n}\n\nfunction getParentStaffIndex(staffs, index) {\n\tfor (var ii = index; ii >= 0; ii--) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\treturn ii;\n\t\t}\n\t}\n\treturn -1;\n}\n\n\nfunction linkStaffAndTabs(staffs) {\n\tfor (var ii = 0; ii < staffs.length; ii++) {\n\t\tif (staffs[ii].isTabStaff) {\n\t\t\t// link to parent staff\n\t\t\tvar parentIndex = getParentStaffIndex(staffs, ii);\n\t\t\tstaffs[ii].hasStaff = staffs[parentIndex];\n\t\t\tif (!staffs[parentIndex].hasTab) staffs[parentIndex].hasTab = [];\n\t\t\tstaffs[parentIndex].hasTab.push(staffs[ii]);\n\t\t}\n\t}\n}\n\nfunction isMultiVoiceSingleStaff(staffs, parent) {\n\tif (getStaffNumbers(staffs) === 1) {\n\t\tif (parent.voices.length > 1) return true;\n\t}\n\treturn false;\n}\n\n\nfunction getNextTabPos(tabIndex, staffGroup) {\n\tvar startIndex = 0;\n\tvar handledVoices = 0;\n\tvar inProgress = true;\n\tvar nbVoices = 0;\n\twhile (inProgress) {\n\t\t//for (var ii = 0; ii < staffGroup.length; ii++) {\n\t\tif (!staffGroup[startIndex])\n\t\t\treturn -1;\n\t\tif (!staffGroup[startIndex].isTabStaff) {\n\t\t\tnbVoices = staffGroup[startIndex].voices.length; // get number of staff voices\n\t\t}\n\t\tif (staffGroup[startIndex].isTabStaff) {\n\t\t\thandledVoices++;\n\t\t\tif (islastTabInStaff(startIndex, staffGroup)) {\n\t\t\t\tif (handledVoices < nbVoices) return startIndex + 1;\n\t\t\t}\n\t\t} else {\n\t\t\thandledVoices = 0;\n\t\t\tif (startIndex >= tabIndex) {\n\t\t\t\tif (startIndex + 1 == staffGroup.length) return startIndex + 1;\n\t\t\t\tif (!staffGroup[startIndex + 1].isTabStaff) return startIndex + 1;\n\t\t\t}\n\t\t}\n\t\tstartIndex++;\n\t\t// out of space case\n\t\tif (startIndex > staffGroup.length) return -1;\n\t}\n}\n\nfunction getLastStaff(staffs, lastTab) {\n\tfor (var ii = lastTab; ii >= 0; ii--) {\n\t\tif (!staffs[ii].isTabStaff) {\n\t\t\treturn staffs[ii];\n\t\t}\n\t}\n\treturn null;\n}\n\nfunction checkVoiceKeySig(voices, ii) {\n\tvar curVoice = voices[ii];\n\t// on multivoice multistaff only the first voice has key signature\n\t// folling consecutive do not have one => we should provide the first voice key sig back then\n\tvar elem0 = curVoice.children[0].abcelem;\n\tif (elem0.el_type === 'clef') return null;\n\tif (ii == 0) {\n\t\t// not found => clef=none case\n\t\treturn 'none';\n\t}\n\treturn voices[ii - 1].children[0];\n}\n\nfunction tabRenderer(plugin, renderer, line, staffIndex) {\n\t//console.log(\"RENDER tabRenderer\")\n\tvar absolutes = new TabAbsoluteElements();\n\tvar tabStaff = {\n\t\tclef: {\n\t\t\ttype: 'TAB'\n\t\t}\n\t};\n\tvar tabSize = (plugin.linePitch * plugin.nbLines);\n\tvar staffs = line.staff;\n\tif (staffs) {\n\t\t// give up on staffline=0 in key \n\t\tvar firstStaff = staffs[0];\n\t\tif (firstStaff) {\n\t\t\tif (firstStaff.clef) {\n\t\t\t\tif (firstStaff.clef.stafflines == 0) {\n\t\t\t\t\tplugin.setError(\"No tablatures when stafflines=0\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstaffs.splice(\n\t\t\tstaffs.length, 0,\n\t\t\ttabStaff\n\t\t);\n\t}\n\tvar staffGroup = line.staffGroup;\n\n\tvar voices = staffGroup.voices;\n\tvar firstVoice = voices[0];\n\t// take lyrics into account if any\n\tvar lyricsHeight = getLyricHeight(firstVoice);\n\tvar padd = 3;\n\tvar prevIndex = staffIndex;\n\tvar previousStaff = staffGroup.staffs[prevIndex];\n\tvar tabTop = tabSize + padd - previousStaff.bottom - lyricsHeight;\n\tif (previousStaff.isTabStaff) {\n\t\ttabTop = previousStaff.top;\n\t}\n\tvar staffGroupInfos = {\n\t\tbottom: -1,\n\t\tisTabStaff: true,\n\t\tspecialY: initSpecialY(),\n\t\tlines: plugin.nbLines,\n\t\tlinePitch: plugin.linePitch,\n\t\tdy: 0.15,\n\t\ttop: tabTop,\n\t};\n\tvar nextTabPos = getNextTabPos(staffIndex, staffGroup.staffs);\n\tif (nextTabPos === -1)\n\t\treturn;\n\tstaffGroupInfos.parentIndex = nextTabPos - 1;\n\tstaffGroup.staffs.splice(nextTabPos, 0, staffGroupInfos);\n\t// staffGroup.staffs.push(staffGroupInfos);\n\tstaffGroup.height += tabSize + padd;\n\tvar parentStaff = getLastStaff(staffGroup.staffs, nextTabPos);\n\tvar nbVoices = 1;\n\tif (isMultiVoiceSingleStaff(staffGroup.staffs, parentStaff)) {\n\t\tnbVoices = parentStaff.voices.length;\n\t}\n\t// build from staff\n\ttabStaff.voices = [];\n\tfor (var ii = 0; ii < nbVoices; ii++) {\n\t\tvar tabVoice = new VoiceElement(0, 0);\n\t\tif (ii > 0) tabVoice.duplicate = true;\n\t\tvar nameHeight = buildTabName(plugin, renderer, tabVoice) / spacing.STEP;\n\t\tnameHeight = Math.max(nameHeight, 1) // If there is no label for the tab line, then there needs to be a little padding\n\t\t// This was pushing down the top staff by the tab label height\n\t\t//staffGroup.staffs[staffIndex].top += nameHeight;\n\t\tstaffGroup.staffs[staffIndex].top += 1;\n\t\tstaffGroup.height += nameHeight;\n\t\ttabVoice.staff = staffGroupInfos;\n\t\tvar tabVoiceIndex = voices.length\n\t\tvoices.splice(voices.length, 0, tabVoice);\n\t\tvar keySig = checkVoiceKeySig(voices, ii + staffIndex);\n\t\ttabStaff.voices[ii] = [];\n\t\tabsolutes.build(plugin, voices, tabStaff.voices[ii], ii, staffIndex, keySig, tabVoiceIndex);\n\t}\n\tlinkStaffAndTabs(staffGroup.staffs); // crossreference tabs and staff\n}\n\nmodule.exports = tabRenderer;\n","// abc_abstract_engraver.js: Creates a data structure suitable for printing a line of abc\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar BeamElem = require('./elements/beam-element');\nvar BraceElem = require('./elements/brace-element');\nvar createClef = require('./create-clef');\nvar createKeySignature = require('./create-key-signature');\nvar createNoteHead = require('./create-note-head');\nvar createTimeSignature = require('./create-time-signature');\nvar Decoration = require('./decoration');\nvar EndingElem = require('./elements/ending-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\nvar spacing = require('../helpers/spacing');\nvar StaffGroupElement = require('./elements/staff-group-element');\nvar TempoElement = require('./elements/tempo-element');\nvar TieElem = require('./elements/tie-element');\nvar TripletElem = require('./elements/triplet-element');\nvar VoiceElement = require('./elements/voice-element');\nvar addChord = require('./add-chord');\nvar pitchesToPerc = require('../../synth/pitches-to-perc')\n\nvar parseCommon = require('../../parse/abc_common');\n\nvar getDuration = function (elem) {\n\tvar d = 0;\n\tif (elem.duration) {\n\t\td = elem.duration;\n\t}\n\treturn d;\n};\n\nvar hint = false;\n\nvar chartable = {\n\trest: { 0: \"rests.whole\", 1: \"rests.half\", 2: \"rests.quarter\", 3: \"rests.8th\", 4: \"rests.16th\", 5: \"rests.32nd\", 6: \"rests.64th\", 7: \"rests.128th\", \"multi\": \"rests.multimeasure\" },\n\tnote: { \"-1\": \"noteheads.dbl\", 0: \"noteheads.whole\", 1: \"noteheads.half\", 2: \"noteheads.quarter\", 3: \"noteheads.quarter\", 4: \"noteheads.quarter\", 5: \"noteheads.quarter\", 6: \"noteheads.quarter\", 7: \"noteheads.quarter\", 'nostem': \"noteheads.quarter\" },\n\trhythm: { \"-1\": \"noteheads.slash.whole\", 0: \"noteheads.slash.whole\", 1: \"noteheads.slash.whole\", 2: \"noteheads.slash.quarter\", 3: \"noteheads.slash.quarter\", 4: \"noteheads.slash.quarter\", 5: \"noteheads.slash.quarter\", 6: \"noteheads.slash.quarter\", 7: \"noteheads.slash.quarter\", nostem: \"noteheads.slash.nostem\" },\n\tx: { \"-1\": \"noteheads.indeterminate\", 0: \"noteheads.indeterminate\", 1: \"noteheads.indeterminate\", 2: \"noteheads.indeterminate\", 3: \"noteheads.indeterminate\", 4: \"noteheads.indeterminate\", 5: \"noteheads.indeterminate\", 6: \"noteheads.indeterminate\", 7: \"noteheads.indeterminate\", nostem: \"noteheads.indeterminate\" },\n\tharmonic: { \"-1\": \"noteheads.harmonic.quarter\", 0: \"noteheads.harmonic.quarter\", 1: \"noteheads.harmonic.quarter\", 2: \"noteheads.harmonic.quarter\", 3: \"noteheads.harmonic.quarter\", 4: \"noteheads.harmonic.quarter\", 5: \"noteheads.harmonic.quarter\", 6: \"noteheads.harmonic.quarter\", 7: \"noteheads.harmonic.quarter\", nostem: \"noteheads.harmonic.quarter\" },\n\ttriangle: { \"-1\": \"noteheads.triangle.quarter\", 0: \"noteheads.triangle.quarter\", 1: \"noteheads.triangle.quarter\", 2: \"noteheads.triangle.quarter\", 3: \"noteheads.triangle.quarter\", 4: \"noteheads.triangle.quarter\", 5: \"noteheads.triangle.quarter\", 6: \"noteheads.triangle.quarter\", 7: \"noteheads.triangle.quarter\", nostem: \"noteheads.triangle.quarter\" },\n\tuflags: { 3: \"flags.u8th\", 4: \"flags.u16th\", 5: \"flags.u32nd\", 6: \"flags.u64th\" },\n\tdflags: { 3: \"flags.d8th\", 4: \"flags.d16th\", 5: \"flags.d32nd\", 6: \"flags.d64th\" }\n};\n\nvar AbstractEngraver = function (getTextSize, tuneNumber, options) {\n\tthis.decoration = new Decoration();\n\tthis.getTextSize = getTextSize;\n\tthis.tuneNumber = tuneNumber;\n\tthis.isBagpipes = options.bagpipes;\n\tthis.flatBeams = options.flatbeams;\n\tthis.graceSlurs = options.graceSlurs;\n\tthis.percmap = options.percmap;\n\tthis.initialClef = options.initialClef\n\tthis.jazzchords = !!options.jazzchords\n\tthis.accentAbove = !!options.accentAbove\n\tthis.germanAlphabet = !!options.germanAlphabet\n\tthis.reset();\n};\n\nAbstractEngraver.prototype.reset = function () {\n\tthis.slurs = {};\n\tthis.ties = [];\n\tthis.voiceScale = 1;\n\tthis.voiceColor = undefined;\n\tthis.slursbyvoice = {};\n\tthis.tiesbyvoice = {};\n\tthis.endingsbyvoice = {};\n\tthis.scaleByVoice = {};\n\tthis.colorByVoice = {};\n\tthis.tripletmultiplier = 1;\n\n\tthis.abcline = undefined;\n\tthis.accidentalSlot = undefined;\n\tthis.accidentalshiftx = undefined;\n\tthis.dotshiftx = undefined;\n\tthis.hasVocals = false;\n\tthis.minY = undefined;\n\tthis.partstartelem = undefined;\n\tthis.startlimitelem = undefined;\n\tthis.stemdir = undefined;\n};\n\nAbstractEngraver.prototype.setStemHeight = function (heightInPixels) {\n\tthis.stemHeight = Math.round(heightInPixels * 10 / spacing.STEP) / 10;\n};\n\nAbstractEngraver.prototype.getCurrentVoiceId = function (s, v) {\n\treturn \"s\" + s + \"v\" + v;\n};\n\nAbstractEngraver.prototype.pushCrossLineElems = function (s, v) {\n\tthis.slursbyvoice[this.getCurrentVoiceId(s, v)] = this.slurs;\n\tthis.tiesbyvoice[this.getCurrentVoiceId(s, v)] = this.ties;\n\tthis.endingsbyvoice[this.getCurrentVoiceId(s, v)] = this.partstartelem;\n\tthis.scaleByVoice[this.getCurrentVoiceId(s, v)] = this.voiceScale;\n\tif (this.voiceColor)\n\t\tthis.colorByVoice[this.getCurrentVoiceId(s, v)] = this.voiceColor;\n};\n\nAbstractEngraver.prototype.popCrossLineElems = function (s, v) {\n\tthis.slurs = this.slursbyvoice[this.getCurrentVoiceId(s, v)] || {};\n\tthis.ties = this.tiesbyvoice[this.getCurrentVoiceId(s, v)] || [];\n\tthis.partstartelem = this.endingsbyvoice[this.getCurrentVoiceId(s, v)];\n\tthis.voiceScale = this.scaleByVoice[this.getCurrentVoiceId(s, v)];\n\tif (this.voiceScale === undefined) this.voiceScale = 1;\n\tthis.voiceColor = this.colorByVoice[this.getCurrentVoiceId(s, v)];\n};\n\nAbstractEngraver.prototype.containsLyrics = function (staves) {\n\tfor (var i = 0; i < staves.length; i++) {\n\t\tfor (var j = 0; j < staves[i].voices.length; j++) {\n\t\t\tfor (var k = 0; k < staves[i].voices[j].length; k++) {\n\t\t\t\tvar el = staves[i].voices[j][k];\n\t\t\t\tif (el.lyric) {\n\t\t\t\t\t// We just want to see if there are vocals below the music to know where to put the dynamics.\n\t\t\t\t\tif (!el.positioning || el.positioning.vocalPosition === 'below')\n\t\t\t\t\t\tthis.hasVocals = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nAbstractEngraver.prototype.createABCLine = function (staffs, tempo, l) {\n\tthis.minY = 2; // PER: This will be the lowest that any note reaches. It will be used to set the dynamics row.\n\t// See if there are any lyrics on this line.\n\tthis.containsLyrics(staffs);\n\tvar staffgroup = new StaffGroupElement(this.getTextSize);\n\tthis.tempoSet = false;\n\tfor (var s = 0; s < staffs.length; s++) {\n\t\tif (hint)\n\t\t\tthis.restoreState();\n\t\thint = false;\n\t\tthis.createABCStaff(staffgroup, staffs[s], tempo, s, l);\n\t}\n\treturn staffgroup;\n};\n\nAbstractEngraver.prototype.createABCStaff = function (staffgroup, abcstaff, tempo, s, l) {\n\t// If the tempo is passed in, then the first element should get the tempo attached to it.\n\tstaffgroup.getTextSize.updateFonts(abcstaff);\n\tfor (var v = 0; v < abcstaff.voices.length; v++) {\n\t\tvar voice = new VoiceElement(v, abcstaff.voices.length);\n\t\tif (v === 0) {\n\t\t\tvoice.barfrom = (abcstaff.connectBarLines === \"start\" || abcstaff.connectBarLines === \"continue\");\n\t\t\tvoice.barto = (abcstaff.connectBarLines === \"continue\" || abcstaff.connectBarLines === \"end\");\n\t\t} else {\n\t\t\tvoice.duplicate = true; // bar lines and other duplicate info need not be created\n\t\t}\n\t\tif (abcstaff.title && abcstaff.title[v]) {\n\t\t\tvoice.header = abcstaff.title[v].replace(/\\\\n/g, \"\\n\");\n\t\t\tvoice.headerPosition = 6 + staffgroup.getTextSize.baselineToCenter(voice.header, \"voicefont\", 'staff-extra voice-name', v, abcstaff.voices.length) / spacing.STEP;\n\t\t}\n\t\tif (abcstaff.clef && abcstaff.clef.type === \"perc\")\n\t\t\tvoice.isPercussion = true;\n\t\tvar clef = (!this.initialClef || l === 0) && createClef(abcstaff.clef, this.tuneNumber);\n\t\tif (clef) {\n\t\t\tif (v === 0 && abcstaff.barNumber) {\n\t\t\t\tthis.addMeasureNumber(abcstaff.barNumber, clef);\n\t\t\t}\n\t\t\tvoice.addChild(clef);\n\t\t\tthis.startlimitelem = clef; // limit ties here\n\t\t}\n\t\tvar keySig = createKeySignature(abcstaff.key, this.tuneNumber);\n\t\tif (keySig) {\n\t\t\tvoice.addChild(keySig);\n\t\t\tthis.startlimitelem = keySig; // limit ties here\n\t\t}\n\t\tif (abcstaff.meter) {\n\t\t\tif (abcstaff.meter.type === 'specified') {\n\t\t\t\tthis.measureLength = abcstaff.meter.value[0].num / abcstaff.meter.value[0].den;\n\t\t\t} else\n\t\t\t\tthis.measureLength = 1;\n\t\t\tvar ts = createTimeSignature(abcstaff.meter, this.tuneNumber);\n\t\t\tvoice.addChild(ts);\n\t\t\tthis.startlimitelem = ts; // limit ties here\n\t\t}\n\t\tif (voice.duplicate)\n\t\t\tvoice.children = []; // we shouldn't reprint the above if we're reusing the same staff. We just created them to get the right spacing.\n\t\tvar staffLines = abcstaff.clef.stafflines || abcstaff.clef.stafflines === 0 ? abcstaff.clef.stafflines : 5;\n\t\tstaffgroup.addVoice(voice, s, staffLines);\n\t\tvar isSingleLineStaff = staffLines === 1;\n\t\tthis.createABCVoice(abcstaff.voices[v], tempo, s, v, isSingleLineStaff, voice);\n\t\tstaffgroup.setStaffLimits(voice);\n\t\tif (v === 0) {\n\t\t\t// only do brace and bracket processing on the first voice, otherwise it would be done twice.\n\t\t\tif (abcstaff.brace === \"start\" || (!staffgroup.brace && abcstaff.brace)) {\n\t\t\t\tif (!staffgroup.brace)\n\t\t\t\t\tstaffgroup.brace = [];\n\t\t\t\tstaffgroup.brace.push(new BraceElem(voice, \"brace\"));\n\t\t\t} else if (abcstaff.brace === \"end\" && staffgroup.brace) {\n\t\t\t\tstaffgroup.brace[staffgroup.brace.length - 1].setBottomStaff(voice);\n\t\t\t} else if (abcstaff.brace === \"continue\" && staffgroup.brace) {\n\t\t\t\tstaffgroup.brace[staffgroup.brace.length - 1].continuing(voice);\n\t\t\t}\n\t\t\tif (abcstaff.bracket === \"start\" || (!staffgroup.bracket && abcstaff.bracket)) {\n\t\t\t\tif (!staffgroup.bracket)\n\t\t\t\t\tstaffgroup.bracket = [];\n\t\t\t\tstaffgroup.bracket.push(new BraceElem(voice, \"bracket\"));\n\t\t\t} else if (abcstaff.bracket === \"end\" && staffgroup.bracket) {\n\t\t\t\tstaffgroup.bracket[staffgroup.bracket.length - 1].setBottomStaff(voice);\n\t\t\t} else if (abcstaff.bracket === \"continue\" && staffgroup.bracket) {\n\t\t\t\tstaffgroup.bracket[staffgroup.bracket.length - 1].continuing(voice);\n\t\t\t}\n\t\t}\n\t}\n};\n\nfunction getBeamGroup(abcline, pos) {\n\t// If there are notes beamed together, they are handled as a group, so find all of them here.\n\tvar elem = abcline[pos];\n\tif (elem.el_type !== 'note' || !elem.startBeam || elem.endBeam)\n\t\treturn { count: 1, elem: elem };\n\n\tvar group = [];\n\twhile (pos < abcline.length && abcline[pos].el_type === 'note') {\n\t\tgroup.push(abcline[pos]);\n\t\tif (abcline[pos].endBeam)\n\t\t\tbreak;\n\t\tpos++;\n\t}\n\treturn { count: group.length, elem: group };\n}\n\nAbstractEngraver.prototype.createABCVoice = function (abcline, tempo, s, v, isSingleLineStaff, voice) {\n\tthis.popCrossLineElems(s, v);\n\tthis.stemdir = (this.isBagpipes) ? \"down\" : null;\n\tthis.abcline = abcline;\n\tif (this.partstartelem) {\n\t\tthis.partstartelem = new EndingElem(\"\", null, null);\n\t\tvoice.addOther(this.partstartelem);\n\t}\n\tvar voiceNumber = voice.voicetotal < 2 ? -1 : voice.voicenumber;\n\tfor (var slur in this.slurs) {\n\t\tif (this.slurs.hasOwnProperty(slur)) {\n\t\t\t// this is already a slur element, but it was created for the last line, so recreate it.\n\t\t\tthis.slurs[slur] = new TieElem({ force: this.slurs[slur].force, voiceNumber: voiceNumber, stemDir: this.slurs[slur].stemDir, style: this.slurs[slur].dotted });\n\t\t\tif (hint) this.slurs[slur].setHint();\n\t\t\tvoice.addOther(this.slurs[slur]);\n\t\t}\n\t}\n\tfor (var i = 0; i < this.ties.length; i++) {\n\t\t// this is already a tie element, but it was created for the last line, so recreate it.\n\t\tthis.ties[i] = new TieElem({ force: this.ties[i].force, stemDir: this.ties[i].stemDir, voiceNumber: voiceNumber, style: this.ties[i].dotted });\n\t\tif (hint) this.ties[i].setHint();\n\t\tvoice.addOther(this.ties[i]);\n\t}\n\n\tfor (var j = 0; j < this.abcline.length; j++) {\n\t\tsetAveragePitch(this.abcline[j]);\n\t\tthis.minY = Math.min(this.abcline[j].minpitch, this.minY);\n\t}\n\n\tvar isFirstStaff = (s === 0);\n\tvar pos = 0;\n\twhile (pos < this.abcline.length) {\n\t\tvar ret = getBeamGroup(this.abcline, pos);\n\t\tvar abselems = this.createABCElement(isFirstStaff, isSingleLineStaff, voice, ret.elem);\n\t\tif (abselems) {\n\t\t\tfor (i = 0; i < abselems.length; i++) {\n\t\t\t\tif (!this.tempoSet && tempo && !tempo.suppress) {\n\t\t\t\t\tthis.tempoSet = true;\n\t\t\t\t\tvar tempoElement = new AbsoluteElement(tempo, 0, 0, \"tempo\", this.tuneNumber, {});\n\t\t\t\t\ttempoElement.addFixedX(new TempoElement(tempo, this.tuneNumber, createNoteHead));\n\t\t\t\t\tvoice.addChild(tempoElement);\n\t\t\t\t}\n\t\t\t\tvoice.addChild(abselems[i]);\n\t\t\t}\n\t\t}\n\t\tpos += ret.count;\n\t}\n\tthis.pushCrossLineElems(s, v);\n};\n\nAbstractEngraver.prototype.saveState = function () {\n\tthis.tiesSave = parseCommon.cloneArray(this.ties);\n\tthis.slursSave = parseCommon.cloneHashOfHash(this.slurs);\n\tthis.slursbyvoiceSave = parseCommon.cloneHashOfHash(this.slursbyvoice);\n\tthis.tiesbyvoiceSave = parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoice);\n};\n\nAbstractEngraver.prototype.restoreState = function () {\n\tthis.ties = parseCommon.cloneArray(this.tiesSave);\n\tthis.slurs = parseCommon.cloneHashOfHash(this.slursSave);\n\tthis.slursbyvoice = parseCommon.cloneHashOfHash(this.slursbyvoiceSave);\n\tthis.tiesbyvoice = parseCommon.cloneHashOfArrayOfHash(this.tiesbyvoiceSave);\n};\n\n// function writeMeasureWidth(voice) {\n// \tvar width = 0;\n// \tfor (var i = voice.children.length-1; i >= 0; i--) {\n// \t\tvar elem = voice.children[i];\n// \t\tif (elem.abcelem.el_type === 'bar')\n// \t\t\tbreak;\n// \t\twidth += elem.w;\n// \t}\n// \treturn new RelativeElement(width.toFixed(2), -70, 0, undefined, {type:\"debug\"});\n// }\n\n// return an array of AbsoluteElement\nAbstractEngraver.prototype.createABCElement = function (isFirstStaff, isSingleLineStaff, voice, elem) {\n\tvar elemset = [];\n\tswitch (elem.el_type) {\n\t\tcase undefined:\n\t\t\t// it is undefined if we were passed an array in - an array means a set of notes that should be beamed together.\n\t\t\telemset = this.createBeam(isSingleLineStaff, voice, elem);\n\t\t\tbreak;\n\t\tcase \"note\":\n\t\t\telemset[0] = this.createNote(elem, false, isSingleLineStaff, voice);\n\t\t\tif (this.triplet && this.triplet.isClosed()) {\n\t\t\t\tvoice.addOther(this.triplet);\n\t\t\t\tthis.triplet = null;\n\t\t\t\tthis.tripletmultiplier = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"bar\":\n\t\t\telemset[0] = this.createBarLine(voice, elem, isFirstStaff);\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\t//\t elemset[0].addChild(writeMeasureWidth(voice));\n\t\t\tbreak;\n\t\tcase \"meter\":\n\t\t\telemset[0] = createTimeSignature(elem, this.tuneNumber);\n\t\t\tthis.startlimitelem = elemset[0]; // limit ties here\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"clef\":\n\t\t\telemset[0] = createClef(elem, this.tuneNumber);\n\t\t\tif (!elemset[0]) return null;\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"key\":\n\t\t\tvar absKey = createKeySignature(elem, this.tuneNumber);\n\t\t\tif (absKey) {\n\t\t\t\telemset[0] = absKey;\n\t\t\t\tthis.startlimitelem = elemset[0]; // limit ties here\n\t\t\t}\n\t\t\tif (voice.duplicate && elemset.length > 0) elemset[0].invisible = true;\n\t\t\tbreak;\n\t\tcase \"stem\":\n\t\t\tthis.stemdir = elem.direction === \"auto\" ? undefined : elem.direction;\n\t\t\tbreak;\n\t\tcase \"part\":\n\t\t\tvar abselem = new AbsoluteElement(elem, 0, 0, 'part', this.tuneNumber);\n\t\t\tvar dim = this.getTextSize.calc(elem.title, 'partsfont', \"part\");\n\t\t\tabselem.addFixedX(new RelativeElement(elem.title, 0, 0, undefined, { type: \"part\", height: dim.height / spacing.STEP }));\n\t\t\telemset[0] = abselem;\n\t\t\tbreak;\n\t\tcase \"tempo\":\n\t\t\tvar abselem3 = new AbsoluteElement(elem, 0, 0, 'tempo', this.tuneNumber);\n\t\t\tabselem3.addFixedX(new TempoElement(elem, this.tuneNumber, createNoteHead));\n\t\t\telemset[0] = abselem3;\n\t\t\tbreak;\n\t\tcase \"style\":\n\t\t\tif (elem.head === \"normal\")\n\t\t\t\tdelete this.style;\n\t\t\telse\n\t\t\t\tthis.style = elem.head;\n\t\t\tbreak;\n\t\tcase \"hint\":\n\t\t\thint = true;\n\t\t\tthis.saveState();\n\t\t\tbreak;\n\t\tcase \"midi\":\n\t\t\t// This has no effect on the visible music, so just skip it.\n\t\t\tbreak;\n\t\tcase \"scale\":\n\t\t\tthis.voiceScale = elem.size;\n\t\t\tbreak;\n\t\tcase \"color\":\n\t\t\tthis.voiceColor = elem.color;\n\t\t\tvoice.color = this.voiceColor;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tvar abselem2 = new AbsoluteElement(elem, 0, 0, 'unsupported', this.tuneNumber);\n\t\t\tabselem2.addFixed(new RelativeElement(\"element type \" + elem.el_type, 0, 0, undefined, { type: \"debug\" }));\n\t\t\telemset[0] = abselem2;\n\t}\n\n\treturn elemset;\n};\n\nfunction setAveragePitch(elem) {\n\tif (elem.pitches) {\n\t\tsortPitch(elem);\n\t\tvar sum = 0;\n\t\tfor (var p = 0; p < elem.pitches.length; p++) {\n\t\t\tsum += elem.pitches[p].verticalPos;\n\t\t}\n\t\telem.averagepitch = sum / elem.pitches.length;\n\t\telem.minpitch = elem.pitches[0].verticalPos;\n\t\telem.maxpitch = elem.pitches[elem.pitches.length - 1].verticalPos;\n\t}\n}\n\nAbstractEngraver.prototype.createBeam = function (isSingleLineStaff, voice, elems) {\n\tvar abselemset = [];\n\n\tvar beamelem = new BeamElem(this.stemHeight * this.voiceScale, this.stemdir, this.flatBeams, elems[0]);\n\tif (hint) beamelem.setHint();\n\tfor (var i = 0; i < elems.length; i++) {\n\t\t// Do a first pass to figure out the stem direction before creating the notes, so that staccatos and other decorations can be placed correctly.\n\t\tbeamelem.runningDirection(elems[i])\n\t}\n\tbeamelem.setStemDirection()\n\tvar tempStemDir = this.stemdir\n\tthis.stemdir = beamelem.stemsUp ? 'up' : 'down'\n\tfor (i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tvar abselem = this.createNote(elem, true, isSingleLineStaff, voice);\n\t\tabselemset.push(abselem);\n\t\tbeamelem.add(abselem);\n\t\tif (this.triplet && this.triplet.isClosed()) {\n\t\t\tvoice.addOther(this.triplet);\n\t\t\tthis.triplet = null;\n\t\t\tthis.tripletmultiplier = 1;\n\t\t}\n\t}\n\tbeamelem.calcDir();\n\tvoice.addBeam(beamelem);\n\tthis.stemdir = tempStemDir\n\treturn abselemset;\n};\n\nvar sortPitch = function (elem) {\n\tvar sorted;\n\tdo {\n\t\tsorted = true;\n\t\tfor (var p = 0; p < elem.pitches.length - 1; p++) {\n\t\t\tif (elem.pitches[p].pitch > elem.pitches[p + 1].pitch) {\n\t\t\t\tsorted = false;\n\t\t\t\tvar tmp = elem.pitches[p];\n\t\t\t\telem.pitches[p] = elem.pitches[p + 1];\n\t\t\t\telem.pitches[p + 1] = tmp;\n\t\t\t}\n\t\t}\n\t} while (!sorted);\n};\n\nvar ledgerLines = function (abselem, minPitch, maxPitch, isRest, symbolWidth, additionalLedgers, dir, dx, scale) {\n\tfor (var i = maxPitch; i > 11; i--) {\n\t\tif (i % 2 === 0 && !isRest) {\n\t\t\tabselem.addFixed(new RelativeElement(null, dx, (symbolWidth + 4) * scale, i, { type: \"ledger\" }));\n\t\t}\n\t}\n\n\tfor (i = minPitch; i < 1; i++) {\n\t\tif (i % 2 === 0 && !isRest) {\n\t\t\tabselem.addFixed(new RelativeElement(null, dx, (symbolWidth + 4) * scale, i, { type: \"ledger\" }));\n\t\t}\n\t}\n\n\tfor (i = 0; i < additionalLedgers.length; i++) { // PER: draw additional ledgers\n\t\tvar ofs = symbolWidth;\n\t\tif (dir === 'down') ofs = -ofs;\n\t\tabselem.addFixed(new RelativeElement(null, ofs + dx, (symbolWidth + 4) * scale, additionalLedgers[i], { type: \"ledger\" }));\n\t}\n};\n\nAbstractEngraver.prototype.addGraceNotes = function (elem, voice, abselem, notehead, stemHeight, isBagpipes, roomtaken) {\n\tvar gracescale = 3 / 5;\n\tvar graceScaleStem = 3.5 / 5; // TODO-PER: empirically found constant.\n\tstemHeight = Math.round(stemHeight * graceScaleStem);\n\tvar gracebeam = null;\n\tvar flag;\n\n\tif (elem.gracenotes.length > 1) {\n\t\tgracebeam = new BeamElem(stemHeight, \"grace\", isBagpipes);\n\t\tif (hint) gracebeam.setHint();\n\t\tgracebeam.mainNote = abselem;\t// this gives us a reference back to the note this is attached to so that the stems can be attached somewhere.\n\t}\n\n\tvar i;\n\tvar graceoffsets = [];\n\tfor (i = elem.gracenotes.length - 1; i >= 0; i--) { // figure out where to place each gracenote\n\t\troomtaken += 10;\n\t\tgraceoffsets[i] = roomtaken;\n\t\tif (elem.gracenotes[i].accidental) {\n\t\t\troomtaken += 7;\n\t\t}\n\t}\n\n\tfor (i = 0; i < elem.gracenotes.length; i++) {\n\t\tvar gracepitch = elem.gracenotes[i].verticalPos;\n\n\t\tflag = (gracebeam) ? null : chartable.uflags[(isBagpipes) ? 5 : 3];\n\t\tvar accidentalSlot = [];\n\t\tvar ret = createNoteHead(abselem, \"noteheads.quarter\", elem.gracenotes[i],\n\t\t\t{ dir: \"up\", headx: -graceoffsets[i], extrax: -graceoffsets[i], flag: flag, scale: gracescale * this.voiceScale, accidentalSlot: accidentalSlot });\n\t\tret.notehead.highestVert = ret.notehead.pitch + stemHeight;\n\t\tvar grace = ret.notehead;\n\t\tthis.addSlursAndTies(abselem, elem.gracenotes[i], grace, voice, \"up\", true);\n\n\t\tabselem.addExtra(grace);\n\t\t// PER: added acciaccatura slash\n\t\tif (elem.gracenotes[i].acciaccatura) {\n\t\t\tvar pos = elem.gracenotes[i].verticalPos + 7 * gracescale; // the same formula that determines the flag position.\n\t\t\tvar dAcciaccatura = gracebeam ? 5 : 6; // just an offset to make it line up correctly.\n\t\t\tabselem.addRight(new RelativeElement(\"flags.ugrace\", -graceoffsets[i] + dAcciaccatura, 0, pos, { scalex: gracescale, scaley: gracescale }));\n\t\t}\n\t\tif (gracebeam) { // give the beam the necessary info\n\t\t\tvar graceDuration = elem.gracenotes[i].duration / 2;\n\t\t\tif (isBagpipes) graceDuration /= 2;\n\t\t\tvar pseudoabselem = {\n\t\t\t\theads: [grace],\n\t\t\t\tabcelem: { averagepitch: gracepitch, minpitch: gracepitch, maxpitch: gracepitch, duration: graceDuration }\n\t\t\t};\n\t\t\tgracebeam.add(pseudoabselem);\n\t\t} else { // draw the stem\n\t\t\tvar p1 = gracepitch + 1 / 3 * gracescale;\n\t\t\tvar p2 = gracepitch + 7 * gracescale;\n\t\t\tvar dx = grace.dx + grace.w;\n\t\t\tvar width = -0.6;\n\t\t\tabselem.addExtra(new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width }));\n\t\t}\n\t\tledgerLines(abselem, gracepitch, gracepitch, false, glyphs.getSymbolWidth(\"noteheads.quarter\"), [], true, grace.dx - 1, 0.6);\n\n\t\t// if this is the first grace note, we might want to start a slur.\n\t\t// there is a slur if graceSlurs is specifically set.\n\t\t// there is no slur if it is bagpipes.\n\t\t// there is not a slur if the element is a spacer or invisible rest.\n\t\tvar isInvisibleRest = elem.rest && (elem.rest.type === \"spacer\" || elem.rest.type === \"invisible\");\n\t\tif (i === 0 && !isBagpipes && this.graceSlurs && !isInvisibleRest) {\n\t\t\t// This is the overall slur that is under the grace notes.\n\t\t\tvoice.addOther(new TieElem({ anchor1: grace, anchor2: notehead, isGrace: true }));\n\t\t}\n\t}\n\n\tif (gracebeam) {\n\t\tgracebeam.calcDir();\n\t\tvoice.addBeam(gracebeam);\n\t}\n\treturn roomtaken;\n};\n\nfunction addRestToAbsElement(abselem, elem, duration, dot, isMultiVoice, stemdir, isSingleLineStaff, durlog, voiceScale) {\n\tvar c;\n\tvar restpitch = 7;\n\tvar noteHead;\n\tvar roomTaken;\n\tvar roomTakenRight;\n\n\tif (isMultiVoice) {\n\t\tif (stemdir === \"down\") restpitch = 3;\n\t\tif (stemdir === \"up\") restpitch = 11;\n\t}\n\t// There is special placement for the percussion staff. If there is one staff line, then move the rest position.\n\tif (isSingleLineStaff) {\n\t\t// The half and whole rests are attached to different lines normally, so we need to tweak their position to get them to both be attached to the same one.\n\t\tif (duration < 0.5)\n\t\t\trestpitch = 7;\n\t\telse if (duration < 1)\n\t\t\trestpitch = 7;\t// half rest\n\t\telse\n\t\t\trestpitch = 5; // whole rest\n\t}\n\tswitch (elem.rest.type) {\n\t\tcase \"whole\":\n\t\t\tc = chartable.rest[0];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tdot = 0;\n\t\t\tbreak;\n\t\tcase \"rest\":\n\t\t\tif (elem.style === \"rhythm\") // special case for rhythm: rests are a handy way to express the rhythm.\n\t\t\t\tc = chartable.rhythm[-durlog];\n\t\t\telse\n\t\t\t\tc = chartable.rest[-durlog];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tbreak;\n\t\tcase \"invisible\":\n\t\tcase \"invisible-multimeasure\":\n\t\tcase \"spacer\":\n\t\t\tc = \"\";\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tbreak;\n\t\tcase \"multimeasure\":\n\t\t\tc = chartable.rest['multi'];\n\t\t\telem.averagepitch = restpitch;\n\t\t\telem.minpitch = restpitch;\n\t\t\telem.maxpitch = restpitch;\n\t\t\tdot = 0;\n\t\t\tvar mmWidth = glyphs.getSymbolWidth(c);\n\t\t\tabselem.addHead(new RelativeElement(c, mmWidth, mmWidth * 2, 7));\n\t\t\tvar numMeasures = new RelativeElement(\"\" + elem.rest.text, mmWidth, mmWidth, 16, { type: \"multimeasure-text\" });\n\t\t\tabselem.addExtra(numMeasures);\n\t}\n\tif (elem.rest.type.indexOf(\"multimeasure\") < 0 && elem.rest.type !== \"invisible\") {\n\t\tvar ret = createNoteHead(abselem, c, { verticalPos: restpitch },\n\t\t\t{ dot: dot, scale: voiceScale });\n\t\tnoteHead = ret.notehead;\n\t\tif (noteHead) {\n\t\t\tabselem.addHead(noteHead);\n\t\t\troomTaken = ret.accidentalshiftx;\n\t\t\troomTakenRight = ret.dotshiftx;\n\t\t}\n\t}\n\treturn { noteHead: noteHead, roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n}\n\nfunction addIfNotExist(arr, item) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (JSON.stringify(arr[i]) === JSON.stringify(item))\n\t\t\treturn;\n\t}\n\tarr.push(item);\n}\n\nAbstractEngraver.prototype.addNoteToAbcElement = function (abselem, elem, dot, stemdir, style, zeroDuration, durlog, nostem, voice) {\n\tvar dotshiftx = 0; // room taken by chords with displaced noteheads which cause dots to shift\n\tvar noteHead;\n\tvar roomTaken = 0;\n\tvar roomTakenRight = 0;\n\tvar min;\n\tvar i;\n\tvar additionalLedgers = [];\n\t// The accidentalSlot will hold a list of all the accidentals on this chord. Each element is a vertical place,\n\t// and contains a pitch, which is the last pitch that contains an accidental in that slot. The slots are numbered\n\t// from closest to the note to farther left. We only need to know the last accidental we placed because\n\t// we know that the pitches are sorted by now.\n\tvar accidentalSlot = [];\n\tvar symbolWidth = 0;\n\n\tvar dir = (elem.averagepitch >= 6) ? \"down\" : \"up\";\n\tif (stemdir) dir = stemdir;\n\n\tstyle = elem.style ? elem.style : style; // get the style of note head.\n\tif (!style || style === \"normal\") style = \"note\";\n\tvar noteSymbol;\n\tif (zeroDuration)\n\t\tnoteSymbol = chartable[style].nostem;\n\telse\n\t\tnoteSymbol = chartable[style][-durlog];\n\tif (!noteSymbol)\n\t\tconsole.log(\"noteSymbol:\", style, durlog, zeroDuration);\n\n\t// determine elements of chords which should be shifted\n\tvar p;\n\tfor (p = (dir === \"down\") ? elem.pitches.length - 2 : 1; (dir === \"down\") ? p >= 0 : p < elem.pitches.length; p = (dir === \"down\") ? p - 1 : p + 1) {\n\t\tvar prev = elem.pitches[(dir === \"down\") ? p + 1 : p - 1];\n\t\tvar curr = elem.pitches[p];\n\t\tvar delta = (dir === \"down\") ? prev.pitch - curr.pitch : curr.pitch - prev.pitch;\n\t\tif (delta <= 1 && !prev.printer_shift) {\n\t\t\tcurr.printer_shift = (delta) ? \"different\" : \"same\";\n\t\t\tif (curr.verticalPos > 11 || curr.verticalPos < 1) { // PER: add extra ledger line\n\t\t\t\tadditionalLedgers.push(curr.verticalPos - (curr.verticalPos % 2));\n\t\t\t}\n\t\t\tif (dir === \"down\") {\n\t\t\t\troomTaken = glyphs.getSymbolWidth(noteSymbol) + 2;\n\t\t\t} else {\n\t\t\t\tdotshiftx = glyphs.getSymbolWidth(noteSymbol) + 2;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar pp = elem.pitches.length;\n\tfor (p = 0; p < elem.pitches.length; p++) {\n\n\t\tif (!nostem) {\n\t\t\tvar flag;\n\t\t\tif ((dir === \"down\" && p !== 0) || (dir === \"up\" && p !== pp - 1)) { // not the stemmed elem of the chord\n\t\t\t\tflag = null;\n\t\t\t} else {\n\t\t\t\tflag = chartable[(dir === \"down\") ? \"dflags\" : \"uflags\"][-durlog];\n\t\t\t}\n\t\t}\n\t\tvar c;\n\t\tif (elem.pitches[p].style) { // There is a style for the whole group of pitches, but there could also be an override for a particular pitch.\n\t\t\tc = chartable[elem.pitches[p].style][-durlog];\n\t\t} else if (voice.isPercussion && this.percmap) {\n\t\t\tc = noteSymbol;\n\t\t\tvar percHead = this.percmap[pitchesToPerc(elem.pitches[p])];\n\t\t\tif (percHead && percHead.noteHead) {\n\t\t\t\tif (chartable[percHead.noteHead])\n\t\t\t\t\tc = chartable[percHead.noteHead][-durlog];\n\t\t\t}\n\t\t} else\n\t\t\tc = noteSymbol;\n\t\t// The highest position for the sake of placing slurs is itself if the slur is internal. It is the highest position possible if the slur is for the whole chord.\n\t\t// If the note is the only one in the chord, then any slur it has counts as if it were on the whole chord.\n\t\telem.pitches[p].highestVert = elem.pitches[p].verticalPos;\n\t\tvar isTopWhenStemIsDown = (stemdir === \"up\" || dir === \"up\") && p === 0;\n\t\tvar isBottomWhenStemIsUp = (stemdir === \"down\" || dir === \"down\") && p === pp - 1;\n\t\tif (isTopWhenStemIsDown || isBottomWhenStemIsUp) { // place to put slurs if not already on pitches\n\n\t\t\tif (elem.startSlur || pp === 1) {\n\t\t\t\telem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos;\n\t\t\t\tif (getDuration(elem) < 1 && (stemdir === \"up\" || dir === \"up\"))\n\t\t\t\t\telem.pitches[p].highestVert += 6; // If the stem is up, then compensate for the length of the stem\n\t\t\t}\n\t\t\tif (elem.startSlur) {\n\t\t\t\tif (!elem.pitches[p].startSlur) elem.pitches[p].startSlur = []; //TODO possibly redundant, provided array is not optional\n\t\t\t\tfor (i = 0; i < elem.startSlur.length; i++) {\n\t\t\t\t\taddIfNotExist(elem.pitches[p].startSlur, elem.startSlur[i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (elem.endSlur) {\n\t\t\t\telem.pitches[p].highestVert = elem.pitches[pp - 1].verticalPos;\n\t\t\t\tif (getDuration(elem) < 1 && (stemdir === \"up\" || dir === \"up\"))\n\t\t\t\t\telem.pitches[p].highestVert += 6; // If the stem is up, then compensate for the length of the stem\n\t\t\t\tif (!elem.pitches[p].endSlur) elem.pitches[p].endSlur = []; //TODO possibly redundant, provided array is not optional\n\t\t\t\tfor (i = 0; i < elem.endSlur.length; i++) {\n\t\t\t\t\taddIfNotExist(elem.pitches[p].endSlur, elem.endSlur[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar hasStem = !nostem && durlog <= -1;\n\t\tvar ret = createNoteHead(abselem, c, elem.pitches[p],\n\t\t\t{ dir: dir, extrax: -roomTaken, flag: flag, dot: dot, dotshiftx: dotshiftx, scale: this.voiceScale, accidentalSlot: accidentalSlot, shouldExtendStem: !stemdir, printAccidentals: !voice.isPercussion });\n\t\tsymbolWidth = Math.max(glyphs.getSymbolWidth(c), symbolWidth);\n\t\tabselem.extraw -= ret.extraLeft;\n\t\tnoteHead = ret.notehead;\n\t\tif (noteHead) {\n\t\t\tthis.addSlursAndTies(abselem, elem.pitches[p], noteHead, voice, hasStem ? dir : null, false);\n\n\t\t\tif (elem.gracenotes && elem.gracenotes.length > 0)\n\t\t\t\tnoteHead.bottom = noteHead.bottom - 1;\t // If there is a tie to the grace notes, leave a little more room for the note to avoid collisions.\n\t\t\tabselem.addHead(noteHead);\n\t\t}\n\t\troomTaken += ret.accidentalshiftx;\n\t\troomTakenRight = Math.max(roomTakenRight, ret.dotshiftx);\n\t}\n\n\t// draw stem from the furthest note to a pitch above/below the stemmed note\n\tif (hasStem) {\n\t\tvar stemHeight = Math.round(70 * this.voiceScale) / 10;\n\t\tvar p1 = (dir === \"down\") ? elem.minpitch - stemHeight : elem.minpitch + 1 / 3;\n\t\t// PER added stemdir test to make the line meet the note.\n\t\tif (p1 > 6 && !stemdir) p1 = 6;\n\t\tvar p2 = (dir === \"down\") ? elem.maxpitch - 1 / 3 : elem.maxpitch + stemHeight;\n\t\t// PER added stemdir test to make the line meet the note.\n\t\tif (p2 < 6 && !stemdir) p2 = 6;\n\t\tvar dx = (dir === \"down\" || abselem.heads.length === 0) ? 0 : abselem.heads[0].w;\n\t\tvar width = (dir === \"down\") ? 1 : -1;\n\t\t// TODO-PER-HACK: One type of note head has a different placement of the stem. This should be more generically calculated:\n\t\tif (noteHead && noteHead.c === 'noteheads.slash.quarter') {\n\t\t\tif (dir === 'down')\n\t\t\t\tp2 -= 1;\n\t\t\telse\n\t\t\t\tp1 += 1;\n\t\t}\n\t\tif (noteHead && noteHead.c === 'noteheads.triangle.quarter') {\n\t\t\tif (dir === 'down')\n\t\t\t\tp2 -= 0.7;\n\t\t\telse\n\t\t\t\tp1 -= 1.2;\n\t\t}\n\t\tabselem.addRight(new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width, bottom: p1 - 1 }));\n\t\t//var RelativeElement = function RelativeElement(c, dx, w, pitch, opt) {\n\t\tmin = Math.min(p1, p2);\n\t}\n\treturn { noteHead: noteHead, roomTaken: roomTaken, roomTakenRight: roomTakenRight, min: min, additionalLedgers: additionalLedgers, dir: dir, symbolWidth: symbolWidth };\n};\n\nAbstractEngraver.prototype.addLyric = function (abselem, elem) {\n\tvar lyricStr = \"\";\n\telem.lyric.forEach(function (ly) {\n\t\tvar div = ly.divider === ' ' ? \"\" : ly.divider;\n\t\tlyricStr += ly.syllable + div + \"\\n\";\n\t});\n\tvar lyricDim = this.getTextSize.calc(lyricStr, 'vocalfont', \"lyric\");\n\tvar position = elem.positioning ? elem.positioning.vocalPosition : 'below';\n\tabselem.addCentered(new RelativeElement(lyricStr, 0, lyricDim.width, undefined, { type: \"lyric\", position: position, height: lyricDim.height / spacing.STEP, dim: this.getTextSize.attr('vocalfont', \"lyric\") }));\n};\n\nAbstractEngraver.prototype.createNote = function (elem, nostem, isSingleLineStaff, voice) { //stem presence: true for drawing stemless notehead\n\tvar notehead = null;\n\tvar roomtaken = 0; // room needed to the left of the note\n\tvar roomtakenright = 0; // room needed to the right of the note\n\tvar symbolWidth = 0;\n\tvar additionalLedgers = []; // PER: handle the case of [bc'], where the b doesn't have a ledger line\n\n\tvar dir;\n\n\tvar duration = getDuration(elem);\n\tvar zeroDuration = false;\n\tif (duration === 0) { zeroDuration = true; duration = 0.25; nostem = true; } //PER: zero duration will draw a quarter note head.\n\tvar durlog = Math.floor(Math.log(duration) / Math.log(2)); //TODO use getDurlog\n\tvar dot = 0;\n\n\tfor (var tot = Math.pow(2, durlog), inc = tot / 2; tot < duration; dot++, tot += inc, inc /= 2);\n\n\n\tif (elem.startTriplet) {\n\t\tthis.tripletmultiplier = elem.tripletMultiplier;\n\t}\n\n\tvar durationForSpacing = duration * this.tripletmultiplier;\n\tif (elem.rest && elem.rest.type === 'multimeasure')\n\t\tdurationForSpacing = 1;\n\tif (elem.rest && elem.rest.type === 'invisible-multimeasure')\n\t\tdurationForSpacing = this.measureLength * elem.rest.text;\n\tvar absType = elem.rest ? \"rest\" : \"note\";\n\tvar abselem = new AbsoluteElement(elem, durationForSpacing, 1, absType, this.tuneNumber, { durationClassOveride: elem.duration * this.tripletmultiplier });\n\tif (hint) abselem.setHint();\n\n\tif (elem.rest) {\n\t\tif (this.measureLength === duration && elem.rest.type !== 'invisible' && elem.rest.type !== 'spacer' && elem.rest.type.indexOf('multimeasure') < 0)\n\t\t\telem.rest.type = 'whole'; // If the rest is exactly a measure, always use a whole rest\n\t\tvar ret1 = addRestToAbsElement(abselem, elem, duration, dot, voice.voicetotal > 1, this.stemdir, isSingleLineStaff, durlog, this.voiceScale);\n\t\tnotehead = ret1.noteHead;\n\t\troomtaken = ret1.roomTaken;\n\t\troomtakenright = ret1.roomTakenRight;\n\t} else {\n\t\tvar ret2 = this.addNoteToAbcElement(abselem, elem, dot, this.stemdir, this.style, zeroDuration, durlog, nostem, voice);\n\t\tif (ret2.min !== undefined)\n\t\t\tthis.minY = Math.min(ret2.min, this.minY);\n\t\tnotehead = ret2.noteHead;\n\t\troomtaken = ret2.roomTaken;\n\t\troomtakenright = ret2.roomTakenRight;\n\t\tadditionalLedgers = ret2.additionalLedgers;\n\t\tdir = ret2.dir;\n\t\tsymbolWidth = ret2.symbolWidth;\n\t}\n\n\tif (elem.lyric !== undefined) {\n\t\tthis.addLyric(abselem, elem);\n\t}\n\n\tif (elem.gracenotes !== undefined) {\n\t\troomtaken += this.addGraceNotes(elem, voice, abselem, notehead, this.stemHeight * this.voiceScale, this.isBagpipes, roomtaken);\n\t}\n\n\tif (elem.decoration) {\n\t\t// TODO-PER: nostem is true if this is beamed. In that case we don't know where to place the decoration yet so just make a guess. This should be refactored to not place decorations until after the beams are determined.\n\t\t// This should probably be combined with moveDecorations()\n\t\tvar bottom = nostem && dir !== 'up' ? Math.min(-3, abselem.bottom - 6) : abselem.bottom\n\t\tthis.decoration.createDecoration(voice, elem.decoration, abselem.top, (notehead) ? notehead.w : 0, abselem, roomtaken, dir, bottom, elem.positioning, this.hasVocals, this.accentAbove);\n\t}\n\n\tif (elem.barNumber) {\n\t\tabselem.addFixed(new RelativeElement(elem.barNumber, -10, 0, 0, { type: \"barNumber\" }));\n\t}\n\n\t// ledger lines\n\tledgerLines(abselem, elem.minpitch, elem.maxpitch, elem.rest, symbolWidth, additionalLedgers, dir, -2, 1);\n\n\tif (elem.chord !== undefined) {\n\t\tvar ret3 = addChord(this.getTextSize, abselem, elem, roomtaken, roomtakenright, symbolWidth, this.jazzchords, this.germanAlphabet);\n\t\troomtaken = ret3.roomTaken;\n\t\troomtakenright = ret3.roomTakenRight;\n\t}\n\n\tif (elem.startTriplet) {\n\t\tthis.triplet = new TripletElem(elem.startTriplet, notehead, { flatBeams: this.flatBeams }); // above is opposite from case of slurs\n\t}\n\n\tif (elem.endTriplet && this.triplet) {\n\t\tthis.triplet.setCloseAnchor(notehead);\n\t}\n\n\tif (this.triplet && !elem.startTriplet && !elem.endTriplet && !(elem.rest && elem.rest.type === \"spacer\")) {\n\t\tthis.triplet.middleNote(notehead);\n\t}\n\n\treturn abselem;\n};\n\nAbstractEngraver.prototype.addSlursAndTies = function (abselem, pitchelem, notehead, voice, dir, isGrace) {\n\tif (pitchelem.endTie) {\n\t\tif (this.ties.length > 0) {\n\t\t\t// If there are multiple open ties, find the one that applies by matching the pitch, if possible.\n\t\t\tvar found = false;\n\t\t\tfor (var j = 0; j < this.ties.length; j++) {\n\t\t\t\tif (this.ties[j].anchor1 && this.ties[j].anchor1.pitch === notehead.pitch) {\n\t\t\t\t\tthis.ties[j].setEndAnchor(notehead);\n\t\t\t\t\tvoice.setRange(this.ties[j])\n\t\t\t\t\tthis.ties.splice(j, 1);\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tthis.ties[0].setEndAnchor(notehead);\n\t\t\t\tvoice.setRange(this.ties[0])\n\t\t\t\tthis.ties.splice(0, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar voiceNumber = voice.voicetotal < 2 ? -1 : voice.voicenumber;\n\tif (pitchelem.startTie) {\n\t\tvar tie = new TieElem({ anchor1: notehead, force: (this.stemdir === \"down\" || this.stemdir === \"up\"), stemDir: this.stemdir, isGrace: isGrace, voiceNumber: voiceNumber, style: pitchelem.startTie.style });\n\t\tif (hint) tie.setHint();\n\n\t\tthis.ties[this.ties.length] = tie;\n\t\tvoice.addOther(tie);\n\t\t// HACK-PER: For the animation, we need to know if a note is tied to the next one, so here's a flag.\n\t\t// Unfortunately, only some of the notes in the current event might be tied, but this will consider it\n\t\t// tied if any one of them is. That will work for most cases.\n\t\tabselem.startTie = true;\n\t}\n\n\tvar slur;\n\tvar slurid;\n\tif (pitchelem.endSlur) {\n\t\tfor (var i = 0; i < pitchelem.endSlur.length; i++) {\n\t\t\tslurid = pitchelem.endSlur[i];\n\t\t\tif (this.slurs[slurid]) {\n\t\t\t\tslur = this.slurs[slurid];\n\t\t\t\tslur.setEndAnchor(notehead);\n\t\t\t\tvoice.setRange(slur)\n\t\t\t\tdelete this.slurs[slurid];\n\t\t\t} else {\n\t\t\t\tslur = new TieElem({ anchor2: notehead, stemDir: this.stemdir, voiceNumber: voiceNumber });\n\t\t\t\tif (hint) slur.setHint();\n\t\t\t\tvoice.addOther(slur);\n\t\t\t}\n\t\t\tif (this.startlimitelem) {\n\t\t\t\tslur.setStartX(this.startlimitelem);\n\t\t\t}\n\t\t}\n\t} else if (!isGrace) {\n\t\tfor (var s in this.slurs) {\n\t\t\tif (this.slurs.hasOwnProperty(s)) {\n\t\t\t\tthis.slurs[s].addInternalNote(notehead);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (pitchelem.startSlur) {\n\t\tfor (i = 0; i < pitchelem.startSlur.length; i++) {\n\t\t\tslurid = pitchelem.startSlur[i].label;\n\t\t\tslur = new TieElem({ anchor1: notehead, stemDir: this.stemdir, voiceNumber: voiceNumber, style: pitchelem.startSlur[i].style });\n\t\t\tif (hint) slur.setHint();\n\t\t\tthis.slurs[slurid] = slur;\n\t\t\tvoice.addOther(slur);\n\t\t}\n\t}\n};\n\nAbstractEngraver.prototype.addMeasureNumber = function (number, abselem) {\n\tvar measureNumDim = this.getTextSize.calc(number, \"measurefont\", 'bar-number');\n\tvar dx = 0;\n\tif (abselem.isClef) // If this is a clef rather than bar line, then the number shouldn't be centered because it could overlap the left side. This is an easy way to let it be centered but move it over, too.\n\t\tdx += measureNumDim.width / 2\n\tvar vert = measureNumDim.width > 10 && abselem.abcelem.type === \"treble\" ? 13 : 11\n\tabselem.addFixed(new RelativeElement(number, dx, measureNumDim.width, vert + measureNumDim.height / spacing.STEP, { type: \"barNumber\", dim: this.getTextSize.attr(\"measurefont\", 'bar-number') }));\n};\n\nAbstractEngraver.prototype.createBarLine = function (voice, elem, isFirstStaff) {\n\t// bar_thin, bar_thin_thick, bar_thin_thin, bar_thick_thin, bar_right_repeat, bar_left_repeat, bar_double_repeat\n\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'bar', this.tuneNumber);\n\tvar anchor = null; // place to attach part lines\n\tvar dx = 0;\n\n\tif (elem.barNumber) {\n\t\tthis.addMeasureNumber(elem.barNumber, abselem);\n\t}\n\n\n\tvar firstdots = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\");\n\tvar firstthin = (elem.type !== \"bar_left_repeat\" && elem.type !== \"bar_thick_thin\" && elem.type !== \"bar_invisible\");\n\tvar thick = (elem.type === \"bar_right_repeat\" || elem.type === \"bar_dbl_repeat\" || elem.type === \"bar_left_repeat\" ||\n\t\telem.type === \"bar_thin_thick\" || elem.type === \"bar_thick_thin\");\n\tvar secondthin = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_thick_thin\" || elem.type === \"bar_thin_thin\" || elem.type === \"bar_dbl_repeat\");\n\tvar seconddots = (elem.type === \"bar_left_repeat\" || elem.type === \"bar_dbl_repeat\");\n\n\t// limit positioning of slurs\n\tif (firstdots || seconddots) {\n\t\tfor (var slur in this.slurs) {\n\t\t\tif (this.slurs.hasOwnProperty(slur)) {\n\t\t\t\tthis.slurs[slur].setEndX(abselem);\n\t\t\t}\n\t\t}\n\t\tthis.startlimitelem = abselem;\n\t}\n\n\tif (firstdots) {\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 7));\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 5));\n\t\tdx += 6; //2 hardcoded, twice;\n\t}\n\n\tif (firstthin) {\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor);\n\t}\n\n\tif (elem.type === \"bar_invisible\") {\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"none\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor);\n\t}\n\n\tif (elem.decoration) {\n\t\tthis.decoration.createDecoration(voice, elem.decoration, 12, (thick) ? 3 : 1, abselem, 0, \"down\", 2, elem.positioning, this.hasVocals, this.accentAbove);\n\t}\n\n\tif (thick) {\n\t\tdx += 4; //3 hardcoded;\n\t\tanchor = new RelativeElement(null, dx, 4, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 4 });\n\t\tabselem.addRight(anchor);\n\t\tdx += 5;\n\t}\n\n\t// if (this.partstartelem && (thick || (firstthin && secondthin))) { // means end of nth part\n\t// this.partstartelem.anchor2=anchor;\n\t// this.partstartelem = null;\n\t// }\n\n\tif (this.partstartelem && elem.endEnding) {\n\t\tthis.partstartelem.anchor2 = anchor;\n\t\tthis.partstartelem = null;\n\t}\n\n\tif (secondthin) {\n\t\tdx += 3; //3 hardcoded;\n\t\tanchor = new RelativeElement(null, dx, 1, 2, { \"type\": \"bar\", \"pitch2\": 10, linewidth: 0.6 });\n\t\tabselem.addRight(anchor); // 3 is hardcoded\n\t}\n\n\tif (seconddots) {\n\t\tdx += 3; //3 hardcoded;\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 7));\n\t\tabselem.addRight(new RelativeElement(\"dots.dot\", dx, 1, 5));\n\t} // 2 is hardcoded\n\n\tif (elem.startEnding && isFirstStaff) { // only put the first & second ending marks on the first staff\n\t\tvar textWidth = this.getTextSize.calc(elem.startEnding, \"repeatfont\", '').width;\n\t\tabselem.minspacing += textWidth + 10; // Give plenty of room for the ending number.\n\t\tthis.partstartelem = new EndingElem(elem.startEnding, anchor, null);\n\t\tvoice.addOther(this.partstartelem);\n\t}\n\n\t// Add a little space to the left of the bar line so that nothing can crowd it.\n\tabselem.extraw -= 5;\n\n\tif (elem.chord !== undefined) {\n\t\tvar ret3 = addChord(this.getTextSize, abselem, elem, 0, 0, 0, false, this.germanAlphabet);\n\t}\n\n\treturn abselem;\n\n};\n\nmodule.exports = AbstractEngraver;\n","var RelativeElement = require('./elements/relative-element');\nvar spacing = require('../helpers/spacing');\nconst translateChord = require(\"./translate-chord\");\n\nvar addChord = function (getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet) {\n\tfor (var i = 0; i < elem.chord.length; i++) {\n\t\tvar pos = elem.chord[i].position;\n\t\tvar rel_position = elem.chord[i].rel_position;\n\t\tvar isAnnotation = pos === \"left\" || pos === \"right\" || pos === \"below\" || pos === \"above\" || !!rel_position\n\t\tvar font;\n\t\tvar klass;\n\t\tif (isAnnotation) {\n\t\t\tfont = 'annotationfont';\n\t\t\tklass = \"abcjs-annotation\";\n\t\t} else {\n\t\t\tfont = 'gchordfont';\n\t\t\tklass = \"abcjs-chord\";\n\t\t}\n\t\tvar attr = getTextSize.attr(font, klass);\n\n\t\tvar name = elem.chord[i].name\n\t\tvar ret;\n\t\t//console.log(\"chord\",name)\n\t\tif (typeof name === \"string\") {\n\t\t\tret = chordString(name, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet)\n\t\t\troomTaken = ret.roomTaken\n\t\t\troomTakenRight = ret.roomTakenRight\n\t\t} else {\n\t\t\tfor (var j = 0; j < name.length; j++) {\n\t\t\t\tret = chordString(name[j].text, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet)\n\t\t\t\troomTaken = ret.roomTaken\n\t\t\t\troomTakenRight = ret.roomTakenRight\n\t\t\t}\n\t\t}\n\t}\n\treturn { roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n};\n\nfunction chordString(chordString, pos, rel_position, isAnnotation, font, klass, attr, getTextSize, abselem, elem, roomTaken, roomTakenRight, noteheadWidth, jazzchords, germanAlphabet) {\n\tvar chords = chordString.split(\"\\n\");\n\tfor (var j = chords.length - 1; j >= 0; j--) { // parse these in opposite order because we place them from bottom to top.\n\t\tvar chord = chords[j];\n\t\tvar x = 0;\n\t\tvar y;\n\t\tif (!isAnnotation)\n\t\t\tchord = translateChord(chord, jazzchords, germanAlphabet);\n\t\tvar dim = getTextSize.calc(chord, font, klass);\n\t\tvar chordWidth = dim.width;\n\t\tvar chordHeight = dim.height / spacing.STEP;\n\t\tswitch (pos) {\n\t\t\tcase \"left\":\n\t\t\t\troomTaken += chordWidth + 7;\n\t\t\t\tx = -roomTaken; // TODO-PER: This is just a guess from trial and error\n\t\t\t\ty = elem.averagepitch;\n\t\t\t\tabselem.addExtra(new RelativeElement(chord, x, chordWidth + 4, y, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\tposition: \"left\"\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"right\":\n\t\t\t\troomTakenRight += 4;\n\t\t\t\tx = roomTakenRight;// TODO-PER: This is just a guess from trial and error\n\t\t\t\ty = elem.averagepitch;\n\t\t\t\tabselem.addRight(new RelativeElement(chord, x, chordWidth + 4, y, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\tposition: \"right\"\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"below\":\n\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\tabselem.addRight(new RelativeElement(chord, 0, 0, undefined, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tposition: \"below\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\tabselem.addRight(new RelativeElement(chord, 0, 0, undefined, {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tposition: \"above\",\n\t\t\t\t\theight: chordHeight,\n\t\t\t\t\tdim: attr,\n\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t}));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (rel_position) {\n\t\t\t\t\tvar relPositionY = rel_position.y + 3 * spacing.STEP; // TODO-PER: this is a fudge factor to make it line up with abcm2ps\n\t\t\t\t\tabselem.addRight(new RelativeElement(chord, x + rel_position.x, 0, elem.minpitch + relPositionY / spacing.STEP, {\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\theight: chordHeight,\n\t\t\t\t\t\tdim: attr\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\t// setting the y-coordinate to undefined for now: it will be overwritten later on, after we figure out what the highest element on the line is.\n\t\t\t\t\tvar pos2 = 'above';\n\t\t\t\t\tif (elem.positioning && elem.positioning.chordPosition)\n\t\t\t\t\t\tpos2 = elem.positioning.chordPosition;\n\n\t\t\t\t\tif (pos2 !== 'hidden') {\n\t\t\t\t\t\tabselem.addCentered(new RelativeElement(chord, noteheadWidth / 2, chordWidth, undefined, {\n\t\t\t\t\t\t\ttype: \"chord\",\n\t\t\t\t\t\t\tposition: pos2,\n\t\t\t\t\t\t\theight: chordHeight,\n\t\t\t\t\t\t\tdim: attr,\n\t\t\t\t\t\t\trealWidth: chordWidth\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\treturn { roomTaken: roomTaken, roomTakenRight: roomTakenRight };\n}\nmodule.exports = addChord;\n","function addTextIf(rows, params, getTextSize) {\n\tif (!params.text)\n\t\treturn;\n\tif (!params.marginLeft) params.marginLeft = 0;\n\tif (!params.klass) params.klass = '';\n\tif (!params.anchor) params.anchor = 'start';\n\tif (!params.info) params.info = { startChar: -2, endChar: -2 }\n\n\tif (params.marginTop)\n\t\trows.push({ move: params.marginTop });\n\tvar attr = { left: params.marginLeft, text: params.text, font: params.font, anchor: params.anchor, startChar: params.info.startChar, endChar: params.info.endChar, 'dominant-baseline': params['dominant-baseline'] };\n\tif (params.absElemType)\n\t\tattr.absElemType = params.absElemType;\n\tif (!params.inGroup && params.klass)\n\t\tattr.klass = params.klass;\n\tif (params.name)\n\t\tattr.name = params.name;\n\n\trows.push(attr);\n\t// If there are blank lines they won't be counted by getTextSize, so just get the height of one line and multiply\n\tvar size = getTextSize.calc(\"A\", params.font, params.klass);\n\tvar numLines = params.text.split(\"\\n\").length;\n\tif (params.text[params.text.length - 1] === '\\n')\n\t\tnumLines--; // If there is a new line at the end of the string, then an extra line will be counted.\n\tif (!params.noMove) {\n\t\tvar h = (size.height * 1.1) * numLines;\n\t\trows.push({ move: Math.round(h) });\n\t\tif (params.marginBottom)\n\t\t\trows.push({ move: params.marginBottom });\n\t}\n}\n\nmodule.exports = addTextIf;\n","var calcHeight = function (staffGroup) {\n\t// the height is calculated here in a parallel way to the drawing below in hopes that both of these functions will be modified together.\n\t// TODO-PER: also add the space between staves. (That's systemStaffSeparation, which is the minimum distance between the staff LINES.)\n\tvar height = 0;\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar staff = staffGroup.voices[i].staff;\n\t\tif (!staffGroup.voices[i].duplicate) {\n\t\t\theight += staff.top;\n\t\t\t//if (staff.bottom < 0)\n\t\t\theight += -staff.bottom;\n\t\t}\n\t}\n\treturn height;\n};\n\nmodule.exports = calcHeight;\n\n","// abc_create_clef.js\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createClef = function (elem, tuneNumber) {\n\tvar clef;\n\tvar octave = 0;\n\telem.el_type = \"clef\";\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra clef', tuneNumber);\n\tabselem.isClef = true;\n\tswitch (elem.type) {\n\t\tcase \"treble\": clef = \"clefs.G\"; break;\n\t\tcase \"tenor\": clef = \"clefs.C\"; break;\n\t\tcase \"alto\": clef = \"clefs.C\"; break;\n\t\tcase \"bass\": clef = \"clefs.F\"; break;\n\t\tcase 'treble+8': clef = \"clefs.G\"; octave = 1; break;\n\t\tcase 'tenor+8': clef = \"clefs.C\"; octave = 1; break;\n\t\tcase 'bass+8': clef = \"clefs.F\"; octave = 1; break;\n\t\tcase 'alto+8': clef = \"clefs.C\"; octave = 1; break;\n\t\tcase 'treble-8': clef = \"clefs.G\"; octave = -1; break;\n\t\tcase 'tenor-8': clef = \"clefs.C\"; octave = -1; break;\n\t\tcase 'bass-8': clef = \"clefs.F\"; octave = -1; break;\n\t\tcase 'alto-8': clef = \"clefs.C\"; octave = -1; break;\n\t\tcase 'none': return null;\n\t\tcase 'perc': clef = \"clefs.perc\"; break;\n\t\tdefault: abselem.addFixed(new RelativeElement(\"clef=\" + elem.type, 0, 0, undefined, { type: \"debug\" }));\n\t}\n\t// if (elem.verticalPos) {\n\t// pitch = elem.verticalPos;\n\t// }\n\tvar dx = 5;\n\tif (clef) {\n\t\tvar height = glyphs.symbolHeightInPitches(clef);\n\t\tvar ofs = clefOffsets(clef);\n\t\tabselem.addRight(new RelativeElement(clef, dx, glyphs.getSymbolWidth(clef), elem.clefPos, { top: height + elem.clefPos + ofs, bottom: elem.clefPos + ofs }));\n\n\t\tif (octave !== 0) {\n\t\t\tvar scale = 2 / 3;\n\t\t\tvar adjustspacing = (glyphs.getSymbolWidth(clef) - glyphs.getSymbolWidth(\"8\") * scale) / 2;\n\t\t\tvar pitch = (octave > 0) ? abselem.top + 3 : abselem.bottom - 1;\n\t\t\tvar top = (octave > 0) ? abselem.top + 3 : abselem.bottom - 3;\n\t\t\tvar bottom = top - 2;\n\t\t\tif (elem.type === \"bass-8\") {\n\t\t\t\t// The placement for bass octave is a little different. It should hug the clef.\n\t\t\t\tpitch = 3;\n\t\t\t\tadjustspacing = 0;\n\t\t\t}\n\t\t\tabselem.addRight(new RelativeElement(\"8\", dx + adjustspacing, glyphs.getSymbolWidth(\"8\") * scale, pitch, {\n\t\t\t\tscalex: scale,\n\t\t\t\tscaley: scale,\n\t\t\t\ttop: top,\n\t\t\t\tbottom: bottom\n\t\t\t}));\n\t\t\t//abselem.top += 2;\n\t\t}\n\t}\n\treturn abselem;\n};\n\nfunction clefOffsets(clef) {\n\tswitch (clef) {\n\t\tcase \"clefs.G\": return -5;\n\t\tcase \"clefs.C\": return -4;\n\t\tcase \"clefs.F\": return -4;\n\t\tcase \"clefs.perc\": return -2;\n\t\tdefault: return 0;\n\t}\n}\n\nmodule.exports = createClef;\n","// abc_create_key_signature.js\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createKeySignature = function (elem, tuneNumber) {\n\telem.el_type = \"keySignature\";\n\tif (!elem.accidentals || elem.accidentals.length === 0)\n\t\treturn null;\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra key-signature', tuneNumber);\n\tabselem.isKeySig = true;\n\tvar dx = 0;\n\telem.accidentals.forEach(function (acc) {\n\t\tvar symbol;\n\t\tvar fudge = 0;\n\t\tswitch (acc.acc) {\n\t\t\tcase \"sharp\": symbol = \"accidentals.sharp\"; fudge = -3; break;\n\t\t\tcase \"natural\": symbol = \"accidentals.nat\"; break;\n\t\t\tcase \"flat\": symbol = \"accidentals.flat\"; fudge = -1.2; break;\n\t\t\tcase \"quartersharp\": symbol = \"accidentals.halfsharp\"; fudge = -2.5; break;\n\t\t\tcase \"quarterflat\": symbol = \"accidentals.halfflat\"; fudge = -1.2; break;\n\t\t\tdefault: symbol = \"accidentals.flat\";\n\t\t}\n\t\tabselem.addRight(new RelativeElement(symbol, dx, glyphs.getSymbolWidth(symbol), acc.verticalPos, { thickness: glyphs.symbolHeightInPitches(symbol), top: acc.verticalPos + glyphs.symbolHeightInPitches(symbol) + fudge, bottom: acc.verticalPos + fudge }));\n\t\tdx += glyphs.getSymbolWidth(symbol) + 2;\n\t}, this);\n\treturn abselem;\n};\n\nmodule.exports = createKeySignature;\n","var glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createNoteHead = function (abselem, c, pitchelem, options) {\n\tif (!options) options = {};\n\tvar dir = (options.dir !== undefined) ? options.dir : null;\n\tvar headx = (options.headx !== undefined) ? options.headx : 0;\n\tvar extrax = (options.extrax !== undefined) ? options.extrax : 0;\n\tvar flag = (options.flag !== undefined) ? options.flag : null;\n\tvar dot = (options.dot !== undefined) ? options.dot : 0;\n\tvar dotshiftx = (options.dotshiftx !== undefined) ? options.dotshiftx : 0;\n\tvar scale = (options.scale !== undefined) ? options.scale : 1;\n\tvar accidentalSlot = (options.accidentalSlot !== undefined) ? options.accidentalSlot : [];\n\tvar shouldExtendStem = (options.shouldExtendStem !== undefined) ? options.shouldExtendStem : false;\n\tvar printAccidentals = (options.printAccidentals !== undefined) ? options.printAccidentals : true;\n\n\t// TODO scale the dot as well\n\tvar pitch = pitchelem.verticalPos;\n\tvar notehead;\n\tvar accidentalshiftx = 0;\n\tvar newDotShiftX = 0;\n\tvar extraLeft = 0;\n\tif (c === undefined)\n\t\tabselem.addFixed(new RelativeElement(\"pitch is undefined\", 0, 0, 0, { type: \"debug\" }));\n\telse if (c === \"\") {\n\t\tnotehead = new RelativeElement(null, 0, 0, pitch);\n\t} else {\n\t\tvar shiftheadx = headx;\n\t\tif (pitchelem.printer_shift) {\n\t\t\tvar adjust = (pitchelem.printer_shift === \"same\") ? 1 : 0;\n\t\t\tshiftheadx = (dir === \"down\") ? -glyphs.getSymbolWidth(c) * scale + adjust : glyphs.getSymbolWidth(c) * scale - adjust;\n\t\t}\n\t\tvar opts = { scalex: scale, scaley: scale, thickness: glyphs.symbolHeightInPitches(c) * scale, name: pitchelem.name };\n\t\tnotehead = new RelativeElement(c, shiftheadx, glyphs.getSymbolWidth(c) * scale, pitch, opts);\n\t\tnotehead.stemDir = dir;\n\t\tif (flag) {\n\t\t\tvar pos = pitch + ((dir === \"down\") ? -7 : 7) * scale;\n\t\t\t// if this is a regular note, (not grace or tempo indicator) then the stem will have been stretched to the middle line if it is far from the center.\n\t\t\tif (shouldExtendStem) {\n\t\t\t\tif (dir === \"down\" && pos > 6)\n\t\t\t\t\tpos = 6;\n\t\t\t\tif (dir === \"up\" && pos < 6)\n\t\t\t\t\tpos = 6;\n\t\t\t}\n\t\t\t//if (scale===1 && (dir===\"down\")?(pos>6):(pos<6)) pos=6;\n\t\t\tvar xdelta = (dir === \"down\") ? headx : headx + notehead.w - 0.6;\n\t\t\tabselem.addRight(new RelativeElement(flag, xdelta, glyphs.getSymbolWidth(flag) * scale, pos, { scalex: scale, scaley: scale }));\n\t\t}\n\t\tnewDotShiftX = notehead.w + dotshiftx - 2 + 5 * dot;\n\t\tfor (; dot > 0; dot--) {\n\t\t\tvar dotadjusty = (1 - Math.abs(pitch) % 2); //PER: take abs value of the pitch. And the shift still happens on ledger lines.\n\t\t\tabselem.addRight(new RelativeElement(\"dots.dot\", notehead.w + dotshiftx - 2 + 5 * dot, glyphs.getSymbolWidth(\"dots.dot\"), pitch + dotadjusty));\n\t\t}\n\t}\n\tif (notehead)\n\t\tnotehead.highestVert = pitchelem.highestVert;\n\n\tif (printAccidentals && pitchelem.accidental) {\n\t\tvar symb;\n\t\tswitch (pitchelem.accidental) {\n\t\t\tcase \"quartersharp\":\n\t\t\t\tsymb = \"accidentals.halfsharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"dblsharp\":\n\t\t\t\tsymb = \"accidentals.dblsharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"sharp\":\n\t\t\t\tsymb = \"accidentals.sharp\";\n\t\t\t\tbreak;\n\t\t\tcase \"quarterflat\":\n\t\t\t\tsymb = \"accidentals.halfflat\";\n\t\t\t\tbreak;\n\t\t\tcase \"flat\":\n\t\t\t\tsymb = \"accidentals.flat\";\n\t\t\t\tbreak;\n\t\t\tcase \"dblflat\":\n\t\t\t\tsymb = \"accidentals.dblflat\";\n\t\t\t\tbreak;\n\t\t\tcase \"natural\":\n\t\t\t\tsymb = \"accidentals.nat\";\n\t\t}\n\t\t// if a note is at least a sixth away, it can share a slot with another accidental\n\t\tvar accSlotFound = false;\n\t\tvar accPlace = extrax;\n\t\tfor (var j = 0; j < accidentalSlot.length; j++) {\n\t\t\tif (pitch - accidentalSlot[j][0] >= 6) {\n\t\t\t\taccidentalSlot[j][0] = pitch;\n\t\t\t\taccPlace = accidentalSlot[j][1];\n\t\t\t\taccSlotFound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (accSlotFound === false) {\n\t\t\taccPlace -= (glyphs.getSymbolWidth(symb) * scale + 2);\n\t\t\taccidentalSlot.push([pitch, accPlace]);\n\t\t\taccidentalshiftx = (glyphs.getSymbolWidth(symb) * scale + 2);\n\t\t}\n\t\tvar h = glyphs.symbolHeightInPitches(symb);\n\t\tabselem.addExtra(new RelativeElement(symb, accPlace, glyphs.getSymbolWidth(symb), pitch, { scalex: scale, scaley: scale, top: pitch + h / 2, bottom: pitch - h / 2 }));\n\t\textraLeft = glyphs.getSymbolWidth(symb) / 2; // TODO-PER: We need a little extra width if there is an accidental, but I'm not sure why it isn't the full width of the accidental.\n\t}\n\n\treturn { notehead: notehead, accidentalshiftx: accidentalshiftx, dotshiftx: newDotShiftX, extraLeft: extraLeft };\n\n};\n\nmodule.exports = createNoteHead;\n","// abc_create_time_signature.js\n\nvar AbsoluteElement = require('./elements/absolute-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\n\nvar createTimeSignature = function (elem, tuneNumber) {\n\telem.el_type = \"timeSignature\";\n\tvar abselem = new AbsoluteElement(elem, 0, 10, 'staff-extra time-signature', tuneNumber);\n\tif (elem.type === \"specified\") {\n\t\tvar x = 0;\n\t\tfor (var i = 0; i < elem.value.length; i++) {\n\t\t\tif (i !== 0) {\n\t\t\t\tabselem.addRight(new RelativeElement('+', x + 1, glyphs.getSymbolWidth(\"+\"), 6, { thickness: glyphs.symbolHeightInPitches(\"+\") }));\n\t\t\t\tx += glyphs.getSymbolWidth(\"+\") + 2;\n\t\t\t}\n\t\t\tif (elem.value[i].den) {\n\t\t\t\tvar numWidth = 0;\n\t\t\t\tfor (var i2 = 0; i2 < elem.value[i].num.length; i2++)\n\t\t\t\t\tnumWidth += glyphs.getSymbolWidth(elem.value[i].num[i2]);\n\t\t\t\tvar denWidth = 0;\n\t\t\t\tfor (i2 = 0; i2 < elem.value[i].num.length; i2++)\n\t\t\t\t\tdenWidth += glyphs.getSymbolWidth(elem.value[i].den[i2]);\n\t\t\t\tvar maxWidth = Math.max(numWidth, denWidth);\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].num, x + (maxWidth - numWidth) / 2, numWidth, 8, { thickness: glyphs.symbolHeightInPitches(elem.value[i].num[0]) }));\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].den, x + (maxWidth - denWidth) / 2, denWidth, 4, { thickness: glyphs.symbolHeightInPitches(elem.value[i].den[0]) }));\n\t\t\t\tx += maxWidth\n\t\t\t} else {\n\t\t\t\tvar thisWidth = 0;\n\t\t\t\tfor (var i3 = 0; i3 < elem.value[i].num.length; i3++)\n\t\t\t\t\tthisWidth += glyphs.getSymbolWidth(elem.value[i].num[i3]);\n\t\t\t\tabselem.addRight(new RelativeElement(elem.value[i].num, x, thisWidth, 6, { thickness: glyphs.symbolHeightInPitches(elem.value[i].num[0]) }));\n\t\t\t\tx += thisWidth;\n\t\t\t}\n\t\t}\n\t} else if (elem.type === \"common_time\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.common\", 0, glyphs.getSymbolWidth(\"timesig.common\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.common\") }));\n\n\t} else if (elem.type === \"cut_time\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.cut\", 0, glyphs.getSymbolWidth(\"timesig.cut\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.cut\") }));\n\t} else if (elem.type === \"tempus_imperfectum\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.imperfectum\", 0, glyphs.getSymbolWidth(\"timesig.imperfectum\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.imperfectum\") }));\n\t} else if (elem.type === \"tempus_imperfectum_prolatio\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.imperfectum2\", 0, glyphs.getSymbolWidth(\"timesig.imperfectum2\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.imperfectum2\") }));\n\t} else if (elem.type === \"tempus_perfectum\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.perfectum\", 0, glyphs.getSymbolWidth(\"timesig.perfectum\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.perfectum\") }));\n\t} else if (elem.type === \"tempus_perfectum_prolatio\") {\n\t\tabselem.addRight(new RelativeElement(\"timesig.perfectum2\", 0, glyphs.getSymbolWidth(\"timesig.perfectum2\"), 6, { thickness: glyphs.symbolHeightInPitches(\"timesig.perfectum2\") }));\n\t} else {\n\t\tconsole.log(\"time signature:\", elem);\n\t}\n\treturn abselem;\n};\n\nmodule.exports = createTimeSignature;\n","// abc_decoration.js: Creates a data structure suitable for printing a line of abc\n\nvar DynamicDecoration = require('./elements/dynamic-decoration');\nvar CrescendoElem = require('./elements/crescendo-element');\nvar GlissandoElem = require('./elements/glissando-element');\nvar glyphs = require('./glyphs');\nvar RelativeElement = require('./elements/relative-element');\nvar TieElem = require('./elements/tie-element');\n\nvar Decoration = function Decoration() {\n\tthis.startDiminuendoX = undefined;\n\tthis.startCrescendoX = undefined;\n\tthis.minTop = 12;\t// TODO-PER: this is assuming a 5-line staff. Pass that info in.\n\tthis.minBottom = 0;\n};\n\nvar closeDecoration = function (voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, accentAbove) {\n\tvar yPos;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tif (decoration[i] === \"staccato\" || decoration[i] === \"tenuto\" || (decoration[i] === \"accent\" && !accentAbove)) {\n\t\t\tvar symbol = \"scripts.\" + decoration[i];\n\t\t\tif (decoration[i] === \"accent\") symbol = \"scripts.sforzato\";\n\t\t\tif (yPos === undefined)\n\t\t\t\tyPos = (dir === \"down\") ? pitch + 2 : minPitch - 2;\n\t\t\telse\n\t\t\t\tyPos = (dir === \"down\") ? yPos + 2 : yPos - 2;\n\t\t\tif (decoration[i] === \"accent\") {\n\t\t\t\t// Always place the accent three pitches away, no matter whether that is a line or space.\n\t\t\t\tif (dir === \"up\") yPos--;\n\t\t\t\telse yPos++;\n\t\t\t} else {\n\t\t\t\t// don't place on a stave line. The stave lines are 2,4,6,8,10\n\t\t\t\tswitch (yPos) {\n\t\t\t\t\tcase 2:\n\t\t\t\t\tcase 4:\n\t\t\t\t\tcase 6:\n\t\t\t\t\tcase 8:\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tif (dir === \"up\") yPos--;\n\t\t\t\t\t\telse yPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pitch > 9) yPos++; // take up some room of those that are above\n\t\t\tvar deltaX = width / 2;\n\t\t\tif (glyphs.getSymbolAlign(symbol) !== \"center\") {\n\t\t\t\tdeltaX -= (glyphs.getSymbolWidth(symbol) / 2);\n\t\t\t}\n\t\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), yPos));\n\t\t}\n\t\tif (decoration[i] === \"slide\" && abselem.heads[0]) {\n\t\t\tvar yPos2 = abselem.heads[0].pitch;\n\t\t\tyPos2 -= 2; // TODO-PER: not sure what this fudge factor is.\n\t\t\tvar blank1 = new RelativeElement(\"\", -roomtaken - 15, 0, yPos2 - 1);\n\t\t\tvar blank2 = new RelativeElement(\"\", -roomtaken - 5, 0, yPos2 + 1);\n\t\t\tabselem.addFixedX(blank1);\n\t\t\tabselem.addFixedX(blank2);\n\t\t\tvoice.addOther(new TieElem({ anchor1: blank1, anchor2: blank2, fixedY: true }));\n\t\t}\n\t}\n\tif (yPos === undefined)\n\t\tyPos = pitch;\n\n\treturn { above: yPos, below: abselem.bottom };\n};\n\nvar volumeDecoration = function (voice, decoration, abselem, positioning) {\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"p\":\n\t\t\tcase \"mp\":\n\t\t\tcase \"pp\":\n\t\t\tcase \"ppp\":\n\t\t\tcase \"pppp\":\n\t\t\tcase \"f\":\n\t\t\tcase \"ff\":\n\t\t\tcase \"fff\":\n\t\t\tcase \"ffff\":\n\t\t\tcase \"sfz\":\n\t\t\tcase \"mf\":\n\t\t\t\tvar elem = new DynamicDecoration(abselem, decoration[i], positioning);\n\t\t\t\tvoice.addOther(elem);\n\t\t}\n\t}\n};\n\nvar compoundDecoration = function (decoration, pitch, width, abselem, dir) {\n\tfunction highestPitch() {\n\t\tif (abselem.heads.length === 0)\n\t\t\treturn 10;\t// TODO-PER: I don't know if this can happen, but we'll return the top of the staff if so.\n\t\tvar pitch = abselem.heads[0].pitch;\n\t\tfor (var i = 1; i < abselem.heads.length; i++)\n\t\t\tpitch = Math.max(pitch, abselem.heads[i].pitch);\n\t\treturn pitch;\n\t}\n\tfunction lowestPitch() {\n\t\tif (abselem.heads.length === 0)\n\t\t\treturn 2;\t// TODO-PER: I don't know if this can happen, but we'll return the bottom of the staff if so.\n\t\tvar pitch = abselem.heads[0].pitch;\n\t\tfor (var i = 1; i < abselem.heads.length; i++)\n\t\t\tpitch = Math.min(pitch, abselem.heads[i].pitch);\n\t\treturn pitch;\n\t}\n\tfunction compoundDecoration(symbol, count) {\n\t\tvar placement = (dir === 'down') ? lowestPitch() + 1 : highestPitch() + 9;\n\t\tif (dir !== 'down' && count === 1)\n\t\t\tplacement--;\n\t\tvar deltaX = width / 2;\n\t\tdeltaX += (dir === 'down') ? -5 : 3;\n\t\tfor (var i = 0; i < count; i++) {\n\t\t\tplacement -= 1;\n\t\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), placement));\n\t\t}\n\t}\n\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"/\": compoundDecoration(\"flags.ugrace\", 1); break;\n\t\t\tcase \"//\": compoundDecoration(\"flags.ugrace\", 2); break;\n\t\t\tcase \"///\": compoundDecoration(\"flags.ugrace\", 3); break;\n\t\t\tcase \"////\": compoundDecoration(\"flags.ugrace\", 4); break;\n\t\t}\n\t}\n};\n\nvar stackedDecoration = function (decoration, width, abselem, yPos, positioning, minTop, minBottom, accentAbove) {\n\tfunction incrementPlacement(placement, height) {\n\t\tif (placement === 'above')\n\t\t\tyPos.above += height;\n\t\telse\n\t\t\tyPos.below -= height;\n\t}\n\tfunction getPlacement(placement) {\n\t\tvar y;\n\t\tif (placement === 'above') {\n\t\t\ty = yPos.above;\n\t\t\tif (y < minTop)\n\t\t\t\ty = minTop;\n\t\t} else {\n\t\t\ty = yPos.below;\n\t\t\tif (y > minBottom)\n\t\t\t\ty = minBottom;\n\t\t}\n\t\treturn y;\n\t}\n\tfunction textDecoration(text, placement, anchor) {\n\t\tvar y = getPlacement(placement);\n\t\tvar textFudge = 2;\n\t\tvar textHeight = 5;\n\t\t// TODO-PER: Get the height of the current font and use that for the thickness.\n\t\tabselem.addFixedX(new RelativeElement(text, width / 2, 0, y + textFudge, { type: \"decoration\", klass: 'ornament', thickness: 3, anchor: anchor }));\n\n\t\tincrementPlacement(placement, textHeight);\n\t}\n\tfunction symbolDecoration(symbol, placement) {\n\t\tvar deltaX = width / 2;\n\t\tif (glyphs.getSymbolAlign(symbol) !== \"center\") {\n\t\t\tdeltaX -= (glyphs.getSymbolWidth(symbol) / 2);\n\t\t}\n\t\tvar height = glyphs.symbolHeightInPitches(symbol) + 1; // adding a little padding so nothing touches.\n\t\tvar y = getPlacement(placement);\n\t\ty = (placement === 'above') ? y + height / 2 : y - height / 2;// Center the element vertically.\n\t\tabselem.addFixedX(new RelativeElement(symbol, deltaX, glyphs.getSymbolWidth(symbol), y, { klass: 'ornament', thickness: glyphs.symbolHeightInPitches(symbol), position: placement }));\n\n\t\tincrementPlacement(placement, height);\n\t}\n\n\tvar symbolList = {\n\t\t\"+\": \"scripts.stopped\",\n\t\t\"open\": \"scripts.open\",\n\t\t\"snap\": \"scripts.snap\",\n\t\t\"wedge\": \"scripts.wedge\",\n\t\t\"thumb\": \"scripts.thumb\",\n\t\t\"shortphrase\": \"scripts.shortphrase\",\n\t\t\"mediumphrase\": \"scripts.mediumphrase\",\n\t\t\"longphrase\": \"scripts.longphrase\",\n\t\t\"trill\": \"scripts.trill\",\n\t\t\"roll\": \"scripts.roll\",\n\t\t\"irishroll\": \"scripts.roll\",\n\t\t\"marcato\": \"scripts.umarcato\",\n\t\t\"dmarcato\": \"scripts.dmarcato\",\n\t\t\"umarcato\": \"scripts.umarcato\",\n\t\t\"turn\": \"scripts.turn\",\n\t\t\"uppermordent\": \"scripts.prall\",\n\t\t\"pralltriller\": \"scripts.prall\",\n\t\t\"mordent\": \"scripts.mordent\",\n\t\t\"lowermordent\": \"scripts.mordent\",\n\t\t\"downbow\": \"scripts.downbow\",\n\t\t\"upbow\": \"scripts.upbow\",\n\t\t\"fermata\": \"scripts.ufermata\",\n\t\t\"invertedfermata\": \"scripts.dfermata\",\n\t\t\"breath\": \",\",\n\t\t\"coda\": \"scripts.coda\",\n\t\t\"segno\": \"scripts.segno\"\n\t};\n\n\tvar hasOne = false;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"D.C.\":\n\t\t\tcase \"D.S.\":\n\t\t\t\ttextDecoration(decoration[i], positioning, 'middle');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.C.alcoda\":\n\t\t\t\ttextDecoration(\"D.C. al coda\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.C.alfine\":\n\t\t\t\ttextDecoration(\"D.C. al fine\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.S.alcoda\":\n\t\t\t\ttextDecoration(\"D.S. al coda\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"D.S.alfine\":\n\t\t\t\ttextDecoration(\"D.S. al fine\", positioning, 'end');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"fine\":\n\t\t\t\ttextDecoration(\"FINE\", positioning, 'middle');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"+\":\n\t\t\tcase \"open\":\n\t\t\tcase \"snap\":\n\t\t\tcase \"wedge\":\n\t\t\tcase \"thumb\":\n\t\t\tcase \"shortphrase\":\n\t\t\tcase \"mediumphrase\":\n\t\t\tcase \"longphrase\":\n\t\t\tcase \"trill\":\n\t\t\tcase \"roll\":\n\t\t\tcase \"irishroll\":\n\t\t\tcase \"marcato\":\n\t\t\tcase \"dmarcato\":\n\t\t\tcase \"turn\":\n\t\t\tcase \"uppermordent\":\n\t\t\tcase \"pralltriller\":\n\t\t\tcase \"mordent\":\n\t\t\tcase \"lowermordent\":\n\t\t\tcase \"downbow\":\n\t\t\tcase \"upbow\":\n\t\t\tcase \"fermata\":\n\t\t\tcase \"breath\":\n\t\t\tcase \"umarcato\":\n\t\t\tcase \"coda\":\n\t\t\tcase \"segno\":\n\t\t\t\tsymbolDecoration(symbolList[decoration[i]], positioning);\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"invertedfermata\":\n\t\t\t\tsymbolDecoration(symbolList[decoration[i]], 'below');\n\t\t\t\thasOne = true;\n\t\t\t\tbreak;\n\t\t\tcase \"mark\":\n\t\t\t\tabselem.klass = \"mark\";\n\t\t\t\tbreak;\n\t\t\tcase \"accent\":\n\t\t\t\tif (accentAbove) {\n\t\t\t\t\tsymbolDecoration(\"scripts.sforzato\", positioning);\n\t\t\t\t\thasOne = true;\n\t\t\t\t}\n\t\t\t\tbreak;\t\n\t\t}\n\t}\n\treturn hasOne;\n};\n\nfunction leftDecoration(decoration, abselem, roomtaken) {\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"arpeggio\":\n\t\t\t\t// The arpeggio symbol is the height of a note (that is, two Y units). This stacks as many as we need to go from the\n\t\t\t\t// top note to the bottom note. The arpeggio should also be a little taller than the stacked notes, so there is an extra\n\t\t\t\t// one drawn and it is offset by half of a note height (that is, one Y unit).\n\t\t\t\tfor (var j = abselem.abcelem.minpitch - 1; j <= abselem.abcelem.maxpitch; j += 2) {\n\t\t\t\t\tabselem.addExtra(\n\t\t\t\t\t\tnew RelativeElement(\n\t\t\t\t\t\t\t\"scripts.arpeggio\",\n\t\t\t\t\t\t\t-glyphs.getSymbolWidth(\"scripts.arpeggio\") * 2 - roomtaken,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\tj + 2,\n\t\t\t\t\t\t\t{ klass: 'ornament', thickness: glyphs.symbolHeightInPitches(\"scripts.arpeggio\") }\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nDecoration.prototype.dynamicDecoration = function (voice, decoration, abselem, positioning) {\n\tvar diminuendo;\n\tvar crescendo;\n\tvar glissando;\n\tfor (var i = 0; i < decoration.length; i++) {\n\t\tswitch (decoration[i]) {\n\t\t\tcase \"diminuendo(\":\n\t\t\t\tthis.startDiminuendoX = abselem;\n\t\t\t\tdiminuendo = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"diminuendo)\":\n\t\t\t\tdiminuendo = { start: this.startDiminuendoX, stop: abselem };\n\t\t\t\tthis.startDiminuendoX = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"crescendo(\":\n\t\t\t\tthis.startCrescendoX = abselem;\n\t\t\t\tcrescendo = undefined;\n\t\t\t\tbreak;\n\t\t\tcase \"crescendo)\":\n\t\t\t\tcrescendo = { start: this.startCrescendoX, stop: abselem };\n\t\t\t\tthis.startCrescendoX = undefined;\n\t\t\t\tbreak;\n\t\t\tcase '~(':\n\t\t\tcase \"glissando(\":\n\t\t\t\tthis.startGlissandoX = abselem;\n\t\t\t\tglissando = undefined;\n\t\t\t\tbreak;\n\t\t\tcase '~)':\n\t\t\tcase \"glissando)\":\n\t\t\t\tglissando = { start: this.startGlissandoX, stop: abselem };\n\t\t\t\tthis.startGlissandoX = undefined;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (diminuendo) {\n\t\tvoice.addOther(new CrescendoElem(diminuendo.start, diminuendo.stop, \">\", positioning));\n\t}\n\tif (crescendo) {\n\t\tvoice.addOther(new CrescendoElem(crescendo.start, crescendo.stop, \"<\", positioning));\n\t}\n\tif (glissando) {\n\t\tvoice.addOther(new GlissandoElem(glissando.start, glissando.stop));\n\t}\n};\n\nDecoration.prototype.createDecoration = function (voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, positioning, hasVocals, accentAbove) {\n\tif (!positioning)\n\t\tpositioning = { ornamentPosition: 'above', volumePosition: hasVocals ? 'above' : 'below', dynamicPosition: hasVocals ? 'above' : 'below' };\n\t// These decorations don't affect the placement of other decorations\n\tvolumeDecoration(voice, decoration, abselem, positioning.volumePosition);\n\tthis.dynamicDecoration(voice, decoration, abselem, positioning.dynamicPosition);\n\tcompoundDecoration(decoration, pitch, width, abselem, dir);\n\n\t// treat staccato, accent, and tenuto first (may need to shift other markers)\n\tvar yPos = closeDecoration(voice, decoration, pitch, width, abselem, roomtaken, dir, minPitch, accentAbove);\n\t// yPos is an object containing 'above' and 'below'. That is the placement of the next symbol on either side.\n\n\tyPos.above = Math.max(yPos.above, this.minTop);\n\tyPos.below = Math.min(yPos.below, minPitch);\n\tvar hasOne = stackedDecoration(decoration, width, abselem, yPos, positioning.ornamentPosition, this.minTop, minPitch, accentAbove);\n\t//if (hasOne) {\n\t\t//\t\t\tabselem.top = Math.max(yPos.above + 3, abselem.top); // TODO-PER: Not sure why we need this fudge factor.\n\t//}\n\tleftDecoration(decoration, abselem, roomtaken);\n};\n\nmodule.exports = Decoration;\n","// abc_absolute_element.js: Definition of the AbsoluteElement class.\n\nvar highlight = require(\"../../interactive/highlight\");\nvar unhighlight = require(\"../../interactive/unhighlight\");\n\n// Everything that is placed in the SVG is first created as an absolute element. This is one unit of graphic information.\n// That is, it embodies a concept: a clef, a time signature, a bar line,etc. or most complexly:\n// a note with its accidental, grace note, chord symbol, trill, stem, eighth flags, etc.\n// In the largest sense, these are placed on the page at a particular place that is determined during the layout phase.\n// This object doesn't contain any of the drawing information, though. That information is contained in an array of\n// RelativeElements as the \"children\" of this class.\n// During the layout phase, the width of all the children is calculated and the X coordinate of the absolute element is set.\n//\n// So, after the AbsoluteElement is placed, then its children can be placed relative to that. There are different types of\n// relative elements that are placed with different rules:\n// 1) Fixed - these elements don't move relative to the absolute element's coordinates. These are things like the notehead,\n// any ledger lines, accidentals, etc.\n// 2) Slotted - these elements can move vertically and don't get Y coordinates until after the absolute element is placed.\n// These are things like the chord symbol, many decorations, the lyrics, etc.\n//\n// Relative elements are also classified by how they are related. This could be:\n// 1) Increases the absolute element's width to the left. This doesn't change the center point of\n// the absolute element, so adding a sharp to the note won't move it to the right. However, if the elements\n// are close together then this enforces a minimum distance.\n// 2) Has no effect on the width. Annotations and the tempo act like this. No matter how long they are the width doesn't change.\n// 3) Increases the absolute element's width to the right. This doesn't change the center point,\n// but it will increase the minimum distance.\n// 4) Sets the width on both sides. This is the note heads. They are centered on both sides of the absolute element's X coordinate.\n\n// duration - actual musical duration - different from notehead duration in triplets. refer to abcelem to get the notehead duration\n// minspacing - spacing which must be taken on top of the width defined by the duration\n// type is a meta-type for the element. It is not necessary for drawing, but it is useful to make semantic sense of the element. For instance, it can be used in the element's class name.\nvar AbsoluteElement = function AbsoluteElement(abcelem, duration, minspacing, type, tuneNumber, options) {\n\t//\tconsole.log(\"Absolute:\",abcelem, duration, minspacing, type, tuneNumber, options);\n\tif (!options)\n\t\toptions = {};\n\tthis.tuneNumber = tuneNumber;\n\tthis.abcelem = abcelem;\n\tthis.duration = duration;\n\tthis.durationClass = options.durationClassOveride ? options.durationClassOveride : this.duration;\n\tthis.minspacing = minspacing || 0;\n\tthis.x = 0;\n\tthis.children = [];\n\tthis.heads = [];\n\tthis.extra = [];\n\tthis.extraw = 0;\n\tthis.w = 0;\n\tthis.right = [];\n\tthis.invisible = false;\n\tthis.bottom = undefined;\n\tthis.top = undefined;\n\tthis.type = type;\n\n\t// The following are the dimensions of the fixed part of the element.\n\t// That is, the chord text will be a different height depending on lot of factors, but the 8th flag will always be in the same place.\n\tthis.fixed = { w: 0, t: undefined, b: undefined }; // there is no x-coord here, because that is set later.\n\n\t// these are the heights of all of the vertical elements that can't be placed until the end of the line.\n\t// the vertical order of elements that are above is: tempo, part, volume/dynamic, ending/chord, lyric\n\t// the vertical order of elements that are below is: lyric, chord, volume/dynamic\n\tthis.specialY = {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n};\n\nAbsoluteElement.prototype.getFixedCoords = function () {\n\treturn { x: this.x, w: this.fixed.w, t: this.fixed.t, b: this.fixed.b };\n};\n\nAbsoluteElement.prototype.addExtra = function (extra) {\n\t// used for accidentals, multi-measure rest text,\n\t// left-side decorations, gracenote heads,\n\t// left annotations, gracenote stems.\n\t// if (!(extra.c && extra.c.indexOf(\"accidentals\") >= 0) &&\n\t// \t!(extra.c && extra.c.indexOf(\"arpeggio\") >= 0) &&\n\t// \textra.type !== \"multimeasure-text\" &&\n\t// \t!(extra.c === \"noteheads.quarter\" && (extra.scalex === 0.6 || extra.scalex === 0.36)) &&\n\t// \t!(extra.type === \"stem\" && extra.linewidth === -0.6) &&\n\t// \textra.position !== \"left\"\n\t// )\n\t// \tconsole.log(\"extra\", extra);\n\n\tthis.fixed.w = Math.max(this.fixed.w, extra.dx + extra.w);\n\tif (this.fixed.t === undefined) this.fixed.t = extra.top; else this.fixed.t = Math.max(this.fixed.t, extra.top);\n\tif (this.fixed.b === undefined) this.fixed.b = extra.bottom; else this.fixed.b = Math.min(this.fixed.b, extra.bottom);\n\tif (extra.dx < this.extraw) this.extraw = extra.dx;\n\tthis.extra[this.extra.length] = extra;\n\tthis._addChild(extra);\n};\n\nAbsoluteElement.prototype.addHead = function (head) {\n\tif (head.dx < this.extraw) this.extraw = head.dx;\n\tthis.heads[this.heads.length] = head;\n\tthis.addRight(head);\n};\n\nAbsoluteElement.prototype.addRight = function (right) {\n\t// // used for clefs, note heads, bar lines, stems, key-signature accidentals, non-beamed flags, dots\n\t// if (!(right.c && right.c.indexOf(\"clefs\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"noteheads\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"flags\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"rests\") >= 0) &&\n\t// \t!(right.c && right.c.indexOf(\"dots.dot\") >= 0) &&\n\t// \tright.type !== \"stem\" &&\n\t// \tright.type !== \"bar\" &&\n\t// \tright.type !== \"none\" && // used when an invisible anchor is needed.\n\t// \t!(this.type.indexOf(\"clef\") >= -1 && right.c === \"8\") &&\n\t// \tthis.type.indexOf(\"key-signature\") === -1 &&\n\t// \tthis.type.indexOf(\"time-signature\") === -1 &&\n\t// \t!(this.abcelem && this.abcelem.rest && this.abcelem.rest.type === \"spacer\") &&\n\t// \t!(this.abcelem && this.abcelem.rest && this.abcelem.rest.type === \"invisible\") &&\n\t// \t!(right.type === \"text\" && right.position === \"relative\") &&\n\t// \t!(right.type === \"text\" && right.position === \"right\") &&\n\t// \t!(right.type === \"text\" && right.position === \"above\") &&\n\t// \t!(right.type === \"text\" && right.position === \"below\")\n\t// )\n\t// \tconsole.log(\"right\", right);\n\t// These are the elements that are the fixed part.\n\tthis.fixed.w = Math.max(this.fixed.w, right.dx + right.w);\n\tif (right.top !== undefined) {\n\t\tif (this.fixed.t === undefined) this.fixed.t = right.top; else this.fixed.t = Math.max(this.fixed.t, right.top);\n\t}\n\tif (right.bottom !== undefined) {\n\t\tif (this.fixed.b === undefined) this.fixed.b = right.bottom; else this.fixed.b = Math.min(this.fixed.b, right.bottom);\n\t}\n\t// if (isNaN(this.fixed.t) || isNaN(this.fixed.b))\n\t// \tdebugger;\n\tif (right.dx + right.w > this.w) this.w = right.dx + right.w;\n\tthis.right[this.right.length] = right;\n\tthis._addChild(right);\n};\n\nAbsoluteElement.prototype.addFixed = function (elem) {\n\t// used for elements that can't move relative to other elements after they have been placed.\n\t// used for ledger lines, bar numbers, debug msgs, clef, key sigs, time sigs\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.addFixedX = function (elem) {\n\t// used for elements that can't move horizontally relative to other elements after they have been placed.\n\t// used for parts, tempo, decorations\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.addCentered = function (elem) {\n\t// // used for chord labels, lyrics\n\t// if (!(elem.type === \"chord\" && elem.position === \"above\") &&\n\t// \t!(elem.type === \"chord\" && elem.position === \"below\") &&\n\t// \telem.type !== 'lyric'\n\t// )\n\t// \tconsole.log(\"centered\", elem);\n\tvar half = elem.w / 2;\n\tif (-half < this.extraw) this.extraw = -half;\n\tthis.extra[this.extra.length] = elem;\n\tif (elem.dx + half > this.w) this.w = elem.dx + half;\n\tthis.right[this.right.length] = elem;\n\tthis._addChild(elem);\n};\n\nAbsoluteElement.prototype.setLimit = function (member, child) {\n\tif (!child[member]) return;\n\tif (!this.specialY[member])\n\t\tthis.specialY[member] = child[member];\n\telse\n\t\tthis.specialY[member] = Math.max(this.specialY[member], child[member]);\n};\n\nAbsoluteElement.prototype._addChild = function (child) {\n\t//\tconsole.log(\"Relative:\",child);\n\tchild.parent = this;\n\tthis.children[this.children.length] = child;\n\tthis.pushTop(child.top);\n\tthis.pushBottom(child.bottom);\n\tthis.setLimit('tempoHeightAbove', child);\n\tthis.setLimit('partHeightAbove', child);\n\tthis.setLimit('volumeHeightAbove', child);\n\tthis.setLimit('dynamicHeightAbove', child);\n\tthis.setLimit('endingHeightAbove', child);\n\tthis.setLimit('chordHeightAbove', child);\n\tthis.setLimit('lyricHeightAbove', child);\n\tthis.setLimit('lyricHeightBelow', child);\n\tthis.setLimit('chordHeightBelow', child);\n\tthis.setLimit('volumeHeightBelow', child);\n\tthis.setLimit('dynamicHeightBelow', child);\n};\n\nAbsoluteElement.prototype.pushTop = function (top) {\n\tif (top !== undefined) {\n\t\tif (this.top === undefined)\n\t\t\tthis.top = top;\n\t\telse\n\t\t\tthis.top = Math.max(top, this.top);\n\t}\n};\n\nAbsoluteElement.prototype.pushBottom = function (bottom) {\n\tif (bottom !== undefined) {\n\t\tif (this.bottom === undefined)\n\t\t\tthis.bottom = bottom;\n\t\telse\n\t\t\tthis.bottom = Math.min(bottom, this.bottom);\n\t}\n};\n\nAbsoluteElement.prototype.setX = function (x) {\n\tthis.x = x;\n\tfor (var i = 0; i < this.children.length; i++)\n\t\tthis.children[i].setX(x);\n};\n\nAbsoluteElement.prototype.center = function (before, after) {\n\t// Used to center whole rests\n\tvar midpoint = (after.x - before.x) / 2 + before.x;\n\tthis.x = midpoint - this.w / 2;\n\tfor (var k = 0; k < this.children.length; k++)\n\t\tthis.children[k].setX(this.x);\n};\n\nAbsoluteElement.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nAbsoluteElement.prototype.highlight = function (klass, color) {\n\thighlight.bind(this)(klass, color);\n};\n\nAbsoluteElement.prototype.unhighlight = function (klass, color) {\n\tunhighlight.bind(this)(klass, color);\n};\n\nmodule.exports = AbsoluteElement;\n","// abc_beam_element.js: Definition of the BeamElem class.\n\n// Most elements on the page are related to a particular absolute element -- notes, rests, bars, etc. Beams, however, span multiple elements.\n// This means that beams can't be laid out until the absolute elements are placed. There is the further complication that the stems for beamed\n// notes can't be laid out until the beams are because we don't know how long they will be until we know the slope of the beam and the horizontal\n// spacing of the absolute elements.\n//\n// So, when a beam is detected, a BeamElem is created, then all notes belonging to that beam are added to it. These notes are not given stems at that time.\n// Then, after the horizontal layout is complete, all of the BeamElem are iterated to set the beam position, then all of the notes that are beamed are given\n// stems. After that, we are ready for the drawing step.\n\n// There are three phases: the setup phase, when new elements are being discovered, the layout phase, when everything is calculated, and the drawing phase,\n// when the object is not changed, but is used to put the elements on the page.\n\n//\n// Setup phase\n//\nvar BeamElem = function BeamElem(stemHeight, type, flat, firstElement) {\n\t// type is \"grace\", \"up\", \"down\", or undefined. flat is used to force flat beams, as it commonly found in the grace notes of bagpipe music.\n\tthis.type = \"BeamElem\";\n\tthis.isflat = !!flat;\n\tthis.isgrace = !!(type && type === \"grace\");\n\tthis.forceup = !!(this.isgrace || (type && type === \"up\"));\n\tthis.forcedown = !!(type && type === \"down\");\n\tthis.elems = []; // all the AbsoluteElements that this beam touches. It may include embedded rests.\n\tthis.total = 0;\n\tthis.average = 6; // use middle line as start for average.\n\tthis.allrests = true;\n\tthis.stemHeight = stemHeight;\n\tthis.beams = []; // During the layout phase, this will become a list of the beams that need to be drawn.\n\tif (firstElement && firstElement.duration) {\n\t\tthis.duration = firstElement.duration;\n\t\tif (firstElement.startTriplet) {\n\t\t\tthis.duration *= firstElement.tripletMultiplier;\n\t\t}\n\t\tthis.duration = Math.round(this.duration * 1000) / 1000;\n\t} else\n\t\tthis.duration = 0;\n};\n\nBeamElem.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nBeamElem.prototype.runningDirection = function (abcelem) {\n\tvar pitch = abcelem.averagepitch;\n\tif (pitch === undefined) return; // don't include elements like spacers in beams\n\tthis.total = Math.round(this.total + pitch);\n\tif (!this.count)\n\t\tthis.count = 0;\n\tthis.count++\n};\n\nBeamElem.prototype.add = function (abselem) {\n\tvar pitch = abselem.abcelem.averagepitch;\n\tif (pitch === undefined) return; // don't include elements like spacers in beams\n\tif (!abselem.abcelem.rest)\n\t\tthis.allrests = false;\n\tabselem.beam = this;\n\tthis.elems.push(abselem);\n\tthis.total = Math.round(this.total + pitch);\n\tif (this.min === undefined || abselem.abcelem.minpitch < this.min) {\n\t\tthis.min = abselem.abcelem.minpitch;\n\t}\n\tif (this.max === undefined || abselem.abcelem.maxpitch > this.max) {\n\t\tthis.max = abselem.abcelem.maxpitch;\n\t}\n};\n\nBeamElem.prototype.addBeam = function (beam) {\n\tthis.beams.push(beam);\n};\n\nBeamElem.prototype.setStemDirection = function () {\n\t// Have to figure this out before the notes are placed because placing the notes also places the decorations.\n\tthis.average = calcAverage(this.total, this.count);\n\tif (this.forceup) {\n\t\tthis.stemsUp = true;\n\t} else if (this.forcedown) {\n\t\tthis.stemsUp = false;\n\t} else {\n\t\tvar middleLine = 6;\t// hardcoded 6 is B\n\t\tthis.stemsUp = this.average < middleLine; // true is up, false is down;\n\t}\n\tdelete this.count;\n\tthis.total = 0;\n};\n\nBeamElem.prototype.calcDir = function () {\n\tthis.average = calcAverage(this.total, this.elems.length);\n\tif (this.forceup) {\n\t\tthis.stemsUp = true;\n\t} else if (this.forcedown) {\n\t\tthis.stemsUp = false;\n\t} else {\n\t\tvar middleLine = 6;\t// hardcoded 6 is B\n\t\tthis.stemsUp = this.average < middleLine; // true is up, false is down;\n\t}\n\tvar dir = this.stemsUp ? 'up' : 'down';\n\tfor (var i = 0; i < this.elems.length; i++) {\n\t\tfor (var j = 0; j < this.elems[i].heads.length; j++) {\n\t\t\tthis.elems[i].heads[j].stemDir = dir;\n\t\t}\n\t}\n};\n\nfunction calcAverage(total, numElements) {\n\tif (!numElements)\n\t\treturn 0;\n\treturn total / numElements;\n}\n\nmodule.exports = BeamElem;\n","const addTextIf = require(\"../add-text-if\");\nconst richText = require(\"./rich-text\");\n\nfunction BottomText(metaText, width, isPrint, paddingLeft, spacing, shouldAddClasses, getTextSize) {\n\tthis.rows = [];\n\tif (metaText.unalignedWords && metaText.unalignedWords.length > 0)\n\t\tthis.unalignedWords(metaText.unalignedWords, paddingLeft, spacing, shouldAddClasses, getTextSize);\n\tthis.extraText(metaText, paddingLeft, spacing, shouldAddClasses, getTextSize);\n\tif (metaText.footer && isPrint)\n\t\tthis.footer(metaText.footer, width, paddingLeft, getTextSize);\n}\n\nBottomText.prototype.unalignedWords = function (unalignedWords, marginLeft, spacing, shouldAddClasses, getTextSize) {\n\tvar klass = shouldAddClasses ? 'abcjs-unaligned-words' : ''\n\tvar defFont = 'wordsfont';\n\tvar space = getTextSize.calc(\"i\", defFont, klass);\n\t\n\tthis.rows.push({ move: spacing.words });\n\t\n\taddMultiLine(this.rows, '', unalignedWords, marginLeft, defFont, \"unalignedWords\", \"unalignedWords\", klass, \"unalignedWords\", spacing, shouldAddClasses, getTextSize)\n\tthis.rows.push({ move: space.height });\n}\n\nfunction addSingleLine(rows, preface, text, marginLeft, klass, shouldAddClasses, getTextSize) {\n\tif (text) {\n\t\tif (preface) {\n\t\t\tif (typeof text === 'string')\n\t\t\t\ttext = preface + text\n\t\t\telse\n\t\t\t\ttext = [{text: preface}].concat(text)\n\t\t}\n\t\tklass = shouldAddClasses ? 'abcjs-extra-text '+klass : ''\n\t\trichText(rows, text, 'historyfont', klass, \"description\", marginLeft, {absElemType: \"extraText\", anchor: 'start'}, getTextSize)\n\t}\n\n}\n\nfunction addMultiLine(rows, preface, content, marginLeft, defFont, absElemType, groupName, klass, name, spacing, shouldAddClasses, getTextSize) {\n\tif (content) {\n\t\tklass = shouldAddClasses ? 'abcjs-extra-text '+klass : ''\n\t\tvar size = getTextSize.calc(\"A\", defFont, klass);\n\t\tif (typeof content === 'string') {\n\t\t\tif (preface)\n\t\t\t\tcontent = preface + \"\\n\" + content\n\t\t\taddTextIf(rows, { marginLeft: marginLeft, text: content, font: defFont, absElemType: \"extraText\", name: name, 'dominant-baseline': 'middle', klass: klass }, getTextSize);\n\t\t\t//rows.push({move: size.height*3/4})\n\t\t} else {\n\t\t\trows.push({ startGroup: groupName, klass: klass, name: name });\n\t\t\trows.push({move: spacing.info})\n\t\t\tif (preface) {\n\t\t\t\taddTextIf(rows, { marginLeft: marginLeft, text: preface, font: defFont, absElemType: \"extraText\", name: name, 'dominant-baseline': 'middle' }, getTextSize);\n\t\t\t\trows.push({move: size.height*3/4})\n\t\t\t}\n\n\t\t\tfor (var j = 0; j < content.length; j++) {\n\t\t\t\trichText(rows, content[j], defFont, '', name, marginLeft, {anchor: 'start'}, getTextSize)\n\t\t\t\t// TODO-PER: Hack! the string and rich lines should have used up the same amount of space without this.\n\t\t\t\tif (j < content.length-1 && typeof content[j] === 'string' && typeof content[j+1] !== 'string')\n\t\t\t\t\trows.push({move: size.height*3/4})\n\t\t\t}\n\t\t\trows.push({ endGroup: groupName, absElemType: absElemType, startChar: -1, endChar: -1, name: name });\n\t\t\trows.push({move: size.height})\n\t\t}\n\t}\n}\nBottomText.prototype.extraText = function (metaText, marginLeft, spacing, shouldAddClasses, getTextSize) {\n\taddSingleLine(this.rows, \"Book: \", metaText.book, marginLeft, 'abcjs-book', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Source: \", metaText.source, marginLeft, 'abcjs-source', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Discography: \", metaText.discography, marginLeft, 'abcjs-discography', shouldAddClasses, getTextSize)\n\n\taddMultiLine(this.rows, 'Notes:', metaText.notes, marginLeft, 'historyfont', \"extraText\", \"notes\", 'abcjs-notes', \"description\", spacing, shouldAddClasses, getTextSize)\n\n\taddSingleLine(this.rows, \"Transcription: \", metaText.transcription, marginLeft, 'abcjs-transcription', shouldAddClasses, getTextSize)\n\n\taddMultiLine(this.rows, \"History:\", metaText.history, marginLeft, 'historyfont', \"extraText\", \"history\", 'abcjs-history', \"description\", spacing, shouldAddClasses, getTextSize)\n\n\taddSingleLine(this.rows, \"Copyright: \", metaText['abc-copyright'], marginLeft, 'abcjs-copyright', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Creator: \", metaText['abc-creator'], marginLeft, 'abcjs-creator', shouldAddClasses, getTextSize)\n\taddSingleLine(this.rows, \"Edited By: \", metaText['abc-edited-by'], marginLeft, 'abcjs-edited-by', shouldAddClasses, getTextSize)\n\n}\n\nBottomText.prototype.footer = function (footer, width, paddingLeft, getTextSize) {\n\tvar klass = 'header meta-bottom';\n\tvar font = \"footerfont\";\n\tthis.rows.push({ startGroup: \"footer\", klass: klass });\n\t// Note: whether there is a footer or not doesn't change any other positioning, so this doesn't change the Y-coordinate.\n\taddTextIf(this.rows, { marginLeft: paddingLeft, text: footer.left, font: font, klass: klass, name: \"footer\" }, getTextSize);\n\taddTextIf(this.rows, { marginLeft: paddingLeft + width / 2, text: footer.center, font: font, klass: klass, anchor: 'middle', name: \"footer\" }, getTextSize);\n\taddTextIf(this.rows, { marginLeft: paddingLeft + width, text: footer.right, font: font, klass: klass, anchor: 'end', name: \"footer\" }, getTextSize);\n}\n\nmodule.exports = BottomText;\n","// abc_brace_element.js: Definition of the BraceElement class.\n\nvar BraceElem = function BraceElem(voice, type) {\n\tthis.startVoice = voice;\n\tthis.type = type;\n};\n\nBraceElem.prototype.setBottomStaff = function (voice) {\n\tthis.endVoice = voice;\n\t// If only the start brace has a name then the name belongs to the brace instead of the staff.\n\tif (this.startVoice.header && !this.endVoice.header) {\n\t\tthis.header = this.startVoice.header;\n\t\tdelete this.startVoice.header;\n\t}\n};\n\nBraceElem.prototype.continuing = function (voice) {\n\t// If the final staff isn't present, then use the last one we saw.\n\tthis.lastContinuedVoice = voice;\n};\n\nBraceElem.prototype.getWidth = function () {\n\treturn 10; // TODO-PER: right now the drawing function doesn't vary the width at all. If it does in the future then this will change.\n};\n\nBraceElem.prototype.isStartVoice = function (voice) {\n\tif (this.startVoice && this.startVoice.staff && this.startVoice.staff.voices.length > 0 && this.startVoice.staff.voices[0] === voice)\n\t\treturn true;\n\treturn false;\n};\n\nmodule.exports = BraceElem;\n","// abc_crescendo_element.js: Definition of the CrescendoElem class.\n\nvar CrescendoElem = function CrescendoElem(anchor1, anchor2, dir, positioning) {\n\tthis.type = \"CrescendoElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n\tthis.dir = dir; // either \"<\" or \">\"\n\tif (positioning === 'above')\n\t\tthis.dynamicHeightAbove = 6;\n\telse\n\t\tthis.dynamicHeightBelow = 6;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = CrescendoElem;\n","// abc_dynamic_decoration.js: Definition of the DynamicDecoration class.\n\nvar DynamicDecoration = function DynamicDecoration(anchor, dec, position) {\n\tthis.type = \"DynamicDecoration\";\n\tthis.anchor = anchor;\n\tthis.dec = dec;\n\tif (position === 'below')\n\t\tthis.volumeHeightBelow = 6;\n\telse\n\t\tthis.volumeHeightAbove = 6;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = DynamicDecoration;\n","// abc_ending_element.js: Definition of the EndingElement class.\n\nvar EndingElem = function EndingElem(text, anchor1, anchor2) {\n\tthis.type = \"EndingElem\";\n\tthis.text = text; // text to be displayed top left\n\tthis.anchor1 = anchor1; // must have a .x property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n\tthis.endingHeightAbove = 5;\n\tthis.pitch = undefined; // This will be set later\n};\n\nmodule.exports = EndingElem;\n","function FreeText(info, vskip, getFontAndAttr, paddingLeft, width, getTextSize) {\n\tvar text = info.text;\n\tthis.rows = [];\n\tvar size;\n\tif (vskip)\n\t\tthis.rows.push({ move: vskip });\n\tvar hash = getFontAndAttr.calc('textfont', 'defined-text');\n\tif (text === \"\") {\t// we do want to print out blank lines if they have been specified.\n\t\tthis.rows.push({ move: hash.attr['font-size'] * 2 }); // move the distance of the line, plus the distance of the margin, which is also one line.\n\t} else if (typeof text === 'string') {\n\t\tthis.rows.push({ move: hash.attr['font-size'] / 2 }); // TODO-PER: move down some - the y location should be the top of the text, but we output text specifying the center line.\n\t\tthis.rows.push({ left: paddingLeft, text: text, font: 'textfont', klass: 'defined-text', anchor: \"start\", startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\tsize = getTextSize.calc(text, 'textfont', 'defined-text');\n\t\tthis.rows.push({ move: size.height });\n\t} else if (text) {\n\t\tvar maxHeight = 0;\n\t\tvar leftSide = paddingLeft;\n\t\tvar currentFont = 'textfont';\n\t\tfor (var i = 0; i < text.length; i++) {\n\t\t\tif (text[i].font) {\n\t\t\t\tcurrentFont = text[i].font;\n\t\t\t} else\n\t\t\t\tcurrentFont = 'textfont';\n\t\t\tthis.rows.push({ left: leftSide, text: text[i].text, font: currentFont, klass: 'defined-text', anchor: 'start', startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\t\tsize = getTextSize.calc(text[i].text, getFontAndAttr.calc(currentFont, 'defined-text').font, 'defined-text');\n\t\t\tleftSide += size.width + size.height / 2; // add a little padding to the right side. The height of the font is probably a close enough approximation.\n\t\t\tmaxHeight = Math.max(maxHeight, size.height)\n\t\t}\n\t\tthis.rows.push({ move: maxHeight });\n\t} else {\n\t\t// The structure is wrong here: it requires an array to do centering, but it shouldn't have.\n\t\tif (info.length === 1) {\n\t\t\tvar x = width / 2;\n\t\t\tthis.rows.push({ left: x, text: info[0].text, font: 'textfont', klass: 'defined-text', anchor: 'middle', startChar: info.startChar, endChar: info.endChar, absElemType: \"freeText\", name: \"free-text\" });\n\t\t\tsize = getTextSize.calc(info[0].text, 'textfont', 'defined-text');\n\t\t\tthis.rows.push({ move: size.height });\n\t\t}\n\t}\n}\n\nmodule.exports = FreeText;\n","var GlissandoElem = function GlissandoElem(anchor1, anchor2) {\n\tthis.type = \"GlissandoElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = anchor2; // must have a .x property or be null (means ends at the end of the line)\n};\n\nmodule.exports = GlissandoElem;\n","// abc_relative_element.js: Definition of the RelativeElement class.\n\nvar RelativeElement = function RelativeElement(c, dx, w, pitch, opt) {\n\topt = opt || {};\n\tthis.x = 0;\n\tthis.c = c; // character or path or string\n\tthis.dx = dx; // relative x position\n\tthis.w = w; // minimum width taken up by this element (can include gratuitous space)\n\tthis.pitch = pitch; // relative y position by pitch\n\tthis.scalex = opt.scalex || 1; // should the character/path be scaled?\n\tthis.scaley = opt.scaley || 1; // should the character/path be scaled?\n\tthis.type = opt.type || \"symbol\"; // cheap types.\n\tthis.pitch2 = opt.pitch2;\n\tthis.linewidth = opt.linewidth;\n\tthis.klass = opt.klass;\n\tthis.anchor = opt.anchor ? opt.anchor : 'middle'\n\tthis.top = pitch;\n\tif (this.pitch2 !== undefined && this.pitch2 > this.top) this.top = this.pitch2;\n\tthis.bottom = pitch;\n\tif (this.pitch2 !== undefined && this.pitch2 < this.bottom) this.bottom = this.pitch2;\n\tif (opt.thickness) {\n\t\tthis.top += opt.thickness / 2;\n\t\tthis.bottom -= opt.thickness / 2;\n\t}\n\tif (opt.stemHeight) {\n\t\tif (opt.stemHeight > 0)\n\t\t\tthis.top += opt.stemHeight;\n\t\telse\n\t\t\tthis.bottom += opt.stemHeight;\n\t}\n\tif (opt.dim)\n\t\tthis.dim = opt.dim;\n\tif (opt.position)\n\t\tthis.position = opt.position;\n\tthis.height = opt.height ? opt.height : 4; // The +1 is to give a little bit of padding.\n\tif (opt.top)\n\t\tthis.top = opt.top;\n\tif (opt.bottom)\n\t\tthis.bottom = opt.bottom;\n\tif (opt.name)\n\t\tthis.name = opt.name;\n\telse if (this.c)\n\t\tthis.name = this.c;\n\telse\n\t\tthis.name = this.type;\n\tif (opt.realWidth)\n\t\tthis.realWidth = opt.realWidth;\n\telse\n\t\tthis.realWidth = this.w;\n\tthis.centerVertically = false;\n\tswitch (this.type) {\n\t\tcase \"debug\":\n\t\t\tthis.chordHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\tthis.lyricHeightBelow = this.height;\n\t\t\telse\n\t\t\t\tthis.lyricHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"chord\":\n\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\tthis.chordHeightBelow = this.height;\n\t\t\telse\n\t\t\t\tthis.chordHeightAbove = this.height;\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\t\tif (this.pitch === undefined) {\n\t\t\t\tif (opt.position && opt.position === 'below')\n\t\t\t\t\tthis.chordHeightBelow = this.height;\n\t\t\t\telse\n\t\t\t\t\tthis.chordHeightAbove = this.height;\n\t\t\t} else\n\t\t\t\tthis.centerVertically = true;\n\t\t\tbreak;\n\t\tcase \"part\": this.partHeightAbove = this.height; break;\n\t}\n};\n\nRelativeElement.prototype.getChordDim = function () {\n\tif (this.type === \"debug\")\n\t\treturn null;\n\tif (!this.chordHeightAbove && !this.chordHeightBelow)\n\t\treturn null;\n\t// Chords are centered, annotations are left justified.\n\t// NOTE: the font reports extra space to the left and right anyway, so there is a built in margin.\n\t// We add a little margin so that items can't touch - we use half the font size as the margin, so that is 1/4 on each side.\n\t// if there is only one character that we're printing, use half of that margin.\n\t// var margin = this.dim.font.size/4;\n\t// if (this.c.length === 1)\n\t// \tmargin = margin / 2;\n\tvar margin = 0;\n\n\tvar offset = this.type === \"chord\" ? this.realWidth / 2 : 0;\n\tvar left = this.x - offset - margin;\n\tvar right = left + this.realWidth + margin;\n\treturn { left: left, right: right };\n};\n\nRelativeElement.prototype.invertLane = function (total) {\n\tif (this.lane === undefined)\n\t\tthis.lane = 0;\n\tthis.lane = total - this.lane - 1;\n};\n\nRelativeElement.prototype.putChordInLane = function (i) {\n\tthis.lane = i;\n\t// Add some extra space to account for the character's descenders.\n\tif (this.chordHeightAbove)\n\t\tthis.chordHeightAbove = (this.height * 1.25) * this.lane;\n\telse\n\t\tthis.chordHeightBelow = (this.height * 1.25) * this.lane;\n};\n\nRelativeElement.prototype.getLane = function () {\n\tif (this.lane === undefined)\n\t\treturn 0;\n\treturn this.lane;\n};\n\nRelativeElement.prototype.setX = function (x) {\n\tthis.x = x + this.dx;\n};\n\nmodule.exports = RelativeElement;\n","const addTextIf = require(\"../add-text-if\");\n\nfunction richText(rows, str, defFont, klass, name, paddingLeft, attr, getTextSize) {\n\tvar space = getTextSize.calc(\"i\", defFont, klass);\n\tif (str === '') {\n\t\trows.push({ move: space.height });\n\t} else {\n\t\tif (typeof str === 'string') {\n\t\t\taddTextIf(rows, { marginLeft: paddingLeft, text: str, font: defFont, klass: klass, marginTop: attr.marginTop, anchor: attr.anchor, absElemType: attr.absElemType, info: attr.info, name: name }, getTextSize);\n\t\t\treturn\n\t\t}\n\t\tif (attr.marginTop)\n\t\t\trows.push({move: attr.marginTop})\n\n\t\tvar largestY = 0;\n\t\tvar gap = 0;\n\t\tvar row = {\n\t\t\tleft: paddingLeft,\n\t\t\tanchor: attr.anchor,\n\t\t\tphrases: []\n\t\t}\n\t\tif (klass)\n\t\t\trow.klass = klass\n\t\trows.push(row)\n\t\tfor (var k = 0; k < str.length; k++) {\n\t\t\tvar thisWord = str[k];\n\t\t\tvar font = (thisWord.font) ? thisWord.font : getTextSize.attr(defFont, klass).font;\n\t\t\tvar phrase = {\n\t\t\t\tcontent: thisWord.text,\n\t\t\t}\n\t\t\tif (font)\n\t\t\t\tphrase.attrs = {\n\t\t\t\t\t\"font-family\": getTextSize.getFamily(font.face),\n\t\t\t\t\t\"font-size\": font.size,\n\t\t\t\t\t\"font-weight\": font.weight,\n\t\t\t\t\t\"font-style\": font.style,\n\t\t\t\t\t\"font-decoration\": font.decoration,\n\t\t\t}\n\t\t\t//if (thisWord.text) {\n\t\t\t\trow.phrases.push(phrase);\n\t\t\t\tvar size = getTextSize.calc(thisWord.text, font, klass);\n\t\t\t\tlargestY = Math.max(largestY, size.height);\n\t\t\t\tif (thisWord.text[thisWord.text.length - 1] === ' ') {\n\t\t\t\t\tgap = space.width\n\t\t\t\t}\n\t\t}\n\t\trows.push({ move: largestY });\n\t}\n}\n\nmodule.exports = richText;\n","function Separator(spaceAbove, lineLength, spaceBelow) {\n\tthis.rows = [];\n\tif (spaceAbove)\n\t\tthis.rows.push({ move: spaceAbove });\n\tthis.rows.push({ separator: lineLength, absElemType: \"separator\" });\n\tif (spaceBelow)\n\t\tthis.rows.push({ move: spaceBelow });\n}\n\nmodule.exports = Separator;\n","// abc_staff_group_element.js: Definition of the StaffGroupElement class.\n\n// StaffGroupElement contains all the elements that go together to make one line of music.\n// That might be multiple staves that are tied together, and it might be multiple voices on one staff.\n//\n// Methods:\n// constructor: some basic initialization\n// addVoice(): Called once for each voice. May add a new staff if needed.\n// finished(): Called only internally by layout()\n// layout(): This does all the layout. It sets the following: spacingunits, startx, minspace, w, and the x-coordinate of each element in each voice.\n// draw(): Calls the underlying methods on the voice objects to do the drawing. Sets y and height.\n//\n// Members:\n// staffs: an array of all the staves in this group. Each staff contains the following elements:\n// { top, bottom, highest, lowest, y }\n// voices: array of VoiceElement objects. This is mostly passed in, but the VoiceElement objects are modified here.\n//\n// spacingunits: number of relative x-units in the line. Used by the calling function to pass back in as the \"spacing\" input parameter.\n// TODO-PER: This should actually be passed back as a return value.\n// minspace: smallest space between two notes. Used by the calling function to pass back in as the \"spacing\" input parameter.\n// TODO-PER: This should actually be passed back as a return value.\n// startx: The left edge, taking the margin and the optional voice name. Used by the draw() method.\n// w: The width of the line. Used by calling function to pass back in as the \"spacing\" input parameter, and the draw() method.\n// TODO-PER: This should actually be passed back as a return value. (TODO-PER: in pixels or spacing units?)\n// y: The top of the staff group, in pixels. This is set in the draw method.\n// TODO-PER: Where is that used? It looks like it might not be needed.\n// height: Set in the draw() method to the height actually used. Used by the calling function to know where to start the next staff group.\n// TODO-PER: This should actually be set in the layout method and passed back as a return value.\nvar calcHeight = require('../calc-height');\n\nvar StaffGroupElement = function (getTextSize) {\n\tthis.getTextSize = getTextSize;\n\tthis.voices = [];\n\tthis.staffs = [];\n\tthis.brace = undefined; //tony\n\tthis.bracket = undefined;\n};\n\nStaffGroupElement.prototype.setLimit = function (member, voice) {\n\tif (!voice.specialY[member]) return;\n\tif (!voice.staff.specialY[member])\n\t\tvoice.staff.specialY[member] = voice.specialY[member];\n\telse\n\t\tvoice.staff.specialY[member] = Math.max(voice.staff.specialY[member], voice.specialY[member]);\n};\n\nStaffGroupElement.prototype.addVoice = function (voice, staffnumber, stafflines) {\n\tvar voiceNum = this.voices.length;\n\tthis.voices[voiceNum] = voice;\n\tif (this.staffs[staffnumber])\n\t\tthis.staffs[staffnumber].voices.push(voiceNum);\n\telse {\n\t\t// TODO-PER: how does the min/max change when stafflines is not 5?\n\t\tthis.staffs[this.staffs.length] = {\n\t\t\ttop: 10,\n\t\t\tbottom: 2,\n\t\t\tlines: stafflines,\n\t\t\tvoices: [voiceNum],\n\t\t\tspecialY: {\n\t\t\t\ttempoHeightAbove: 0,\n\t\t\t\tpartHeightAbove: 0,\n\t\t\t\tvolumeHeightAbove: 0,\n\t\t\t\tdynamicHeightAbove: 0,\n\t\t\t\tendingHeightAbove: 0,\n\t\t\t\tchordHeightAbove: 0,\n\t\t\t\tlyricHeightAbove: 0,\n\n\t\t\t\tlyricHeightBelow: 0,\n\t\t\t\tchordHeightBelow: 0,\n\t\t\t\tvolumeHeightBelow: 0,\n\t\t\t\tdynamicHeightBelow: 0\n\t\t\t}\n\t\t};\n\t}\n\tvoice.staff = this.staffs[staffnumber];\n};\n\nStaffGroupElement.prototype.setHeight = function () {\n\tthis.height = calcHeight(this);\n};\n\nStaffGroupElement.prototype.setWidth = function (width) {\n\tthis.w = width;\n\tfor (var i = 0; i < this.voices.length; i++) {\n\t\tthis.voices[i].setWidth(width);\n\t}\n};\n\nStaffGroupElement.prototype.setStaffLimits = function (voice) {\n\tvoice.staff.top = Math.max(voice.staff.top, voice.top);\n\tvoice.staff.bottom = Math.min(voice.staff.bottom, voice.bottom);\n\tthis.setLimit('tempoHeightAbove', voice);\n\tthis.setLimit('partHeightAbove', voice);\n\tthis.setLimit('volumeHeightAbove', voice);\n\tthis.setLimit('dynamicHeightAbove', voice);\n\tthis.setLimit('endingHeightAbove', voice);\n\tthis.setLimit('chordHeightAbove', voice);\n\tthis.setLimit('lyricHeightAbove', voice);\n\tthis.setLimit('lyricHeightBelow', voice);\n\tthis.setLimit('chordHeightBelow', voice);\n\tthis.setLimit('volumeHeightBelow', voice);\n\tthis.setLimit('dynamicHeightBelow', voice);\n};\n\nmodule.exports = StaffGroupElement;\n","function Subtitle(spaceAbove, formatting, info, center, paddingLeft, getTextSize) {\n\tthis.rows = [];\n\tif (spaceAbove)\n\t\tthis.rows.push({ move: spaceAbove });\n\tvar tAnchor = formatting.titleleft ? 'start' : 'middle';\n\tvar tLeft = formatting.titleleft ? paddingLeft : center;\n\tthis.rows.push({ left: tLeft, text: info.text, font: 'subtitlefont', klass: 'text subtitle', anchor: tAnchor, startChar: info.startChar, endChar: info.endChar, absElemType: \"subtitle\", name: \"subtitle\" });\n\tvar size = getTextSize.calc(info.text, 'subtitlefont', 'text subtitle');\n\tthis.rows.push({ move: size.height });\n}\n\nmodule.exports = Subtitle;\n","// abc_tempo_element.js: Definition of the TempoElement class.\n\nvar AbsoluteElement = require('./absolute-element');\nvar RelativeElement = require('./relative-element');\n\nvar TempoElement = function TempoElement(tempo, tuneNumber, createNoteHead) {\n\tthis.type = \"TempoElement\";\n\tthis.tempo = tempo;\n\tthis.tempo.type = \"tempo\"; /// TODO-PER: this should be set earlier, in the parser, probably.\n\tthis.tuneNumber = tuneNumber;\n\t// TODO: can these two properties be merged?\n\tthis.totalHeightInPitches = 6;\n\tthis.tempoHeightAbove = this.totalHeightInPitches;\n\tthis.pitch = undefined; // This will be set later\n\tif (this.tempo.duration && !this.tempo.suppressBpm) {\n\t\tthis.note = this.createNote(createNoteHead, tempo, tuneNumber);\n\t}\n};\n\nTempoElement.prototype.setX = function (x) {\n\tthis.x = x;\n};\n\nTempoElement.prototype.createNote = function (createNoteHead, tempo, tuneNumber) {\n\tvar temposcale = 0.75;\n\tvar duration = tempo.duration[0]; // TODO when multiple durations\n\tvar absElem = new AbsoluteElement(tempo, duration, 1, 'tempo', tuneNumber);\n\t// There aren't an infinite number of note values, but we are passed a float, so just in case something is off upstream,\n\t// merge all of the in between points.\n\tvar dot;\n\tvar flag;\n\tvar note;\n\tif (duration <= 1 / 32) { note = \"noteheads.quarter\"; flag = \"flags.u32nd\"; dot = 0; }\n\telse if (duration <= 1 / 16) { note = \"noteheads.quarter\"; flag = \"flags.u16th\"; dot = 0; }\n\telse if (duration <= 3 / 32) { note = \"noteheads.quarter\"; flag = \"flags.u16nd\"; dot = 1; }\n\telse if (duration <= 1 / 8) { note = \"noteheads.quarter\"; flag = \"flags.u8th\"; dot = 0; }\n\telse if (duration <= 3 / 16) { note = \"noteheads.quarter\"; flag = \"flags.u8th\"; dot = 1; }\n\telse if (duration <= 1 / 4) { note = \"noteheads.quarter\"; dot = 0; }\n\telse if (duration <= 3 / 8) { note = \"noteheads.quarter\"; dot = 1; }\n\telse if (duration <= 1 / 2) { note = \"noteheads.half\"; dot = 0; }\n\telse if (duration <= 3 / 4) { note = \"noteheads.half\"; dot = 1; }\n\telse if (duration <= 1) { note = \"noteheads.whole\"; dot = 0; }\n\telse if (duration <= 1.5) { note = \"noteheads.whole\"; dot = 1; }\n\telse if (duration <= 2) { note = \"noteheads.dbl\"; dot = 0; }\n\telse { note = \"noteheads.dbl\"; dot = 1; }\n\n\tvar ret = createNoteHead(absElem, note, { verticalPos: 0 }, // This is just temporary: we'll offset the vertical positioning when we get the actual vertical spot.\n\t\t{ dir: \"up\", flag: flag, dot: dot, scale: temposcale });\n\tvar tempoNote = ret.notehead;\n\tabsElem.addHead(tempoNote);\n\tvar stem;\n\tif (note !== \"noteheads.whole\" && note !== \"noteheads.dbl\") {\n\t\tvar p1 = 1 / 3 * temposcale;\n\t\tvar p2 = 5 * temposcale;\n\t\tvar dx = tempoNote.dx + tempoNote.w;\n\t\tvar width = -0.6;\n\t\tstem = new RelativeElement(null, dx, 0, p1, { \"type\": \"stem\", \"pitch2\": p2, linewidth: width });\n\t\tabsElem.addRight(stem);\n\t}\n\treturn absElem;\n};\n\nmodule.exports = TempoElement;\n","// abc_tie_element.js: Definition of the TieElement class.\n\nvar TieElem = function TieElem(options) {\n\tthis.type = \"TieElem\";\n\t//\tconsole.log(\"constructor\", options.anchor1 ? options.anchor1.pitch : \"N/A\", options.anchor2 ? options.anchor2.pitch : \"N/A\", options.isTie, options.isGrace);\n\tthis.anchor1 = options.anchor1; // must have a .x and a .pitch, and a .parent property or be null (means starts at the \"beginning\" of the line - after keysig)\n\tthis.anchor2 = options.anchor2; // must have a .x and a .pitch property or be null (means ends at the end of the line)\n\tif (options.isGrace)\n\t\tthis.isGrace = true;\n\tif (options.fixedY)\n\t\tthis.fixedY = true;\n\tif (options.stemDir)\n\t\tthis.stemDir = options.stemDir;\n\tif (options.voiceNumber !== undefined)\n\t\tthis.voiceNumber = options.voiceNumber;\n\tif (options.style !== undefined)\n\t\tthis.dotted = true;\n\tthis.internalNotes = [];\n};\n\nTieElem.prototype.addInternalNote = function (note) {\n\tthis.internalNotes.push(note);\n};\n\nTieElem.prototype.setEndAnchor = function (anchor2) {\n\t//\tconsole.log(\"end\", this.anchor1 ? this.anchor1.pitch : \"N/A\", anchor2 ? anchor2.pitch : \"N/A\", this.isTie, this.isGrace);\n\tthis.anchor2 = anchor2; // must have a .x and a .pitch property or be null (means ends at the end of the line)\n\n\t// we don't really have enough info to know what the vertical extent is yet and we won't until drawing. This will just give it enough\n\t// room on either side (we don't even know if the slur will be above yet). We need to set this so that we can make sure the voice has\n\t// at least enough room that the line doesn't get cut off if the tie or slur is the lowest thing.\n\tif (this.anchor1) {\n\t\tthis.top = Math.max(this.anchor1.pitch, this.anchor2.pitch) + 4\n\t\tthis.bottom = Math.min(this.anchor1.pitch, this.anchor2.pitch) - 4\n\t} else {\n\t\tthis.top = this.anchor2.pitch + 4\n\t\tthis.bottom = this.anchor2.pitch - 4\n\t}\n};\n\n// If we encounter a repeat sign, then we don't want to extend either a tie or a slur past it, so these are called to be a limit.\nTieElem.prototype.setStartX = function (startLimitElem) {\n\tthis.startLimitX = startLimitElem;\n};\n\nTieElem.prototype.setEndX = function (endLimitElem) {\n\tthis.endLimitX = endLimitElem;\n};\n\nTieElem.prototype.setHint = function () {\n\tthis.hint = true;\n};\n\nTieElem.prototype.calcTieDirection = function () {\n\t// The rules:\n\t// 1) If it is in a grace note group, then the direction is always BELOW.\n\t// 2) If it is in a single voice, then the direction is always OPPOSITE of the stem (or where the stem would have been in the case of whole notes.)\n\t// 3) If the stem direction is forced (probably because there are two voices on the same line), then the direction is the SAME as the stem direction.\n\n\tif (this.isGrace)\n\t\tthis.above = false;\n\telse if (this.voiceNumber === 0)\n\t\tthis.above = true;\n\telse if (this.voiceNumber > 0)\n\t\tthis.above = false;\n\telse {\n\t\tvar referencePitch;\n\t\tif (this.anchor1)\n\t\t\treferencePitch = this.anchor1.pitch;\n\t\telse if (this.anchor2)\n\t\t\treferencePitch = this.anchor2.pitch;\n\t\telse\n\t\t\treferencePitch = 14; // TODO-PER: this can't really happen normally. This would imply that a tie crossed over three lines, something like \"C-\\nz\\nC\"\n\t\t// Put the arc in the opposite direction of the stem. That isn't always the pitch if one or both of the notes are beamed with something that affects its stem.\n\t\tif ((this.anchor1 && this.anchor1.stemDir === 'down') && (this.anchor2 && this.anchor2.stemDir === \"down\"))\n\t\t\tthis.above = true;\n\t\telse if ((this.anchor1 && this.anchor1.stemDir === 'up') && (this.anchor2 && this.anchor2.stemDir === \"up\"))\n\t\t\tthis.above = false;\n\t\telse if (this.anchor1 && this.anchor2)\n\t\t\tthis.above = referencePitch >= 6;\n\t\telse if (this.anchor1)\n\t\t\tthis.above = this.anchor1.stemDir === \"down\";\n\t\telse if (this.anchor2)\n\t\t\tthis.above = this.anchor2.stemDir === \"down\";\n\t\telse\n\t\t\tthis.above = referencePitch >= 6;\n\t}\n};\n\n// From \"standard music notation practice\" by Music Publishers’ Association:\n// 1) Slurs are placed under the note heads if all stems go up.\n// 2) Slurs are placed over the note heads if all stems go down.\n// 3) If there are both up stems and down stems, prefer placing the slur over.\n// 4) When the staff has opposite stemmed voices, all slurs should be on the stemmed side.\n\nTieElem.prototype.calcSlurDirection = function () {\n\tif (this.isGrace)\n\t\tthis.above = false;\n\telse if (this.voiceNumber === 0)\n\t\tthis.above = true;\n\telse if (this.voiceNumber > 0)\n\t\tthis.above = false;\n\telse {\n\t\tvar hasDownStem = false;\n\t\tif (this.anchor1 && this.anchor1.stemDir === \"down\")\n\t\t\thasDownStem = true;\n\t\tif (this.anchor2 && this.anchor2.stemDir === \"down\")\n\t\t\thasDownStem = true;\n\t\tfor (var i = 0; i < this.internalNotes.length; i++) {\n\t\t\tvar n = this.internalNotes[i];\n\t\t\tif (n.stemDir === \"down\")\n\t\t\t\thasDownStem = true;\n\t\t}\n\t\tthis.above = hasDownStem;\n\t}\n};\n\nTieElem.prototype.calcX = function (lineStartX, lineEndX) {\n\tif (this.anchor1) {\n\t\tthis.startX = this.anchor1.x; // The normal case where there is a starting element to attach to.\n\t\tif (this.anchor1.scalex < 1) // this is a grace note - don't offset the tie as much.\n\t\t\tthis.startX -= 3;\n\t} else if (this.startLimitX)\n\t\tthis.startX = this.startLimitX.x + this.startLimitX.w; // if there is no start element, but there is a repeat mark before the start of the line.\n\telse {\n\t\tif (this.anchor2)\n\t\t\tthis.startX = this.anchor2.x - 20; // There is no element and no repeat mark: make a small arc\n\t\telse\n\t\t\tthis.startX = lineStartX; // Don't have any guidance, so extend to beginning of line\n\t}\n\tif (!this.anchor1 && this.dotted)\n\t\tthis.startX -= 3; // The arc needs to be long enough to tell that it is dotted.\n\n\tif (this.anchor2)\n\t\tthis.endX = this.anchor2.x; // The normal case where there is a starting element to attach to.\n\telse if (this.endLimitX)\n\t\tthis.endX = this.endLimitX.x; // if there is no start element, but there is a repeat mark before the start of the line.\n\telse\n\t\tthis.endX = lineEndX; // There is no element and no repeat mark: extend to the beginning of the line.\n};\n\nTieElem.prototype.calcTieY = function () {\n\t// If the tie comes from another line, then one or both anchors will be missing.\n\tif (this.anchor1)\n\t\tthis.startY = this.anchor1.pitch;\n\telse if (this.anchor2)\n\t\tthis.startY = this.anchor2.pitch;\n\telse\n\t\tthis.startY = this.above ? 14 : 0;\n\n\tif (this.anchor2)\n\t\tthis.endY = this.anchor2.pitch;\n\telse if (this.anchor1)\n\t\tthis.endY = this.anchor1.pitch;\n\telse\n\t\tthis.endY = this.above ? 14 : 0;\n};\n\n// From \"standard music notation practice\" by Music Publishers’ Association:\n// 1) If the anchor note is down stem, the slur points to the note head.\n// 2) If the anchor note is up stem, and the slur is over, then point to middle of stem.\n\nTieElem.prototype.calcSlurY = function () {\n\tif (this.anchor1 && this.anchor2) {\n\t\tif (this.above && this.anchor1.stemDir === \"up\" && !this.fixedY) {\n\t\t\tthis.startY = (this.anchor1.highestVert + this.anchor1.pitch) / 2;\n\t\t\tthis.startX += this.anchor1.w / 2; // When going to the middle of the stem, bump the line to the right a little bit to make it look right.\n\t\t} else\n\t\t\tthis.startY = this.anchor1.pitch;\n\n\t\t// If the closing note has an up stem, and it is beamed, and it isn't the first note in the beam, then the beam will get in the way.\n\t\tvar beamInterferes = this.anchor2.parent.beam && this.anchor2.parent.beam.stemsUp && this.anchor2.parent.beam.elems[0] !== this.anchor2.parent;\n\t\tvar midPoint = (this.anchor2.highestVert + this.anchor2.pitch) / 2;\n\t\tif (this.above && this.anchor2.stemDir === \"up\" && !this.fixedY && !beamInterferes && (midPoint < this.startY)) {\n\t\t\tthis.endY = midPoint;\n\t\t\tthis.endX += Math.round(this.anchor2.w / 2); // When going to the middle of the stem, bump the line to the right a little bit to make it look right.\n\t\t} else\n\t\t\tthis.endY = this.above && beamInterferes ? this.anchor2.highestVert : this.anchor2.pitch;\n\n\t\tif (this.anchor1.scalex === 1) { // Need a way to tell if this is a grace note - if so then keep the slur as close as possible. TODO-PER-HACK: this should be more declaratively determined.\n\t\t\tvar hasBeam1 = !!this.anchor1.parent.beam\n\t\t\tvar hasBeam2 = !!this.anchor2.parent.beam\n\t\t\tif (hasBeam1) {\n\t\t\t\tvar isLastInBeam = this.anchor1.parent === this.anchor1.parent.beam.elems[this.anchor1.parent.beam.elems.length-1]\n\t\t\t\tif (!isLastInBeam) {\n\t\t\t\t\t\tif (this.above)\n\t\t\t\t\t\tthis.startY = this.anchor1.parent.fixed.t\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.startY = this.anchor1.parent.fixed.b\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (hasBeam2) {\n\t\t\t\tvar isFirstInBeam = this.anchor2.parent === this.anchor2.parent.beam.elems[0]\n\t\t\t\tif (!isFirstInBeam) {\n\t\t\t\t\tif (this.above)\n\t\t\t\t\t\tthis.endY = this.anchor2.parent.fixed.t\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.endY = this.anchor2.parent.fixed.b\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (this.anchor1) {\n\t\tthis.startY = this.endY = this.anchor1.pitch;\n\t} else if (this.anchor2) {\n\t\tthis.startY = this.endY = this.anchor2.pitch;\n\t} else {\n\t\t// This is the case where the slur covers the entire line.\n\t\t// TODO-PER: figure out where the real top and bottom of the line are.\n\t\tthis.startY = this.above ? 14 : 0;\n\t\tthis.endY = this.above ? 14 : 0;\n\t}\n};\n\nTieElem.prototype.avoidCollisionAbove = function () {\n\t// Double check that an interior note in the slur isn't so high that it interferes.\n\tif (this.above) {\n\t\tvar maxInnerHeight = -50;\n\t\tfor (var i = 0; i < this.internalNotes.length; i++) {\n\t\t\tif (this.internalNotes[i].highestVert > maxInnerHeight)\n\t\t\t\tmaxInnerHeight = this.internalNotes[i].highestVert;\n\t\t}\n\t\tif (maxInnerHeight > this.startY && maxInnerHeight > this.endY)\n\t\t\tthis.startY = this.endY = maxInnerHeight - 1;\n\t}\n};\n\nTieElem.prototype.getYBounds = function () {\n\tvar lineStartX = 10 // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much\n\tvar lineEndX = 1000 // TODO-PER: I'm not sure where to get this number from but it probably doesn't matter much\n\tif (this.isTie) {\n\t\tthis.calcTieDirection();\n\t\tthis.calcX(lineStartX, lineEndX);\n\t\tthis.calcTieY();\n\n\t} else {\n\t\tthis.calcSlurDirection();\n\t\tthis.calcX(lineStartX, lineEndX);\n\t\tthis.calcSlurY();\n\t}\n\tvar top;\n\tvar bottom;\n\t// TODO-PER: It's hard to tell how far the arc is, so I'm just using 3 as the max\n\tif (this.above) {\n\t\tbottom = Math.min(this.startY, this.endY)\n\t\ttop = bottom + 3\n\t} else {\n\t\ttop = Math.min(this.startY, this.endY)\n\t\tbottom = top - 3\n\t}\n\treturn [ top, bottom ]\n};\n\nmodule.exports = TieElem;\n","const addTextIf = require(\"../add-text-if\");\nconst richText = require(\"./rich-text\");\n\nfunction TopText(metaText, metaTextInfo, formatting, lines, width, isPrint, paddingLeft, spacing, shouldAddClasses, getTextSize) {\n\tthis.rows = [];\n\n\tif (metaText.header && isPrint) {\n\t\t// Note: whether there is a header or not doesn't change any other positioning, so this doesn't change the Y-coordinate.\n\t\t// This text goes above the margin, so we'll temporarily move up.\n\t\tvar headerTextHeight = getTextSize.calc(\"X\", \"headerfont\", 'abcjs-header abcjs-meta-top').height;\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft, text: metaText.header.left, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft + width / 2, text: metaText.header.center, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, anchor: 'middle', info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\t\taddTextIf(this.rows, { marginLeft: paddingLeft + width, text: metaText.header.right, font: 'headerfont', klass: 'header meta-top', marginTop: -headerTextHeight, anchor: 'end', info: metaTextInfo.header, name: \"header\" }, getTextSize);\n\n\t\t//\t\tTopText.prototype.addTextIf = function (marginLeft, text, font, klass, marginTop, marginBottom, anchor, getTextSize, absElemType, noMove) {\n\t}\n\tif (isPrint)\n\t\tthis.rows.push({ move: spacing.top });\n\tvar tAnchor = formatting.titleleft ? 'start' : 'middle';\n\tvar tLeft = formatting.titleleft ? paddingLeft : paddingLeft + width / 2;\n\tif (metaText.title) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-title' : ''\n\t\trichText(this.rows, metaText.title, \"titlefont\", klass, 'title', tLeft, {marginTop: spacing.title, anchor: tAnchor, absElemType: \"title\", info: metaTextInfo.title}, getTextSize)\n\t}\n\tif (lines.length) {\n\t\tvar index = 0;\n\t\twhile (index < lines.length && lines[index].subtitle) {\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-text abcjs-subtitle' : ''\n\t\t\trichText(this.rows, lines[index].subtitle.text, \"subtitlefont\", klass, 'subtitle', tLeft, {marginTop: spacing.subtitle, anchor: tAnchor, absElemType: \"subtitle\", info: lines[index].subtitle}, getTextSize)\n\t\t\tindex++;\n\t\t}\n\t}\n\n\tif (metaText.rhythm || metaText.origin || metaText.composer) {\n\t\tthis.rows.push({ move: spacing.composer });\n\t\tif (metaText.rhythm && metaText.rhythm.length > 0) {\n\t\t\tvar noMove = !!(metaText.composer || metaText.origin);\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-rhythm' : ''\n\t\t\taddTextIf(this.rows, { marginLeft: paddingLeft, text: metaText.rhythm, font: 'infofont', klass: klass, absElemType: \"rhythm\", noMove: noMove, info: metaTextInfo.rhythm, name: \"rhythm\" }, getTextSize);\n\t\t}\n\t\tvar hasSimpleComposerLine = true\n\t\tif (metaText.composer && typeof metaText.composer !== 'string')\n\t\t\thasSimpleComposerLine = false\n\t\tif (metaText.origin && typeof metaText.origin !== 'string')\n\t\t\thasSimpleComposerLine = false\n\t\t\t\n\t\tvar composerLine = metaText.composer ? metaText.composer : '';\n\t\tif (metaText.origin) {\n\t\t\tif (typeof composerLine === 'string' && typeof metaText.origin === 'string')\n\t\t\t\tcomposerLine += ' (' + metaText.origin + ')';\n\t\t\telse if (typeof composerLine === 'string' && typeof metaText.origin !== 'string') {\n\t\t\t\tcomposerLine = [{text:composerLine}]\n\t\t\t\tcomposerLine.push({text:\" (\"})\n\t\t\t\tcomposerLine = composerLine.concat(metaText.origin)\n\t\t\t\tcomposerLine.push({text:\")\"})\n\t\t\t} else {\n\t\t\t\tcomposerLine.push({text:\" (\"})\n\t\t\t\tcomposerLine = composerLine.concat(metaText.origin)\n\t\t\t\tcomposerLine.push({text:\")\"})\n\t\t\t}\n\t\t}\n\t\tif (composerLine) {\n\t\t\tvar klass = shouldAddClasses ? 'abcjs-composer' : ''\n\t\t\trichText(this.rows, composerLine, 'composerfont', klass, \"composer\", paddingLeft+width, {anchor: \"end\", absElemType: \"composer\", info: metaTextInfo.composer, ingroup: true}, getTextSize)\n\t\t}\n\t}\n\n\tif (metaText.author && metaText.author.length > 0) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-author' : ''\n\t\trichText(this.rows, metaText.author, 'composerfont', klass, \"author\", paddingLeft+width, {anchor: \"end\", absElemType: \"author\", info: metaTextInfo.author}, getTextSize)\n\t}\n\n\tif (metaText.partOrder && metaText.partOrder.length > 0) {\n\t\tvar klass = shouldAddClasses ? 'abcjs-part-order' : ''\n\t\trichText(this.rows, metaText.partOrder, 'partsfont', klass, \"part-order\", paddingLeft, {absElemType: \"partOrder\", info: metaTextInfo.partOrder, anchor: 'start'}, getTextSize)\n\n\t}\n}\n\nmodule.exports = TopText;\n","// abc_triplet_element.js: Definition of the TripletElem class.\n\nvar TripletElem = function TripletElem(number, anchor1, options) {\n\tthis.type = \"TripletElem\";\n\tthis.anchor1 = anchor1; // must have a .x and a .parent property or be null (means starts at the \"beginning\" of the line - after key signature)\n\tthis.number = number;\n\tthis.durationClass = ('d' + (Math.round(anchor1.parent.durationClass * 1000) / 1000)).replace(/\\./, '-');\n\tthis.middleElems = []; // This is to calculate the highest interior pitch. It is used to make sure that the drawn bracket never crosses a really high middle note.\n\tthis.flatBeams = options.flatBeams;\n};\n\nTripletElem.prototype.isClosed = function () {\n\treturn !!this.anchor2;\n};\n\nTripletElem.prototype.middleNote = function (elem) {\n\tthis.middleElems.push(elem);\n};\n\nTripletElem.prototype.setCloseAnchor = function (anchor2) {\n\tthis.anchor2 = anchor2;\n\t// TODO-PER: This used to be just for beamed triplets but it looks like bracketed triplets need extra room, too. The only one that doesn't is stem down and beamed\n\t//if (this.anchor1.parent.beam)\n\tif (!this.anchor1.parent.beam || this.anchor1.stemDir === 'up')\n\t\tthis.endingHeightAbove = 4;\n};\n\nmodule.exports = TripletElem;\n","// abc_voice_element.js: Definition of the VoiceElement class.\n\nvar VoiceElement = function VoiceElement(voicenumber, voicetotal) {\n\tthis.children = [];\n\tthis.beams = [];\n\tthis.otherchildren = []; // ties, slurs, triplets\n\tthis.w = 0;\n\tthis.duplicate = false;\n\tthis.voicenumber = voicenumber; //number of the voice on a given stave (not staffgroup)\n\tthis.voicetotal = voicetotal;\n\tthis.bottom = 7;\n\tthis.top = 7;\n\tthis.specialY = {\n\t\ttempoHeightAbove: 0,\n\t\tpartHeightAbove: 0,\n\t\tvolumeHeightAbove: 0,\n\t\tdynamicHeightAbove: 0,\n\t\tendingHeightAbove: 0,\n\t\tchordHeightAbove: 0,\n\t\tlyricHeightAbove: 0,\n\n\t\tlyricHeightBelow: 0,\n\t\tchordHeightBelow: 0,\n\t\tvolumeHeightBelow: 0,\n\t\tdynamicHeightBelow: 0\n\t};\n};\n\nVoiceElement.prototype.addChild = function (absElem) {\n\t// This is always passed an AbsoluteElement\n\tif (absElem.type === 'bar') {\n\t\tvar firstItem = true;\n\t\tfor (var i = 0; firstItem && i < this.children.length; i++) {\n\t\t\tif (this.children[i].type.indexOf(\"staff-extra\") < 0 && this.children[i].type !== \"tempo\")\n\t\t\t\tfirstItem = false;\n\t\t}\n\t\tif (!firstItem) {\n\t\t\tthis.beams.push(\"bar\");\n\t\t\tthis.otherchildren.push(\"bar\");\n\t\t}\n\t}\n\tthis.children[this.children.length] = absElem;\n\tthis.setRange(absElem);\n};\n\nVoiceElement.prototype.setLimit = function (member, child) {\n\t// Sometimes we get an absolute element in here and sometimes we get some type of relative element.\n\t// If there is a \"specialY\" element, then assume it is an absolute element. If that doesn't exist, look for the\n\t// same members at the top level, because that's where they are in relative elements.\n\tvar specialY = child.specialY;\n\tif (!specialY) specialY = child;\n\tif (!specialY[member]) return;\n\tif (!this.specialY[member])\n\t\tthis.specialY[member] = specialY[member];\n\telse\n\t\tthis.specialY[member] = Math.max(this.specialY[member], specialY[member]);\n};\n\nVoiceElement.prototype.adjustRange = function (child) {\n\tif (child.bottom !== undefined)\n\t\tthis.bottom = Math.min(this.bottom, child.bottom);\n\tif (child.top !== undefined)\n\t\tthis.top = Math.max(this.top, child.top);\n};\n\nVoiceElement.prototype.setRange = function (child) {\n\tthis.adjustRange(child);\n\tthis.setLimit('tempoHeightAbove', child);\n\tthis.setLimit('partHeightAbove', child);\n\tthis.setLimit('volumeHeightAbove', child);\n\tthis.setLimit('dynamicHeightAbove', child);\n\tthis.setLimit('endingHeightAbove', child);\n\tthis.setLimit('chordHeightAbove', child);\n\tthis.setLimit('lyricHeightAbove', child);\n\tthis.setLimit('lyricHeightBelow', child);\n\tthis.setLimit('chordHeightBelow', child);\n\tthis.setLimit('volumeHeightBelow', child);\n\tthis.setLimit('dynamicHeightBelow', child);\n};\n\nVoiceElement.prototype.addOther = function (child) {\n\tthis.otherchildren.push(child);\n\tthis.setRange(child);\n};\n\nVoiceElement.prototype.addBeam = function (child) {\n\tthis.beams.push(child);\n};\n\nVoiceElement.prototype.setWidth = function (width) {\n\tthis.w = width;\n};\n\nmodule.exports = VoiceElement;\n","var spacing = require('../helpers/spacing');\n\n/**\n * Glyphs and some methods to adjust for their x and y baseline\n */\nvar glyphs =\n{\n\t'0': { d: [['M', 4.83, -14.97], ['c', 0.33, -0.03, 1.11, 0.00, 1.47, 0.06], ['c', 1.68, 0.36, 2.97, 1.59, 3.78, 3.60], ['c', 1.20, 2.97, 0.81, 6.96, -0.90, 9.27], ['c', -0.78, 1.08, -1.71, 1.71, -2.91, 1.95], ['c', -0.45, 0.09, -1.32, 0.09, -1.77, 0.00], ['c', -0.81, -0.18, -1.47, -0.51, -2.07, -1.02], ['c', -2.34, -2.07, -3.15, -6.72, -1.74, -10.20], ['c', 0.87, -2.16, 2.28, -3.42, 4.14, -3.66], ['z'], ['m', 1.11, 0.87], ['c', -0.21, -0.06, -0.69, -0.09, -0.87, -0.06], ['c', -0.54, 0.12, -0.87, 0.42, -1.17, 0.99], ['c', -0.36, 0.66, -0.51, 1.56, -0.60, 3.00], ['c', -0.03, 0.75, -0.03, 4.59, 0.00, 5.31], ['c', 0.09, 1.50, 0.27, 2.40, 0.60, 3.06], ['c', 0.24, 0.48, 0.57, 0.78, 0.96, 0.90], ['c', 0.27, 0.09, 0.78, 0.09, 1.05, 0.00], ['c', 0.39, -0.12, 0.72, -0.42, 0.96, -0.90], ['c', 0.33, -0.66, 0.51, -1.56, 0.60, -3.06], ['c', 0.03, -0.72, 0.03, -4.56, 0.00, -5.31], ['c', -0.09, -1.47, -0.27, -2.37, -0.60, -3.03], ['c', -0.24, -0.48, -0.54, -0.78, -0.93, -0.90], ['z']], w: 10.78, h: 14.959 },\n\t'1': { d: [['M', 3.30, -15.06], ['c', 0.06, -0.06, 0.21, -0.03, 0.66, 0.15], ['c', 0.81, 0.39, 1.08, 0.39, 1.83, 0.03], ['c', 0.21, -0.09, 0.39, -0.15, 0.42, -0.15], ['c', 0.12, 0.00, 0.21, 0.09, 0.27, 0.21], ['c', 0.06, 0.12, 0.06, 0.33, 0.06, 5.94], ['c', 0.00, 3.93, 0.00, 5.85, 0.03, 6.03], ['c', 0.06, 0.36, 0.15, 0.69, 0.27, 0.96], ['c', 0.36, 0.75, 0.93, 1.17, 1.68, 1.26], ['c', 0.30, 0.03, 0.39, 0.09, 0.39, 0.30], ['c', 0.00, 0.15, -0.03, 0.18, -0.09, 0.24], ['c', -0.06, 0.06, -0.09, 0.06, -0.48, 0.06], ['c', -0.42, 0.00, -0.69, -0.03, -2.10, -0.24], ['c', -0.90, -0.15, -1.77, -0.15, -2.67, 0.00], ['c', -1.41, 0.21, -1.68, 0.24, -2.10, 0.24], ['c', -0.39, 0.00, -0.42, 0.00, -0.48, -0.06], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.24], ['c', 0.00, -0.21, 0.06, -0.27, 0.36, -0.30], ['c', 0.75, -0.09, 1.32, -0.51, 1.68, -1.26], ['c', 0.12, -0.27, 0.21, -0.60, 0.27, -0.96], ['c', 0.03, -0.18, 0.03, -1.59, 0.03, -4.29], ['c', 0.00, -3.87, 0.00, -4.05, -0.06, -4.14], ['c', -0.09, -0.15, -0.18, -0.24, -0.39, -0.24], ['c', -0.12, 0.00, -0.15, 0.03, -0.21, 0.06], ['c', -0.03, 0.06, -0.45, 0.99, -0.96, 2.13], ['c', -0.48, 1.14, -0.90, 2.10, -0.93, 2.16], ['c', -0.06, 0.15, -0.21, 0.24, -0.33, 0.24], ['c', -0.24, 0.00, -0.42, -0.18, -0.42, -0.39], ['c', 0.00, -0.06, 3.27, -7.62, 3.33, -7.74], ['z']], w: 8.94, h: 15.058 },\n\t'2': { d: [['M', 4.23, -14.97], ['c', 0.57, -0.06, 1.68, 0.00, 2.34, 0.18], ['c', 0.69, 0.18, 1.50, 0.54, 2.01, 0.90], ['c', 1.35, 0.96, 1.95, 2.25, 1.77, 3.81], ['c', -0.15, 1.35, -0.66, 2.34, -1.68, 3.15], ['c', -0.60, 0.48, -1.44, 0.93, -3.12, 1.65], ['c', -1.32, 0.57, -1.80, 0.81, -2.37, 1.14], ['c', -0.57, 0.33, -0.57, 0.33, -0.24, 0.27], ['c', 0.39, -0.09, 1.26, -0.09, 1.68, 0.00], ['c', 0.72, 0.15, 1.41, 0.45, 2.10, 0.90], ['c', 0.99, 0.63, 1.86, 0.87, 2.55, 0.75], ['c', 0.24, -0.06, 0.42, -0.15, 0.57, -0.30], ['c', 0.12, -0.09, 0.30, -0.42, 0.30, -0.51], ['c', 0.00, -0.09, 0.12, -0.21, 0.24, -0.24], ['c', 0.18, -0.03, 0.39, 0.12, 0.39, 0.30], ['c', 0.00, 0.12, -0.15, 0.57, -0.30, 0.87], ['c', -0.54, 1.02, -1.56, 1.74, -2.79, 2.01], ['c', -0.42, 0.09, -1.23, 0.09, -1.62, 0.03], ['c', -0.81, -0.18, -1.32, -0.45, -2.01, -1.11], ['c', -0.45, -0.45, -0.63, -0.57, -0.96, -0.69], ['c', -0.84, -0.27, -1.89, 0.12, -2.25, 0.90], ['c', -0.12, 0.21, -0.21, 0.54, -0.21, 0.72], ['c', 0.00, 0.12, -0.12, 0.21, -0.27, 0.24], ['c', -0.15, 0.00, -0.27, -0.03, -0.33, -0.15], ['c', -0.09, -0.21, 0.09, -1.08, 0.33, -1.71], ['c', 0.24, -0.66, 0.66, -1.26, 1.29, -1.89], ['c', 0.45, -0.45, 0.90, -0.81, 1.92, -1.56], ['c', 1.29, -0.93, 1.89, -1.44, 2.34, -1.98], ['c', 0.87, -1.05, 1.26, -2.19, 1.20, -3.63], ['c', -0.06, -1.29, -0.39, -2.31, -0.96, -2.91], ['c', -0.36, -0.33, -0.72, -0.51, -1.17, -0.54], ['c', -0.84, -0.03, -1.53, 0.42, -1.59, 1.05], ['c', -0.03, 0.33, 0.12, 0.60, 0.57, 1.14], ['c', 0.45, 0.54, 0.54, 0.87, 0.42, 1.41], ['c', -0.15, 0.63, -0.54, 1.11, -1.08, 1.38], ['c', -0.63, 0.33, -1.20, 0.33, -1.83, 0.00], ['c', -0.24, -0.12, -0.33, -0.18, -0.54, -0.39], ['c', -0.18, -0.18, -0.27, -0.30, -0.36, -0.51], ['c', -0.24, -0.45, -0.27, -0.84, -0.21, -1.38], ['c', 0.12, -0.75, 0.45, -1.41, 1.02, -1.98], ['c', 0.72, -0.72, 1.74, -1.17, 2.85, -1.32], ['z']], w: 10.764, h: 14.97 },\n\t'3': { d: [['M', 3.78, -14.97], ['c', 0.30, -0.03, 1.41, 0.00, 1.83, 0.06], ['c', 2.22, 0.30, 3.51, 1.32, 3.72, 2.91], ['c', 0.03, 0.33, 0.03, 1.26, -0.03, 1.65], ['c', -0.12, 0.84, -0.48, 1.47, -1.05, 1.77], ['c', -0.27, 0.15, -0.36, 0.24, -0.45, 0.39], ['c', -0.09, 0.21, -0.09, 0.36, 0.00, 0.57], ['c', 0.09, 0.15, 0.18, 0.24, 0.51, 0.39], ['c', 0.75, 0.42, 1.23, 1.14, 1.41, 2.13], ['c', 0.06, 0.42, 0.06, 1.35, 0.00, 1.71], ['c', -0.18, 0.81, -0.48, 1.38, -1.02, 1.95], ['c', -0.75, 0.72, -1.80, 1.20, -3.18, 1.38], ['c', -0.42, 0.06, -1.56, 0.06, -1.95, 0.00], ['c', -1.89, -0.33, -3.18, -1.29, -3.51, -2.64], ['c', -0.03, -0.12, -0.03, -0.33, -0.03, -0.60], ['c', 0.00, -0.36, 0.00, -0.42, 0.06, -0.63], ['c', 0.12, -0.30, 0.27, -0.51, 0.51, -0.75], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.36, 0.33, 0.57, 0.75, 0.60, 1.20], ['c', 0.00, 0.21, 0.00, 0.27, -0.06, 0.42], ['c', -0.09, 0.18, -0.12, 0.24, -0.54, 0.54], ['c', -0.51, 0.36, -0.63, 0.54, -0.60, 0.87], ['c', 0.06, 0.54, 0.54, 0.90, 1.38, 0.99], ['c', 0.36, 0.06, 0.72, 0.03, 0.96, -0.06], ['c', 0.81, -0.27, 1.29, -1.23, 1.44, -2.79], ['c', 0.03, -0.45, 0.03, -1.95, -0.03, -2.37], ['c', -0.09, -0.75, -0.33, -1.23, -0.75, -1.44], ['c', -0.33, -0.18, -0.45, -0.18, -1.98, -0.18], ['c', -1.35, 0.00, -1.41, 0.00, -1.50, -0.06], ['c', -0.18, -0.12, -0.24, -0.39, -0.12, -0.60], ['c', 0.12, -0.15, 0.15, -0.15, 1.68, -0.15], ['c', 1.50, 0.00, 1.62, 0.00, 1.89, -0.15], ['c', 0.18, -0.09, 0.42, -0.36, 0.54, -0.57], ['c', 0.18, -0.42, 0.27, -0.90, 0.30, -1.95], ['c', 0.03, -1.20, -0.06, -1.80, -0.36, -2.37], ['c', -0.24, -0.48, -0.63, -0.81, -1.14, -0.96], ['c', -0.30, -0.06, -1.08, -0.06, -1.38, 0.03], ['c', -0.60, 0.15, -0.90, 0.42, -0.96, 0.84], ['c', -0.03, 0.30, 0.06, 0.45, 0.63, 0.84], ['c', 0.33, 0.24, 0.42, 0.39, 0.45, 0.63], ['c', 0.03, 0.72, -0.57, 1.50, -1.32, 1.65], ['c', -1.05, 0.27, -2.10, -0.57, -2.10, -1.65], ['c', 0.00, -0.45, 0.15, -0.96, 0.39, -1.38], ['c', 0.12, -0.21, 0.54, -0.63, 0.81, -0.81], ['c', 0.57, -0.42, 1.38, -0.69, 2.25, -0.81], ['z']], w: 9.735, h: 14.967 },\n\t'4': { d: [['M', 8.64, -14.94], ['c', 0.27, -0.09, 0.42, -0.12, 0.54, -0.03], ['c', 0.09, 0.06, 0.15, 0.21, 0.15, 0.30], ['c', -0.03, 0.06, -1.92, 2.31, -4.23, 5.04], ['c', -2.31, 2.73, -4.23, 4.98, -4.26, 5.01], ['c', -0.03, 0.06, 0.12, 0.06, 2.55, 0.06], ['l', 2.61, 0.00], ['l', 0.00, -2.37], ['c', 0.00, -2.19, 0.03, -2.37, 0.06, -2.46], ['c', 0.03, -0.06, 0.21, -0.18, 0.57, -0.42], ['c', 1.08, -0.72, 1.38, -1.08, 1.86, -2.16], ['c', 0.12, -0.30, 0.24, -0.54, 0.27, -0.57], ['c', 0.12, -0.12, 0.39, -0.06, 0.45, 0.12], ['c', 0.06, 0.09, 0.06, 0.57, 0.06, 3.96], ['l', 0.00, 3.90], ['l', 1.08, 0.00], ['c', 1.05, 0.00, 1.11, 0.00, 1.20, 0.06], ['c', 0.24, 0.15, 0.24, 0.54, 0.00, 0.69], ['c', -0.09, 0.06, -0.15, 0.06, -1.20, 0.06], ['l', -1.08, 0.00], ['l', 0.00, 0.33], ['c', 0.00, 0.57, 0.09, 1.11, 0.30, 1.53], ['c', 0.36, 0.75, 0.93, 1.17, 1.68, 1.26], ['c', 0.30, 0.03, 0.39, 0.09, 0.39, 0.30], ['c', 0.00, 0.15, -0.03, 0.18, -0.09, 0.24], ['c', -0.06, 0.06, -0.09, 0.06, -0.48, 0.06], ['c', -0.42, 0.00, -0.69, -0.03, -2.10, -0.24], ['c', -0.90, -0.15, -1.77, -0.15, -2.67, 0.00], ['c', -1.41, 0.21, -1.68, 0.24, -2.10, 0.24], ['c', -0.39, 0.00, -0.42, 0.00, -0.48, -0.06], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.24], ['c', 0.00, -0.21, 0.06, -0.27, 0.36, -0.30], ['c', 0.75, -0.09, 1.32, -0.51, 1.68, -1.26], ['c', 0.21, -0.42, 0.30, -0.96, 0.30, -1.53], ['l', 0.00, -0.33], ['l', -2.70, 0.00], ['c', -2.91, 0.00, -2.85, 0.00, -3.09, -0.15], ['c', -0.18, -0.12, -0.30, -0.39, -0.27, -0.54], ['c', 0.03, -0.06, 0.18, -0.24, 0.33, -0.45], ['c', 0.75, -0.90, 1.59, -2.07, 2.13, -3.03], ['c', 0.33, -0.54, 0.84, -1.62, 1.05, -2.16], ['c', 0.57, -1.41, 0.84, -2.64, 0.90, -4.05], ['c', 0.03, -0.63, 0.06, -0.72, 0.24, -0.81], ['l', 0.12, -0.06], ['l', 0.45, 0.12], ['c', 0.66, 0.18, 1.02, 0.24, 1.47, 0.27], ['c', 0.60, 0.03, 1.23, -0.09, 2.01, -0.33], ['z']], w: 11.795, h: 14.994 },\n\t'5': { d: [['M', 1.02, -14.94], ['c', 0.12, -0.09, 0.03, -0.09, 1.08, 0.06], ['c', 2.49, 0.36, 4.35, 0.36, 6.96, -0.06], ['c', 0.57, -0.09, 0.66, -0.06, 0.81, 0.06], ['c', 0.15, 0.18, 0.12, 0.24, -0.15, 0.51], ['c', -1.29, 1.26, -3.24, 2.04, -5.58, 2.31], ['c', -0.60, 0.09, -1.20, 0.12, -1.71, 0.12], ['c', -0.39, 0.00, -0.45, 0.00, -0.57, 0.06], ['c', -0.09, 0.06, -0.15, 0.12, -0.21, 0.21], ['l', -0.06, 0.12], ['l', 0.00, 1.65], ['l', 0.00, 1.65], ['l', 0.21, -0.21], ['c', 0.66, -0.57, 1.41, -0.96, 2.19, -1.14], ['c', 0.33, -0.06, 1.41, -0.06, 1.95, 0.00], ['c', 2.61, 0.36, 4.02, 1.74, 4.26, 4.14], ['c', 0.03, 0.45, 0.03, 1.08, -0.03, 1.44], ['c', -0.18, 1.02, -0.78, 2.01, -1.59, 2.70], ['c', -0.72, 0.57, -1.62, 1.02, -2.49, 1.20], ['c', -1.38, 0.27, -3.03, 0.06, -4.20, -0.54], ['c', -1.08, -0.54, -1.71, -1.32, -1.86, -2.28], ['c', -0.09, -0.69, 0.09, -1.29, 0.57, -1.74], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.36, 0.33, 0.57, 0.75, 0.60, 1.20], ['c', 0.00, 0.21, 0.00, 0.27, -0.06, 0.42], ['c', -0.09, 0.18, -0.12, 0.24, -0.54, 0.54], ['c', -0.18, 0.12, -0.36, 0.30, -0.42, 0.33], ['c', -0.36, 0.42, -0.18, 0.99, 0.36, 1.26], ['c', 0.51, 0.27, 1.47, 0.36, 2.01, 0.27], ['c', 0.93, -0.21, 1.47, -1.17, 1.65, -2.91], ['c', 0.06, -0.45, 0.06, -1.89, 0.00, -2.31], ['c', -0.15, -1.20, -0.51, -2.10, -1.05, -2.55], ['c', -0.21, -0.18, -0.54, -0.36, -0.81, -0.39], ['c', -0.30, -0.06, -0.84, -0.03, -1.26, 0.06], ['c', -0.93, 0.18, -1.65, 0.60, -2.16, 1.20], ['c', -0.15, 0.21, -0.27, 0.30, -0.39, 0.30], ['c', -0.15, 0.00, -0.30, -0.09, -0.36, -0.18], ['c', -0.06, -0.09, -0.06, -0.15, -0.06, -3.66], ['c', 0.00, -3.39, 0.00, -3.57, 0.06, -3.66], ['c', 0.03, -0.06, 0.09, -0.15, 0.15, -0.18], ['z']], w: 10.212, h: 14.997 },\n\t'6': { d: [['M', 4.98, -14.97], ['c', 0.36, -0.03, 1.20, 0.00, 1.59, 0.06], ['c', 0.90, 0.15, 1.68, 0.51, 2.25, 1.05], ['c', 0.57, 0.51, 0.87, 1.23, 0.84, 1.98], ['c', -0.03, 0.51, -0.21, 0.90, -0.60, 1.26], ['c', -0.24, 0.24, -0.45, 0.39, -0.75, 0.51], ['c', -0.21, 0.06, -0.27, 0.06, -0.60, 0.06], ['c', -0.33, 0.00, -0.39, 0.00, -0.60, -0.06], ['c', -0.30, -0.12, -0.51, -0.27, -0.75, -0.51], ['c', -0.39, -0.36, -0.57, -0.78, -0.57, -1.26], ['c', 0.00, -0.27, 0.00, -0.30, 0.09, -0.42], ['c', 0.03, -0.09, 0.18, -0.21, 0.30, -0.30], ['c', 0.12, -0.09, 0.30, -0.21, 0.39, -0.27], ['c', 0.09, -0.06, 0.21, -0.18, 0.27, -0.24], ['c', 0.06, -0.12, 0.09, -0.15, 0.09, -0.33], ['c', 0.00, -0.18, -0.03, -0.24, -0.09, -0.36], ['c', -0.24, -0.39, -0.75, -0.60, -1.38, -0.57], ['c', -0.54, 0.03, -0.90, 0.18, -1.23, 0.48], ['c', -0.81, 0.72, -1.08, 2.16, -0.96, 5.37], ['l', 0.00, 0.63], ['l', 0.30, -0.12], ['c', 0.78, -0.27, 1.29, -0.33, 2.10, -0.27], ['c', 1.47, 0.12, 2.49, 0.54, 3.27, 1.29], ['c', 0.48, 0.51, 0.81, 1.11, 0.96, 1.89], ['c', 0.06, 0.27, 0.06, 0.42, 0.06, 0.93], ['c', 0.00, 0.54, 0.00, 0.69, -0.06, 0.96], ['c', -0.15, 0.78, -0.48, 1.38, -0.96, 1.89], ['c', -0.54, 0.51, -1.17, 0.87, -1.98, 1.08], ['c', -1.14, 0.30, -2.40, 0.33, -3.24, 0.03], ['c', -1.50, -0.48, -2.64, -1.89, -3.27, -4.02], ['c', -0.36, -1.23, -0.51, -2.82, -0.42, -4.08], ['c', 0.30, -3.66, 2.28, -6.30, 4.95, -6.66], ['z'], ['m', 0.66, 7.41], ['c', -0.27, -0.09, -0.81, -0.12, -1.08, -0.06], ['c', -0.72, 0.18, -1.08, 0.69, -1.23, 1.71], ['c', -0.06, 0.54, -0.06, 3.00, 0.00, 3.54], ['c', 0.18, 1.26, 0.72, 1.77, 1.80, 1.74], ['c', 0.39, -0.03, 0.63, -0.09, 0.90, -0.27], ['c', 0.66, -0.42, 0.90, -1.32, 0.90, -3.24], ['c', 0.00, -2.22, -0.36, -3.12, -1.29, -3.42], ['z']], w: 9.956, h: 14.982 },\n\t'7': { d: [['M', 0.21, -14.97], ['c', 0.21, -0.06, 0.45, 0.00, 0.54, 0.15], ['c', 0.06, 0.09, 0.06, 0.15, 0.06, 0.39], ['c', 0.00, 0.24, 0.00, 0.33, 0.06, 0.42], ['c', 0.06, 0.12, 0.21, 0.24, 0.27, 0.24], ['c', 0.03, 0.00, 0.12, -0.12, 0.24, -0.21], ['c', 0.96, -1.20, 2.58, -1.35, 3.99, -0.42], ['c', 0.15, 0.12, 0.42, 0.30, 0.54, 0.45], ['c', 0.48, 0.39, 0.81, 0.57, 1.29, 0.60], ['c', 0.69, 0.03, 1.50, -0.30, 2.13, -0.87], ['c', 0.09, -0.09, 0.27, -0.30, 0.39, -0.45], ['c', 0.12, -0.15, 0.24, -0.27, 0.30, -0.30], ['c', 0.18, -0.06, 0.39, 0.03, 0.51, 0.21], ['c', 0.06, 0.18, 0.06, 0.24, -0.27, 0.72], ['c', -0.18, 0.24, -0.54, 0.78, -0.78, 1.17], ['c', -2.37, 3.54, -3.54, 6.27, -3.87, 9.00], ['c', -0.03, 0.33, -0.03, 0.66, -0.03, 1.26], ['c', 0.00, 0.90, 0.00, 1.08, 0.15, 1.89], ['c', 0.06, 0.45, 0.06, 0.48, 0.03, 0.60], ['c', -0.06, 0.09, -0.21, 0.21, -0.30, 0.21], ['c', -0.03, 0.00, -0.27, -0.06, -0.54, -0.15], ['c', -0.84, -0.27, -1.11, -0.30, -1.65, -0.30], ['c', -0.57, 0.00, -0.84, 0.03, -1.56, 0.27], ['c', -0.60, 0.18, -0.69, 0.21, -0.81, 0.15], ['c', -0.12, -0.06, -0.21, -0.18, -0.21, -0.30], ['c', 0.00, -0.15, 0.60, -1.44, 1.20, -2.61], ['c', 1.14, -2.22, 2.73, -4.68, 5.10, -8.01], ['c', 0.21, -0.27, 0.36, -0.48, 0.33, -0.48], ['c', 0.00, 0.00, -0.12, 0.06, -0.27, 0.12], ['c', -0.54, 0.30, -0.99, 0.39, -1.56, 0.39], ['c', -0.75, 0.03, -1.20, -0.18, -1.83, -0.75], ['c', -0.99, -0.90, -1.83, -1.17, -2.31, -0.72], ['c', -0.18, 0.15, -0.36, 0.51, -0.45, 0.84], ['c', -0.06, 0.24, -0.06, 0.33, -0.09, 1.98], ['c', 0.00, 1.62, -0.03, 1.74, -0.06, 1.80], ['c', -0.15, 0.24, -0.54, 0.24, -0.69, 0.00], ['c', -0.06, -0.09, -0.06, -0.15, -0.06, -3.57], ['c', 0.00, -3.42, 0.00, -3.48, 0.06, -3.57], ['c', 0.03, -0.06, 0.09, -0.12, 0.15, -0.15], ['z']], w: 10.561, h: 15.093 },\n\t'8': { d: [['M', 4.98, -14.97], ['c', 0.33, -0.03, 1.02, -0.03, 1.32, 0.00], ['c', 1.32, 0.12, 2.49, 0.60, 3.21, 1.32], ['c', 0.39, 0.39, 0.66, 0.81, 0.78, 1.29], ['c', 0.09, 0.36, 0.09, 1.08, 0.00, 1.44], ['c', -0.21, 0.84, -0.66, 1.59, -1.59, 2.55], ['l', -0.30, 0.30], ['l', 0.27, 0.18], ['c', 1.47, 0.93, 2.31, 2.31, 2.25, 3.75], ['c', -0.03, 0.75, -0.24, 1.35, -0.63, 1.95], ['c', -0.45, 0.66, -1.02, 1.14, -1.83, 1.53], ['c', -1.80, 0.87, -4.20, 0.87, -6.00, 0.03], ['c', -1.62, -0.78, -2.52, -2.16, -2.46, -3.66], ['c', 0.06, -0.99, 0.54, -1.77, 1.80, -2.97], ['c', 0.54, -0.51, 0.54, -0.54, 0.48, -0.57], ['c', -0.39, -0.27, -0.96, -0.78, -1.20, -1.14], ['c', -0.75, -1.11, -0.87, -2.40, -0.30, -3.60], ['c', 0.69, -1.35, 2.25, -2.25, 4.20, -2.40], ['z'], ['m', 1.53, 0.69], ['c', -0.42, -0.09, -1.11, -0.12, -1.38, -0.06], ['c', -0.30, 0.06, -0.60, 0.18, -0.81, 0.30], ['c', -0.21, 0.12, -0.60, 0.51, -0.72, 0.72], ['c', -0.51, 0.87, -0.42, 1.89, 0.21, 2.52], ['c', 0.21, 0.21, 0.36, 0.30, 1.95, 1.23], ['c', 0.96, 0.54, 1.74, 0.99, 1.77, 1.02], ['c', 0.09, 0.00, 0.63, -0.60, 0.99, -1.11], ['c', 0.21, -0.36, 0.48, -0.87, 0.57, -1.23], ['c', 0.06, -0.24, 0.06, -0.36, 0.06, -0.72], ['c', 0.00, -0.45, -0.03, -0.66, -0.15, -0.99], ['c', -0.39, -0.81, -1.29, -1.44, -2.49, -1.68], ['z'], ['m', -1.44, 8.07], ['l', -1.89, -1.08], ['c', -0.03, 0.00, -0.18, 0.15, -0.39, 0.33], ['c', -1.20, 1.08, -1.65, 1.95, -1.59, 3.00], ['c', 0.09, 1.59, 1.35, 2.85, 3.21, 3.24], ['c', 0.33, 0.06, 0.45, 0.06, 0.93, 0.06], ['c', 0.63, 0.00, 0.81, -0.03, 1.29, -0.27], ['c', 0.90, -0.42, 1.47, -1.41, 1.41, -2.40], ['c', -0.06, -0.66, -0.39, -1.29, -0.90, -1.65], ['c', -0.12, -0.09, -1.05, -0.63, -2.07, -1.23], ['z']], w: 10.926, h: 14.989 },\n\t'9': { d: [['M', 4.23, -14.97], ['c', 0.42, -0.03, 1.29, 0.00, 1.62, 0.06], ['c', 0.51, 0.12, 0.93, 0.30, 1.38, 0.57], ['c', 1.53, 1.02, 2.52, 3.24, 2.73, 5.94], ['c', 0.18, 2.55, -0.48, 4.98, -1.83, 6.57], ['c', -1.05, 1.26, -2.40, 1.89, -3.93, 1.83], ['c', -1.23, -0.06, -2.31, -0.45, -3.03, -1.14], ['c', -0.57, -0.51, -0.87, -1.23, -0.84, -1.98], ['c', 0.03, -0.51, 0.21, -0.90, 0.60, -1.26], ['c', 0.24, -0.24, 0.45, -0.39, 0.75, -0.51], ['c', 0.21, -0.06, 0.27, -0.06, 0.60, -0.06], ['c', 0.33, 0.00, 0.39, 0.00, 0.60, 0.06], ['c', 0.30, 0.12, 0.51, 0.27, 0.75, 0.51], ['c', 0.39, 0.36, 0.57, 0.78, 0.57, 1.26], ['c', 0.00, 0.27, 0.00, 0.30, -0.09, 0.42], ['c', -0.03, 0.09, -0.18, 0.21, -0.30, 0.30], ['c', -0.12, 0.09, -0.30, 0.21, -0.39, 0.27], ['c', -0.09, 0.06, -0.21, 0.18, -0.27, 0.24], ['c', -0.06, 0.12, -0.06, 0.15, -0.06, 0.33], ['c', 0.00, 0.18, 0.00, 0.24, 0.06, 0.36], ['c', 0.24, 0.39, 0.75, 0.60, 1.38, 0.57], ['c', 0.54, -0.03, 0.90, -0.18, 1.23, -0.48], ['c', 0.81, -0.72, 1.08, -2.16, 0.96, -5.37], ['l', 0.00, -0.63], ['l', -0.30, 0.12], ['c', -0.78, 0.27, -1.29, 0.33, -2.10, 0.27], ['c', -1.47, -0.12, -2.49, -0.54, -3.27, -1.29], ['c', -0.48, -0.51, -0.81, -1.11, -0.96, -1.89], ['c', -0.06, -0.27, -0.06, -0.42, -0.06, -0.96], ['c', 0.00, -0.51, 0.00, -0.66, 0.06, -0.93], ['c', 0.15, -0.78, 0.48, -1.38, 0.96, -1.89], ['c', 0.15, -0.12, 0.33, -0.27, 0.42, -0.36], ['c', 0.69, -0.51, 1.62, -0.81, 2.76, -0.93], ['z'], ['m', 1.17, 0.66], ['c', -0.21, -0.06, -0.57, -0.06, -0.81, -0.03], ['c', -0.78, 0.12, -1.26, 0.69, -1.41, 1.74], ['c', -0.12, 0.63, -0.15, 1.95, -0.09, 2.79], ['c', 0.12, 1.71, 0.63, 2.40, 1.77, 2.46], ['c', 1.08, 0.03, 1.62, -0.48, 1.80, -1.74], ['c', 0.06, -0.54, 0.06, -3.00, 0.00, -3.54], ['c', -0.15, -1.05, -0.51, -1.53, -1.26, -1.68], ['z']], w: 9.959, h: 14.986 },\n\t'rests.multimeasure': { d: [['M', 0, -4], ['l', 0, 16], ['l', 1, 0], ['l', 0, -5], ['l', 40, 0], ['l', 0, 5], ['l', 1, 0], ['l', 0, -16], ['l', -1, 0], ['l', 0, 5], ['l', -40, 0], ['l', 0, -5], ['z']], w: 42, h: 18 },\n\t'rests.whole': { d: [['M', 0.06, 0.03], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.49, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 2.19], ['l', 0.00, 2.19], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -5.49, 0.00], ['l', -5.46, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -2.19], ['l', 0.00, -2.19], ['z']], w: 11.25, h: 4.68 },\n\t'rests.half': { d: [['M', 0.06, -4.62], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.49, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 2.19], ['l', 0.00, 2.19], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -5.49, 0.00], ['l', -5.46, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -2.19], ['l', 0.00, -2.19], ['z']], w: 11.25, h: 4.68 },\n\t'rests.quarter': { d: [['M', 1.89, -11.82], ['c', 0.12, -0.06, 0.24, -0.06, 0.36, -0.03], ['c', 0.09, 0.06, 4.74, 5.58, 4.86, 5.82], ['c', 0.21, 0.39, 0.15, 0.78, -0.15, 1.26], ['c', -0.24, 0.33, -0.72, 0.81, -1.62, 1.56], ['c', -0.45, 0.36, -0.87, 0.75, -0.96, 0.84], ['c', -0.93, 0.99, -1.14, 2.49, -0.60, 3.63], ['c', 0.18, 0.39, 0.27, 0.48, 1.32, 1.68], ['c', 1.92, 2.25, 1.83, 2.16, 1.83, 2.34], ['c', 0.00, 0.18, -0.18, 0.36, -0.36, 0.39], ['c', -0.15, 0.00, -0.27, -0.06, -0.48, -0.27], ['c', -0.75, -0.75, -2.46, -1.29, -3.39, -1.08], ['c', -0.45, 0.09, -0.69, 0.27, -0.90, 0.69], ['c', -0.12, 0.30, -0.21, 0.66, -0.24, 1.14], ['c', -0.03, 0.66, 0.09, 1.35, 0.30, 2.01], ['c', 0.15, 0.42, 0.24, 0.66, 0.45, 0.96], ['c', 0.18, 0.24, 0.18, 0.33, 0.03, 0.42], ['c', -0.12, 0.06, -0.18, 0.03, -0.45, -0.30], ['c', -1.08, -1.38, -2.07, -3.36, -2.40, -4.83], ['c', -0.27, -1.05, -0.15, -1.77, 0.27, -2.07], ['c', 0.21, -0.12, 0.42, -0.15, 0.87, -0.15], ['c', 0.87, 0.06, 2.10, 0.39, 3.30, 0.90], ['l', 0.39, 0.18], ['l', -1.65, -1.95], ['c', -2.52, -2.97, -2.61, -3.09, -2.70, -3.27], ['c', -0.09, -0.24, -0.12, -0.48, -0.03, -0.75], ['c', 0.15, -0.48, 0.57, -0.96, 1.83, -2.01], ['c', 0.45, -0.36, 0.84, -0.72, 0.93, -0.78], ['c', 0.69, -0.75, 1.02, -1.80, 0.90, -2.79], ['c', -0.06, -0.33, -0.21, -0.84, -0.39, -1.11], ['c', -0.09, -0.15, -0.45, -0.60, -0.81, -1.05], ['c', -0.36, -0.42, -0.69, -0.81, -0.72, -0.87], ['c', -0.09, -0.18, 0.00, -0.42, 0.21, -0.51], ['z']], w: 7.888, h: 21.435 },\n\t'rests.8th': { d: [['M', 1.68, -6.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.33, -0.09], ['c', 0.39, -0.18, 1.32, -1.29, 1.68, -1.98], ['c', 0.09, -0.21, 0.24, -0.30, 0.39, -0.30], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.27, 1.11, -1.86, 6.42], ['c', -1.02, 3.48, -1.89, 6.39, -1.92, 6.42], ['c', 0.00, 0.03, -0.12, 0.12, -0.24, 0.15], ['c', -0.18, 0.09, -0.21, 0.09, -0.45, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.15, -0.57, 1.68, -4.92], ['c', 0.96, -2.67, 1.74, -4.89, 1.71, -4.89], ['l', -0.51, 0.15], ['c', -1.08, 0.36, -1.74, 0.48, -2.55, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 7.534, h: 13.883 },\n\t'rests.16th': { d: [['M', 3.33, -6.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.15, 0.39, 0.57, 0.57, 0.87, 0.42], ['c', 0.39, -0.18, 1.20, -1.23, 1.62, -2.07], ['c', 0.06, -0.15, 0.24, -0.24, 0.36, -0.24], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.45, 1.86, -2.67, 10.17], ['c', -1.50, 5.55, -2.73, 10.14, -2.76, 10.17], ['c', -0.03, 0.03, -0.12, 0.12, -0.24, 0.15], ['c', -0.18, 0.09, -0.21, 0.09, -0.45, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.12, -0.57, 1.44, -4.92], ['c', 0.81, -2.67, 1.47, -4.86, 1.47, -4.89], ['c', -0.03, 0.00, -0.27, 0.06, -0.54, 0.15], ['c', -1.08, 0.36, -1.77, 0.48, -2.58, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.09, 0.09, 0.27, 0.18, 0.45, 0.21], ['c', 0.12, 0.00, 0.18, 0.00, 0.33, -0.09], ['c', 0.33, -0.15, 1.02, -0.93, 1.41, -1.59], ['c', 0.12, -0.21, 0.18, -0.39, 0.39, -1.08], ['c', 0.66, -2.10, 1.17, -3.84, 1.17, -3.87], ['c', 0.00, 0.00, -0.21, 0.06, -0.42, 0.15], ['c', -0.51, 0.15, -1.20, 0.33, -1.68, 0.42], ['c', -0.33, 0.06, -0.51, 0.06, -0.96, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 9.724, h: 21.383 },\n\t'rests.32nd': { d: [['M', 4.23, -13.62], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.27, -0.06], ['c', 0.33, -0.21, 0.99, -1.11, 1.44, -1.98], ['c', 0.09, -0.24, 0.21, -0.33, 0.39, -0.33], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.57, 2.67, -3.21, 13.89], ['c', -1.80, 7.62, -3.30, 13.89, -3.30, 13.92], ['c', -0.03, 0.06, -0.12, 0.12, -0.24, 0.18], ['c', -0.21, 0.09, -0.24, 0.09, -0.48, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.09, -0.57, 1.23, -4.92], ['c', 0.69, -2.67, 1.26, -4.86, 1.29, -4.89], ['c', 0.00, -0.03, -0.12, -0.03, -0.48, 0.12], ['c', -1.17, 0.39, -2.22, 0.57, -3.00, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.12, 0.09, 0.30, 0.18, 0.48, 0.21], ['c', 0.12, 0.00, 0.18, 0.00, 0.30, -0.09], ['c', 0.42, -0.21, 1.29, -1.29, 1.56, -1.89], ['c', 0.03, -0.12, 1.23, -4.59, 1.23, -4.65], ['c', 0.00, -0.03, -0.18, 0.03, -0.39, 0.12], ['c', -0.63, 0.18, -1.20, 0.36, -1.74, 0.45], ['c', -0.39, 0.06, -0.54, 0.06, -1.02, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.18, 0.18, 0.51, 0.27, 0.72, 0.15], ['c', 0.30, -0.12, 0.69, -0.57, 1.08, -1.17], ['c', 0.42, -0.60, 0.39, -0.51, 1.05, -3.03], ['c', 0.33, -1.26, 0.60, -2.31, 0.60, -2.34], ['c', 0.00, 0.00, -0.21, 0.03, -0.45, 0.12], ['c', -0.57, 0.18, -1.14, 0.33, -1.62, 0.42], ['c', -0.33, 0.06, -0.51, 0.06, -0.96, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 11.373, h: 28.883 },\n\t'rests.64th': { d: [['M', 5.13, -13.62], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.21, 0.54, 0.30, 0.75, 0.18], ['c', 0.24, -0.12, 0.63, -0.66, 1.08, -1.56], ['c', 0.33, -0.66, 0.39, -0.72, 0.60, -0.72], ['c', 0.12, 0.00, 0.27, 0.09, 0.33, 0.18], ['c', 0.03, 0.06, -0.69, 3.66, -3.54, 17.64], ['c', -1.95, 9.66, -3.57, 17.61, -3.57, 17.64], ['c', -0.03, 0.06, -0.12, 0.12, -0.24, 0.18], ['c', -0.21, 0.09, -0.24, 0.09, -0.48, 0.09], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.06, -0.57, 1.05, -4.95], ['c', 0.60, -2.70, 1.08, -4.89, 1.08, -4.92], ['c', 0.00, 0.00, -0.24, 0.06, -0.51, 0.15], ['c', -0.66, 0.24, -1.20, 0.36, -1.77, 0.48], ['c', -0.42, 0.06, -0.57, 0.06, -1.05, 0.06], ['c', -0.69, 0.00, -0.87, -0.03, -1.35, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.72, -1.05, 2.22, -1.23, 3.06, -0.42], ['c', 0.30, 0.33, 0.42, 0.60, 0.60, 1.38], ['c', 0.09, 0.45, 0.21, 0.78, 0.33, 0.90], ['c', 0.09, 0.09, 0.27, 0.18, 0.45, 0.21], ['c', 0.21, 0.03, 0.39, -0.09, 0.72, -0.42], ['c', 0.45, -0.45, 1.02, -1.26, 1.17, -1.65], ['c', 0.03, -0.09, 0.27, -1.14, 0.54, -2.34], ['c', 0.27, -1.20, 0.48, -2.19, 0.51, -2.22], ['c', 0.00, -0.03, -0.09, -0.03, -0.48, 0.12], ['c', -1.17, 0.39, -2.22, 0.57, -3.00, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.15, 0.39, 0.57, 0.57, 0.90, 0.42], ['c', 0.36, -0.18, 1.20, -1.26, 1.47, -1.89], ['c', 0.03, -0.09, 0.30, -1.20, 0.57, -2.43], ['l', 0.51, -2.28], ['l', -0.54, 0.18], ['c', -1.11, 0.36, -1.80, 0.48, -2.61, 0.48], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.21, 0.21, 0.54, 0.30, 0.75, 0.18], ['c', 0.36, -0.18, 0.93, -0.93, 1.29, -1.68], ['c', 0.12, -0.24, 0.18, -0.48, 0.63, -2.55], ['l', 0.51, -2.31], ['c', 0.00, -0.03, -0.18, 0.03, -0.39, 0.12], ['c', -1.14, 0.36, -2.10, 0.54, -2.82, 0.51], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 12.453, h: 36.383 },\n\t'rests.128th': { d: [['M', 6.03, -21.12], ['c', 0.66, -0.09, 1.23, 0.09, 1.68, 0.51], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.21, 0.00, 0.33, -0.06, 0.54, -0.36], ['c', 0.15, -0.21, 0.54, -0.93, 0.78, -1.47], ['c', 0.15, -0.33, 0.18, -0.39, 0.30, -0.48], ['c', 0.18, -0.09, 0.45, 0.00, 0.51, 0.15], ['c', 0.03, 0.09, -7.11, 42.75, -7.17, 42.84], ['c', -0.03, 0.03, -0.15, 0.09, -0.24, 0.15], ['c', -0.18, 0.06, -0.24, 0.06, -0.45, 0.06], ['c', -0.24, 0.00, -0.30, 0.00, -0.48, -0.06], ['c', -0.09, -0.06, -0.21, -0.12, -0.21, -0.15], ['c', -0.06, -0.03, 0.03, -0.57, 0.84, -4.98], ['c', 0.51, -2.70, 0.93, -4.92, 0.90, -4.92], ['c', 0.00, 0.00, -0.15, 0.06, -0.36, 0.12], ['c', -0.78, 0.27, -1.62, 0.48, -2.31, 0.57], ['c', -0.15, 0.03, -0.54, 0.03, -0.81, 0.03], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.63, 0.48], ['c', 0.12, 0.00, 0.18, 0.00, 0.30, -0.09], ['c', 0.42, -0.21, 1.14, -1.11, 1.50, -1.83], ['c', 0.12, -0.27, 0.12, -0.27, 0.54, -2.52], ['c', 0.24, -1.23, 0.42, -2.25, 0.39, -2.25], ['c', 0.00, 0.00, -0.24, 0.06, -0.51, 0.18], ['c', -1.26, 0.39, -2.25, 0.57, -3.06, 0.54], ['c', -0.42, -0.03, -0.75, -0.12, -1.11, -0.30], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.21, 0.51, 0.30, 0.75, 0.18], ['c', 0.36, -0.15, 1.05, -0.99, 1.41, -1.77], ['l', 0.15, -0.30], ['l', 0.42, -2.25], ['c', 0.21, -1.26, 0.42, -2.28, 0.39, -2.28], ['l', -0.51, 0.15], ['c', -1.11, 0.39, -1.89, 0.51, -2.70, 0.51], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.15, 0.63, 0.21, 0.81, 0.33, 0.96], ['c', 0.18, 0.18, 0.48, 0.27, 0.72, 0.21], ['c', 0.33, -0.12, 1.14, -1.26, 1.41, -1.95], ['c', 0.00, -0.09, 0.21, -1.11, 0.45, -2.34], ['c', 0.21, -1.20, 0.39, -2.22, 0.39, -2.28], ['c', 0.03, -0.03, 0.00, -0.03, -0.45, 0.12], ['c', -0.57, 0.18, -1.20, 0.33, -1.71, 0.42], ['c', -0.30, 0.06, -0.51, 0.06, -0.93, 0.06], ['c', -0.66, 0.00, -0.84, -0.03, -1.32, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.36, -0.54, 0.96, -0.87, 1.65, -0.93], ['c', 0.54, -0.03, 1.02, 0.15, 1.41, 0.54], ['c', 0.27, 0.30, 0.39, 0.54, 0.57, 1.26], ['c', 0.09, 0.33, 0.18, 0.66, 0.21, 0.72], ['c', 0.12, 0.27, 0.33, 0.45, 0.60, 0.48], ['c', 0.18, 0.00, 0.36, -0.09, 0.57, -0.33], ['c', 0.33, -0.36, 0.78, -1.14, 0.93, -1.56], ['c', 0.03, -0.12, 0.24, -1.20, 0.45, -2.40], ['c', 0.24, -1.20, 0.42, -2.22, 0.42, -2.28], ['c', 0.03, -0.03, 0.00, -0.03, -0.39, 0.09], ['c', -1.05, 0.36, -1.80, 0.48, -2.58, 0.48], ['c', -0.63, 0.00, -0.84, -0.03, -1.29, -0.27], ['c', -1.32, -0.63, -1.77, -2.16, -1.02, -3.30], ['c', 0.33, -0.45, 0.84, -0.81, 1.38, -0.90], ['z']], w: 12.992, h: 43.883 },\n\t'accidentals.sharp': { d: [['M', 5.73, -11.19], ['c', 0.21, -0.12, 0.54, -0.03, 0.66, 0.24], ['c', 0.06, 0.12, 0.06, 0.21, 0.06, 2.31], ['c', 0.00, 1.23, 0.00, 2.22, 0.03, 2.22], ['c', 0.00, 0.00, 0.27, -0.12, 0.60, -0.24], ['c', 0.69, -0.27, 0.78, -0.30, 0.96, -0.15], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.38], ['c', 0.00, 1.02, 0.00, 1.11, -0.06, 1.20], ['c', -0.03, 0.06, -0.09, 0.12, -0.12, 0.15], ['c', -0.06, 0.03, -0.42, 0.21, -0.84, 0.36], ['l', -0.75, 0.33], ['l', -0.03, 2.43], ['c', 0.00, 1.32, 0.00, 2.43, 0.03, 2.43], ['c', 0.00, 0.00, 0.27, -0.12, 0.60, -0.24], ['c', 0.69, -0.27, 0.78, -0.30, 0.96, -0.15], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.38], ['c', 0.00, 1.02, 0.00, 1.11, -0.06, 1.20], ['c', -0.03, 0.06, -0.09, 0.12, -0.12, 0.15], ['c', -0.06, 0.03, -0.42, 0.21, -0.84, 0.36], ['l', -0.75, 0.33], ['l', -0.03, 2.52], ['c', 0.00, 2.28, -0.03, 2.55, -0.06, 2.64], ['c', -0.21, 0.36, -0.72, 0.36, -0.93, 0.00], ['c', -0.03, -0.09, -0.06, -0.33, -0.06, -2.43], ['l', 0.00, -2.31], ['l', -1.29, 0.51], ['l', -1.26, 0.51], ['l', 0.00, 2.43], ['c', 0.00, 2.58, 0.00, 2.52, -0.15, 2.67], ['c', -0.06, 0.09, -0.27, 0.18, -0.36, 0.18], ['c', -0.12, 0.00, -0.33, -0.09, -0.39, -0.18], ['c', -0.15, -0.15, -0.15, -0.09, -0.15, -2.43], ['c', 0.00, -1.23, 0.00, -2.22, -0.03, -2.22], ['c', 0.00, 0.00, -0.27, 0.12, -0.60, 0.24], ['c', -0.69, 0.27, -0.78, 0.30, -0.96, 0.15], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.38], ['c', 0.00, -1.02, 0.00, -1.11, 0.06, -1.20], ['c', 0.03, -0.06, 0.09, -0.12, 0.12, -0.15], ['c', 0.06, -0.03, 0.42, -0.21, 0.84, -0.36], ['l', 0.78, -0.33], ['l', 0.00, -2.43], ['c', 0.00, -1.32, 0.00, -2.43, -0.03, -2.43], ['c', 0.00, 0.00, -0.27, 0.12, -0.60, 0.24], ['c', -0.69, 0.27, -0.78, 0.30, -0.96, 0.15], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.38], ['c', 0.00, -1.02, 0.00, -1.11, 0.06, -1.20], ['c', 0.03, -0.06, 0.09, -0.12, 0.12, -0.15], ['c', 0.06, -0.03, 0.42, -0.21, 0.84, -0.36], ['l', 0.78, -0.33], ['l', 0.00, -2.52], ['c', 0.00, -2.28, 0.03, -2.55, 0.06, -2.64], ['c', 0.21, -0.36, 0.72, -0.36, 0.93, 0.00], ['c', 0.03, 0.09, 0.06, 0.33, 0.06, 2.43], ['l', 0.03, 2.31], ['l', 1.26, -0.51], ['l', 1.26, -0.51], ['l', 0.00, -2.43], ['c', 0.00, -2.28, 0.00, -2.43, 0.06, -2.55], ['c', 0.06, -0.12, 0.12, -0.18, 0.27, -0.24], ['z'], ['m', -0.33, 10.65], ['l', 0.00, -2.43], ['l', -1.29, 0.51], ['l', -1.26, 0.51], ['l', 0.00, 2.46], ['l', 0.00, 2.43], ['l', 0.09, -0.03], ['c', 0.06, -0.03, 0.63, -0.27, 1.29, -0.51], ['l', 1.17, -0.48], ['l', 0.00, -2.46], ['z']], w: 8.25, h: 22.462 },\n\t'accidentals.halfsharp': { d: [['M', 2.43, -10.05], ['c', 0.21, -0.12, 0.54, -0.03, 0.66, 0.24], ['c', 0.06, 0.12, 0.06, 0.21, 0.06, 2.01], ['c', 0.00, 1.05, 0.00, 1.89, 0.03, 1.89], ['l', 0.72, -0.48], ['c', 0.69, -0.48, 0.69, -0.51, 0.87, -0.51], ['c', 0.15, 0.00, 0.18, 0.03, 0.27, 0.09], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.41], ['c', 0.00, 1.11, -0.03, 1.14, -0.09, 1.23], ['c', -0.03, 0.03, -0.48, 0.39, -1.02, 0.75], ['l', -0.99, 0.66], ['l', 0.00, 2.37], ['c', 0.00, 1.32, 0.00, 2.37, 0.03, 2.37], ['l', 0.72, -0.48], ['c', 0.69, -0.48, 0.69, -0.51, 0.87, -0.51], ['c', 0.15, 0.00, 0.18, 0.03, 0.27, 0.09], ['c', 0.21, 0.15, 0.21, 0.18, 0.21, 1.41], ['c', 0.00, 1.11, -0.03, 1.14, -0.09, 1.23], ['c', -0.03, 0.03, -0.48, 0.39, -1.02, 0.75], ['l', -0.99, 0.66], ['l', 0.00, 2.25], ['c', 0.00, 1.95, 0.00, 2.28, -0.06, 2.37], ['c', -0.06, 0.12, -0.12, 0.21, -0.24, 0.27], ['c', -0.27, 0.12, -0.54, 0.03, -0.69, -0.24], ['c', -0.06, -0.12, -0.06, -0.21, -0.06, -2.01], ['c', 0.00, -1.05, 0.00, -1.89, -0.03, -1.89], ['l', -0.72, 0.48], ['c', -0.69, 0.48, -0.69, 0.48, -0.87, 0.48], ['c', -0.15, 0.00, -0.18, 0.00, -0.27, -0.06], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.41], ['c', 0.00, -1.11, 0.03, -1.14, 0.09, -1.23], ['c', 0.03, -0.03, 0.48, -0.39, 1.02, -0.75], ['l', 0.99, -0.66], ['l', 0.00, -2.37], ['c', 0.00, -1.32, 0.00, -2.37, -0.03, -2.37], ['l', -0.72, 0.48], ['c', -0.69, 0.48, -0.69, 0.48, -0.87, 0.48], ['c', -0.15, 0.00, -0.18, 0.00, -0.27, -0.06], ['c', -0.21, -0.15, -0.21, -0.18, -0.21, -1.41], ['c', 0.00, -1.11, 0.03, -1.14, 0.09, -1.23], ['c', 0.03, -0.03, 0.48, -0.39, 1.02, -0.75], ['l', 0.99, -0.66], ['l', 0.00, -2.25], ['c', 0.00, -2.13, 0.00, -2.28, 0.06, -2.40], ['c', 0.06, -0.12, 0.12, -0.18, 0.27, -0.24], ['z']], w: 5.25, h: 20.174 },\n\t'accidentals.nat': { d: [['M', 0.21, -11.40], ['c', 0.24, -0.06, 0.78, 0.00, 0.99, 0.15], ['c', 0.03, 0.03, 0.03, 0.48, 0.00, 2.61], ['c', -0.03, 1.44, -0.03, 2.61, -0.03, 2.61], ['c', 0.00, 0.03, 0.75, -0.09, 1.68, -0.24], ['c', 0.96, -0.18, 1.71, -0.27, 1.74, -0.27], ['c', 0.15, 0.03, 0.27, 0.15, 0.36, 0.30], ['l', 0.06, 0.12], ['l', 0.09, 8.67], ['c', 0.09, 6.96, 0.12, 8.67, 0.09, 8.67], ['c', -0.03, 0.03, -0.12, 0.06, -0.21, 0.09], ['c', -0.24, 0.09, -0.72, 0.09, -0.96, 0.00], ['c', -0.09, -0.03, -0.18, -0.06, -0.21, -0.09], ['c', -0.03, -0.03, -0.03, -0.48, 0.00, -2.61], ['c', 0.03, -1.44, 0.03, -2.61, 0.03, -2.61], ['c', 0.00, -0.03, -0.75, 0.09, -1.68, 0.24], ['c', -0.96, 0.18, -1.71, 0.27, -1.74, 0.27], ['c', -0.15, -0.03, -0.27, -0.15, -0.36, -0.30], ['l', -0.06, -0.15], ['l', -0.09, -7.53], ['c', -0.06, -4.14, -0.09, -8.04, -0.12, -8.67], ['l', 0.00, -1.11], ['l', 0.15, -0.06], ['c', 0.09, -0.03, 0.21, -0.06, 0.27, -0.09], ['z'], ['m', 3.75, 8.40], ['c', 0.00, -0.33, 0.00, -0.42, -0.03, -0.42], ['c', -0.12, 0.00, -2.79, 0.45, -2.79, 0.48], ['c', -0.03, 0.00, -0.09, 6.30, -0.09, 6.33], ['c', 0.03, 0.00, 2.79, -0.45, 2.82, -0.48], ['c', 0.00, 0.00, 0.09, -4.53, 0.09, -5.91], ['z']], w: 5.4, h: 22.8 },\n\t'accidentals.flat': { d: [['M', -0.36, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z']], w: 6.75, h: 18.801 },\n\t'accidentals.halfflat': { d: [['M', 4.83, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.60, -0.12, 9.06], ['c', -0.09, 5.55, -0.15, 9.06, -0.18, 9.12], ['c', -0.03, 0.09, -0.09, 0.18, -0.15, 0.27], ['c', -0.24, 0.21, -0.54, 0.24, -0.81, 0.06], ['c', -0.06, -0.03, -0.27, -0.24, -0.45, -0.42], ['c', -0.36, -0.42, -0.66, -0.66, -1.80, -1.44], ['c', -1.23, -0.84, -1.83, -1.32, -2.25, -1.77], ['c', -0.66, -0.78, -0.96, -1.56, -0.93, -2.46], ['c', 0.09, -1.41, 1.11, -2.58, 2.40, -2.79], ['c', 0.30, -0.06, 0.84, -0.03, 1.23, 0.06], ['c', 0.54, 0.12, 1.08, 0.33, 1.53, 0.63], ['c', 0.12, 0.09, 0.24, 0.15, 0.24, 0.12], ['c', 0.00, 0.00, -0.12, -8.37, -0.18, -9.75], ['l', 0.00, -0.66], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', -1.65, 10.95], ['c', -0.60, -0.18, -1.08, 0.09, -1.38, 0.69], ['c', -0.27, 0.60, -0.36, 1.38, -0.18, 2.07], ['c', 0.12, 0.42, 0.42, 0.99, 0.72, 1.41], ['c', 0.30, 0.42, 0.93, 1.05, 1.56, 1.59], ['l', 0.48, 0.39], ['l', 0.00, -0.12], ['c', 0.03, -0.09, 0.03, -0.48, 0.06, -0.90], ['c', 0.03, -0.57, 0.03, -1.08, 0.00, -2.22], ['c', -0.03, -1.62, -0.03, -1.62, -0.24, -2.07], ['c', -0.21, -0.42, -0.60, -0.75, -1.02, -0.84], ['z']], w: 6.728, h: 18.801 },\n\t'accidentals.dblflat': { d: [['M', -0.36, -14.07], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z'], ['m', 3, -11], ['c', 0.33, -0.06, 0.87, 0.00, 1.08, 0.15], ['c', 0.06, 0.03, 0.06, 0.36, -0.03, 5.25], ['c', -0.06, 2.85, -0.09, 5.19, -0.09, 5.19], ['c', 0.00, 0.03, 0.12, -0.03, 0.24, -0.12], ['c', 0.63, -0.42, 1.41, -0.66, 2.19, -0.72], ['c', 0.81, -0.03, 1.47, 0.21, 2.04, 0.78], ['c', 0.57, 0.54, 0.87, 1.26, 0.93, 2.04], ['c', 0.03, 0.57, -0.09, 1.08, -0.36, 1.62], ['c', -0.42, 0.81, -1.02, 1.38, -2.82, 2.61], ['c', -1.14, 0.78, -1.44, 1.02, -1.80, 1.44], ['c', -0.18, 0.18, -0.39, 0.39, -0.45, 0.42], ['c', -0.27, 0.18, -0.57, 0.15, -0.81, -0.06], ['c', -0.06, -0.09, -0.12, -0.18, -0.15, -0.27], ['c', -0.03, -0.06, -0.09, -3.27, -0.18, -8.34], ['c', -0.09, -4.53, -0.15, -8.58, -0.18, -9.03], ['l', 0.00, -0.78], ['l', 0.12, -0.06], ['c', 0.06, -0.03, 0.18, -0.09, 0.27, -0.12], ['z'], ['m', 3.18, 11.01], ['c', -0.21, -0.12, -0.54, -0.15, -0.81, -0.06], ['c', -0.54, 0.15, -0.99, 0.63, -1.17, 1.26], ['c', -0.06, 0.30, -0.12, 2.88, -0.06, 3.87], ['c', 0.03, 0.42, 0.03, 0.81, 0.06, 0.90], ['l', 0.03, 0.12], ['l', 0.45, -0.39], ['c', 0.63, -0.54, 1.26, -1.17, 1.56, -1.59], ['c', 0.30, -0.42, 0.60, -0.99, 0.72, -1.41], ['c', 0.18, -0.69, 0.09, -1.47, -0.18, -2.07], ['c', -0.15, -0.30, -0.33, -0.51, -0.60, -0.63], ['z']], w: 12.1, h: 18.804 },\n\t'accidentals.dblsharp': { d: [['M', -0.18, -3.96], ['c', 0.06, -0.03, 0.12, -0.06, 0.15, -0.06], ['c', 0.09, 0.00, 2.76, 0.27, 2.79, 0.30], ['c', 0.12, 0.03, 0.15, 0.12, 0.15, 0.51], ['c', 0.06, 0.96, 0.24, 1.59, 0.57, 2.10], ['c', 0.06, 0.09, 0.15, 0.21, 0.18, 0.24], ['l', 0.09, 0.06], ['l', 0.09, -0.06], ['c', 0.03, -0.03, 0.12, -0.15, 0.18, -0.24], ['c', 0.33, -0.51, 0.51, -1.14, 0.57, -2.10], ['c', 0.00, -0.39, 0.03, -0.45, 0.12, -0.51], ['c', 0.03, 0.00, 0.66, -0.09, 1.44, -0.15], ['c', 1.47, -0.15, 1.50, -0.15, 1.56, -0.03], ['c', 0.03, 0.06, 0.00, 0.42, -0.09, 1.44], ['c', -0.09, 0.72, -0.15, 1.35, -0.15, 1.38], ['c', 0.00, 0.03, -0.03, 0.09, -0.06, 0.12], ['c', -0.06, 0.06, -0.12, 0.09, -0.51, 0.09], ['c', -1.08, 0.06, -1.80, 0.30, -2.28, 0.75], ['l', -0.12, 0.09], ['l', 0.09, 0.09], ['c', 0.12, 0.15, 0.39, 0.33, 0.63, 0.45], ['c', 0.42, 0.18, 0.96, 0.27, 1.68, 0.33], ['c', 0.39, 0.00, 0.45, 0.03, 0.51, 0.09], ['c', 0.03, 0.03, 0.06, 0.09, 0.06, 0.12], ['c', 0.00, 0.03, 0.06, 0.66, 0.15, 1.38], ['c', 0.09, 1.02, 0.12, 1.38, 0.09, 1.44], ['c', -0.06, 0.12, -0.09, 0.12, -1.56, -0.03], ['c', -0.78, -0.06, -1.41, -0.15, -1.44, -0.15], ['c', -0.09, -0.06, -0.12, -0.12, -0.12, -0.54], ['c', -0.06, -0.93, -0.24, -1.56, -0.57, -2.07], ['c', -0.06, -0.09, -0.15, -0.21, -0.18, -0.24], ['l', -0.09, -0.06], ['l', -0.09, 0.06], ['c', -0.03, 0.03, -0.12, 0.15, -0.18, 0.24], ['c', -0.33, 0.51, -0.51, 1.14, -0.57, 2.07], ['c', 0.00, 0.42, -0.03, 0.48, -0.12, 0.54], ['c', -0.03, 0.00, -0.66, 0.09, -1.44, 0.15], ['c', -1.47, 0.15, -1.50, 0.15, -1.56, 0.03], ['c', -0.03, -0.06, 0.00, -0.42, 0.09, -1.44], ['c', 0.09, -0.72, 0.15, -1.35, 0.15, -1.38], ['c', 0.00, -0.03, 0.03, -0.09, 0.06, -0.12], ['c', 0.06, -0.06, 0.12, -0.09, 0.51, -0.09], ['c', 0.72, -0.06, 1.26, -0.15, 1.68, -0.33], ['c', 0.24, -0.12, 0.51, -0.30, 0.63, -0.45], ['l', 0.09, -0.09], ['l', -0.12, -0.09], ['c', -0.48, -0.45, -1.20, -0.69, -2.28, -0.75], ['c', -0.39, 0.00, -0.45, -0.03, -0.51, -0.09], ['c', -0.03, -0.03, -0.06, -0.09, -0.06, -0.12], ['c', 0.00, -0.03, -0.06, -0.63, -0.12, -1.38], ['c', -0.09, -0.72, -0.15, -1.35, -0.15, -1.38], ['z']], w: 7.95, h: 7.977 },\n\t'dots.dot': { d: [['M', 1.32, -1.68], ['c', 0.09, -0.03, 0.27, -0.06, 0.39, -0.06], ['c', 0.96, 0.00, 1.74, 0.78, 1.74, 1.71], ['c', 0.00, 0.96, -0.78, 1.74, -1.71, 1.74], ['c', -0.96, 0.00, -1.74, -0.78, -1.74, -1.71], ['c', 0.00, -0.78, 0.54, -1.50, 1.32, -1.68], ['z']], w: 3.45, h: 3.45 },\n\t'noteheads.dbl': { d: [['M', -0.69, -4.02], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['c', 0.06, 0.15, 0.06, 0.18, 0.06, 1.41], ['l', 0.00, 1.23], ['l', 0.12, -0.18], ['c', 0.72, -1.26, 2.64, -2.31, 4.86, -2.64], ['c', 0.81, -0.15, 1.11, -0.15, 2.13, -0.15], ['c', 0.99, 0.00, 1.29, 0.00, 2.10, 0.15], ['c', 0.75, 0.12, 1.38, 0.27, 2.04, 0.54], ['c', 1.35, 0.51, 2.34, 1.26, 2.82, 2.10], ['l', 0.12, 0.18], ['l', 0.00, -1.23], ['c', 0.00, -1.20, 0.00, -1.26, 0.06, -1.38], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 3.54], ['l', 0.00, 3.54], ['l', -0.06, 0.15], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.06, -0.12, -0.06, -0.18, -0.06, -1.38], ['l', 0.00, -1.23], ['l', -0.12, 0.18], ['c', -0.48, 0.84, -1.47, 1.59, -2.82, 2.10], ['c', -0.84, 0.33, -1.71, 0.54, -2.85, 0.66], ['c', -0.45, 0.06, -2.16, 0.06, -2.61, 0.00], ['c', -1.14, -0.12, -2.01, -0.33, -2.85, -0.66], ['c', -1.35, -0.51, -2.34, -1.26, -2.82, -2.10], ['l', -0.12, -0.18], ['l', 0.00, 1.23], ['c', 0.00, 1.23, 0.00, 1.26, -0.06, 1.38], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['l', -0.06, -0.15], ['l', 0.00, -3.54], ['c', 0.00, -3.48, 0.00, -3.54, 0.06, -3.66], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z'], ['m', 7.71, 0.63], ['c', -0.36, -0.06, -0.90, -0.06, -1.14, 0.00], ['c', -0.30, 0.03, -0.66, 0.24, -0.87, 0.42], ['c', -0.60, 0.54, -0.90, 1.62, -0.75, 2.82], ['c', 0.12, 0.93, 0.51, 1.68, 1.11, 2.31], ['c', 0.75, 0.72, 1.83, 1.20, 2.85, 1.26], ['c', 1.05, 0.06, 1.83, -0.54, 2.10, -1.65], ['c', 0.21, -0.90, 0.12, -1.95, -0.24, -2.82], ['c', -0.36, -0.81, -1.08, -1.53, -1.95, -1.95], ['c', -0.30, -0.15, -0.78, -0.30, -1.11, -0.39], ['z']], w: 16.83, h: 8.145 },\n\t'noteheads.whole': { d: [['M', 6.51, -4.05], ['c', 0.51, -0.03, 2.01, 0.00, 2.52, 0.03], ['c', 1.41, 0.18, 2.64, 0.51, 3.72, 1.08], ['c', 1.20, 0.63, 1.95, 1.41, 2.19, 2.31], ['c', 0.09, 0.33, 0.09, 0.90, 0.00, 1.23], ['c', -0.24, 0.90, -0.99, 1.68, -2.19, 2.31], ['c', -1.08, 0.57, -2.28, 0.90, -3.75, 1.08], ['c', -0.66, 0.06, -2.31, 0.06, -2.97, 0.00], ['c', -1.47, -0.18, -2.67, -0.51, -3.75, -1.08], ['c', -1.20, -0.63, -1.95, -1.41, -2.19, -2.31], ['c', -0.09, -0.33, -0.09, -0.90, 0.00, -1.23], ['c', 0.24, -0.90, 0.99, -1.68, 2.19, -2.31], ['c', 1.20, -0.63, 2.61, -0.99, 4.23, -1.11], ['z'], ['m', 0.57, 0.66], ['c', -0.87, -0.15, -1.53, 0.00, -2.04, 0.51], ['c', -0.15, 0.15, -0.24, 0.27, -0.33, 0.48], ['c', -0.24, 0.51, -0.36, 1.08, -0.33, 1.77], ['c', 0.03, 0.69, 0.18, 1.26, 0.42, 1.77], ['c', 0.60, 1.17, 1.74, 1.98, 3.18, 2.22], ['c', 1.11, 0.21, 1.95, -0.15, 2.34, -0.99], ['c', 0.24, -0.51, 0.36, -1.08, 0.33, -1.80], ['c', -0.06, -1.11, -0.45, -2.04, -1.17, -2.76], ['c', -0.63, -0.63, -1.47, -1.05, -2.40, -1.20], ['z']], w: 14.985, h: 8.097 },\n\t'noteheads.half': { d: [['M', 7.44, -4.05], ['c', 0.06, -0.03, 0.27, -0.03, 0.48, -0.03], ['c', 1.05, 0.00, 1.71, 0.24, 2.10, 0.81], ['c', 0.42, 0.60, 0.45, 1.35, 0.18, 2.40], ['c', -0.42, 1.59, -1.14, 2.73, -2.16, 3.39], ['c', -1.41, 0.93, -3.18, 1.44, -5.40, 1.53], ['c', -1.17, 0.03, -1.89, -0.21, -2.28, -0.81], ['c', -0.42, -0.60, -0.45, -1.35, -0.18, -2.40], ['c', 0.42, -1.59, 1.14, -2.73, 2.16, -3.39], ['c', 0.63, -0.42, 1.23, -0.72, 1.98, -0.96], ['c', 0.90, -0.30, 1.65, -0.42, 3.12, -0.54], ['z'], ['m', 1.29, 0.87], ['c', -0.27, -0.09, -0.63, -0.12, -0.90, -0.03], ['c', -0.72, 0.24, -1.53, 0.69, -3.27, 1.80], ['c', -2.34, 1.50, -3.30, 2.25, -3.57, 2.79], ['c', -0.36, 0.72, -0.06, 1.50, 0.66, 1.77], ['c', 0.24, 0.12, 0.69, 0.09, 0.99, 0.00], ['c', 0.84, -0.30, 1.92, -0.93, 4.14, -2.37], ['c', 1.62, -1.08, 2.37, -1.71, 2.61, -2.19], ['c', 0.36, -0.72, 0.06, -1.50, -0.66, -1.77], ['z']], w: 10.37, h: 8.132 },\n\t'noteheads.quarter': { d: [['M', 6.09, -4.05], ['c', 0.36, -0.03, 1.20, 0.00, 1.53, 0.06], ['c', 1.17, 0.24, 1.89, 0.84, 2.16, 1.83], ['c', 0.06, 0.18, 0.06, 0.30, 0.06, 0.66], ['c', 0.00, 0.45, 0.00, 0.63, -0.15, 1.08], ['c', -0.66, 2.04, -3.06, 3.93, -5.52, 4.38], ['c', -0.54, 0.09, -1.44, 0.09, -1.83, 0.03], ['c', -1.23, -0.27, -1.98, -0.87, -2.25, -1.86], ['c', -0.06, -0.18, -0.06, -0.30, -0.06, -0.66], ['c', 0.00, -0.45, 0.00, -0.63, 0.15, -1.08], ['c', 0.24, -0.78, 0.75, -1.53, 1.44, -2.22], ['c', 1.20, -1.20, 2.85, -2.01, 4.47, -2.22], ['z']], w: 9.81, h: 8.094 },\n\t'noteheads.slash.nostem': { d: [['M', 9.30, -7.77], ['c', 0.06, -0.06, 0.18, -0.06, 1.71, -0.06], ['l', 1.65, 0.00], ['l', 0.09, 0.09], ['c', 0.06, 0.06, 0.06, 0.09, 0.06, 0.15], ['c', -0.03, 0.12, -9.21, 15.24, -9.30, 15.33], ['c', -0.06, 0.06, -0.18, 0.06, -1.71, 0.06], ['l', -1.65, 0.00], ['l', -0.09, -0.09], ['c', -0.06, -0.06, -0.06, -0.09, -0.06, -0.15], ['c', 0.03, -0.12, 9.21, -15.24, 9.30, -15.33], ['z']], w: 12.81, h: 15.63 },\n\t'noteheads.indeterminate': { d: [['M', 0.78, -4.05], ['c', 0.12, -0.03, 0.24, -0.03, 0.36, 0.03], ['c', 0.03, 0.03, 0.93, 0.72, 1.95, 1.56], ['l', 1.86, 1.50], ['l', 1.86, -1.50], ['c', 1.02, -0.84, 1.92, -1.53, 1.95, -1.56], ['c', 0.21, -0.12, 0.33, -0.09, 0.75, 0.24], ['c', 0.30, 0.27, 0.36, 0.36, 0.36, 0.54], ['c', 0.00, 0.03, -0.03, 0.12, -0.06, 0.18], ['c', -0.03, 0.06, -0.90, 0.75, -1.89, 1.56], ['l', -1.80, 1.47], ['c', 0.00, 0.03, 0.81, 0.69, 1.80, 1.50], ['c', 0.99, 0.81, 1.86, 1.50, 1.89, 1.56], ['c', 0.03, 0.06, 0.06, 0.15, 0.06, 0.18], ['c', 0.00, 0.18, -0.06, 0.27, -0.36, 0.54], ['c', -0.42, 0.33, -0.54, 0.36, -0.75, 0.24], ['c', -0.03, -0.03, -0.93, -0.72, -1.95, -1.56], ['l', -1.86, -1.50], ['l', -1.86, 1.50], ['c', -1.02, 0.84, -1.92, 1.53, -1.95, 1.56], ['c', -0.21, 0.12, -0.33, 0.09, -0.75, -0.24], ['c', -0.30, -0.27, -0.36, -0.36, -0.36, -0.54], ['c', 0.00, -0.03, 0.03, -0.12, 0.06, -0.18], ['c', 0.03, -0.06, 0.90, -0.75, 1.89, -1.56], ['l', 1.80, -1.47], ['c', 0.00, -0.03, -0.81, -0.69, -1.80, -1.50], ['c', -0.99, -0.81, -1.86, -1.50, -1.89, -1.56], ['c', -0.06, -0.12, -0.09, -0.21, -0.03, -0.36], ['c', 0.03, -0.09, 0.57, -0.57, 0.72, -0.63], ['z']], w: 9.843, h: 8.139 },\n\t'scripts.ufermata': { d: [['M', -0.75, -10.77], ['c', 0.12, 0.00, 0.45, -0.03, 0.69, -0.03], ['c', 2.91, -0.03, 5.55, 1.53, 7.41, 4.35], ['c', 1.17, 1.71, 1.95, 3.72, 2.43, 6.03], ['c', 0.12, 0.51, 0.12, 0.57, 0.03, 0.69], ['c', -0.12, 0.21, -0.48, 0.27, -0.69, 0.12], ['c', -0.12, -0.09, -0.18, -0.24, -0.27, -0.69], ['c', -0.78, -3.63, -3.42, -6.54, -6.78, -7.38], ['c', -0.78, -0.21, -1.20, -0.24, -2.07, -0.24], ['c', -0.63, 0.00, -0.84, 0.00, -1.20, 0.06], ['c', -1.83, 0.27, -3.42, 1.08, -4.80, 2.37], ['c', -1.41, 1.35, -2.40, 3.21, -2.85, 5.19], ['c', -0.09, 0.45, -0.15, 0.60, -0.27, 0.69], ['c', -0.21, 0.15, -0.57, 0.09, -0.69, -0.12], ['c', -0.09, -0.12, -0.09, -0.18, 0.03, -0.69], ['c', 0.33, -1.62, 0.78, -3.00, 1.47, -4.38], ['c', 1.77, -3.54, 4.44, -5.67, 7.56, -5.97], ['z'], ['m', 0.33, 7.47], ['c', 1.38, -0.30, 2.58, 0.90, 2.31, 2.25], ['c', -0.15, 0.72, -0.78, 1.35, -1.47, 1.50], ['c', -1.38, 0.27, -2.58, -0.93, -2.31, -2.31], ['c', 0.15, -0.69, 0.78, -1.29, 1.47, -1.44], ['z']], w: 19.748, h: 11.289 },\n\t'scripts.dfermata': { d: [['M', -9.63, -0.42], ['c', 0.15, -0.09, 0.36, -0.06, 0.51, 0.03], ['c', 0.12, 0.09, 0.18, 0.24, 0.27, 0.66], ['c', 0.78, 3.66, 3.42, 6.57, 6.78, 7.41], ['c', 0.78, 0.21, 1.20, 0.24, 2.07, 0.24], ['c', 0.63, 0.00, 0.84, 0.00, 1.20, -0.06], ['c', 1.83, -0.27, 3.42, -1.08, 4.80, -2.37], ['c', 1.41, -1.35, 2.40, -3.21, 2.85, -5.22], ['c', 0.09, -0.42, 0.15, -0.57, 0.27, -0.66], ['c', 0.21, -0.15, 0.57, -0.09, 0.69, 0.12], ['c', 0.09, 0.12, 0.09, 0.18, -0.03, 0.69], ['c', -0.33, 1.62, -0.78, 3.00, -1.47, 4.38], ['c', -1.92, 3.84, -4.89, 6.00, -8.31, 6.00], ['c', -3.42, 0.00, -6.39, -2.16, -8.31, -6.00], ['c', -0.48, -0.96, -0.84, -1.92, -1.14, -2.97], ['c', -0.18, -0.69, -0.42, -1.74, -0.42, -1.92], ['c', 0.00, -0.12, 0.09, -0.27, 0.24, -0.33], ['z'], ['m', 9.21, 0.00], ['c', 1.20, -0.27, 2.34, 0.63, 2.34, 1.86], ['c', 0.00, 0.90, -0.66, 1.68, -1.50, 1.89], ['c', -1.38, 0.27, -2.58, -0.93, -2.31, -2.31], ['c', 0.15, -0.69, 0.78, -1.29, 1.47, -1.44], ['z']], w: 19.744, h: 11.274 },\n\t'scripts.sforzato': { d: [['M', -6.45, -3.69], ['c', 0.06, -0.03, 0.15, -0.06, 0.18, -0.06], ['c', 0.06, 0.00, 2.85, 0.72, 6.24, 1.59], ['l', 6.33, 1.65], ['c', 0.33, 0.06, 0.45, 0.21, 0.45, 0.51], ['c', 0.00, 0.30, -0.12, 0.45, -0.45, 0.51], ['l', -6.33, 1.65], ['c', -3.39, 0.87, -6.18, 1.59, -6.21, 1.59], ['c', -0.21, 0.00, -0.48, -0.24, -0.51, -0.45], ['c', 0.00, -0.15, 0.06, -0.36, 0.18, -0.45], ['c', 0.09, -0.06, 0.87, -0.27, 3.84, -1.05], ['c', 2.04, -0.54, 3.84, -0.99, 4.02, -1.02], ['c', 0.15, -0.06, 1.14, -0.24, 2.22, -0.42], ['c', 1.05, -0.18, 1.92, -0.36, 1.92, -0.36], ['c', 0.00, 0.00, -0.87, -0.18, -1.92, -0.36], ['c', -1.08, -0.18, -2.07, -0.36, -2.22, -0.42], ['c', -0.18, -0.03, -1.98, -0.48, -4.02, -1.02], ['c', -2.97, -0.78, -3.75, -0.99, -3.84, -1.05], ['c', -0.12, -0.09, -0.18, -0.30, -0.18, -0.45], ['c', 0.03, -0.15, 0.15, -0.30, 0.30, -0.39], ['z']], w: 13.5, h: 7.5 },\n\t'scripts.staccato': { d: [['M', -0.36, -1.47], ['c', 0.93, -0.21, 1.86, 0.51, 1.86, 1.47], ['c', 0.00, 0.93, -0.87, 1.65, -1.80, 1.47], ['c', -0.54, -0.12, -1.02, -0.57, -1.14, -1.08], ['c', -0.21, -0.81, 0.27, -1.65, 1.08, -1.86], ['z']], w: 2.989, h: 3.004 },\n\t'scripts.tenuto': { d: [['M', -4.20, -0.48], ['l', 0.12, -0.06], ['l', 4.08, 0.00], ['l', 4.08, 0.00], ['l', 0.12, 0.06], ['c', 0.39, 0.21, 0.39, 0.75, 0.00, 0.96], ['l', -0.12, 0.06], ['l', -4.08, 0.00], ['l', -4.08, 0.00], ['l', -0.12, -0.06], ['c', -0.39, -0.21, -0.39, -0.75, 0.00, -0.96], ['z']], w: 8.985, h: 1.08 },\n\t'scripts.umarcato': { d: [['M', -0.15, -8.19], ['c', 0.15, -0.12, 0.36, -0.03, 0.45, 0.15], ['c', 0.21, 0.42, 3.45, 7.65, 3.45, 7.71], ['c', 0.00, 0.12, -0.12, 0.27, -0.21, 0.30], ['c', -0.03, 0.03, -0.51, 0.03, -1.14, 0.03], ['c', -1.05, 0.00, -1.08, 0.00, -1.17, -0.06], ['c', -0.09, -0.06, -0.24, -0.36, -1.17, -2.40], ['c', -0.57, -1.29, -1.05, -2.34, -1.08, -2.34], ['c', 0.00, -0.03, -0.51, 1.02, -1.08, 2.34], ['c', -0.93, 2.07, -1.08, 2.34, -1.14, 2.40], ['c', -0.06, 0.03, -0.15, 0.06, -0.18, 0.06], ['c', -0.15, 0.00, -0.33, -0.18, -0.33, -0.33], ['c', 0.00, -0.06, 3.24, -7.32, 3.45, -7.71], ['c', 0.03, -0.06, 0.09, -0.15, 0.15, -0.15], ['z']], w: 7.5, h: 8.245 },\n\t'scripts.dmarcato': { d: [['M', -3.57, 0.03], ['c', 0.03, 0.00, 0.57, -0.03, 1.17, -0.03], ['c', 1.05, 0.00, 1.08, 0.00, 1.17, 0.06], ['c', 0.09, 0.06, 0.24, 0.36, 1.17, 2.40], ['c', 0.57, 1.29, 1.05, 2.34, 1.08, 2.34], ['c', 0.00, 0.03, 0.51, -1.02, 1.08, -2.34], ['c', 0.93, -2.07, 1.08, -2.34, 1.14, -2.40], ['c', 0.06, -0.03, 0.15, -0.06, 0.18, -0.06], ['c', 0.15, 0.00, 0.33, 0.18, 0.33, 0.33], ['c', 0.00, 0.09, -3.45, 7.74, -3.54, 7.83], ['c', -0.12, 0.12, -0.30, 0.12, -0.42, 0.00], ['c', -0.09, -0.09, -3.54, -7.74, -3.54, -7.83], ['c', 0.00, -0.09, 0.12, -0.27, 0.18, -0.30], ['z']], w: 7.5, h: 8.25 },\n\t'scripts.stopped': { d: [['M', -0.27, -4.08], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 1.50], ['l', 0.00, 1.47], ['l', 1.47, 0.00], ['l', 1.50, 0.00], ['l', 0.15, 0.06], ['c', 0.15, 0.09, 0.21, 0.15, 0.30, 0.33], ['c', 0.09, 0.18, 0.09, 0.36, 0.00, 0.54], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.12, 0.06, -0.18, 0.06, -1.62, 0.06], ['l', -1.47, 0.00], ['l', 0.00, 1.47], ['l', 0.00, 1.47], ['l', -0.06, 0.15], ['c', -0.09, 0.18, -0.15, 0.24, -0.33, 0.33], ['c', -0.18, 0.09, -0.36, 0.09, -0.54, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['l', -0.06, -0.15], ['l', 0.00, -1.47], ['l', 0.00, -1.47], ['l', -1.47, 0.00], ['c', -1.44, 0.00, -1.50, 0.00, -1.62, -0.06], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.09, -0.36, 0.00, -0.54], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['l', 0.15, -0.06], ['l', 1.47, 0.00], ['l', 1.47, 0.00], ['l', 0.00, -1.47], ['c', 0.00, -1.44, 0.00, -1.50, 0.06, -1.62], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z']], w: 8.295, h: 8.295 },\n\t'scripts.upbow': { d: [['M', -4.65, -15.54], ['c', 0.12, -0.09, 0.36, -0.06, 0.48, 0.03], ['c', 0.03, 0.03, 0.09, 0.09, 0.12, 0.15], ['c', 0.03, 0.06, 0.66, 2.13, 1.41, 4.62], ['c', 1.35, 4.41, 1.38, 4.56, 2.01, 6.96], ['l', 0.63, 2.46], ['l', 0.63, -2.46], ['c', 0.63, -2.40, 0.66, -2.55, 2.01, -6.96], ['c', 0.75, -2.49, 1.38, -4.56, 1.41, -4.62], ['c', 0.06, -0.15, 0.18, -0.21, 0.36, -0.24], ['c', 0.15, 0.00, 0.30, 0.06, 0.39, 0.18], ['c', 0.15, 0.21, 0.24, -0.18, -2.10, 7.56], ['c', -1.20, 3.96, -2.22, 7.32, -2.25, 7.41], ['c', 0.00, 0.12, -0.06, 0.27, -0.09, 0.30], ['c', -0.12, 0.21, -0.60, 0.21, -0.72, 0.00], ['c', -0.03, -0.03, -0.09, -0.18, -0.09, -0.30], ['c', -0.03, -0.09, -1.05, -3.45, -2.25, -7.41], ['c', -2.34, -7.74, -2.25, -7.35, -2.10, -7.56], ['c', 0.03, -0.03, 0.09, -0.09, 0.15, -0.12], ['z']], w: 9.73, h: 15.608 },\n\t'scripts.downbow': { d: [['M', -5.55, -9.93], ['l', 0.09, -0.06], ['l', 5.46, 0.00], ['l', 5.46, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 4.77], ['c', 0.00, 5.28, 0.00, 4.89, -0.18, 5.01], ['c', -0.18, 0.12, -0.42, 0.06, -0.54, -0.12], ['c', -0.06, -0.09, -0.06, -0.18, -0.06, -2.97], ['l', 0.00, -2.85], ['l', -4.83, 0.00], ['l', -4.83, 0.00], ['l', 0.00, 2.85], ['c', 0.00, 2.79, 0.00, 2.88, -0.06, 2.97], ['c', -0.15, 0.24, -0.51, 0.24, -0.66, 0.00], ['c', -0.06, -0.09, -0.06, -0.21, -0.06, -4.89], ['l', 0.00, -4.77], ['z']], w: 11.22, h: 9.992 },\n\t'scripts.turn': { d: [['M', -4.77, -3.90], ['c', 0.36, -0.06, 1.05, -0.06, 1.44, 0.03], ['c', 0.78, 0.15, 1.50, 0.51, 2.34, 1.14], ['c', 0.60, 0.45, 1.05, 0.87, 2.22, 2.01], ['c', 1.11, 1.08, 1.62, 1.50, 2.22, 1.86], ['c', 0.60, 0.36, 1.32, 0.57, 1.92, 0.57], ['c', 0.90, 0.00, 1.71, -0.57, 1.89, -1.35], ['c', 0.24, -0.93, -0.39, -1.89, -1.35, -2.10], ['l', -0.15, -0.06], ['l', -0.09, 0.15], ['c', -0.03, 0.09, -0.15, 0.24, -0.24, 0.33], ['c', -0.72, 0.72, -2.04, 0.54, -2.49, -0.36], ['c', -0.48, -0.93, 0.03, -1.86, 1.17, -2.19], ['c', 0.30, -0.09, 1.02, -0.09, 1.35, 0.00], ['c', 0.99, 0.27, 1.74, 0.87, 2.25, 1.83], ['c', 0.69, 1.41, 0.63, 3.00, -0.21, 4.26], ['c', -0.21, 0.30, -0.69, 0.81, -0.99, 1.02], ['c', -0.30, 0.21, -0.84, 0.45, -1.17, 0.54], ['c', -1.23, 0.36, -2.49, 0.15, -3.72, -0.60], ['c', -0.75, -0.48, -1.41, -1.02, -2.85, -2.46], ['c', -1.11, -1.08, -1.62, -1.50, -2.22, -1.86], ['c', -0.60, -0.36, -1.32, -0.57, -1.92, -0.57], ['c', -0.90, 0.00, -1.71, 0.57, -1.89, 1.35], ['c', -0.24, 0.93, 0.39, 1.89, 1.35, 2.10], ['l', 0.15, 0.06], ['l', 0.09, -0.15], ['c', 0.03, -0.09, 0.15, -0.24, 0.24, -0.33], ['c', 0.72, -0.72, 2.04, -0.54, 2.49, 0.36], ['c', 0.48, 0.93, -0.03, 1.86, -1.17, 2.19], ['c', -0.30, 0.09, -1.02, 0.09, -1.35, 0.00], ['c', -0.99, -0.27, -1.74, -0.87, -2.25, -1.83], ['c', -0.69, -1.41, -0.63, -3.00, 0.21, -4.26], ['c', 0.21, -0.30, 0.69, -0.81, 0.99, -1.02], ['c', 0.48, -0.33, 1.11, -0.57, 1.74, -0.66], ['z']], w: 16.366, h: 7.893 },\n\t'scripts.trill': { d: [['M', -0.51, -16.02], ['c', 0.12, -0.09, 0.21, -0.18, 0.21, -0.18], ['l', -0.81, 4.02], ['l', -0.81, 4.02], ['c', 0.03, 0.00, 0.51, -0.27, 1.08, -0.60], ['c', 0.60, -0.30, 1.14, -0.63, 1.26, -0.66], ['c', 1.14, -0.54, 2.31, -0.60, 3.09, -0.18], ['c', 0.27, 0.15, 0.54, 0.36, 0.60, 0.51], ['l', 0.06, 0.12], ['l', 0.21, -0.21], ['c', 0.90, -0.81, 2.22, -0.99, 3.12, -0.42], ['c', 0.60, 0.42, 0.90, 1.14, 0.78, 2.07], ['c', -0.15, 1.29, -1.05, 2.31, -1.95, 2.25], ['c', -0.48, -0.03, -0.78, -0.30, -0.96, -0.81], ['c', -0.09, -0.27, -0.09, -0.90, -0.03, -1.20], ['c', 0.21, -0.75, 0.81, -1.23, 1.59, -1.32], ['l', 0.24, -0.03], ['l', -0.09, -0.12], ['c', -0.51, -0.66, -1.62, -0.63, -2.31, 0.03], ['c', -0.39, 0.42, -0.30, 0.09, -1.23, 4.77], ['l', -0.81, 4.14], ['c', -0.03, 0.00, -0.12, -0.03, -0.21, -0.09], ['c', -0.33, -0.15, -0.54, -0.18, -0.99, -0.18], ['c', -0.42, 0.00, -0.66, 0.03, -1.05, 0.18], ['c', -0.12, 0.06, -0.21, 0.09, -0.21, 0.09], ['c', 0.00, -0.03, 0.36, -1.86, 0.81, -4.11], ['c', 0.90, -4.47, 0.87, -4.26, 0.69, -4.53], ['c', -0.21, -0.36, -0.66, -0.51, -1.17, -0.36], ['c', -0.15, 0.06, -2.22, 1.14, -2.58, 1.38], ['c', -0.12, 0.09, -0.12, 0.09, -0.21, 0.60], ['l', -0.09, 0.51], ['l', 0.21, 0.24], ['c', 0.63, 0.75, 1.02, 1.47, 1.20, 2.19], ['c', 0.06, 0.27, 0.06, 0.36, 0.06, 0.81], ['c', 0.00, 0.42, 0.00, 0.54, -0.06, 0.78], ['c', -0.15, 0.54, -0.33, 0.93, -0.63, 1.35], ['c', -0.18, 0.24, -0.57, 0.63, -0.81, 0.78], ['c', -0.24, 0.15, -0.63, 0.36, -0.84, 0.42], ['c', -0.27, 0.06, -0.66, 0.06, -0.87, 0.03], ['c', -0.81, -0.18, -1.32, -1.05, -1.38, -2.46], ['c', -0.03, -0.60, 0.03, -0.99, 0.33, -2.46], ['c', 0.21, -1.08, 0.24, -1.32, 0.21, -1.29], ['c', -1.20, 0.48, -2.40, 0.75, -3.21, 0.72], ['c', -0.69, -0.06, -1.17, -0.30, -1.41, -0.72], ['c', -0.39, -0.75, -0.12, -1.80, 0.66, -2.46], ['c', 0.24, -0.18, 0.69, -0.42, 1.02, -0.51], ['c', 0.69, -0.18, 1.53, -0.15, 2.31, 0.09], ['c', 0.30, 0.09, 0.75, 0.30, 0.99, 0.45], ['c', 0.12, 0.09, 0.15, 0.09, 0.15, 0.03], ['c', 0.03, -0.03, 0.33, -1.59, 0.72, -3.45], ['c', 0.36, -1.86, 0.66, -3.42, 0.69, -3.45], ['c', 0.00, -0.03, 0.03, -0.03, 0.21, 0.03], ['c', 0.21, 0.06, 0.27, 0.06, 0.48, 0.06], ['c', 0.42, -0.03, 0.78, -0.18, 1.26, -0.48], ['c', 0.15, -0.12, 0.36, -0.27, 0.48, -0.39], ['z'], ['m', -5.73, 7.68], ['c', -0.27, -0.03, -0.96, -0.06, -1.20, -0.03], ['c', -0.81, 0.12, -1.35, 0.57, -1.50, 1.20], ['c', -0.18, 0.66, 0.12, 1.14, 0.75, 1.29], ['c', 0.66, 0.12, 1.92, -0.12, 3.18, -0.66], ['l', 0.33, -0.15], ['l', 0.09, -0.39], ['c', 0.06, -0.21, 0.09, -0.42, 0.09, -0.45], ['c', 0.00, -0.03, -0.45, -0.30, -0.75, -0.45], ['c', -0.27, -0.15, -0.66, -0.27, -0.99, -0.36], ['z'], ['m', 4.29, 3.63], ['c', -0.24, -0.39, -0.51, -0.75, -0.51, -0.69], ['c', -0.06, 0.12, -0.39, 1.92, -0.45, 2.28], ['c', -0.09, 0.54, -0.12, 1.14, -0.06, 1.38], ['c', 0.06, 0.42, 0.21, 0.60, 0.51, 0.57], ['c', 0.39, -0.06, 0.75, -0.48, 0.93, -1.14], ['c', 0.09, -0.33, 0.09, -1.05, 0.00, -1.38], ['c', -0.09, -0.39, -0.24, -0.69, -0.42, -1.02], ['z']], w: 17.963, h: 16.49 },\n\t'scripts.segno': { d: [['M', -3.72, -11.22], ['c', 0.78, -0.09, 1.59, 0.03, 2.31, 0.42], ['c', 1.20, 0.60, 2.01, 1.71, 2.31, 3.09], ['c', 0.09, 0.42, 0.09, 1.20, 0.03, 1.50], ['c', -0.15, 0.45, -0.39, 0.81, -0.66, 0.93], ['c', -0.33, 0.18, -0.84, 0.21, -1.23, 0.15], ['c', -0.81, -0.18, -1.32, -0.93, -1.26, -1.89], ['c', 0.03, -0.36, 0.09, -0.57, 0.24, -0.90], ['c', 0.15, -0.33, 0.45, -0.60, 0.72, -0.75], ['c', 0.12, -0.06, 0.18, -0.09, 0.18, -0.12], ['c', 0.00, -0.03, -0.03, -0.15, -0.09, -0.24], ['c', -0.18, -0.45, -0.54, -0.87, -0.96, -1.08], ['c', -1.11, -0.57, -2.34, -0.18, -2.88, 0.90], ['c', -0.24, 0.51, -0.33, 1.11, -0.24, 1.83], ['c', 0.27, 1.92, 1.50, 3.54, 3.93, 5.13], ['c', 0.48, 0.33, 1.26, 0.78, 1.29, 0.78], ['c', 0.03, 0.00, 1.35, -2.19, 2.94, -4.89], ['l', 2.88, -4.89], ['l', 0.84, 0.00], ['l', 0.87, 0.00], ['l', -0.03, 0.06], ['c', -0.15, 0.21, -6.15, 10.41, -6.15, 10.44], ['c', 0.00, 0.00, 0.21, 0.15, 0.48, 0.27], ['c', 2.61, 1.47, 4.35, 3.03, 5.13, 4.65], ['c', 1.14, 2.34, 0.51, 5.07, -1.44, 6.39], ['c', -0.66, 0.42, -1.32, 0.63, -2.13, 0.69], ['c', -2.01, 0.09, -3.81, -1.41, -4.26, -3.54], ['c', -0.09, -0.42, -0.09, -1.20, -0.03, -1.50], ['c', 0.15, -0.45, 0.39, -0.81, 0.66, -0.93], ['c', 0.33, -0.18, 0.84, -0.21, 1.23, -0.15], ['c', 0.81, 0.18, 1.32, 0.93, 1.26, 1.89], ['c', -0.03, 0.36, -0.09, 0.57, -0.24, 0.90], ['c', -0.15, 0.33, -0.45, 0.60, -0.72, 0.75], ['c', -0.12, 0.06, -0.18, 0.09, -0.18, 0.12], ['c', 0.00, 0.03, 0.03, 0.15, 0.09, 0.24], ['c', 0.18, 0.45, 0.54, 0.87, 0.96, 1.08], ['c', 1.11, 0.57, 2.34, 0.18, 2.88, -0.90], ['c', 0.24, -0.51, 0.33, -1.11, 0.24, -1.83], ['c', -0.27, -1.92, -1.50, -3.54, -3.93, -5.13], ['c', -0.48, -0.33, -1.26, -0.78, -1.29, -0.78], ['c', -0.03, 0.00, -1.35, 2.19, -2.91, 4.89], ['l', -2.88, 4.89], ['l', -0.87, 0.00], ['l', -0.87, 0.00], ['l', 0.03, -0.06], ['c', 0.15, -0.21, 6.15, -10.41, 6.15, -10.44], ['c', 0.00, 0.00, -0.21, -0.15, -0.48, -0.30], ['c', -2.61, -1.44, -4.35, -3.00, -5.13, -4.62], ['c', -0.90, -1.89, -0.72, -4.02, 0.48, -5.52], ['c', 0.69, -0.84, 1.68, -1.41, 2.73, -1.53], ['z'], ['m', 8.76, 9.09], ['c', 0.03, -0.03, 0.15, -0.03, 0.27, -0.03], ['c', 0.33, 0.03, 0.57, 0.18, 0.72, 0.48], ['c', 0.09, 0.18, 0.09, 0.57, 0.00, 0.75], ['c', -0.09, 0.18, -0.21, 0.30, -0.36, 0.39], ['c', -0.15, 0.06, -0.21, 0.06, -0.39, 0.06], ['c', -0.21, 0.00, -0.27, 0.00, -0.39, -0.06], ['c', -0.30, -0.15, -0.48, -0.45, -0.48, -0.75], ['c', 0.00, -0.39, 0.24, -0.72, 0.63, -0.84], ['z'], ['m', -10.53, 2.61], ['c', 0.03, -0.03, 0.15, -0.03, 0.27, -0.03], ['c', 0.33, 0.03, 0.57, 0.18, 0.72, 0.48], ['c', 0.09, 0.18, 0.09, 0.57, 0.00, 0.75], ['c', -0.09, 0.18, -0.21, 0.30, -0.36, 0.39], ['c', -0.15, 0.06, -0.21, 0.06, -0.39, 0.06], ['c', -0.21, 0.00, -0.27, 0.00, -0.39, -0.06], ['c', -0.30, -0.15, -0.48, -0.45, -0.48, -0.75], ['c', 0.00, -0.39, 0.24, -0.72, 0.63, -0.84], ['z']], w: 15, h: 22.504 },\n\t'scripts.coda': { d: [['M', -0.21, -10.47], ['c', 0.18, -0.12, 0.42, -0.06, 0.54, 0.12], ['c', 0.06, 0.09, 0.06, 0.18, 0.06, 1.50], ['l', 0.00, 1.38], ['l', 0.18, 0.00], ['c', 0.39, 0.06, 0.96, 0.24, 1.38, 0.48], ['c', 1.68, 0.93, 2.82, 3.24, 3.03, 6.12], ['c', 0.03, 0.24, 0.03, 0.45, 0.03, 0.45], ['c', 0.00, 0.03, 0.60, 0.03, 1.35, 0.03], ['c', 1.50, 0.00, 1.47, 0.00, 1.59, 0.18], ['c', 0.09, 0.12, 0.09, 0.30, 0.00, 0.42], ['c', -0.12, 0.18, -0.09, 0.18, -1.59, 0.18], ['c', -0.75, 0.00, -1.35, 0.00, -1.35, 0.03], ['c', 0.00, 0.00, 0.00, 0.21, -0.03, 0.42], ['c', -0.24, 3.15, -1.53, 5.58, -3.45, 6.36], ['c', -0.27, 0.12, -0.72, 0.24, -0.96, 0.27], ['l', -0.18, 0.00], ['l', 0.00, 1.38], ['c', 0.00, 1.32, 0.00, 1.41, -0.06, 1.50], ['c', -0.15, 0.24, -0.51, 0.24, -0.66, 0.00], ['c', -0.06, -0.09, -0.06, -0.18, -0.06, -1.50], ['l', 0.00, -1.38], ['l', -0.18, 0.00], ['c', -0.39, -0.06, -0.96, -0.24, -1.38, -0.48], ['c', -1.68, -0.93, -2.82, -3.24, -3.03, -6.15], ['c', -0.03, -0.21, -0.03, -0.42, -0.03, -0.42], ['c', 0.00, -0.03, -0.60, -0.03, -1.35, -0.03], ['c', -1.50, 0.00, -1.47, 0.00, -1.59, -0.18], ['c', -0.09, -0.12, -0.09, -0.30, 0.00, -0.42], ['c', 0.12, -0.18, 0.09, -0.18, 1.59, -0.18], ['c', 0.75, 0.00, 1.35, 0.00, 1.35, -0.03], ['c', 0.00, 0.00, 0.00, -0.21, 0.03, -0.45], ['c', 0.24, -3.12, 1.53, -5.55, 3.45, -6.33], ['c', 0.27, -0.12, 0.72, -0.24, 0.96, -0.27], ['l', 0.18, 0.00], ['l', 0.00, -1.38], ['c', 0.00, -1.53, 0.00, -1.50, 0.18, -1.62], ['z'], ['m', -0.18, 6.93], ['c', 0.00, -2.97, 0.00, -3.15, -0.06, -3.15], ['c', -0.09, 0.00, -0.51, 0.15, -0.66, 0.21], ['c', -0.87, 0.51, -1.38, 1.62, -1.56, 3.51], ['c', -0.06, 0.54, -0.12, 1.59, -0.12, 2.16], ['l', 0.00, 0.42], ['l', 1.20, 0.00], ['l', 1.20, 0.00], ['l', 0.00, -3.15], ['z'], ['m', 1.17, -3.06], ['c', -0.09, -0.03, -0.21, -0.06, -0.27, -0.09], ['l', -0.12, 0.00], ['l', 0.00, 3.15], ['l', 0.00, 3.15], ['l', 1.20, 0.00], ['l', 1.20, 0.00], ['l', 0.00, -0.81], ['c', -0.06, -2.40, -0.33, -3.69, -0.93, -4.59], ['c', -0.27, -0.39, -0.66, -0.69, -1.08, -0.81], ['z'], ['m', -1.17, 10.14], ['l', 0.00, -3.15], ['l', -1.20, 0.00], ['l', -1.20, 0.00], ['l', 0.00, 0.81], ['c', 0.03, 0.96, 0.06, 1.47, 0.15, 2.13], ['c', 0.24, 2.04, 0.96, 3.12, 2.13, 3.36], ['l', 0.12, 0.00], ['l', 0.00, -3.15], ['z'], ['m', 3.18, -2.34], ['l', 0.00, -0.81], ['l', -1.20, 0.00], ['l', -1.20, 0.00], ['l', 0.00, 3.15], ['l', 0.00, 3.15], ['l', 0.12, 0.00], ['c', 1.17, -0.24, 1.89, -1.32, 2.13, -3.36], ['c', 0.09, -0.66, 0.12, -1.17, 0.15, -2.13], ['z']], w: 16.035, h: 21.062 },\n\t'scripts.comma': { d: [['M', 1.14, -4.62], ['c', 0.30, -0.12, 0.69, -0.03, 0.93, 0.15], ['c', 0.12, 0.12, 0.36, 0.45, 0.51, 0.78], ['c', 0.90, 1.77, 0.54, 4.05, -1.08, 6.75], ['c', -0.36, 0.63, -0.87, 1.38, -0.96, 1.44], ['c', -0.18, 0.12, -0.42, 0.06, -0.54, -0.12], ['c', -0.09, -0.18, -0.09, -0.30, 0.12, -0.60], ['c', 0.96, -1.44, 1.44, -2.97, 1.38, -4.35], ['c', -0.06, -0.93, -0.30, -1.68, -0.78, -2.46], ['c', -0.27, -0.39, -0.33, -0.63, -0.24, -0.96], ['c', 0.09, -0.27, 0.36, -0.54, 0.66, -0.63], ['z']], w: 3.042, h: 9.237 },\n\t'scripts.roll': { d: [['M', 1.95, -6.00], ['c', 0.21, -0.09, 0.36, -0.09, 0.57, 0.00], ['c', 0.39, 0.15, 0.63, 0.39, 1.47, 1.35], ['c', 0.66, 0.75, 0.78, 0.87, 1.08, 1.05], ['c', 0.75, 0.45, 1.65, 0.42, 2.40, -0.06], ['c', 0.12, -0.09, 0.27, -0.27, 0.54, -0.60], ['c', 0.42, -0.54, 0.51, -0.63, 0.69, -0.63], ['c', 0.09, 0.00, 0.30, 0.12, 0.36, 0.21], ['c', 0.09, 0.12, 0.12, 0.30, 0.03, 0.42], ['c', -0.06, 0.12, -3.15, 3.90, -3.30, 4.08], ['c', -0.06, 0.06, -0.18, 0.12, -0.27, 0.18], ['c', -0.27, 0.12, -0.60, 0.06, -0.99, -0.27], ['c', -0.27, -0.21, -0.42, -0.39, -1.08, -1.14], ['c', -0.63, -0.72, -0.81, -0.90, -1.17, -1.08], ['c', -0.36, -0.18, -0.57, -0.21, -0.99, -0.21], ['c', -0.39, 0.00, -0.63, 0.03, -0.93, 0.18], ['c', -0.36, 0.15, -0.51, 0.27, -0.90, 0.81], ['c', -0.24, 0.27, -0.45, 0.51, -0.48, 0.54], ['c', -0.12, 0.09, -0.27, 0.06, -0.39, 0.00], ['c', -0.24, -0.15, -0.33, -0.39, -0.21, -0.60], ['c', 0.09, -0.12, 3.18, -3.87, 3.33, -4.02], ['c', 0.06, -0.06, 0.18, -0.15, 0.24, -0.21], ['z']], w: 10.817, h: 6.125 },\n\t'scripts.prall': { d: [['M', -4.38, -3.69], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['c', 0.03, 0.00, 0.57, -0.84, 1.23, -1.83], ['c', 1.14, -1.68, 1.23, -1.83, 1.35, -1.89], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['l', 0.48, -0.69], ['c', 0.51, -0.78, 0.54, -0.84, 0.69, -0.90], ['c', 0.42, -0.18, 0.87, 0.15, 0.81, 0.60], ['c', -0.03, 0.12, -0.30, 0.51, -1.50, 2.37], ['c', -1.38, 2.07, -1.50, 2.22, -1.62, 2.28], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['c', -0.03, 0.00, -0.57, 0.84, -1.23, 1.83], ['c', -1.14, 1.68, -1.23, 1.83, -1.35, 1.89], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['l', -0.48, 0.69], ['c', -0.51, 0.78, -0.54, 0.84, -0.69, 0.90], ['c', -0.42, 0.18, -0.87, -0.15, -0.81, -0.60], ['c', 0.03, -0.12, 0.30, -0.51, 1.50, -2.37], ['c', 1.38, -2.07, 1.50, -2.22, 1.62, -2.28], ['z']], w: 15.011, h: 7.5 },\n\t'scripts.arpeggio': { d: [['M', 1.5, 0], ['c', 1.5, 2, 1.5, 3, 1.5, 3], ['s', 0, 1, -2, 1.5], ['s', -0.5, 3, 1, 5.5], ['l', 1.5, 0], ['s', -1.75, -2, -1.9, -3.25], ['s', 2.15, -0.6, 2.95, -1.6], ['s', 0.45, -1, 0.5, -1.25], ['s', 0, -1, -2, -3.9], ['l', -1.5, 0], ['z']], w: 5, h: 10 },\n\t'scripts.mordent': { d: [['M', -0.21, -4.95], ['c', 0.27, -0.15, 0.63, 0.00, 0.75, 0.27], ['c', 0.06, 0.12, 0.06, 0.24, 0.06, 1.44], ['l', 0.00, 1.29], ['l', 0.57, -0.84], ['c', 0.51, -0.75, 0.57, -0.84, 0.69, -0.90], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['l', 0.48, -0.69], ['c', 0.51, -0.78, 0.54, -0.84, 0.69, -0.90], ['c', 0.42, -0.18, 0.87, 0.15, 0.81, 0.60], ['c', -0.03, 0.12, -0.30, 0.51, -1.50, 2.37], ['c', -1.38, 2.07, -1.50, 2.22, -1.62, 2.28], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.83, -1.89], ['c', -0.81, -0.99, -1.50, -1.80, -1.53, -1.86], ['c', -0.06, -0.03, -0.06, -0.03, -0.12, 0.03], ['c', -0.06, 0.06, -0.06, 0.15, -0.06, 2.28], ['c', 0.00, 1.95, 0.00, 2.25, -0.06, 2.34], ['c', -0.18, 0.45, -0.81, 0.48, -1.05, 0.03], ['c', -0.03, -0.06, -0.06, -0.24, -0.06, -1.41], ['l', 0.00, -1.35], ['l', -0.57, 0.84], ['c', -0.54, 0.78, -0.60, 0.87, -0.72, 0.93], ['c', -0.06, 0.03, -0.18, 0.06, -0.24, 0.06], ['c', -0.30, 0.00, -0.27, 0.03, -1.89, -1.95], ['l', -1.53, -1.83], ['l', -0.48, 0.69], ['c', -0.51, 0.78, -0.54, 0.84, -0.69, 0.90], ['c', -0.42, 0.18, -0.87, -0.15, -0.81, -0.60], ['c', 0.03, -0.12, 0.30, -0.51, 1.50, -2.37], ['c', 1.38, -2.07, 1.50, -2.22, 1.62, -2.28], ['c', 0.06, -0.03, 0.18, -0.06, 0.24, -0.06], ['c', 0.30, 0.00, 0.27, -0.03, 1.89, 1.95], ['l', 1.53, 1.83], ['c', 0.03, 0.00, 0.06, -0.06, 0.09, -0.09], ['c', 0.06, -0.12, 0.06, -0.15, 0.06, -2.28], ['c', 0.00, -1.92, 0.00, -2.22, 0.06, -2.31], ['c', 0.06, -0.15, 0.15, -0.24, 0.30, -0.30], ['z']], w: 15.011, h: 10.012 },\n\t'flags.u8th': { d: [['M', -0.42, 3.75], ['l', 0.00, -3.75], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.18], ['c', 0.00, 0.30, 0.06, 0.84, 0.12, 1.23], ['c', 0.24, 1.53, 0.90, 3.12, 2.13, 5.16], ['l', 0.99, 1.59], ['c', 0.87, 1.44, 1.38, 2.34, 1.77, 3.09], ['c', 0.81, 1.68, 1.20, 3.06, 1.26, 4.53], ['c', 0.03, 1.53, -0.21, 3.27, -0.75, 5.01], ['c', -0.21, 0.69, -0.51, 1.50, -0.60, 1.59], ['c', -0.09, 0.12, -0.27, 0.21, -0.42, 0.21], ['c', -0.15, 0.00, -0.42, -0.12, -0.51, -0.21], ['c', -0.15, -0.18, -0.18, -0.42, -0.09, -0.66], ['c', 0.15, -0.33, 0.45, -1.20, 0.57, -1.62], ['c', 0.42, -1.38, 0.60, -2.58, 0.60, -3.90], ['c', 0.00, -0.66, 0.00, -0.81, -0.06, -1.11], ['c', -0.39, -2.07, -1.80, -4.26, -4.59, -7.14], ['l', -0.42, -0.45], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -3.75], ['z']], w: 6.692, h: 22.59 },\n\t'flags.u16th': { d: [['M', -0.42, 7.50], ['l', 0.00, -7.50], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.39], ['c', 0.06, 1.08, 0.39, 2.19, 0.99, 3.39], ['c', 0.45, 0.90, 0.87, 1.59, 1.95, 3.12], ['c', 1.29, 1.86, 1.77, 2.64, 2.22, 3.57], ['c', 0.45, 0.93, 0.72, 1.80, 0.87, 2.64], ['c', 0.06, 0.51, 0.06, 1.50, 0.00, 1.92], ['c', -0.12, 0.60, -0.30, 1.20, -0.54, 1.71], ['l', -0.09, 0.24], ['l', 0.18, 0.45], ['c', 0.51, 1.20, 0.72, 2.22, 0.69, 3.42], ['c', -0.06, 1.53, -0.39, 3.03, -0.99, 4.53], ['c', -0.30, 0.75, -0.36, 0.81, -0.57, 0.90], ['c', -0.15, 0.09, -0.33, 0.06, -0.48, 0.00], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.12, -0.75], ['c', 0.66, -1.41, 1.02, -2.88, 1.08, -4.32], ['c', 0.00, -0.60, -0.03, -1.05, -0.18, -1.59], ['c', -0.30, -1.20, -0.99, -2.40, -2.25, -3.87], ['c', -0.42, -0.48, -1.53, -1.62, -2.19, -2.22], ['l', -0.45, -0.42], ['l', -0.03, 1.11], ['l', 0.00, 1.11], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -7.50], ['z'], ['m', 1.65, 0.09], ['c', -0.30, -0.30, -0.69, -0.72, -0.90, -0.87], ['l', -0.33, -0.33], ['l', 0.00, 0.15], ['c', 0.00, 0.30, 0.06, 0.81, 0.15, 1.26], ['c', 0.27, 1.29, 0.87, 2.61, 2.04, 4.29], ['c', 0.15, 0.24, 0.60, 0.87, 0.96, 1.38], ['l', 1.08, 1.53], ['l', 0.42, 0.63], ['c', 0.03, 0.00, 0.12, -0.36, 0.21, -0.72], ['c', 0.06, -0.33, 0.06, -1.20, 0.00, -1.62], ['c', -0.33, -1.71, -1.44, -3.48, -3.63, -5.70], ['z']], w: 6.693, h: 26.337 },\n\t'flags.u32nd': { d: [['M', -0.42, 11.25], ['l', 0.00, -11.25], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.36], ['c', 0.09, 1.68, 0.69, 3.27, 2.07, 5.46], ['l', 0.87, 1.35], ['c', 1.02, 1.62, 1.47, 2.37, 1.86, 3.18], ['c', 0.48, 1.02, 0.78, 1.92, 0.93, 2.88], ['c', 0.06, 0.48, 0.06, 1.50, 0.00, 1.89], ['c', -0.09, 0.42, -0.21, 0.87, -0.36, 1.26], ['l', -0.12, 0.30], ['l', 0.15, 0.39], ['c', 0.69, 1.56, 0.84, 2.88, 0.54, 4.38], ['c', -0.09, 0.45, -0.27, 1.08, -0.45, 1.47], ['l', -0.12, 0.24], ['l', 0.18, 0.36], ['c', 0.33, 0.72, 0.57, 1.56, 0.69, 2.34], ['c', 0.12, 1.02, -0.06, 2.52, -0.42, 3.84], ['c', -0.27, 0.93, -0.75, 2.13, -0.93, 2.31], ['c', -0.18, 0.15, -0.45, 0.18, -0.66, 0.09], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.06, -0.60], ['c', 0.21, -0.36, 0.42, -0.90, 0.57, -1.38], ['c', 0.51, -1.41, 0.69, -3.06, 0.48, -4.08], ['c', -0.15, -0.81, -0.57, -1.68, -1.20, -2.55], ['c', -0.72, -0.99, -1.83, -2.13, -3.30, -3.33], ['l', -0.48, -0.42], ['l', -0.03, 1.53], ['l', 0.00, 1.56], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -11.25], ['z'], ['m', 1.26, -3.96], ['c', -0.27, -0.30, -0.54, -0.60, -0.66, -0.72], ['l', -0.18, -0.21], ['l', 0.00, 0.42], ['c', 0.06, 0.87, 0.24, 1.74, 0.66, 2.67], ['c', 0.36, 0.87, 0.96, 1.86, 1.92, 3.18], ['c', 0.21, 0.33, 0.63, 0.87, 0.87, 1.23], ['c', 0.27, 0.39, 0.60, 0.84, 0.75, 1.08], ['l', 0.27, 0.39], ['l', 0.03, -0.12], ['c', 0.12, -0.45, 0.15, -1.05, 0.09, -1.59], ['c', -0.27, -1.86, -1.38, -3.78, -3.75, -6.33], ['z'], ['m', -0.27, 6.09], ['c', -0.27, -0.21, -0.48, -0.42, -0.51, -0.45], ['c', -0.06, -0.03, -0.06, -0.03, -0.06, 0.21], ['c', 0.00, 0.90, 0.30, 2.04, 0.81, 3.09], ['c', 0.48, 1.02, 0.96, 1.77, 2.37, 3.63], ['c', 0.60, 0.78, 1.05, 1.44, 1.29, 1.77], ['c', 0.06, 0.12, 0.15, 0.21, 0.15, 0.18], ['c', 0.03, -0.03, 0.18, -0.57, 0.24, -0.87], ['c', 0.06, -0.45, 0.06, -1.32, -0.03, -1.74], ['c', -0.09, -0.48, -0.24, -0.90, -0.51, -1.44], ['c', -0.66, -1.35, -1.83, -2.70, -3.75, -4.38], ['z']], w: 6.697, h: 32.145 },\n\t'flags.u64th': { d: [['M', -0.42, 15.00], ['l', 0.00, -15.00], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 0.36], ['c', 0.06, 1.20, 0.39, 2.37, 1.02, 3.66], ['c', 0.39, 0.81, 0.84, 1.56, 1.80, 3.09], ['c', 0.81, 1.26, 1.05, 1.68, 1.35, 2.22], ['c', 0.87, 1.50, 1.35, 2.79, 1.56, 4.08], ['c', 0.06, 0.54, 0.06, 1.56, -0.03, 2.04], ['c', -0.09, 0.48, -0.21, 0.99, -0.36, 1.35], ['l', -0.12, 0.27], ['l', 0.12, 0.27], ['c', 0.09, 0.15, 0.21, 0.45, 0.27, 0.66], ['c', 0.69, 1.89, 0.63, 3.66, -0.18, 5.46], ['l', -0.18, 0.39], ['l', 0.15, 0.33], ['c', 0.30, 0.66, 0.51, 1.44, 0.63, 2.10], ['c', 0.06, 0.48, 0.06, 1.35, 0.00, 1.71], ['c', -0.15, 0.57, -0.42, 1.20, -0.78, 1.68], ['l', -0.21, 0.27], ['l', 0.18, 0.33], ['c', 0.57, 1.05, 0.93, 2.13, 1.02, 3.18], ['c', 0.06, 0.72, 0.00, 1.83, -0.21, 2.79], ['c', -0.18, 1.02, -0.63, 2.34, -1.02, 3.09], ['c', -0.15, 0.33, -0.48, 0.45, -0.78, 0.30], ['c', -0.18, -0.09, -0.27, -0.18, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.30, 0.03, -0.54], ['c', 0.75, -1.50, 1.23, -3.45, 1.17, -4.89], ['c', -0.06, -1.02, -0.42, -2.01, -1.17, -3.15], ['c', -0.48, -0.72, -1.02, -1.35, -1.89, -2.22], ['c', -0.57, -0.57, -1.56, -1.50, -1.92, -1.77], ['l', -0.12, -0.09], ['l', 0.00, 1.68], ['l', 0.00, 1.68], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -15.00], ['z'], ['m', 0.93, -8.07], ['c', -0.27, -0.30, -0.48, -0.54, -0.51, -0.54], ['c', 0.00, 0.00, 0.00, 0.69, 0.03, 1.02], ['c', 0.15, 1.47, 0.75, 2.94, 2.04, 4.83], ['l', 1.08, 1.53], ['c', 0.39, 0.57, 0.84, 1.20, 0.99, 1.44], ['c', 0.15, 0.24, 0.30, 0.45, 0.30, 0.45], ['c', 0.00, 0.00, 0.03, -0.09, 0.06, -0.21], ['c', 0.36, -1.59, -0.15, -3.33, -1.47, -5.40], ['c', -0.63, -0.93, -1.35, -1.83, -2.52, -3.12], ['z'], ['m', 0.06, 6.72], ['c', -0.24, -0.21, -0.48, -0.42, -0.51, -0.45], ['l', -0.06, -0.06], ['l', 0.00, 0.33], ['c', 0.00, 1.20, 0.30, 2.34, 0.93, 3.60], ['c', 0.45, 0.90, 0.96, 1.68, 2.25, 3.51], ['c', 0.39, 0.54, 0.84, 1.17, 1.02, 1.44], ['c', 0.21, 0.33, 0.33, 0.51, 0.33, 0.48], ['c', 0.06, -0.09, 0.21, -0.63, 0.30, -0.99], ['c', 0.06, -0.33, 0.06, -0.45, 0.06, -0.96], ['c', 0.00, -0.60, -0.03, -0.84, -0.18, -1.35], ['c', -0.30, -1.08, -1.02, -2.28, -2.13, -3.57], ['c', -0.39, -0.45, -1.44, -1.47, -2.01, -1.98], ['z'], ['m', 0.00, 6.72], ['c', -0.24, -0.21, -0.48, -0.39, -0.51, -0.42], ['l', -0.06, -0.06], ['l', 0.00, 0.33], ['c', 0.00, 1.41, 0.45, 2.82, 1.38, 4.35], ['c', 0.42, 0.72, 0.72, 1.14, 1.86, 2.73], ['c', 0.36, 0.45, 0.75, 0.99, 0.87, 1.20], ['c', 0.15, 0.21, 0.30, 0.36, 0.30, 0.36], ['c', 0.06, 0.00, 0.30, -0.48, 0.39, -0.75], ['c', 0.09, -0.36, 0.12, -0.63, 0.12, -1.05], ['c', -0.06, -1.05, -0.45, -2.04, -1.20, -3.18], ['c', -0.57, -0.87, -1.11, -1.53, -2.07, -2.49], ['c', -0.36, -0.33, -0.84, -0.78, -1.08, -1.02], ['z']], w: 6.682, h: 39.694 },\n\t'flags.d8th': { d: [['M', 5.67, -21.63], ['c', 0.24, -0.12, 0.54, -0.06, 0.69, 0.15], ['c', 0.06, 0.06, 0.21, 0.36, 0.39, 0.66], ['c', 0.84, 1.77, 1.26, 3.36, 1.32, 5.10], ['c', 0.03, 1.29, -0.21, 2.37, -0.81, 3.63], ['c', -0.60, 1.23, -1.26, 2.13, -3.21, 4.38], ['c', -1.35, 1.53, -1.86, 2.19, -2.40, 2.97], ['c', -0.63, 0.93, -1.11, 1.92, -1.38, 2.79], ['c', -0.15, 0.54, -0.27, 1.35, -0.27, 1.80], ['l', 0.00, 0.15], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -3.75], ['l', 0.00, -3.75], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.48, -0.30], ['c', 1.83, -1.11, 3.12, -2.10, 4.17, -3.12], ['c', 0.78, -0.81, 1.32, -1.53, 1.71, -2.31], ['c', 0.45, -0.93, 0.60, -1.74, 0.51, -2.88], ['c', -0.12, -1.56, -0.63, -3.18, -1.47, -4.68], ['c', -0.12, -0.21, -0.15, -0.33, -0.06, -0.51], ['c', 0.06, -0.15, 0.15, -0.24, 0.33, -0.33], ['z']], w: 8.492, h: 21.691 },\n\t'flags.ugrace': { d: [['M', 6.03, 6.93], ['c', 0.15, -0.09, 0.33, -0.06, 0.51, 0.00], ['c', 0.15, 0.09, 0.21, 0.15, 0.30, 0.33], ['c', 0.09, 0.18, 0.06, 0.39, -0.03, 0.54], ['c', -0.06, 0.15, -10.89, 8.88, -11.07, 8.97], ['c', -0.15, 0.09, -0.33, 0.06, -0.48, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.06, -0.39, 0.03, -0.54], ['c', 0.06, -0.15, 10.89, -8.88, 11.07, -8.97], ['z']], w: 12.019, h: 9.954 },\n\t'flags.dgrace': { d: [['M', -6.06, -15.93], ['c', 0.18, -0.09, 0.33, -0.12, 0.48, -0.06], ['c', 0.18, 0.09, 14.01, 8.04, 14.10, 8.10], ['c', 0.12, 0.12, 0.18, 0.33, 0.18, 0.51], ['c', -0.03, 0.21, -0.15, 0.39, -0.36, 0.48], ['c', -0.18, 0.09, -0.33, 0.12, -0.48, 0.06], ['c', -0.18, -0.09, -14.01, -8.04, -14.10, -8.10], ['c', -0.12, -0.12, -0.18, -0.33, -0.18, -0.51], ['c', 0.03, -0.21, 0.15, -0.39, 0.36, -0.48], ['z']], w: 15.12, h: 9.212 },\n\t'flags.d16th': { d: [['M', 6.84, -22.53], ['c', 0.27, -0.12, 0.57, -0.06, 0.72, 0.15], ['c', 0.15, 0.15, 0.33, 0.87, 0.45, 1.56], ['c', 0.06, 0.33, 0.06, 1.35, 0.00, 1.65], ['c', -0.06, 0.33, -0.15, 0.78, -0.27, 1.11], ['c', -0.12, 0.33, -0.45, 0.96, -0.66, 1.32], ['l', -0.18, 0.27], ['l', 0.09, 0.18], ['c', 0.48, 1.02, 0.72, 2.25, 0.69, 3.30], ['c', -0.06, 1.23, -0.42, 2.28, -1.26, 3.45], ['c', -0.57, 0.87, -0.99, 1.32, -3.00, 3.39], ['c', -1.56, 1.56, -2.22, 2.40, -2.76, 3.45], ['c', -0.42, 0.84, -0.66, 1.80, -0.66, 2.55], ['l', 0.00, 0.15], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -7.50], ['l', 0.00, -7.50], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.14], ['l', 0.00, 1.11], ['l', 0.27, -0.15], ['c', 1.11, -0.57, 1.77, -0.99, 2.52, -1.47], ['c', 2.37, -1.56, 3.69, -3.15, 4.05, -4.83], ['c', 0.03, -0.18, 0.03, -0.39, 0.03, -0.78], ['c', 0.00, -0.60, -0.03, -0.93, -0.24, -1.50], ['c', -0.06, -0.18, -0.12, -0.39, -0.15, -0.45], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.63, 7.50], ['c', -0.06, -0.18, -0.15, -0.36, -0.15, -0.36], ['c', -0.03, 0.00, -0.03, 0.03, -0.06, 0.06], ['c', -0.06, 0.12, -0.96, 1.02, -1.95, 1.98], ['c', -0.63, 0.57, -1.26, 1.17, -1.44, 1.35], ['c', -1.53, 1.62, -2.28, 2.85, -2.55, 4.32], ['c', -0.03, 0.18, -0.03, 0.54, -0.06, 0.99], ['l', 0.00, 0.69], ['l', 0.18, -0.09], ['c', 0.93, -0.54, 2.10, -1.29, 2.82, -1.83], ['c', 0.69, -0.51, 1.02, -0.81, 1.53, -1.29], ['c', 1.86, -1.89, 2.37, -3.66, 1.68, -5.82], ['z']], w: 8.475, h: 22.591 },\n\t'flags.d32nd': { d: [['M', 6.84, -29.13], ['c', 0.27, -0.12, 0.57, -0.06, 0.72, 0.15], ['c', 0.12, 0.12, 0.27, 0.63, 0.36, 1.11], ['c', 0.33, 1.59, 0.06, 3.06, -0.81, 4.47], ['l', -0.18, 0.27], ['l', 0.09, 0.15], ['c', 0.12, 0.24, 0.33, 0.69, 0.45, 1.05], ['c', 0.63, 1.83, 0.45, 3.57, -0.57, 5.22], ['l', -0.18, 0.30], ['l', 0.15, 0.27], ['c', 0.42, 0.87, 0.60, 1.71, 0.57, 2.61], ['c', -0.06, 1.29, -0.48, 2.46, -1.35, 3.78], ['c', -0.54, 0.81, -0.93, 1.29, -2.46, 3.00], ['c', -0.51, 0.54, -1.05, 1.17, -1.26, 1.41], ['c', -1.56, 1.86, -2.25, 3.36, -2.37, 5.01], ['l', 0.00, 0.33], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -11.25], ['l', 0.00, -11.25], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.35], ['l', 0.03, 1.35], ['l', 0.78, -0.39], ['c', 1.38, -0.69, 2.34, -1.26, 3.24, -1.92], ['c', 1.38, -1.02, 2.28, -2.13, 2.64, -3.21], ['c', 0.15, -0.48, 0.18, -0.72, 0.18, -1.29], ['c', 0.00, -0.57, -0.06, -0.90, -0.24, -1.47], ['c', -0.06, -0.18, -0.12, -0.39, -0.15, -0.45], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.63, 7.20], ['c', -0.09, -0.18, -0.12, -0.21, -0.12, -0.15], ['c', -0.03, 0.09, -1.02, 1.08, -2.04, 2.04], ['c', -1.17, 1.08, -1.65, 1.56, -2.07, 2.04], ['c', -0.84, 0.96, -1.38, 1.86, -1.68, 2.76], ['c', -0.21, 0.57, -0.27, 0.99, -0.30, 1.65], ['l', 0.00, 0.54], ['l', 0.66, -0.33], ['c', 3.57, -1.86, 5.49, -3.69, 5.94, -5.70], ['c', 0.06, -0.39, 0.06, -1.20, -0.03, -1.65], ['c', -0.06, -0.39, -0.24, -0.90, -0.36, -1.20], ['z'], ['m', -0.06, 7.20], ['c', -0.06, -0.15, -0.12, -0.33, -0.15, -0.45], ['l', -0.06, -0.18], ['l', -0.18, 0.21], ['l', -1.83, 1.83], ['c', -0.87, 0.90, -1.77, 1.80, -1.95, 2.01], ['c', -1.08, 1.29, -1.62, 2.31, -1.89, 3.51], ['c', -0.06, 0.30, -0.06, 0.51, -0.09, 0.93], ['l', 0.00, 0.57], ['l', 0.09, -0.06], ['c', 0.75, -0.45, 1.89, -1.26, 2.52, -1.74], ['c', 0.81, -0.66, 1.74, -1.53, 2.22, -2.16], ['c', 1.26, -1.53, 1.68, -3.06, 1.32, -4.47], ['z']], w: 8.385, h: 29.191 },\n\t'flags.d64th': { d: [['M', 7.08, -32.88], ['c', 0.30, -0.12, 0.66, -0.03, 0.78, 0.24], ['c', 0.18, 0.33, 0.27, 2.10, 0.15, 2.64], ['c', -0.09, 0.39, -0.21, 0.78, -0.39, 1.08], ['l', -0.15, 0.30], ['l', 0.09, 0.27], ['c', 0.03, 0.12, 0.09, 0.45, 0.12, 0.69], ['c', 0.27, 1.44, 0.18, 2.55, -0.30, 3.60], ['l', -0.12, 0.33], ['l', 0.06, 0.42], ['c', 0.27, 1.35, 0.33, 2.82, 0.21, 3.63], ['c', -0.12, 0.60, -0.30, 1.23, -0.57, 1.80], ['l', -0.15, 0.27], ['l', 0.03, 0.42], ['c', 0.06, 1.02, 0.06, 2.70, 0.03, 3.06], ['c', -0.15, 1.47, -0.66, 2.76, -1.74, 4.41], ['c', -0.45, 0.69, -0.75, 1.11, -1.74, 2.37], ['c', -1.05, 1.38, -1.50, 1.98, -1.95, 2.73], ['c', -0.93, 1.50, -1.38, 2.82, -1.44, 4.20], ['l', 0.00, 0.42], ['l', -0.21, 0.00], ['l', -0.21, 0.00], ['l', 0.00, -15.00], ['l', 0.00, -15.00], ['l', 0.21, 0.00], ['l', 0.21, 0.00], ['l', 0.00, 1.86], ['l', 0.00, 1.89], ['c', 0.00, 0.00, 0.21, -0.03, 0.45, -0.09], ['c', 2.22, -0.39, 4.08, -1.11, 5.19, -2.01], ['c', 0.63, -0.54, 1.02, -1.14, 1.20, -1.80], ['c', 0.06, -0.30, 0.06, -1.14, -0.03, -1.65], ['c', -0.03, -0.18, -0.06, -0.39, -0.09, -0.48], ['c', -0.03, -0.24, 0.12, -0.48, 0.36, -0.60], ['z'], ['m', -0.45, 6.15], ['c', -0.03, -0.18, -0.06, -0.42, -0.06, -0.54], ['l', -0.03, -0.18], ['l', -0.33, 0.30], ['c', -0.42, 0.36, -0.87, 0.72, -1.68, 1.29], ['c', -1.98, 1.38, -2.25, 1.59, -2.85, 2.16], ['c', -0.75, 0.69, -1.23, 1.44, -1.47, 2.19], ['c', -0.15, 0.45, -0.18, 0.63, -0.21, 1.35], ['l', 0.00, 0.66], ['l', 0.39, -0.18], ['c', 1.83, -0.90, 3.45, -1.95, 4.47, -2.91], ['c', 0.93, -0.90, 1.53, -1.83, 1.74, -2.82], ['c', 0.06, -0.33, 0.06, -0.87, 0.03, -1.32], ['z'], ['m', -0.27, 4.86], ['c', -0.03, -0.21, -0.06, -0.36, -0.06, -0.36], ['c', 0.00, -0.03, -0.12, 0.09, -0.24, 0.24], ['c', -0.39, 0.48, -0.99, 1.08, -2.16, 2.19], ['c', -1.47, 1.38, -1.92, 1.83, -2.46, 2.49], ['c', -0.66, 0.87, -1.08, 1.74, -1.29, 2.58], ['c', -0.09, 0.42, -0.15, 0.87, -0.15, 1.44], ['l', 0.00, 0.54], ['l', 0.48, -0.33], ['c', 1.50, -1.02, 2.58, -1.89, 3.51, -2.82], ['c', 1.47, -1.47, 2.25, -2.85, 2.40, -4.26], ['c', 0.03, -0.39, 0.03, -1.17, -0.03, -1.71], ['z'], ['m', -0.66, 7.68], ['c', 0.03, -0.15, 0.03, -0.60, 0.03, -0.99], ['l', 0.00, -0.72], ['l', -0.27, 0.33], ['l', -1.74, 1.98], ['c', -1.77, 1.92, -2.43, 2.76, -2.97, 3.90], ['c', -0.51, 1.02, -0.72, 1.77, -0.75, 2.91], ['c', 0.00, 0.63, 0.00, 0.63, 0.06, 0.60], ['c', 0.03, -0.03, 0.30, -0.27, 0.63, -0.54], ['c', 0.66, -0.60, 1.86, -1.80, 2.31, -2.31], ['c', 1.65, -1.89, 2.52, -3.54, 2.70, -5.16], ['z']], w: 8.485, h: 32.932 },\n\t'clefs.C': { d: [['M', 0.06, -14.94], ['l', 0.09, -0.06], ['l', 1.92, 0.00], ['l', 1.92, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 14.85], ['l', 0.00, 14.82], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.92, 0.00], ['l', -1.92, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -14.82], ['l', 0.00, -14.85], ['z'], ['m', 5.37, 0.00], ['c', 0.09, -0.06, 0.09, -0.06, 0.57, -0.06], ['c', 0.45, 0.00, 0.45, 0.00, 0.54, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.14], ['l', 0.00, 7.11], ['l', 0.09, -0.06], ['c', 0.18, -0.18, 0.72, -0.84, 0.96, -1.20], ['c', 0.30, -0.45, 0.66, -1.17, 0.84, -1.65], ['c', 0.36, -0.90, 0.57, -1.83, 0.60, -2.79], ['c', 0.03, -0.48, 0.03, -0.54, 0.09, -0.63], ['c', 0.12, -0.18, 0.36, -0.21, 0.54, -0.12], ['c', 0.18, 0.09, 0.21, 0.15, 0.24, 0.66], ['c', 0.06, 0.87, 0.21, 1.56, 0.57, 2.22], ['c', 0.51, 1.02, 1.26, 1.68, 2.22, 1.92], ['c', 0.21, 0.06, 0.33, 0.06, 0.78, 0.06], ['c', 0.45, 0.00, 0.57, 0.00, 0.84, -0.06], ['c', 0.45, -0.12, 0.81, -0.33, 1.08, -0.60], ['c', 0.57, -0.57, 0.87, -1.41, 0.99, -2.88], ['c', 0.06, -0.54, 0.06, -3.00, 0.00, -3.57], ['c', -0.21, -2.58, -0.84, -3.87, -2.16, -4.50], ['c', -0.48, -0.21, -1.17, -0.36, -1.77, -0.36], ['c', -0.69, 0.00, -1.29, 0.27, -1.50, 0.72], ['c', -0.06, 0.15, -0.06, 0.21, -0.06, 0.42], ['c', 0.00, 0.24, 0.00, 0.30, 0.06, 0.45], ['c', 0.12, 0.24, 0.24, 0.39, 0.63, 0.66], ['c', 0.42, 0.30, 0.57, 0.48, 0.69, 0.72], ['c', 0.06, 0.15, 0.06, 0.21, 0.06, 0.48], ['c', 0.00, 0.39, -0.03, 0.63, -0.21, 0.96], ['c', -0.30, 0.60, -0.87, 1.08, -1.50, 1.26], ['c', -0.27, 0.06, -0.87, 0.06, -1.14, 0.00], ['c', -0.78, -0.24, -1.44, -0.87, -1.65, -1.68], ['c', -0.12, -0.42, -0.09, -1.17, 0.09, -1.71], ['c', 0.51, -1.65, 1.98, -2.82, 3.81, -3.09], ['c', 0.84, -0.09, 2.46, 0.03, 3.51, 0.27], ['c', 2.22, 0.57, 3.69, 1.80, 4.44, 3.75], ['c', 0.36, 0.93, 0.57, 2.13, 0.57, 3.36], ['c', 0.00, 1.44, -0.48, 2.73, -1.38, 3.81], ['c', -1.26, 1.50, -3.27, 2.43, -5.28, 2.43], ['c', -0.48, 0.00, -0.51, 0.00, -0.75, -0.09], ['c', -0.15, -0.03, -0.48, -0.21, -0.78, -0.36], ['c', -0.69, -0.36, -0.87, -0.42, -1.26, -0.42], ['c', -0.27, 0.00, -0.30, 0.00, -0.51, 0.09], ['c', -0.57, 0.30, -0.81, 0.90, -0.81, 2.10], ['c', 0.00, 1.23, 0.24, 1.83, 0.81, 2.13], ['c', 0.21, 0.09, 0.24, 0.09, 0.51, 0.09], ['c', 0.39, 0.00, 0.57, -0.06, 1.26, -0.42], ['c', 0.30, -0.15, 0.63, -0.33, 0.78, -0.36], ['c', 0.24, -0.09, 0.27, -0.09, 0.75, -0.09], ['c', 2.01, 0.00, 4.02, 0.93, 5.28, 2.40], ['c', 0.90, 1.11, 1.38, 2.40, 1.38, 3.84], ['c', 0.00, 1.50, -0.30, 2.88, -0.84, 3.96], ['c', -0.78, 1.59, -2.19, 2.64, -4.17, 3.15], ['c', -1.05, 0.24, -2.67, 0.36, -3.51, 0.27], ['c', -1.83, -0.27, -3.30, -1.44, -3.81, -3.09], ['c', -0.18, -0.54, -0.21, -1.29, -0.09, -1.74], ['c', 0.15, -0.60, 0.63, -1.20, 1.23, -1.47], ['c', 0.36, -0.18, 0.57, -0.21, 0.99, -0.21], ['c', 0.42, 0.00, 0.63, 0.03, 1.02, 0.21], ['c', 0.42, 0.21, 0.84, 0.63, 1.05, 1.05], ['c', 0.18, 0.36, 0.21, 0.60, 0.21, 0.96], ['c', 0.00, 0.30, 0.00, 0.36, -0.06, 0.51], ['c', -0.12, 0.24, -0.27, 0.42, -0.69, 0.72], ['c', -0.57, 0.42, -0.69, 0.63, -0.69, 1.08], ['c', 0.00, 0.24, 0.00, 0.30, 0.06, 0.45], ['c', 0.12, 0.21, 0.30, 0.39, 0.57, 0.54], ['c', 0.42, 0.18, 0.87, 0.21, 1.53, 0.15], ['c', 1.08, -0.15, 1.80, -0.57, 2.34, -1.32], ['c', 0.54, -0.75, 0.84, -1.83, 0.99, -3.51], ['c', 0.06, -0.57, 0.06, -3.03, 0.00, -3.57], ['c', -0.12, -1.47, -0.42, -2.31, -0.99, -2.88], ['c', -0.27, -0.27, -0.63, -0.48, -1.08, -0.60], ['c', -0.27, -0.06, -0.39, -0.06, -0.84, -0.06], ['c', -0.45, 0.00, -0.57, 0.00, -0.78, 0.06], ['c', -1.14, 0.27, -2.01, 1.17, -2.46, 2.49], ['c', -0.21, 0.57, -0.30, 0.99, -0.33, 1.65], ['c', -0.03, 0.51, -0.06, 0.57, -0.24, 0.66], ['c', -0.12, 0.06, -0.27, 0.06, -0.39, 0.00], ['c', -0.21, -0.09, -0.21, -0.15, -0.24, -0.75], ['c', -0.09, -1.92, -0.78, -3.72, -2.01, -5.19], ['c', -0.18, -0.21, -0.36, -0.42, -0.39, -0.45], ['l', -0.09, -0.06], ['l', 0.00, 7.11], ['l', 0.00, 7.14], ['l', -0.06, 0.09], ['c', -0.09, 0.06, -0.09, 0.06, -0.54, 0.06], ['c', -0.48, 0.00, -0.48, 0.00, -0.57, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -14.82], ['l', 0.00, -14.85], ['z']], w: 20.31, h: 29.97 },\n\t'clefs.F': { d: [['M', 6.30, -7.80], ['c', 0.36, -0.03, 1.65, 0.00, 2.13, 0.03], ['c', 3.60, 0.42, 6.03, 2.10, 6.93, 4.86], ['c', 0.27, 0.84, 0.36, 1.50, 0.36, 2.58], ['c', 0.00, 0.90, -0.03, 1.35, -0.18, 2.16], ['c', -0.78, 3.78, -3.54, 7.08, -8.37, 9.96], ['c', -1.74, 1.05, -3.87, 2.13, -6.18, 3.12], ['c', -0.39, 0.18, -0.75, 0.33, -0.81, 0.36], ['c', -0.06, 0.03, -0.15, 0.06, -0.18, 0.06], ['c', -0.15, 0.00, -0.33, -0.18, -0.33, -0.33], ['c', 0.00, -0.15, 0.06, -0.21, 0.51, -0.48], ['c', 3.00, -1.77, 5.13, -3.21, 6.84, -4.74], ['c', 0.51, -0.45, 1.59, -1.50, 1.95, -1.95], ['c', 1.89, -2.19, 2.88, -4.32, 3.15, -6.78], ['c', 0.06, -0.42, 0.06, -1.77, 0.00, -2.19], ['c', -0.24, -2.01, -0.93, -3.63, -2.04, -4.71], ['c', -0.63, -0.63, -1.29, -1.02, -2.07, -1.20], ['c', -1.62, -0.39, -3.36, 0.15, -4.56, 1.44], ['c', -0.54, 0.60, -1.05, 1.47, -1.32, 2.22], ['l', -0.09, 0.21], ['l', 0.24, -0.12], ['c', 0.39, -0.21, 0.63, -0.24, 1.11, -0.24], ['c', 0.30, 0.00, 0.45, 0.00, 0.66, 0.06], ['c', 1.92, 0.48, 2.85, 2.55, 1.95, 4.38], ['c', -0.45, 0.99, -1.41, 1.62, -2.46, 1.71], ['c', -1.47, 0.09, -2.91, -0.87, -3.39, -2.25], ['c', -0.18, -0.57, -0.21, -1.32, -0.03, -2.28], ['c', 0.39, -2.25, 1.83, -4.20, 3.81, -5.19], ['c', 0.69, -0.36, 1.59, -0.60, 2.37, -0.69], ['z'], ['m', 11.58, 2.52], ['c', 0.84, -0.21, 1.71, 0.30, 1.89, 1.14], ['c', 0.30, 1.17, -0.72, 2.19, -1.89, 1.89], ['c', -0.99, -0.21, -1.50, -1.32, -1.02, -2.25], ['c', 0.18, -0.39, 0.60, -0.69, 1.02, -0.78], ['z'], ['m', 0.00, 7.50], ['c', 0.84, -0.21, 1.71, 0.30, 1.89, 1.14], ['c', 0.21, 0.87, -0.30, 1.71, -1.14, 1.89], ['c', -0.87, 0.21, -1.71, -0.30, -1.89, -1.14], ['c', -0.21, -0.84, 0.30, -1.71, 1.14, -1.89], ['z']], w: 20.153, h: 23.142 },\n\t'clefs.G': { d: [['M', 9.69, -37.41], ['c', 0.09, -0.09, 0.24, -0.06, 0.36, 0.00], ['c', 0.12, 0.09, 0.57, 0.60, 0.96, 1.11], ['c', 1.77, 2.34, 3.21, 5.85, 3.57, 8.73], ['c', 0.21, 1.56, 0.03, 3.27, -0.45, 4.86], ['c', -0.69, 2.31, -1.92, 4.47, -4.23, 7.44], ['c', -0.30, 0.39, -0.57, 0.72, -0.60, 0.75], ['c', -0.03, 0.06, 0.00, 0.15, 0.18, 0.78], ['c', 0.54, 1.68, 1.38, 4.44, 1.68, 5.49], ['l', 0.09, 0.42], ['l', 0.39, 0.00], ['c', 1.47, 0.09, 2.76, 0.51, 3.96, 1.29], ['c', 1.83, 1.23, 3.06, 3.21, 3.39, 5.52], ['c', 0.09, 0.45, 0.12, 1.29, 0.06, 1.74], ['c', -0.09, 1.02, -0.33, 1.83, -0.75, 2.73], ['c', -0.84, 1.71, -2.28, 3.06, -4.02, 3.72], ['l', -0.33, 0.12], ['l', 0.03, 1.26], ['c', 0.00, 1.74, -0.06, 3.63, -0.21, 4.62], ['c', -0.45, 3.06, -2.19, 5.49, -4.47, 6.21], ['c', -0.57, 0.18, -0.90, 0.21, -1.59, 0.21], ['c', -0.69, 0.00, -1.02, -0.03, -1.65, -0.21], ['c', -1.14, -0.27, -2.13, -0.84, -2.94, -1.65], ['c', -0.99, -0.99, -1.56, -2.16, -1.71, -3.54], ['c', -0.09, -0.81, 0.06, -1.53, 0.45, -2.13], ['c', 0.63, -0.99, 1.83, -1.56, 3.00, -1.53], ['c', 1.50, 0.09, 2.64, 1.32, 2.73, 2.94], ['c', 0.06, 1.47, -0.93, 2.70, -2.37, 2.97], ['c', -0.45, 0.06, -0.84, 0.03, -1.29, -0.09], ['l', -0.21, -0.09], ['l', 0.09, 0.12], ['c', 0.39, 0.54, 0.78, 0.93, 1.32, 1.26], ['c', 1.35, 0.87, 3.06, 1.02, 4.35, 0.36], ['c', 1.44, -0.72, 2.52, -2.28, 2.97, -4.35], ['c', 0.15, -0.66, 0.24, -1.50, 0.30, -3.03], ['c', 0.03, -0.84, 0.03, -2.94, 0.00, -3.00], ['c', -0.03, 0.00, -0.18, 0.00, -0.36, 0.03], ['c', -0.66, 0.12, -0.99, 0.12, -1.83, 0.12], ['c', -1.05, 0.00, -1.71, -0.06, -2.61, -0.30], ['c', -4.02, -0.99, -7.11, -4.35, -7.80, -8.46], ['c', -0.12, -0.66, -0.12, -0.99, -0.12, -1.83], ['c', 0.00, -0.84, 0.00, -1.14, 0.15, -1.92], ['c', 0.36, -2.28, 1.41, -4.62, 3.30, -7.29], ['l', 2.79, -3.60], ['c', 0.54, -0.66, 0.96, -1.20, 0.96, -1.23], ['c', 0.00, -0.03, -0.09, -0.33, -0.18, -0.69], ['c', -0.96, -3.21, -1.41, -5.28, -1.59, -7.68], ['c', -0.12, -1.38, -0.15, -3.09, -0.06, -3.96], ['c', 0.33, -2.67, 1.38, -5.07, 3.12, -7.08], ['c', 0.36, -0.42, 0.99, -1.05, 1.17, -1.14], ['z'], ['m', 2.01, 4.71], ['c', -0.15, -0.30, -0.30, -0.54, -0.30, -0.54], ['c', -0.03, 0.00, -0.18, 0.09, -0.30, 0.21], ['c', -2.40, 1.74, -3.87, 4.20, -4.26, 7.11], ['c', -0.06, 0.54, -0.06, 1.41, -0.03, 1.89], ['c', 0.09, 1.29, 0.48, 3.12, 1.08, 5.22], ['c', 0.15, 0.42, 0.24, 0.78, 0.24, 0.81], ['c', 0.00, 0.03, 0.84, -1.11, 1.23, -1.68], ['c', 1.89, -2.73, 2.88, -5.07, 3.15, -7.53], ['c', 0.09, -0.57, 0.12, -1.74, 0.06, -2.37], ['c', -0.09, -1.23, -0.27, -1.92, -0.87, -3.12], ['z'], ['m', -2.94, 20.70], ['c', -0.21, -0.72, -0.39, -1.32, -0.42, -1.32], ['c', 0.00, 0.00, -1.20, 1.47, -1.86, 2.37], ['c', -2.79, 3.63, -4.02, 6.30, -4.35, 9.30], ['c', -0.03, 0.21, -0.03, 0.69, -0.03, 1.08], ['c', 0.00, 0.69, 0.00, 0.75, 0.06, 1.11], ['c', 0.12, 0.54, 0.27, 0.99, 0.51, 1.47], ['c', 0.69, 1.38, 1.83, 2.55, 3.42, 3.42], ['c', 0.96, 0.54, 2.07, 0.90, 3.21, 1.08], ['c', 0.78, 0.12, 2.04, 0.12, 2.94, -0.03], ['c', 0.51, -0.06, 0.45, -0.03, 0.42, -0.30], ['c', -0.24, -3.33, -0.72, -6.33, -1.62, -10.08], ['c', -0.09, -0.39, -0.18, -0.75, -0.18, -0.78], ['c', -0.03, -0.03, -0.42, 0.00, -0.81, 0.09], ['c', -0.90, 0.18, -1.65, 0.57, -2.22, 1.14], ['c', -0.72, 0.72, -1.08, 1.65, -1.05, 2.64], ['c', 0.06, 0.96, 0.48, 1.83, 1.23, 2.58], ['c', 0.36, 0.36, 0.72, 0.63, 1.17, 0.90], ['c', 0.33, 0.18, 0.36, 0.21, 0.42, 0.33], ['c', 0.18, 0.42, -0.18, 0.90, -0.60, 0.87], ['c', -0.18, -0.03, -0.84, -0.36, -1.26, -0.63], ['c', -0.78, -0.51, -1.38, -1.11, -1.86, -1.83], ['c', -1.77, -2.70, -0.99, -6.42, 1.71, -8.19], ['c', 0.30, -0.21, 0.81, -0.48, 1.17, -0.63], ['c', 0.30, -0.09, 1.02, -0.30, 1.14, -0.30], ['c', 0.06, 0.00, 0.09, 0.00, 0.09, -0.03], ['c', 0.03, -0.03, -0.51, -1.92, -1.23, -4.26], ['z'], ['m', 3.78, 7.41], ['c', -0.18, -0.03, -0.36, -0.06, -0.39, -0.06], ['c', -0.03, 0.00, 0.00, 0.21, 0.18, 1.02], ['c', 0.75, 3.18, 1.26, 6.30, 1.50, 9.09], ['c', 0.06, 0.72, 0.00, 0.69, 0.51, 0.42], ['c', 0.78, -0.36, 1.44, -0.96, 1.98, -1.77], ['c', 1.08, -1.62, 1.20, -3.69, 0.30, -5.55], ['c', -0.81, -1.62, -2.31, -2.79, -4.08, -3.15], ['z']], w: 19.051, h: 57.057 },\n\t'clefs.perc': { d: [['M', 5.07, -7.44], ['l', 0.09, -0.06], ['l', 1.53, 0.00], ['l', 1.53, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.35], ['l', 0.00, 7.32], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.53, 0.00], ['l', -1.53, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -7.32], ['l', 0.00, -7.35], ['z'], ['m', 6.63, 0.00], ['l', 0.09, -0.06], ['l', 1.53, 0.00], ['l', 1.53, 0.00], ['l', 0.09, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 7.35], ['l', 0.00, 7.32], ['l', -0.06, 0.09], ['l', -0.09, 0.06], ['l', -1.53, 0.00], ['l', -1.53, 0.00], ['l', -0.09, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -7.32], ['l', 0.00, -7.35], ['z']], w: 21, h: 14.97 },\n\t'tab.big': { d: [['M', 20.16, -21.66], ['c', 0.24, -0.09, 0.66, 0.09, 0.78, 0.36], ['c', 0.09, 0.21, 0.09, 0.24, -0.18, 0.54], ['c', -0.78, 0.81, -1.86, 1.44, -2.94, 1.71], ['c', -0.87, 0.24, -1.71, 0.24, -2.55, 0.03], ['l', -0.06, -0.03], ['l', -0.18, 0.99], ['c', -0.33, 1.98, -0.75, 4.26, -0.96, 5.04], ['c', -0.42, 1.65, -1.26, 3.18, -2.28, 4.14], ['c', -0.57, 0.57, -1.17, 0.90, -1.86, 1.08], ['c', -0.18, 0.06, -0.33, 0.06, -0.66, 0.06], ['c', -0.54, 0.00, -0.78, -0.03, -1.23, -0.27], ['c', -0.39, -0.18, -0.66, -0.39, -1.38, -0.99], ['c', -0.30, -0.24, -0.66, -0.51, -0.75, -0.57], ['c', -0.21, -0.15, -0.27, -0.24, -0.24, -0.45], ['c', 0.06, -0.27, 0.36, -0.60, 0.60, -0.66], ['c', 0.18, -0.03, 0.33, 0.06, 0.90, 0.57], ['c', 0.48, 0.42, 0.72, 0.57, 0.93, 0.69], ['c', 0.66, 0.33, 1.38, 0.21, 1.95, -0.36], ['c', 0.63, -0.60, 1.05, -1.62, 1.23, -3.00], ['c', 0.03, -0.18, 0.09, -0.66, 0.09, -1.11], ['c', 0.09, -1.56, 0.33, -3.81, 0.57, -5.49], ['c', 0.06, -0.33, 0.09, -0.63, 0.09, -0.63], ['c', -0.03, -0.03, -0.81, -0.12, -1.02, -0.12], ['c', -0.57, 0.00, -1.32, 0.12, -1.80, 0.33], ['c', -0.87, 0.30, -1.35, 0.78, -1.50, 1.41], ['c', -0.18, 0.63, 0.09, 1.26, 0.66, 1.65], ['c', 0.12, 0.06, 0.15, 0.12, 0.18, 0.24], ['c', 0.09, 0.27, 0.06, 0.57, -0.09, 0.75], ['c', -0.03, 0.06, -0.12, 0.09, -0.27, 0.15], ['c', -0.72, 0.21, -1.44, 0.15, -2.10, -0.18], ['c', -0.54, -0.27, -0.96, -0.66, -1.20, -1.14], ['c', -0.39, -0.75, -0.33, -1.74, 0.15, -2.52], ['c', 0.27, -0.42, 0.84, -0.93, 1.41, -1.23], ['c', 1.17, -0.57, 2.88, -0.90, 4.80, -0.90], ['c', 0.69, 0.00, 0.78, 0.00, 1.08, 0.06], ['c', 0.45, 0.09, 1.11, 0.30, 2.07, 0.60], ['c', 1.47, 0.48, 1.83, 0.57, 2.55, 0.54], ['c', 1.02, -0.06, 2.04, -0.45, 2.94, -1.11], ['c', 0.12, -0.09, 0.24, -0.18, 0.27, -0.18], ['z'], ['m', -5.88, 13.05], ['c', 0.21, -0.03, 0.81, 0.00, 1.08, 0.06], ['c', 0.48, 0.12, 0.90, 0.42, 0.99, 0.69], ['c', 0.03, 0.09, 0.03, 0.15, 0.00, 0.27], ['c', 0.00, 0.09, -0.03, 0.57, -0.06, 1.08], ['c', -0.09, 2.19, -0.24, 5.76, -0.39, 8.28], ['c', -0.06, 1.53, -0.06, 1.77, 0.03, 2.01], ['c', 0.09, 0.18, 0.15, 0.24, 0.30, 0.30], ['c', 0.24, 0.12, 0.54, 0.06, 1.23, -0.27], ['c', 0.57, -0.27, 0.66, -0.30, 0.75, -0.24], ['c', 0.09, 0.06, 0.18, 0.30, 0.18, 0.45], ['c', 0.00, 0.33, -0.15, 0.51, -0.45, 0.63], ['c', -0.12, 0.03, -0.39, 0.15, -0.60, 0.27], ['c', -1.17, 0.60, -1.38, 0.69, -1.80, 0.72], ['c', -0.45, 0.03, -0.78, -0.09, -1.08, -0.39], ['c', -0.39, -0.42, -0.66, -1.20, -1.02, -3.12], ['c', -0.24, -1.23, -0.36, -2.07, -0.54, -3.75], ['l', 0.00, -0.18], ['l', -0.36, 0.45], ['c', -0.60, 0.75, -1.32, 1.59, -1.95, 2.25], ['c', -0.15, 0.18, -0.27, 0.30, -0.27, 0.33], ['c', 0.00, 0.00, 0.06, 0.09, 0.15, 0.18], ['c', 0.24, 0.33, 0.60, 0.57, 1.05, 0.69], ['c', 0.18, 0.06, 0.30, 0.06, 0.69, 0.06], ['l', 0.48, 0.03], ['l', 0.06, 0.12], ['c', 0.15, 0.27, 0.03, 0.72, -0.21, 0.90], ['c', -0.18, 0.12, -0.93, 0.27, -1.41, 0.27], ['c', -0.84, 0.00, -1.59, -0.30, -1.98, -0.84], ['l', -0.12, -0.15], ['l', -0.45, 0.42], ['c', -0.99, 0.87, -1.53, 1.32, -2.16, 1.74], ['c', -0.78, 0.51, -1.50, 0.84, -2.10, 0.93], ['c', -0.69, 0.12, -1.20, 0.03, -1.95, -0.42], ['c', -0.21, -0.12, -0.51, -0.27, -0.66, -0.36], ['c', -0.24, -0.12, -0.30, -0.18, -0.33, -0.24], ['c', -0.12, -0.27, 0.15, -0.78, 0.45, -0.93], ['c', 0.24, -0.12, 0.33, -0.09, 0.90, 0.18], ['c', 0.60, 0.30, 0.84, 0.39, 1.20, 0.36], ['c', 0.87, -0.09, 1.77, -0.69, 3.24, -2.31], ['c', 2.67, -2.85, 4.59, -5.94, 5.70, -9.15], ['c', 0.15, -0.45, 0.24, -0.63, 0.42, -0.81], ['c', 0.21, -0.24, 0.60, -0.45, 0.99, -0.51], ['z'], ['m', -3.99, 16.05], ['c', 0.18, 0.00, 0.69, -0.03, 1.17, 0.00], ['c', 3.27, 0.03, 5.37, 0.75, 6.00, 2.07], ['c', 0.45, 0.99, 0.12, 2.40, -0.81, 3.42], ['c', -0.24, 0.27, -0.57, 0.57, -0.84, 0.75], ['c', -0.09, 0.06, -0.18, 0.09, -0.18, 0.12], ['c', 0.00, 0.00, 0.18, 0.03, 0.42, 0.09], ['c', 1.23, 0.30, 2.01, 0.81, 2.37, 1.59], ['c', 0.27, 0.54, 0.30, 1.32, 0.09, 2.10], ['c', -0.12, 0.36, -0.45, 1.05, -0.69, 1.35], ['c', -0.87, 1.17, -2.10, 1.92, -3.54, 2.25], ['c', -0.36, 0.06, -0.48, 0.06, -0.96, 0.06], ['c', -0.45, 0.00, -0.66, 0.00, -0.84, -0.03], ['c', -0.84, -0.18, -1.47, -0.51, -2.07, -1.11], ['c', -0.33, -0.33, -0.45, -0.51, -0.45, -0.63], ['c', 0.00, -0.06, 0.03, -0.15, 0.06, -0.24], ['c', 0.18, -0.33, 0.69, -0.60, 0.93, -0.48], ['c', 0.03, 0.03, 0.15, 0.12, 0.27, 0.24], ['c', 0.39, 0.42, 0.99, 0.57, 1.62, 0.45], ['c', 1.05, -0.21, 1.98, -1.02, 2.31, -2.01], ['c', 0.48, -1.53, -0.48, -2.55, -2.58, -2.67], ['c', -0.21, 0.00, -0.36, -0.03, -0.42, -0.06], ['c', -0.15, -0.09, -0.21, -0.51, -0.06, -0.78], ['c', 0.12, -0.27, 0.24, -0.33, 0.60, -0.36], ['c', 0.57, -0.06, 1.11, -0.42, 1.50, -0.99], ['c', 0.48, -0.72, 0.54, -1.59, 0.18, -2.31], ['c', -0.12, -0.21, -0.45, -0.54, -0.69, -0.69], ['c', -0.33, -0.21, -0.93, -0.45, -1.35, -0.51], ['l', -0.12, -0.03], ['l', -0.06, 0.48], ['c', -0.54, 2.94, -1.14, 6.24, -1.29, 6.75], ['c', -0.33, 1.35, -0.93, 2.61, -1.65, 3.60], ['c', -0.30, 0.36, -0.81, 0.90, -1.14, 1.14], ['c', -0.30, 0.24, -0.84, 0.48, -1.14, 0.57], ['c', -0.33, 0.09, -0.96, 0.09, -1.26, 0.03], ['c', -0.45, -0.12, -0.87, -0.39, -1.53, -0.96], ['c', -0.24, -0.15, -0.51, -0.39, -0.63, -0.48], ['c', -0.30, -0.21, -0.33, -0.33, -0.21, -0.63], ['c', 0.12, -0.18, 0.27, -0.36, 0.42, -0.45], ['c', 0.27, -0.12, 0.36, -0.09, 0.87, 0.33], ['c', 0.78, 0.60, 1.08, 0.75, 1.65, 0.72], ['c', 0.45, -0.03, 0.81, -0.21, 1.17, -0.54], ['c', 0.87, -0.90, 1.38, -2.85, 1.38, -5.37], ['c', 0.00, -0.60, 0.03, -1.11, 0.12, -2.04], ['c', 0.06, -0.69, 0.24, -2.01, 0.33, -2.58], ['c', 0.06, -0.24, 0.06, -0.42, 0.06, -0.42], ['c', 0.00, 0.00, -0.12, 0.03, -0.21, 0.09], ['c', -1.44, 0.57, -2.16, 1.65, -1.74, 2.55], ['c', 0.09, 0.15, 0.18, 0.24, 0.27, 0.33], ['c', 0.24, 0.21, 0.30, 0.27, 0.33, 0.39], ['c', 0.06, 0.24, 0.00, 0.63, -0.15, 0.78], ['c', -0.09, 0.12, -0.54, 0.21, -0.96, 0.24], ['c', -1.02, 0.03, -2.01, -0.48, -2.43, -1.32], ['c', -0.21, -0.45, -0.27, -0.90, -0.15, -1.44], ['c', 0.06, -0.27, 0.21, -0.66, 0.39, -0.93], ['c', 0.87, -1.29, 3.00, -2.22, 5.64, -2.43], ['z']], w: 19.643, h: 43.325 },\n\t'tab.tiny': { d: [['M', 16.02, -17.25], ['c', 0.12, -0.09, 0.15, -0.09, 0.27, -0.09], ['c', 0.21, 0.03, 0.51, 0.30, 0.51, 0.45], ['c', 0.00, 0.06, -0.12, 0.18, -0.30, 0.36], ['c', -1.11, 1.08, -2.55, 1.59, -3.84, 1.41], ['c', -0.15, -0.03, -0.33, -0.06, -0.39, -0.09], ['c', -0.06, -0.03, -0.09, -0.03, -0.12, -0.03], ['c', 0.00, 0.00, -0.06, 0.42, -0.15, 0.93], ['c', -0.33, 2.01, -0.66, 3.69, -0.84, 4.26], ['c', -0.42, 1.41, -1.23, 2.67, -2.16, 3.33], ['c', -0.27, 0.18, -0.75, 0.42, -0.99, 0.48], ['c', -0.30, 0.09, -0.72, 0.09, -1.02, 0.06], ['c', -0.45, -0.09, -0.84, -0.33, -1.53, -0.90], ['c', -0.21, -0.18, -0.51, -0.39, -0.63, -0.48], ['c', -0.27, -0.21, -0.30, -0.24, -0.30, -0.36], ['c', 0.00, -0.12, 0.09, -0.36, 0.18, -0.45], ['c', 0.09, -0.09, 0.27, -0.18, 0.36, -0.18], ['c', 0.12, 0.00, 0.30, 0.12, 0.66, 0.45], ['c', 0.57, 0.51, 0.87, 0.69, 1.23, 0.72], ['c', 0.93, 0.06, 1.68, -0.78, 1.98, -2.37], ['c', 0.09, -0.39, 0.15, -0.75, 0.18, -1.53], ['c', 0.06, -0.99, 0.24, -2.79, 0.42, -4.05], ['c', 0.03, -0.30, 0.06, -0.57, 0.06, -0.60], ['c', 0.00, -0.06, -0.03, -0.09, -0.15, -0.12], ['c', -0.90, -0.18, -2.13, 0.06, -2.76, 0.57], ['c', -0.36, 0.30, -0.51, 0.60, -0.51, 1.02], ['c', 0.00, 0.45, 0.15, 0.75, 0.48, 0.99], ['c', 0.06, 0.06, 0.15, 0.18, 0.18, 0.24], ['c', 0.12, 0.24, 0.03, 0.63, -0.15, 0.69], ['c', -0.24, 0.12, -0.60, 0.15, -0.90, 0.15], ['c', -0.36, -0.03, -0.57, -0.09, -0.87, -0.24], ['c', -0.78, -0.36, -1.23, -1.11, -1.20, -1.92], ['c', 0.12, -1.53, 1.74, -2.49, 4.62, -2.70], ['c', 1.20, -0.09, 1.47, -0.03, 3.33, 0.57], ['c', 0.90, 0.30, 1.14, 0.36, 1.56, 0.39], ['c', 0.45, 0.00, 0.93, -0.06, 1.38, -0.21], ['c', 0.51, -0.18, 0.81, -0.33, 1.41, -0.75], ['z'], ['m', -4.68, 10.38], ['c', 0.39, -0.06, 0.84, 0.00, 1.20, 0.15], ['c', 0.24, 0.12, 0.36, 0.21, 0.45, 0.36], ['l', 0.09, 0.09], ['l', -0.06, 1.41], ['c', -0.09, 2.19, -0.18, 3.96, -0.27, 5.49], ['c', -0.03, 0.78, -0.06, 1.59, -0.06, 1.86], ['c', 0.00, 0.42, 0.00, 0.48, 0.06, 0.57], ['c', 0.06, 0.18, 0.18, 0.24, 0.36, 0.27], ['c', 0.18, 0.00, 0.39, -0.06, 0.84, -0.27], ['c', 0.45, -0.21, 0.54, -0.24, 0.63, -0.18], ['c', 0.12, 0.12, 0.15, 0.54, 0.03, 0.69], ['c', -0.03, 0.03, -0.15, 0.12, -0.27, 0.18], ['c', -0.15, 0.03, -0.30, 0.12, -0.36, 0.15], ['c', -0.87, 0.45, -1.02, 0.51, -1.26, 0.57], ['c', -0.33, 0.09, -0.60, 0.06, -0.84, -0.06], ['c', -0.42, -0.18, -0.63, -0.60, -0.87, -1.44], ['c', -0.30, -1.23, -0.57, -2.97, -0.66, -4.08], ['c', 0.00, -0.18, -0.03, -0.30, -0.03, -0.33], ['l', -0.06, 0.06], ['c', -0.18, 0.27, -1.11, 1.38, -1.68, 2.01], ['l', -0.33, 0.33], ['l', 0.06, 0.09], ['c', 0.06, 0.15, 0.27, 0.33, 0.48, 0.42], ['c', 0.27, 0.18, 0.51, 0.24, 0.96, 0.27], ['l', 0.39, 0.00], ['l', 0.03, 0.12], ['c', 0.12, 0.21, 0.03, 0.57, -0.15, 0.69], ['c', -0.03, 0.03, -0.21, 0.09, -0.36, 0.15], ['c', -0.27, 0.06, -0.39, 0.06, -0.75, 0.06], ['c', -0.48, 0.00, -0.75, -0.03, -1.08, -0.21], ['c', -0.21, -0.12, -0.51, -0.36, -0.57, -0.48], ['l', -0.03, -0.09], ['l', -0.39, 0.36], ['c', -1.47, 1.35, -2.49, 1.98, -3.42, 2.13], ['c', -0.54, 0.09, -0.96, -0.03, -1.62, -0.39], ['c', -0.21, -0.15, -0.45, -0.27, -0.54, -0.30], ['c', -0.18, -0.09, -0.21, -0.21, -0.12, -0.45], ['c', 0.06, -0.27, 0.33, -0.48, 0.54, -0.48], ['c', 0.03, 0.00, 0.27, 0.09, 0.48, 0.21], ['c', 0.48, 0.24, 0.69, 0.27, 0.99, 0.27], ['c', 0.60, -0.06, 1.17, -0.42, 2.10, -1.35], ['c', 2.22, -2.22, 4.02, -4.98, 4.95, -7.59], ['c', 0.21, -0.57, 0.30, -0.78, 0.48, -0.93], ['c', 0.15, -0.15, 0.42, -0.27, 0.66, -0.33], ['z'], ['m', -3.06, 12.84], ['c', 0.27, -0.03, 1.68, 0.00, 2.01, 0.03], ['c', 1.92, 0.18, 3.15, 0.69, 3.63, 1.50], ['c', 0.18, 0.33, 0.24, 0.51, 0.21, 0.93], ['c', 0.00, 0.45, -0.06, 0.72, -0.24, 1.11], ['c', -0.24, 0.51, -0.69, 1.02, -1.17, 1.35], ['c', -0.21, 0.15, -0.21, 0.15, -0.12, 0.18], ['c', 0.72, 0.15, 1.11, 0.30, 1.50, 0.57], ['c', 0.39, 0.24, 0.63, 0.57, 0.75, 0.96], ['c', 0.09, 0.30, 0.09, 0.96, 0.00, 1.29], ['c', -0.15, 0.57, -0.39, 1.05, -0.78, 1.50], ['c', -0.66, 0.75, -1.62, 1.32, -2.61, 1.53], ['c', -0.27, 0.06, -0.42, 0.06, -0.84, 0.06], ['c', -0.48, 0.00, -0.57, 0.00, -0.81, -0.06], ['c', -0.60, -0.18, -1.05, -0.42, -1.47, -0.81], ['c', -0.36, -0.39, -0.42, -0.51, -0.30, -0.75], ['c', 0.12, -0.21, 0.39, -0.39, 0.60, -0.39], ['c', 0.09, 0.00, 0.15, 0.03, 0.33, 0.18], ['c', 0.12, 0.12, 0.27, 0.24, 0.36, 0.27], ['c', 0.96, 0.48, 2.46, -0.33, 2.82, -1.50], ['c', 0.24, -0.81, -0.03, -1.44, -0.69, -1.77], ['c', -0.39, -0.21, -1.02, -0.33, -1.53, -0.33], ['c', -0.18, 0.00, -0.21, 0.00, -0.27, -0.09], ['c', -0.06, -0.09, -0.06, -0.30, -0.03, -0.48], ['c', 0.06, -0.18, 0.18, -0.36, 0.33, -0.36], ['c', 0.39, -0.06, 0.51, -0.09, 0.72, -0.18], ['c', 0.69, -0.36, 1.11, -1.23, 0.99, -2.01], ['c', -0.09, -0.51, -0.42, -0.90, -0.93, -1.17], ['c', -0.24, -0.12, -0.60, -0.27, -0.87, -0.30], ['c', -0.09, -0.03, -0.09, -0.03, -0.12, 0.12], ['c', 0.00, 0.09, -0.21, 1.11, -0.42, 2.25], ['c', -0.66, 3.75, -0.72, 3.99, -1.26, 5.07], ['c', -0.90, 1.89, -2.25, 2.85, -3.48, 2.61], ['c', -0.39, -0.09, -0.69, -0.27, -1.38, -0.84], ['c', -0.63, -0.51, -0.63, -0.48, -0.63, -0.60], ['c', 0.00, -0.18, 0.18, -0.48, 0.39, -0.57], ['c', 0.21, -0.12, 0.30, -0.09, 0.81, 0.33], ['c', 0.15, 0.15, 0.39, 0.30, 0.54, 0.36], ['c', 0.18, 0.12, 0.27, 0.12, 0.48, 0.15], ['c', 0.99, 0.06, 1.71, -0.78, 2.04, -2.46], ['c', 0.12, -0.66, 0.18, -1.14, 0.21, -2.22], ['c', 0.03, -1.23, 0.12, -2.25, 0.36, -3.63], ['c', 0.03, -0.24, 0.06, -0.45, 0.06, -0.48], ['c', -0.06, -0.03, -0.66, 0.27, -0.90, 0.42], ['c', -0.06, 0.06, -0.21, 0.18, -0.33, 0.30], ['c', -0.57, 0.57, -0.60, 1.35, -0.06, 1.74], ['c', 0.18, 0.12, 0.24, 0.24, 0.21, 0.51], ['c', -0.03, 0.30, -0.15, 0.42, -0.57, 0.48], ['c', -1.11, 0.24, -2.22, -0.42, -2.43, -1.38], ['c', -0.09, -0.45, 0.03, -1.02, 0.30, -1.47], ['c', 0.18, -0.24, 0.60, -0.63, 0.90, -0.84], ['c', 0.90, -0.60, 2.28, -1.02, 3.69, -1.11], ['z']], w: 15.709, h: 34.656 },\n\t'timesig.common': { d: [['M', 6.66, -7.83], ['c', 0.72, -0.06, 1.41, -0.03, 1.98, 0.09], ['c', 1.20, 0.27, 2.34, 0.96, 3.09, 1.92], ['c', 0.63, 0.81, 1.08, 1.86, 1.14, 2.73], ['c', 0.06, 1.02, -0.51, 1.92, -1.44, 2.22], ['c', -0.24, 0.09, -0.30, 0.09, -0.63, 0.09], ['c', -0.33, 0.00, -0.42, 0.00, -0.63, -0.06], ['c', -0.66, -0.24, -1.14, -0.63, -1.41, -1.20], ['c', -0.15, -0.30, -0.21, -0.51, -0.24, -0.90], ['c', -0.06, -1.08, 0.57, -2.04, 1.56, -2.37], ['c', 0.18, -0.06, 0.27, -0.06, 0.63, -0.06], ['l', 0.45, 0.00], ['c', 0.06, 0.03, 0.09, 0.03, 0.09, 0.00], ['c', 0.00, 0.00, -0.09, -0.12, -0.24, -0.27], ['c', -1.02, -1.11, -2.55, -1.68, -4.08, -1.50], ['c', -1.29, 0.15, -2.04, 0.69, -2.40, 1.74], ['c', -0.36, 0.93, -0.42, 1.89, -0.42, 5.37], ['c', 0.00, 2.97, 0.06, 3.96, 0.24, 4.77], ['c', 0.24, 1.08, 0.63, 1.68, 1.41, 2.07], ['c', 0.81, 0.39, 2.16, 0.45, 3.18, 0.09], ['c', 1.29, -0.45, 2.37, -1.53, 3.03, -2.97], ['c', 0.15, -0.33, 0.33, -0.87, 0.39, -1.17], ['c', 0.09, -0.24, 0.15, -0.36, 0.30, -0.39], ['c', 0.21, -0.03, 0.42, 0.15, 0.39, 0.36], ['c', -0.06, 0.39, -0.42, 1.38, -0.69, 1.89], ['c', -0.96, 1.80, -2.49, 2.94, -4.23, 3.18], ['c', -0.99, 0.12, -2.58, -0.06, -3.63, -0.45], ['c', -0.96, -0.36, -1.71, -0.84, -2.40, -1.50], ['c', -1.11, -1.11, -1.80, -2.61, -2.04, -4.56], ['c', -0.06, -0.60, -0.06, -2.01, 0.00, -2.61], ['c', 0.24, -1.95, 0.90, -3.45, 2.01, -4.56], ['c', 0.69, -0.66, 1.44, -1.11, 2.37, -1.47], ['c', 0.63, -0.24, 1.47, -0.42, 2.22, -0.48], ['z']], w: 13.038, h: 15.689 },\n\t'timesig.cut': { d: [['M', 6.24, -10.44], ['c', 0.09, -0.06, 0.09, -0.06, 0.48, -0.06], ['c', 0.36, 0.00, 0.36, 0.00, 0.45, 0.06], ['l', 0.06, 0.09], ['l', 0.00, 1.23], ['l', 0.00, 1.26], ['l', 0.27, 0.00], ['c', 1.26, 0.00, 2.49, 0.45, 3.48, 1.29], ['c', 1.05, 0.87, 1.80, 2.28, 1.89, 3.48], ['c', 0.06, 1.02, -0.51, 1.92, -1.44, 2.22], ['c', -0.24, 0.09, -0.30, 0.09, -0.63, 0.09], ['c', -0.33, 0.00, -0.42, 0.00, -0.63, -0.06], ['c', -0.66, -0.24, -1.14, -0.63, -1.41, -1.20], ['c', -0.15, -0.30, -0.21, -0.51, -0.24, -0.90], ['c', -0.06, -1.08, 0.57, -2.04, 1.56, -2.37], ['c', 0.18, -0.06, 0.27, -0.06, 0.63, -0.06], ['l', 0.45, 0.00], ['c', 0.06, 0.03, 0.09, 0.03, 0.09, 0.00], ['c', 0.00, -0.03, -0.45, -0.51, -0.66, -0.69], ['c', -0.87, -0.69, -1.83, -1.05, -2.94, -1.11], ['l', -0.42, 0.00], ['l', 0.00, 7.17], ['l', 0.00, 7.14], ['l', 0.42, 0.00], ['c', 0.69, -0.03, 1.23, -0.18, 1.86, -0.51], ['c', 1.05, -0.51, 1.89, -1.47, 2.46, -2.70], ['c', 0.15, -0.33, 0.33, -0.87, 0.39, -1.17], ['c', 0.09, -0.24, 0.15, -0.36, 0.30, -0.39], ['c', 0.21, -0.03, 0.42, 0.15, 0.39, 0.36], ['c', -0.03, 0.24, -0.21, 0.78, -0.39, 1.20], ['c', -0.96, 2.37, -2.94, 3.90, -5.13, 3.90], ['l', -0.30, 0.00], ['l', 0.00, 1.26], ['l', 0.00, 1.23], ['l', -0.06, 0.09], ['c', -0.09, 0.06, -0.09, 0.06, -0.45, 0.06], ['c', -0.39, 0.00, -0.39, 0.00, -0.48, -0.06], ['l', -0.06, -0.09], ['l', 0.00, -1.29], ['l', 0.00, -1.29], ['l', -0.21, -0.03], ['c', -1.23, -0.21, -2.31, -0.63, -3.21, -1.29], ['c', -0.15, -0.09, -0.45, -0.36, -0.66, -0.57], ['c', -1.11, -1.11, -1.80, -2.61, -2.04, -4.56], ['c', -0.06, -0.60, -0.06, -2.01, 0.00, -2.61], ['c', 0.24, -1.95, 0.93, -3.45, 2.04, -4.59], ['c', 0.42, -0.39, 0.78, -0.66, 1.26, -0.93], ['c', 0.75, -0.45, 1.65, -0.75, 2.61, -0.90], ['l', 0.21, -0.03], ['l', 0.00, -1.29], ['l', 0.00, -1.29], ['z'], ['m', -0.06, 10.44], ['c', 0.00, -5.58, 0.00, -6.99, -0.03, -6.99], ['c', -0.15, 0.00, -0.63, 0.27, -0.87, 0.45], ['c', -0.45, 0.36, -0.75, 0.93, -0.93, 1.77], ['c', -0.18, 0.81, -0.24, 1.80, -0.24, 4.74], ['c', 0.00, 2.97, 0.06, 3.96, 0.24, 4.77], ['c', 0.24, 1.08, 0.66, 1.68, 1.41, 2.07], ['c', 0.12, 0.06, 0.30, 0.12, 0.33, 0.15], ['l', 0.09, 0.00], ['l', 0.00, -6.96], ['z']], w: 13.038, h: 20.97 },\n\t'timesig.imperfectum': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.imperfectum2': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.perfectum': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'timesig.perfectum2': { d: [['M', 13, -5], ['a', 8, 8, 0, 1, 0, 0, 10]], w: 13.038, h: 20.97 },\n\t'f': { d: [['M', 9.93, -14.28], ['c', 1.53, -0.18, 2.88, 0.45, 3.12, 1.50], ['c', 0.12, 0.51, 0.00, 1.32, -0.27, 1.86], ['c', -0.15, 0.30, -0.42, 0.57, -0.63, 0.69], ['c', -0.69, 0.36, -1.56, 0.03, -1.83, -0.69], ['c', -0.09, -0.24, -0.09, -0.69, 0.00, -0.87], ['c', 0.06, -0.12, 0.21, -0.24, 0.45, -0.42], ['c', 0.42, -0.24, 0.57, -0.45, 0.60, -0.72], ['c', 0.03, -0.33, -0.09, -0.39, -0.63, -0.42], ['c', -0.30, 0.00, -0.45, 0.00, -0.60, 0.03], ['c', -0.81, 0.21, -1.35, 0.93, -1.74, 2.46], ['c', -0.06, 0.27, -0.48, 2.25, -0.48, 2.31], ['c', 0.00, 0.03, 0.39, 0.03, 0.90, 0.03], ['c', 0.72, 0.00, 0.90, 0.00, 0.99, 0.06], ['c', 0.42, 0.15, 0.45, 0.72, 0.03, 0.90], ['c', -0.12, 0.06, -0.24, 0.06, -1.17, 0.06], ['l', -1.05, 0.00], ['l', -0.78, 2.55], ['c', -0.45, 1.41, -0.87, 2.79, -0.96, 3.06], ['c', -0.87, 2.37, -2.37, 4.74, -3.78, 5.91], ['c', -1.05, 0.90, -2.04, 1.23, -3.09, 1.08], ['c', -1.11, -0.18, -1.89, -0.78, -2.04, -1.59], ['c', -0.12, -0.66, 0.15, -1.71, 0.54, -2.19], ['c', 0.69, -0.75, 1.86, -0.54, 2.22, 0.39], ['c', 0.06, 0.15, 0.09, 0.27, 0.09, 0.48], ['c', 0.00, 0.24, -0.03, 0.27, -0.12, 0.42], ['c', -0.03, 0.09, -0.15, 0.18, -0.27, 0.27], ['c', -0.09, 0.06, -0.27, 0.21, -0.36, 0.27], ['c', -0.24, 0.18, -0.36, 0.36, -0.39, 0.60], ['c', -0.03, 0.33, 0.09, 0.39, 0.63, 0.42], ['c', 0.42, 0.00, 0.63, -0.03, 0.90, -0.15], ['c', 0.60, -0.30, 0.96, -0.96, 1.38, -2.64], ['c', 0.09, -0.42, 0.63, -2.55, 1.17, -4.77], ['l', 1.02, -4.08], ['c', 0.00, -0.03, -0.36, -0.03, -0.81, -0.03], ['c', -0.72, 0.00, -0.81, 0.00, -0.93, -0.06], ['c', -0.42, -0.18, -0.39, -0.75, 0.03, -0.90], ['c', 0.09, -0.06, 0.27, -0.06, 1.05, -0.06], ['l', 0.96, 0.00], ['l', 0.00, -0.09], ['c', 0.06, -0.18, 0.30, -0.72, 0.51, -1.17], ['c', 1.20, -2.46, 3.30, -4.23, 5.34, -4.50], ['z']], w: 16.155, h: 19.445 },\n\t'm': { d: [['M', 2.79, -8.91], ['c', 0.09, 0.00, 0.30, -0.03, 0.45, -0.03], ['c', 0.24, 0.03, 0.30, 0.03, 0.45, 0.12], ['c', 0.36, 0.15, 0.63, 0.54, 0.75, 1.02], ['l', 0.03, 0.21], ['l', 0.33, -0.30], ['c', 0.69, -0.69, 1.38, -1.02, 2.07, -1.02], ['c', 0.27, 0.00, 0.33, 0.00, 0.48, 0.06], ['c', 0.21, 0.09, 0.48, 0.36, 0.63, 0.60], ['c', 0.03, 0.09, 0.12, 0.27, 0.18, 0.42], ['c', 0.03, 0.15, 0.09, 0.27, 0.12, 0.27], ['c', 0.00, 0.00, 0.09, -0.09, 0.18, -0.21], ['c', 0.33, -0.39, 0.87, -0.81, 1.29, -0.99], ['c', 0.78, -0.33, 1.47, -0.21, 2.01, 0.33], ['c', 0.30, 0.33, 0.48, 0.69, 0.60, 1.14], ['c', 0.09, 0.42, 0.06, 0.54, -0.54, 3.06], ['c', -0.33, 1.29, -0.57, 2.40, -0.57, 2.43], ['c', 0.00, 0.12, 0.09, 0.21, 0.21, 0.21], ['c', 0.24, 0.00, 0.75, -0.30, 1.20, -0.72], ['c', 0.45, -0.39, 0.60, -0.45, 0.78, -0.27], ['c', 0.18, 0.18, 0.09, 0.36, -0.45, 0.87], ['c', -1.05, 0.96, -1.83, 1.47, -2.58, 1.71], ['c', -0.93, 0.33, -1.53, 0.21, -1.80, -0.33], ['c', -0.06, -0.15, -0.06, -0.21, -0.06, -0.45], ['c', 0.00, -0.24, 0.03, -0.48, 0.60, -2.82], ['c', 0.42, -1.71, 0.60, -2.64, 0.63, -2.79], ['c', 0.03, -0.57, -0.30, -0.75, -0.84, -0.48], ['c', -0.24, 0.12, -0.54, 0.39, -0.66, 0.63], ['c', -0.03, 0.09, -0.42, 1.38, -0.90, 3.00], ['c', -0.90, 3.15, -0.84, 3.00, -1.14, 3.15], ['l', -0.15, 0.09], ['l', -0.78, 0.00], ['c', -0.60, 0.00, -0.78, 0.00, -0.84, -0.06], ['c', -0.09, -0.03, -0.18, -0.18, -0.18, -0.27], ['c', 0.00, -0.03, 0.36, -1.38, 0.84, -2.97], ['c', 0.57, -2.04, 0.81, -2.97, 0.84, -3.12], ['c', 0.03, -0.54, -0.30, -0.72, -0.84, -0.45], ['c', -0.24, 0.12, -0.57, 0.42, -0.66, 0.63], ['c', -0.06, 0.09, -0.51, 1.44, -1.05, 2.97], ['c', -0.51, 1.56, -0.99, 2.85, -0.99, 2.91], ['c', -0.06, 0.12, -0.21, 0.24, -0.36, 0.30], ['c', -0.12, 0.06, -0.21, 0.06, -0.90, 0.06], ['c', -0.60, 0.00, -0.78, 0.00, -0.84, -0.06], ['c', -0.09, -0.03, -0.18, -0.18, -0.18, -0.27], ['c', 0.00, -0.03, 0.45, -1.38, 0.99, -2.97], ['c', 1.05, -3.18, 1.05, -3.18, 0.93, -3.45], ['c', -0.12, -0.27, -0.39, -0.30, -0.72, -0.15], ['c', -0.54, 0.27, -1.14, 1.17, -1.56, 2.40], ['c', -0.06, 0.15, -0.15, 0.30, -0.18, 0.36], ['c', -0.21, 0.21, -0.57, 0.27, -0.72, 0.09], ['c', -0.09, -0.09, -0.06, -0.21, 0.06, -0.63], ['c', 0.48, -1.26, 1.26, -2.46, 2.01, -3.21], ['c', 0.57, -0.54, 1.20, -0.87, 1.83, -1.02], ['z']], w: 14.687, h: 9.126 },\n\t'p': { d: [['M', 1.92, -8.70], ['c', 0.27, -0.09, 0.81, -0.06, 1.11, 0.03], ['c', 0.54, 0.18, 0.93, 0.51, 1.17, 0.99], ['c', 0.09, 0.15, 0.15, 0.33, 0.18, 0.36], ['l', 0.00, 0.12], ['l', 0.30, -0.27], ['c', 0.66, -0.60, 1.35, -1.02, 2.13, -1.20], ['c', 0.21, -0.06, 0.33, -0.06, 0.78, -0.06], ['c', 0.45, 0.00, 0.51, 0.00, 0.84, 0.09], ['c', 1.29, 0.33, 2.07, 1.32, 2.25, 2.79], ['c', 0.09, 0.81, -0.09, 2.01, -0.45, 2.79], ['c', -0.54, 1.26, -1.86, 2.55, -3.18, 3.03], ['c', -0.45, 0.18, -0.81, 0.24, -1.29, 0.24], ['c', -0.69, -0.03, -1.35, -0.18, -1.86, -0.45], ['c', -0.30, -0.15, -0.51, -0.18, -0.69, -0.09], ['c', -0.09, 0.03, -0.18, 0.09, -0.18, 0.12], ['c', -0.09, 0.12, -1.05, 2.94, -1.05, 3.06], ['c', 0.00, 0.24, 0.18, 0.48, 0.51, 0.63], ['c', 0.18, 0.06, 0.54, 0.15, 0.75, 0.15], ['c', 0.21, 0.00, 0.36, 0.06, 0.42, 0.18], ['c', 0.12, 0.18, 0.06, 0.42, -0.12, 0.54], ['c', -0.09, 0.03, -0.15, 0.03, -0.78, 0.00], ['c', -1.98, -0.15, -3.81, -0.15, -5.79, 0.00], ['c', -0.63, 0.03, -0.69, 0.03, -0.78, 0.00], ['c', -0.24, -0.15, -0.24, -0.57, 0.03, -0.66], ['c', 0.06, -0.03, 0.48, -0.09, 0.99, -0.12], ['c', 0.87, -0.06, 1.11, -0.09, 1.35, -0.21], ['c', 0.18, -0.06, 0.33, -0.18, 0.39, -0.30], ['c', 0.06, -0.12, 3.24, -9.42, 3.27, -9.60], ['c', 0.06, -0.33, 0.03, -0.57, -0.15, -0.69], ['c', -0.09, -0.06, -0.12, -0.06, -0.30, -0.06], ['c', -0.69, 0.06, -1.53, 1.02, -2.28, 2.61], ['c', -0.09, 0.21, -0.21, 0.45, -0.27, 0.51], ['c', -0.09, 0.12, -0.33, 0.24, -0.48, 0.24], ['c', -0.18, 0.00, -0.36, -0.15, -0.36, -0.30], ['c', 0.00, -0.24, 0.78, -1.83, 1.26, -2.55], ['c', 0.72, -1.11, 1.47, -1.74, 2.28, -1.92], ['z'], ['m', 5.37, 1.47], ['c', -0.27, -0.12, -0.75, -0.03, -1.14, 0.21], ['c', -0.75, 0.48, -1.47, 1.68, -1.89, 3.15], ['c', -0.45, 1.47, -0.42, 2.34, 0.00, 2.70], ['c', 0.45, 0.39, 1.26, 0.21, 1.83, -0.36], ['c', 0.51, -0.51, 0.99, -1.68, 1.38, -3.27], ['c', 0.30, -1.17, 0.33, -1.74, 0.15, -2.13], ['c', -0.09, -0.15, -0.15, -0.21, -0.33, -0.30], ['z']], w: 14.689, h: 13.127 },\n\t'r': { d: [['M', 6.33, -9.12], ['c', 0.27, -0.03, 0.93, 0.00, 1.20, 0.06], ['c', 0.84, 0.21, 1.23, 0.81, 1.02, 1.53], ['c', -0.24, 0.75, -0.90, 1.17, -1.56, 0.96], ['c', -0.33, -0.09, -0.51, -0.30, -0.66, -0.75], ['c', -0.03, -0.12, -0.09, -0.24, -0.12, -0.30], ['c', -0.09, -0.15, -0.30, -0.24, -0.48, -0.24], ['c', -0.57, 0.00, -1.38, 0.54, -1.65, 1.08], ['c', -0.06, 0.15, -0.33, 1.17, -0.90, 3.27], ['c', -0.57, 2.31, -0.81, 3.12, -0.87, 3.21], ['c', -0.03, 0.06, -0.12, 0.15, -0.18, 0.21], ['l', -0.12, 0.06], ['l', -0.81, 0.03], ['c', -0.69, 0.00, -0.81, 0.00, -0.90, -0.03], ['c', -0.09, -0.06, -0.18, -0.21, -0.18, -0.30], ['c', 0.00, -0.06, 0.39, -1.62, 0.90, -3.51], ['c', 0.84, -3.24, 0.87, -3.45, 0.87, -3.72], ['c', 0.00, -0.21, 0.00, -0.27, -0.03, -0.36], ['c', -0.12, -0.15, -0.21, -0.24, -0.42, -0.24], ['c', -0.24, 0.00, -0.45, 0.15, -0.78, 0.42], ['c', -0.33, 0.36, -0.45, 0.54, -0.72, 1.14], ['c', -0.03, 0.12, -0.21, 0.24, -0.36, 0.27], ['c', -0.12, 0.00, -0.15, 0.00, -0.24, -0.06], ['c', -0.18, -0.12, -0.18, -0.21, -0.06, -0.54], ['c', 0.21, -0.57, 0.42, -0.93, 0.78, -1.32], ['c', 0.54, -0.51, 1.20, -0.81, 1.95, -0.87], ['c', 0.81, -0.03, 1.53, 0.30, 1.92, 0.87], ['l', 0.12, 0.18], ['l', 0.09, -0.09], ['c', 0.57, -0.45, 1.41, -0.84, 2.19, -0.96], ['z']], w: 9.41, h: 9.132 },\n\t's': { d: [['M', 4.47, -8.73], ['c', 0.09, 0.00, 0.36, -0.03, 0.57, -0.03], ['c', 0.75, 0.03, 1.29, 0.24, 1.71, 0.63], ['c', 0.51, 0.54, 0.66, 1.26, 0.36, 1.83], ['c', -0.24, 0.42, -0.63, 0.57, -1.11, 0.42], ['c', -0.33, -0.09, -0.60, -0.36, -0.60, -0.57], ['c', 0.00, -0.03, 0.06, -0.21, 0.15, -0.39], ['c', 0.12, -0.21, 0.15, -0.33, 0.18, -0.48], ['c', 0.00, -0.24, -0.06, -0.48, -0.15, -0.60], ['c', -0.15, -0.21, -0.42, -0.24, -0.75, -0.15], ['c', -0.27, 0.06, -0.48, 0.18, -0.69, 0.36], ['c', -0.39, 0.39, -0.51, 0.96, -0.33, 1.38], ['c', 0.09, 0.21, 0.42, 0.51, 0.78, 0.72], ['c', 1.11, 0.69, 1.59, 1.11, 1.89, 1.68], ['c', 0.21, 0.39, 0.24, 0.78, 0.15, 1.29], ['c', -0.18, 1.20, -1.17, 2.16, -2.52, 2.52], ['c', -1.02, 0.24, -1.95, 0.12, -2.70, -0.42], ['c', -0.72, -0.51, -0.99, -1.47, -0.60, -2.19], ['c', 0.24, -0.48, 0.72, -0.63, 1.17, -0.42], ['c', 0.33, 0.18, 0.54, 0.45, 0.57, 0.81], ['c', 0.00, 0.21, -0.03, 0.30, -0.33, 0.51], ['c', -0.33, 0.24, -0.39, 0.42, -0.27, 0.69], ['c', 0.06, 0.15, 0.21, 0.27, 0.45, 0.33], ['c', 0.30, 0.09, 0.87, 0.09, 1.20, 0.00], ['c', 0.75, -0.21, 1.23, -0.72, 1.29, -1.35], ['c', 0.03, -0.42, -0.15, -0.81, -0.54, -1.20], ['c', -0.24, -0.24, -0.48, -0.42, -1.41, -1.02], ['c', -0.69, -0.42, -1.05, -0.93, -1.05, -1.47], ['c', 0.00, -0.39, 0.12, -0.87, 0.30, -1.23], ['c', 0.27, -0.57, 0.78, -1.05, 1.38, -1.35], ['c', 0.24, -0.12, 0.63, -0.27, 0.90, -0.30], ['z']], w: 6.632, h: 8.758 },\n\t'z': { d: [['M', 2.64, -7.95], ['c', 0.36, -0.09, 0.81, -0.03, 1.71, 0.27], ['c', 0.78, 0.21, 0.96, 0.27, 1.74, 0.30], ['c', 0.87, 0.06, 1.02, 0.03, 1.38, -0.21], ['c', 0.21, -0.15, 0.33, -0.15, 0.48, -0.06], ['c', 0.15, 0.09, 0.21, 0.30, 0.15, 0.45], ['c', -0.03, 0.06, -1.26, 1.26, -2.76, 2.67], ['l', -2.73, 2.55], ['l', 0.54, 0.03], ['c', 0.54, 0.03, 0.72, 0.03, 2.01, 0.15], ['c', 0.36, 0.03, 0.90, 0.06, 1.20, 0.09], ['c', 0.66, 0.00, 0.81, -0.03, 1.02, -0.24], ['c', 0.30, -0.30, 0.39, -0.72, 0.27, -1.23], ['c', -0.06, -0.27, -0.06, -0.27, -0.03, -0.39], ['c', 0.15, -0.30, 0.54, -0.27, 0.69, 0.03], ['c', 0.15, 0.33, 0.27, 1.02, 0.27, 1.50], ['c', 0.00, 1.47, -1.11, 2.70, -2.52, 2.79], ['c', -0.57, 0.03, -1.02, -0.09, -2.01, -0.51], ['c', -1.02, -0.42, -1.23, -0.48, -2.13, -0.54], ['c', -0.81, -0.06, -0.96, -0.03, -1.26, 0.18], ['c', -0.12, 0.06, -0.24, 0.12, -0.27, 0.12], ['c', -0.27, 0.00, -0.45, -0.30, -0.36, -0.51], ['c', 0.03, -0.06, 1.32, -1.32, 2.91, -2.79], ['l', 2.88, -2.73], ['c', -0.03, 0.00, -0.21, 0.03, -0.42, 0.06], ['c', -0.21, 0.03, -0.78, 0.09, -1.23, 0.12], ['c', -1.11, 0.12, -1.23, 0.15, -1.95, 0.27], ['c', -0.72, 0.15, -1.17, 0.18, -1.29, 0.09], ['c', -0.27, -0.18, -0.21, -0.75, 0.12, -1.26], ['c', 0.39, -0.60, 0.93, -1.02, 1.59, -1.20], ['z']], w: 8.573, h: 8.743 },\n\t'+': { d: [['M', 3.48, -9.3], ['c', 0.18, -0.09, 0.36, -0.09, 0.54, 0.00], ['c', 0.18, 0.09, 0.24, 0.15, 0.33, 0.30], ['l', 0.06, 0.15], ['l', 0.00, 1.29], ['l', 0.00, 1.29], ['l', 1.29, 0.00], ['c', 1.23, 0.00, 1.29, 0.00, 1.41, 0.06], ['c', 0.06, 0.03, 0.15, 0.09, 0.18, 0.12], ['c', 0.12, 0.09, 0.21, 0.33, 0.21, 0.48], ['c', 0.00, 0.15, -0.09, 0.39, -0.21, 0.48], ['c', -0.03, 0.03, -0.12, 0.09, -0.18, 0.12], ['c', -0.12, 0.06, -0.18, 0.06, -1.41, 0.06], ['l', -1.29, 0.00], ['l', 0.00, 1.29], ['c', 0.00, 1.23, 0.00, 1.29, -0.06, 1.41], ['c', -0.09, 0.18, -0.15, 0.24, -0.30, 0.33], ['c', -0.21, 0.09, -0.39, 0.09, -0.57, 0.00], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.06, -0.12, -0.06, -0.18, -0.06, -1.41], ['l', 0.00, -1.29], ['l', -1.29, 0.00], ['c', -1.23, 0.00, -1.29, 0.00, -1.41, -0.06], ['c', -0.18, -0.09, -0.24, -0.15, -0.33, -0.33], ['c', -0.09, -0.18, -0.09, -0.36, 0.00, -0.54], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['l', 0.15, -0.06], ['l', 1.26, 0.00], ['l', 1.29, 0.00], ['l', 0.00, -1.29], ['c', 0.00, -1.23, 0.00, -1.29, 0.06, -1.41], ['c', 0.09, -0.18, 0.15, -0.24, 0.33, -0.33], ['z']], w: 7.507, h: 7.515 },\n\t',': { d: [['M', 1.85, -3.36], ['c', 0.57, -0.15, 1.17, 0.03, 1.59, 0.45], ['c', 0.45, 0.45, 0.60, 0.96, 0.51, 1.89], ['c', -0.09, 1.23, -0.42, 2.46, -0.99, 3.93], ['c', -0.30, 0.72, -0.72, 1.62, -0.78, 1.68], ['c', -0.18, 0.21, -0.51, 0.18, -0.66, -0.06], ['c', -0.03, -0.06, -0.06, -0.15, -0.06, -0.18], ['c', 0.00, -0.06, 0.12, -0.33, 0.24, -0.63], ['c', 0.84, -1.80, 1.02, -2.61, 0.69, -3.24], ['c', -0.12, -0.24, -0.27, -0.36, -0.75, -0.60], ['c', -0.36, -0.15, -0.42, -0.21, -0.60, -0.39], ['c', -0.69, -0.69, -0.69, -1.71, 0.00, -2.40], ['c', 0.21, -0.21, 0.51, -0.39, 0.81, -0.45], ['z']], w: 3.452, h: 8.143 },\n\t'-': { d: [['M', 0.18, -5.34], ['c', 0.09, -0.06, 0.15, -0.06, 2.31, -0.06], ['c', 2.46, 0.00, 2.37, 0.00, 2.46, 0.21], ['c', 0.12, 0.21, 0.03, 0.42, -0.15, 0.54], ['c', -0.09, 0.06, -0.15, 0.06, -2.28, 0.06], ['c', -2.16, 0.00, -2.22, 0.00, -2.31, -0.06], ['c', -0.27, -0.15, -0.27, -0.54, -0.03, -0.69], ['z']], w: 5.001, h: 0.81 },\n\t'.': { d: [['M', 1.32, -3.36], ['c', 1.05, -0.27, 2.10, 0.57, 2.10, 1.65], ['c', 0.00, 1.08, -1.05, 1.92, -2.10, 1.65], ['c', -0.90, -0.21, -1.50, -1.14, -1.26, -2.04], ['c', 0.12, -0.63, 0.63, -1.11, 1.26, -1.26], ['z']], w: 3.413, h: 3.402 },\n\t'scripts.wedge': { d: [['M', -3.66, -7.44], ['c', 0.06, -0.09, 0.00, -0.09, 0.81, 0.03], ['c', 1.86, 0.30, 3.84, 0.30, 5.73, 0.00], ['c', 0.78, -0.12, 0.72, -0.12, 0.78, -0.03], ['c', 0.15, 0.15, 0.12, 0.24, -0.24, 0.60], ['c', -0.93, 0.93, -1.98, 2.76, -2.67, 4.62], ['c', -0.30, 0.78, -0.51, 1.71, -0.51, 2.13], ['c', 0.00, 0.15, 0.00, 0.18, -0.06, 0.27], ['c', -0.12, 0.09, -0.24, 0.09, -0.36, 0.00], ['c', -0.06, -0.09, -0.06, -0.12, -0.06, -0.27], ['c', 0.00, -0.42, -0.21, -1.35, -0.51, -2.13], ['c', -0.69, -1.86, -1.74, -3.69, -2.67, -4.62], ['c', -0.36, -0.36, -0.39, -0.45, -0.24, -0.60], ['z']], w: 7.49, h: 7.752 },\n\t'scripts.thumb': { d: [['M', -0.54, -3.69], ['c', 0.15, -0.03, 0.36, -0.06, 0.51, -0.06], ['c', 1.44, 0.00, 2.58, 1.11, 2.94, 2.85], ['c', 0.09, 0.48, 0.09, 1.32, 0.00, 1.80], ['c', -0.27, 1.41, -1.08, 2.43, -2.16, 2.73], ['l', -0.18, 0.06], ['l', 0.00, 0.12], ['c', 0.03, 0.06, 0.06, 0.45, 0.09, 0.87], ['c', 0.03, 0.57, 0.03, 0.78, 0.00, 0.84], ['c', -0.09, 0.27, -0.39, 0.48, -0.66, 0.48], ['c', -0.27, 0.00, -0.57, -0.21, -0.66, -0.48], ['c', -0.03, -0.06, -0.03, -0.27, 0.00, -0.84], ['c', 0.03, -0.42, 0.06, -0.81, 0.09, -0.87], ['l', 0.00, -0.12], ['l', -0.18, -0.06], ['c', -1.08, -0.30, -1.89, -1.32, -2.16, -2.73], ['c', -0.09, -0.48, -0.09, -1.32, 0.00, -1.80], ['c', 0.15, -0.84, 0.51, -1.53, 1.02, -2.04], ['c', 0.39, -0.39, 0.84, -0.63, 1.35, -0.75], ['z'], ['m', 1.05, 0.90], ['c', -0.15, -0.09, -0.21, -0.09, -0.45, -0.12], ['c', -0.15, 0.00, -0.30, 0.03, -0.39, 0.03], ['c', -0.57, 0.18, -0.90, 0.72, -1.08, 1.74], ['c', -0.06, 0.48, -0.06, 1.80, 0.00, 2.28], ['c', 0.15, 0.90, 0.42, 1.44, 0.90, 1.65], ['c', 0.18, 0.09, 0.21, 0.09, 0.51, 0.09], ['c', 0.30, 0.00, 0.33, 0.00, 0.51, -0.09], ['c', 0.48, -0.21, 0.75, -0.75, 0.90, -1.65], ['c', 0.03, -0.27, 0.03, -0.54, 0.03, -1.14], ['c', 0.00, -0.60, 0.00, -0.87, -0.03, -1.14], ['c', -0.15, -0.90, -0.45, -1.44, -0.90, -1.65], ['z']], w: 5.955, h: 9.75 },\n\t'scripts.open': { d: [['M', -0.54, -3.69], ['c', 0.15, -0.03, 0.36, -0.06, 0.51, -0.06], ['c', 1.44, 0.00, 2.58, 1.11, 2.94, 2.85], ['c', 0.09, 0.48, 0.09, 1.32, 0.00, 1.80], ['c', -0.33, 1.74, -1.47, 2.85, -2.91, 2.85], ['c', -1.44, 0.00, -2.58, -1.11, -2.91, -2.85], ['c', -0.09, -0.48, -0.09, -1.32, 0.00, -1.80], ['c', 0.15, -0.84, 0.51, -1.53, 1.02, -2.04], ['c', 0.39, -0.39, 0.84, -0.63, 1.35, -0.75], ['z'], ['m', 1.11, 0.90], ['c', -0.21, -0.09, -0.27, -0.09, -0.51, -0.12], ['c', -0.30, 0.00, -0.42, 0.03, -0.66, 0.15], ['c', -0.24, 0.12, -0.51, 0.39, -0.66, 0.63], ['c', -0.54, 0.93, -0.63, 2.64, -0.21, 3.81], ['c', 0.21, 0.54, 0.51, 0.90, 0.93, 1.11], ['c', 0.21, 0.09, 0.24, 0.09, 0.54, 0.09], ['c', 0.30, 0.00, 0.33, 0.00, 0.54, -0.09], ['c', 0.42, -0.21, 0.72, -0.57, 0.93, -1.11], ['c', 0.36, -0.99, 0.36, -2.37, 0.00, -3.36], ['c', -0.21, -0.54, -0.51, -0.90, -0.90, -1.11], ['z']], w: 5.955, h: 7.5 },\n\t'scripts.longphrase': { d: [['M', 1.47, -15.09], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.54, 0.06, 11.25], ['l', 0.00, 11.25], ['l', -0.63, 0.15], ['c', -0.66, 0.18, -1.44, 0.39, -1.50, 0.39], ['c', -0.03, 0.00, -0.03, -3.39, -0.03, -11.25], ['l', 0.00, -11.25], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 23.04 },\n\t'scripts.mediumphrase': { d: [['M', 1.47, -7.59], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.39, 0.06, 7.50], ['l', 0.00, 7.50], ['l', -0.63, 0.15], ['c', -0.66, 0.18, -1.44, 0.39, -1.50, 0.39], ['c', -0.03, 0.00, -0.03, -2.28, -0.03, -7.50], ['l', 0.00, -7.50], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 15.54 },\n\t'scripts.shortphrase': { d: [['M', 1.47, -7.59], ['c', 0.36, -0.09, 0.66, -0.18, 0.69, -0.18], ['c', 0.06, 0.00, 0.06, 0.21, 0.06, 3.75], ['l', 0.00, 3.75], ['l', -0.42, 0.09], ['c', -0.57, 0.18, -1.65, 0.45, -1.71, 0.45], ['c', -0.03, 0.00, -0.03, -0.72, -0.03, -3.75], ['l', 0.00, -3.75], ['l', 0.36, -0.09], ['c', 0.21, -0.06, 0.66, -0.18, 1.05, -0.27], ['z']], w: 2.16, h: 8.04 },\n\t'scripts.snap': { d: [['M', 4.50, -3.39], ['c', 0.36, -0.03, 0.96, -0.03, 1.35, 0.00], ['c', 1.56, 0.15, 3.15, 0.90, 4.20, 2.01], ['c', 0.24, 0.27, 0.33, 0.42, 0.33, 0.60], ['c', 0.00, 0.27, 0.03, 0.24, -2.46, 2.22], ['c', -1.29, 1.02, -2.40, 1.86, -2.49, 1.92], ['c', -0.18, 0.09, -0.30, 0.09, -0.48, 0.00], ['c', -0.09, -0.06, -1.20, -0.90, -2.49, -1.92], ['c', -2.49, -1.98, -2.46, -1.95, -2.46, -2.22], ['c', 0.00, -0.18, 0.09, -0.33, 0.33, -0.60], ['c', 1.05, -1.08, 2.64, -1.86, 4.17, -2.01], ['z'], ['m', 1.29, 1.17], ['c', -1.47, -0.15, -2.97, 0.30, -4.14, 1.20], ['l', -0.18, 0.15], ['l', 0.06, 0.09], ['c', 0.15, 0.12, 3.63, 2.85, 3.66, 2.85], ['c', 0.03, 0.00, 3.51, -2.73, 3.66, -2.85], ['l', 0.06, -0.09], ['l', -0.18, -0.15], ['c', -0.84, -0.66, -1.89, -1.08, -2.94, -1.20], ['z']], w: 10.38, h: 6.84 }\n};\n\n// Custom characters that weren't generated from the font:\nglyphs['noteheads.slash.whole'] = { d: [['M', 5, -5], ['l', 1, 1], ['l', -5, 5], ['l', -1, -1], ['z'], ['m', 4, 6], ['l', -5, -5], ['l', 2, -2], ['l', 5, 5], ['z'], ['m', 0, -2], ['l', 1, 1], ['l', -5, 5], ['l', -1, -1], ['z'], ['m', -4, 6], ['l', -5, -5], ['l', 2, -2], ['l', 5, 5], ['z']], w: 10.81, h: 15.63 };\n\nglyphs['noteheads.slash.quarter'] = { d: [['M', 9, -6], ['l', 0, 4], ['l', -9, 9], ['l', 0, -4], ['z']], w: 9, h: 9 };\n\nglyphs['noteheads.harmonic.quarter'] = { d: [['M', 3.63, -4.02], ['c', 0.09, -0.06, 0.18, -0.09, 0.24, -0.03], ['c', 0.03, 0.03, 0.87, 0.93, 1.83, 2.01], ['c', 1.50, 1.65, 1.80, 1.98, 1.80, 2.04], ['c', 0.00, 0.06, -0.30, 0.39, -1.80, 2.04], ['c', -0.96, 1.08, -1.80, 1.98, -1.83, 2.01], ['c', -0.06, 0.06, -0.15, 0.03, -0.24, -0.03], ['c', -0.12, -0.09, -3.54, -3.84, -3.60, -3.93], ['c', -0.03, -0.03, -0.03, -0.09, -0.03, -0.15], ['c', 0.03, -0.06, 3.45, -3.84, 3.63, -3.96], ['z']], w: 7.5, h: 8.165 };\n\nglyphs['noteheads.triangle.quarter'] = { d: [['M', 0, 4], ['l', 9, 0], ['l', -4.5, -9], ['z']], w: 9, h: 9 };\n\nvar pathClone = function (pathArray) {\n\tvar res = [];\n\tfor (var i = 0, ii = pathArray.length; i < ii; i++) {\n\t\tres[i] = [];\n\t\tfor (var j = 0, jj = pathArray[i].length; j < jj; j++) {\n\t\t\tres[i][j] = pathArray[i][j];\n\t\t}\n\t}\n\treturn res;\n};\n\nvar pathScale = function (pathArray, kx, ky) {\n\tfor (var i = 0, ii = pathArray.length; i < ii; i++) {\n\t\tvar p = pathArray[i];\n\t\tvar j, jj;\n\t\tfor (j = 1, jj = p.length; j < jj; j++) {\n\t\t\tp[j] *= (j % 2) ? kx : ky;\n\t\t}\n\t}\n};\n\nvar Glyphs = {\n\tprintSymbol: function (x, y, symb, paper, attrs) {\n\t\tif (!glyphs[symb]) return null;\n\t\tvar pathArray = pathClone(glyphs[symb].d);\n\t\tpathArray[0][1] += x;\n\t\tpathArray[0][2] += y;\n\t\tvar path = \"\";\n\t\tfor (var i = 0; i < pathArray.length; i++)\n\t\t\tpath += pathArray[i].join(\" \");\n\t\tattrs.path = path;\n\t\treturn paper.path(attrs);\n\t},\n\n\tgetPathForSymbol: function (x, y, symb, scalex, scaley) {\n\t\tscalex = scalex || 1;\n\t\tscaley = scaley || 1;\n\t\tif (!glyphs[symb]) return null;\n\t\tvar pathArray = pathClone(glyphs[symb].d);\n\t\tif (scalex !== 1 || scaley !== 1) pathScale(pathArray, scalex, scaley);\n\t\tpathArray[0][1] += x;\n\t\tpathArray[0][2] += y;\n\n\t\treturn pathArray;\n\t},\n\n\tgetSymbolWidth: function (symbol) {\n\t\tif (glyphs[symbol]) return glyphs[symbol].w;\n\t\treturn 0;\n\t},\n\n\tsymbolHeightInPitches: function (symbol) {\n\t\tvar height = glyphs[symbol] ? glyphs[symbol].h : 0;\n\t\treturn height / spacing.STEP;\n\t},\n\n\tgetSymbolAlign: function (symbol) {\n\t\tif (symbol.substring(0, 7) === \"scripts\" &&\n\t\t\tsymbol !== \"scripts.roll\") {\n\t\t\treturn \"center\";\n\t\t}\n\t\treturn \"left\";\n\t},\n\n\tgetYCorr: function (symbol) {\n\t\tswitch (symbol) {\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"6\":\n\t\t\tcase \"7\":\n\t\t\tcase \"8\":\n\t\t\tcase \"9\":\n\t\t\tcase \"+\": return -2;\n\t\t\tcase \"timesig.common\":\n\t\t\tcase \"timesig.cut\": return 0;\n\t\t\tcase \"flags.d32nd\": return -1;\n\t\t\tcase \"flags.d64th\": return -2;\n\t\t\tcase \"flags.u32nd\": return 1;\n\t\t\tcase \"flags.u64th\": return 3;\n\t\t\tcase \"rests.whole\": return 1;\n\t\t\tcase \"rests.half\": return -1;\n\t\t\tcase \"rests.8th\": return -1;\n\t\t\tcase \"rests.quarter\": return -1;\n\t\t\tcase \"rests.16th\": return -1;\n\t\t\tcase \"rests.32nd\": return -1;\n\t\t\tcase \"rests.64th\": return -1;\n\t\t\tcase \"f\":\n\t\t\tcase \"m\":\n\t\t\tcase \"p\":\n\t\t\tcase \"s\":\n\t\t\tcase \"z\":\n\t\t\t\treturn -4;\n\t\t\tcase \"scripts.trill\":\n\t\t\tcase \"scripts.upbow\":\n\t\t\tcase \"scripts.downbow\":\n\t\t\t\treturn -2;\n\t\t\tcase \"scripts.ufermata\":\n\t\t\tcase \"scripts.wedge\":\n\t\t\tcase \"scripts.roll\":\n\t\t\tcase \"scripts.shortphrase\":\n\t\t\tcase \"scripts.longphrase\":\n\t\t\t\treturn -1;\n\t\t\tcase \"scripts.dfermata\":\n\t\t\t\treturn 1;\n\t\t\tdefault: return 0;\n\t\t}\n\t},\n\tsetSymbol: function (name, path) {\n\t\tglyphs[name] = path;\n\t}\n};\n\nmodule.exports = Glyphs; // we need the glyphs for layout information\n","function germanNote(note) {\n\tswitch (note) {\n\t\tcase \"B#\": return \"H#\";\n\t\tcase \"B♯\": return \"H♯\";\n\t\tcase \"B\": return \"H\";\n\t\tcase \"Bb\": return \"B\";\n\t\tcase \"B♭\": return \"B\";\n\t}\n\treturn note;\n}\n\nfunction translateChord(chordString, jazzchords, germanAlphabet) {\n\tvar lines = chordString.split(\"\\n\");\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tlet chord = lines[i];\n\t\t// If the chord isn't in a recognizable format then just skip it.\n\t\tlet reg = chord.match(/^([ABCDEFG][♯♭]?)?([^\\/]+)?(\\/([ABCDEFG][#b♯♭]?))?/);\n\t\tif (!reg) {\n\t\t\tcontinue;\n\t\t}\n\t\tlet baseChord = reg[1] || \"\";\n\t\tlet modifier = reg[2] || \"\";\n\t\tlet bassNote = reg[4] || \"\";\n\t\tif (germanAlphabet) {\n\t\t\tbaseChord = germanNote(baseChord);\n\t\t\tbassNote = germanNote(bassNote);\n\t\t}\n\t\t// This puts markers in the pieces of the chord that are read by the svg creator.\n\t\t// After the main part of the chord (the letter, a sharp or flat, and \"m\") a marker is added. Before a slash a marker is added.\n\t\tconst marker = jazzchords ? \"\\x03\" : \"\";\n\t\tconst bass = bassNote ? \"/\" + bassNote : \"\";\n\t\tlines[i] = [baseChord, modifier, bass].join(marker);\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nmodule.exports = translateChord;\n","var drawTempo = require('./tempo');\nvar drawRelativeElement = require('./relative');\nvar spacing = require('../helpers/spacing');\nvar setClass = require('../helpers/set-class');\nvar elementGroup = require('./group-elements');\n\nfunction drawAbsolute(renderer, params, bartop, selectables, staffPos) {\n\tif (params.invisible) return;\n\tvar isTempo = params.children.length > 0 && params.children[0].type === \"TempoElement\";\n\tparams.elemset = [];\n\telementGroup.beginGroup(renderer.paper, renderer.controller);\n\tfor (var i = 0; i < params.children.length; i++) {\n\t\tvar child = params.children[i];\n\t\tswitch (child.type) {\n\t\t\tcase \"TempoElement\":\n\t\t\t\tdrawTempo(renderer, child);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tvar el = drawRelativeElement(renderer, child, bartop);\n\t\t\t\tif (child.type === \"symbol\" && child.c && child.c.indexOf('notehead') >= 0) {\n\t\t\t\t\tel.setAttribute('class', 'abcjs-notehead')\n\t\t\t\t}\n\t\t}\n\t}\n\tvar klass = params.type;\n\tif (params.type === 'note' || params.type === 'rest') {\n\t\tparams.counters = renderer.controller.classes.getCurrent();\n\t\tklass += ' d' + Math.round(params.durationClass * 1000) / 1000;\n\t\tklass = klass.replace(/\\./g, '-');\n\t\tif (params.abcelem.pitches) {\n\t\t\tfor (var j = 0; j < params.abcelem.pitches.length; j++) {\n\t\t\t\tklass += ' p' + params.abcelem.pitches[j].pitch;\n\t\t\t}\n\t\t}\n\t}\n\tvar g = elementGroup.endGroup(klass, params.type);\n\tif (g) {\n\t\t// TODO-PER-HACK! This corrects the classes because the tablature is not being created at the right time.\n\t\tif (params.cloned) {\n\t\t\tparams.cloned.overrideClasses = g.className.baseVal\n\t\t}\n\t\tif (params.overrideClasses) {\n\t\t\tvar type = g.classList && g.classList.length > 0 ? g.classList[0] + ' ' : ''\n\t\t\tg.setAttribute(\"class\", type + params.overrideClasses)\n\t\t}\n\t\tif (isTempo) {\n\t\t\tparams.startChar = params.abcelem.startChar;\n\t\t\tparams.endChar = params.abcelem.endChar;\n\t\t\tselectables.add(params, g, false, staffPos);\n\t\t} else {\n\t\t\tparams.elemset.push(g);\n\t\t\tvar isSelectable = false;\n\t\t\tif (params.type === 'note' || params.type === 'tabNumber') {\n\t\t\t\tisSelectable = true;\n\t\t\t}\n\t\t\tselectables.add(params, g, isSelectable, staffPos);\n\t\t}\n\t} else if (params.elemset.length > 0)\n\t\tselectables.add(params, params.elemset[0], params.type === 'note', staffPos);\n\t// If there was no output, then don't add to the selectables. This happens when using the \"y\" spacer, for instance.\n\n\tif (params.klass)\n\t\tsetClass(params.elemset, \"mark\", \"\", \"#00ff00\");\n\tif (params.hint)\n\t\tsetClass(params.elemset, \"abcjs-hint\", \"\", null);\n\tparams.abcelem.abselem = params;\n\n\tif (params.heads && params.heads.length > 0) {\n\t\tparams.notePositions = [];\n\t\tfor (var jj = 0; jj < params.heads.length; jj++) {\n\t\t\tparams.notePositions.push({\n\t\t\t\tx: params.heads[jj].x + params.heads[jj].w / 2,\n\t\t\t\ty: staffPos.zero - params.heads[jj].pitch * spacing.STEP\n\t\t\t});\n\t\t}\n\t}\n}\n\nmodule.exports = drawAbsolute;\n","var printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawBeam(renderer, params) {\n\tif (params.beams.length === 0) return;\n\n\tvar pathString = \"\";\n\tfor (var i = 0; i < params.beams.length; i++) {\n\t\tvar beam = params.beams[i];\n\t\tif (beam.split) {\n\t\t\tvar slope = getSlope(renderer, beam.startX, beam.startY, beam.endX, beam.endY);\n\t\t\tvar xes = [];\n\t\t\tfor (var j = 0; j < beam.split.length; j += 2) {\n\t\t\t\txes.push([beam.split[j], beam.split[j + 1]]);\n\t\t\t}\n\t\t\tfor (j = 0; j < xes.length; j++) {\n\t\t\t\tvar y1 = getY(beam.startX, beam.startY, slope, xes[j][0]);\n\t\t\t\tvar y2 = getY(beam.startX, beam.startY, slope, xes[j][1]);\n\t\t\t\tpathString += draw(renderer, xes[j][0], y1, xes[j][1], y2, beam.dy);\n\t\t\t}\n\t\t} else\n\t\t\tpathString += draw(renderer, beam.startX, beam.startY, beam.endX, beam.endY, beam.dy);\n\t}\n\tvar durationClass = (\"abcjs-d\" + params.duration).replace(/\\./g, \"-\");\n\tvar klasses = renderer.controller.classes.generate('beam-elem ' + durationClass);\n\tvar el = printPath(renderer, {\n\t\tpath: pathString,\n\t\tstroke: \"none\",\n\t\tfill: renderer.foregroundColor,\n\t\t'class': klasses\n\t});\n\treturn [el];\n}\n\nfunction draw(renderer, startX, startY, endX, endY, dy) {\n\t// the X coordinates are actual coordinates, but the Y coordinates are in pitches.\n\tstartY = roundNumber(renderer.calcY(startY));\n\tendY = roundNumber(renderer.calcY(endY));\n\tstartX = roundNumber(startX);\n\tendX = roundNumber(endX);\n\tvar startY2 = roundNumber(startY + dy);\n\tvar endY2 = roundNumber(endY + dy);\n\treturn \"M\" + startX + \" \" + startY + \" L\" + endX + \" \" + endY +\n\t\t\"L\" + endX + \" \" + endY2 + \" L\" + startX + \" \" + startY2 + \"z\";\n}\n\nfunction getSlope(renderer, startX, startY, endX, endY) {\n\treturn (endY - startY) / (endX - startX);\n}\n\nfunction getY(startX, startY, slope, currentX) {\n\tvar x = currentX - startX;\n\treturn startY + x * slope;\n}\n\nmodule.exports = drawBeam;\n","var sprintf = require('./sprintf');\nvar spacing = require('../helpers/spacing');\nvar renderText = require('./text');\n\nfunction drawBrace(renderer, params, selectables) {\n\t// The absoluteY number is the spot where the note on the first ledger line is drawn (i.e. middle C if treble clef)\n\t// The STEP offset here moves it to the top and bottom lines\n\tvar startY = params.startVoice.staff.absoluteY - spacing.STEP * 10;\n\tif (params.endVoice && params.endVoice.staff)\n\t\tparams.endY = params.endVoice.staff.absoluteY - spacing.STEP * 2;\n\telse if (params.lastContinuedVoice && params.lastContinuedVoice.staff)\n\t\tparams.endY = params.lastContinuedVoice.staff.absoluteY - spacing.STEP * 2;\n\telse\n\t\tparams.endY = params.startVoice.staff.absoluteY - spacing.STEP * 2;\n\treturn draw(renderer, params.x, startY, params.endY, params.type, params.header, selectables);\n}\n\nfunction straightPath(renderer, xLeft, yTop, yBottom, type) {\n\txLeft += spacing.STEP;\n\tvar xLineWidth = spacing.STEP * 0.75;\n\tvar yOverlap = spacing.STEP * 0.75;\n\tvar height = yBottom - yTop;\n\t// Straight line\n\tvar pathString = sprintf(\"M %f %f l %f %f l %f %f l %f %f z\",\n\t\txLeft, yTop - yOverlap, // top left line\n\t\t0, height + yOverlap * 2, // bottom left line\n\t\txLineWidth, 0, // bottom right line\n\t\t0, - (height + yOverlap * 2) // top right line\n\t);\n\t// Top arm\n\tvar wCurve = spacing.STEP * 2;\n\tvar hCurve = spacing.STEP;\n\tpathString += sprintf(\"M %f %f q %f %f %f %f q %f %f %f %f z\",\n\t\txLeft + xLineWidth, yTop - yOverlap, // top left arm\n\t\twCurve * 0.6, hCurve * 0.2,\n\t\twCurve, -hCurve, // right point\n\t\t-wCurve * 0.1, hCurve * 0.3,\n\t\t-wCurve, hCurve + spacing.STEP // left bottom\n\t);\n\t// Bottom arm\n\tpathString += sprintf(\"M %f %f q %f %f %f %f q %f %f %f %f z\",\n\t\txLeft + xLineWidth, yTop + yOverlap + height, // bottom left arm\n\t\twCurve * 0.6, -hCurve * 0.2,\n\t\twCurve, hCurve, // right point\n\t\t-wCurve * 0.1, -hCurve * 0.3,\n\t\t-wCurve, -hCurve - spacing.STEP // left bottom\n\t);\n\treturn renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(type), \"data-name\": type });\n}\n\nfunction curvyPath(renderer, xLeft, yTop, yBottom, type) {\n\tvar yHeight = yBottom - yTop;\n\n\tvar pathString = curve(xLeft,\n\t\tyTop,\n\t\t[7.5, -8, 21, 0, 18.5, -10.5, 7.5],\n\t\t[0, yHeight / 5.5, yHeight / 3.14, yHeight / 2, yHeight / 2.93, yHeight / 4.88, 0]);\n\n\tpathString += curve(xLeft,\n\t\tyTop,\n\t\t[0, 17.5, -7.5, 6.6, -5, 20, 0],\n\t\t[yHeight / 2, yHeight / 1.46, yHeight / 1.22, yHeight, yHeight / 1.19, yHeight / 1.42, yHeight / 2]);\n\n\treturn renderer.paper.path({ path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(type), \"data-name\": type });\n}\n\nfunction curve(xLeft, yTop, xCurve, yCurve) {\n\treturn sprintf(\"M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z\",\n\t\txLeft + xCurve[0], yTop + yCurve[0],\n\t\txLeft + xCurve[1], yTop + yCurve[1],\n\t\txLeft + xCurve[2], yTop + yCurve[2],\n\t\txLeft + xCurve[3], yTop + yCurve[3],\n\t\txLeft + xCurve[4], yTop + yCurve[4],\n\t\txLeft + xCurve[5], yTop + yCurve[5],\n\t\txLeft + xCurve[6], yTop + yCurve[6]);\n}\n\nvar draw = function (renderer, xLeft, yTop, yBottom, type, header, selectables) {//Tony\n\tvar ret;\n\tif (header) {\n\t\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate(\"staff-extra voice-name\"), \"data-name\": type });\n\t\tvar position = yTop + (yBottom - yTop) / 2;\n\t\tposition = position - renderer.controller.getTextSize.baselineToCenter(header, \"voicefont\", 'staff-extra voice-name', 0, 1);\n\n\t\trenderText(renderer, {\n\t\t\tx: renderer.padding.left,\n\t\t\ty: position,\n\t\t\ttext: header,\n\t\t\ttype: 'voicefont',\n\t\t\tklass: 'staff-extra voice-name',\n\t\t\tanchor: 'start',\n\t\t\tcenterVertically: true\n\t\t});\n\t}\n\tif (type === \"brace\")\n\t\tret = curvyPath(renderer, xLeft, yTop, yBottom, type);\n\telse if (type === \"bracket\")\n\t\tret = straightPath(renderer, xLeft, yTop, yBottom, type);\n\tif (header) {\n\t\tret = renderer.paper.closeGroup();\n\t}\n\tselectables.wrapSvgEl({ el_type: type, startChar: -1, endChar: -1 }, ret);\n\n\treturn ret;\n};\nmodule.exports = drawBrace;\n","var sprintf = require('./sprintf');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawCrescendo(renderer, params, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Crescendo Element y-coordinate not set.\");\n\tvar y = renderer.calcY(params.pitch) + 4; // This is the top pixel to use (it is offset a little so that it looks good with the volume marks.)\n\tvar height = 8;\n\n\t// TODO-PER: This is just a quick hack to make the dynamic marks not crash if they are mismatched. See the slur treatment for the way to get the beginning and end.\n\tvar left = params.anchor1 ? params.anchor1.x : 0;\n\tvar right = params.anchor2 ? params.anchor2.x : 800;\n\n\tvar el;\n\tif (params.dir === \"<\") {\n\t\tel = drawLine(renderer, y + height / 2, y, y + height / 2, y + height, left, right);\n\t} else {\n\t\tel = drawLine(renderer, y, y + height / 2, y + height, y + height / 2, left, right);\n\t}\n\tselectables.wrapSvgEl({ el_type: \"dynamicDecoration\", startChar: -1, endChar: -1 }, el);\n\treturn [el];\n}\n\nvar drawLine = function (renderer, y1, y2, y3, y4, left, right) {\n\ty1 = roundNumber(y1);\n\ty2 = roundNumber(y2);\n\ty3 = roundNumber(y3);\n\ty4 = roundNumber(y4);\n\tleft = roundNumber(left);\n\tright = roundNumber(right);\n\n\tvar pathString = sprintf(\"M %f %f L %f %f M %f %f L %f %f\",\n\t\tleft, y1, right, y2, left, y3, right, y4);\n\treturn printPath(renderer, { path: pathString, highlight: \"stroke\", stroke: renderer.foregroundColor, 'class': renderer.controller.classes.generate('dynamics decoration'), \"data-name\": \"dynamics\" });\n};\n\nmodule.exports = drawCrescendo;\n","function printDebugBox(renderer, attr, comment) {\n\tvar box = renderer.paper.rectBeneath(attr);\n\tif (comment)\n\t\trenderer.paper.text(comment, { x: 0, y: attr.y + 7, \"text-anchor\": \"start\", \"font-size\": \"14px\", fill: \"rgba(0,0,255,.4)\", stroke: \"rgba(0,0,255,.4)\" });\n\treturn box;\n}\n\nmodule.exports = printDebugBox;\n","var drawStaffGroup = require('./staff-group');\nvar setPaperSize = require('./set-paper-size');\nvar nonMusic = require('./non-music');\nvar spacing = require('../helpers/spacing');\nvar Selectables = require('./selectables');\n\nfunction draw(renderer, classes, abcTune, width, maxWidth, responsive, scale, selectTypes, tuneNumber, lineOffset) {\n\tvar selectables = new Selectables(renderer.paper, selectTypes, tuneNumber);\n\tvar groupClasses = {}\n\tif (classes.shouldAddClasses)\n\t\tgroupClasses.klass = \"abcjs-meta-top\"\n\trenderer.paper.openGroup(groupClasses)\n\trenderer.moveY(renderer.padding.top);\n\tnonMusic(renderer, abcTune.topText, selectables);\n\trenderer.paper.closeGroup()\n\trenderer.moveY(renderer.spacing.music);\n\tvar staffgroups = [];\n\tfor (var line = 0; line < abcTune.lines.length; line++) {\n\t\tclasses.incrLine();\n\t\tvar abcLine = abcTune.lines[line];\n\t\tif (abcLine.staff) {\n\t\t\tif (classes.shouldAddClasses)\n\t\t\t\tgroupClasses.klass = \"abcjs-staff-wrapper abcjs-l\" + classes.lineNumber\n\t\t\trenderer.paper.openGroup(groupClasses)\n\t\t\tif (abcLine.vskip) {\n\t\t\t\trenderer.moveY(abcLine.vskip);\n\t\t\t}\n\t\t\tif (staffgroups.length >= 1)\n\t\t\t\taddStaffPadding(renderer, renderer.spacing.staffSeparation, staffgroups[staffgroups.length - 1], abcLine.staffGroup);\n\t\t\tvar staffgroup = engraveStaffLine(renderer, abcLine.staffGroup, selectables, line);\n\t\t\tstaffgroup.line = lineOffset + line; // If there are non-music lines then the staffgroup array won't line up with the line array, so this keeps track.\n\t\t\tstaffgroups.push(staffgroup);\n\t\t\trenderer.paper.closeGroup()\n\t\t} else if (abcLine.nonMusic) {\n\t\t\tif (classes.shouldAddClasses)\n\t\t\t\tgroupClasses.klass = \"abcjs-non-music\"\n\t\t\trenderer.paper.openGroup(groupClasses)\n\t\t\tnonMusic(renderer, abcLine.nonMusic, selectables);\n\t\t\trenderer.paper.closeGroup()\n\t\t}\n\t}\n\n\tclasses.reset();\n\tif (abcTune.bottomText && abcTune.bottomText.rows && abcTune.bottomText.rows.length > 0) {\n\t\tif (classes.shouldAddClasses)\n\t\t\tgroupClasses.klass = \"abcjs-meta-bottom\"\n\t\trenderer.paper.openGroup(groupClasses)\n\t\trenderer.moveY(24); // TODO-PER: Empirically discovered. What variable should this be?\n\t\tnonMusic(renderer, abcTune.bottomText, selectables);\n\t\trenderer.paper.closeGroup()\n\t}\n\tsetPaperSize(renderer, maxWidth, scale, responsive);\n\treturn { staffgroups: staffgroups, selectables: selectables.getElements() };\n}\n\nfunction engraveStaffLine(renderer, staffGroup, selectables, lineNumber) {\n\tdrawStaffGroup(renderer, staffGroup, selectables, lineNumber);\n\tvar height = staffGroup.height * spacing.STEP;\n\trenderer.y += height;\n\treturn staffGroup;\n}\n\nfunction addStaffPadding(renderer, staffSeparation, lastStaffGroup, thisStaffGroup) {\n\tvar lastStaff = lastStaffGroup.staffs[lastStaffGroup.staffs.length - 1];\n\tvar lastBottomLine = -(lastStaff.bottom - 2); // The 2 is because the scale goes to 2 below the last line.\n\tvar nextTopLine = thisStaffGroup.staffs[0].top - 10; // Because 10 represents the top line.\n\tvar naturalSeparation = nextTopLine + lastBottomLine; // This is how far apart they'd be without extra spacing\n\tvar separationInPixels = naturalSeparation * spacing.STEP;\n\tif (separationInPixels < staffSeparation)\n\t\trenderer.moveY(staffSeparation - separationInPixels);\n}\n\nmodule.exports = draw;\n","var printSymbol = require('./print-symbol');\n\nfunction drawDynamics(renderer, params, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Dynamic Element y-coordinate not set.\");\n\tvar scalex = 1;\n\tvar scaley = 1;\n\tvar el = printSymbol(renderer, params.anchor.x, params.pitch, params.dec, {\n\t\tscalex: scalex,\n\t\tscaley: scaley,\n\t\tklass: renderer.controller.classes.generate('decoration dynamics'),\n\t\tfill: renderer.foregroundColor,\n\t\tstroke: \"none\",\n\t\tname: \"dynamics\"\n\t});\n\tselectables.wrapSvgEl({ el_type: \"dynamicDecoration\", startChar: -1, endChar: -1, decoration: params.dec }, el);\n\treturn [el];\n}\n\nmodule.exports = drawDynamics;\n","var sprintf = require('./sprintf');\nvar renderText = require('./text');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawEnding(renderer, params, linestartx, lineendx, selectables) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Ending Element y-coordinate not set.\");\n\tvar y = roundNumber(renderer.calcY(params.pitch));\n\tvar height = 20;\n\tvar pathString = '';\n\n\tif (params.anchor1) {\n\t\tlinestartx = roundNumber(params.anchor1.x + params.anchor1.w);\n\t\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\t\tlinestartx, y, linestartx, roundNumber(y + height));\n\t}\n\n\tif (params.anchor2) {\n\t\tlineendx = roundNumber(params.anchor2.x);\n\t\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\t\tlineendx, y, lineendx, roundNumber(y + height));\n\t}\n\n\tpathString += sprintf(\"M %f %f L %f %f \",\n\t\tlinestartx, y, lineendx, y);\n\n\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate(\"ending\"), \"data-name\": \"ending\" });\n\tprintPath(renderer, { path: pathString, stroke: renderer.foregroundColor, fill: renderer.foregroundColor, \"data-name\": \"line\" });\n\tif (params.anchor1)\n\t\trenderText(renderer, {\n\t\t\tx: roundNumber(linestartx + 5),\n\t\t\ty: roundNumber(renderer.calcY(params.pitch - 0.5)),\n\t\t\ttext: params.text,\n\t\t\ttype: 'repeatfont',\n\t\t\tklass: 'ending',\n\t\t\tanchor: \"start\",\n\t\t\tnoClass: true,\n\t\t\tname: params.text\n\t\t});\n\tvar g = renderer.paper.closeGroup();\n\tselectables.wrapSvgEl({ el_type: \"ending\", startChar: -1, endChar: -1 }, g);\n\treturn [g];\n}\n\nmodule.exports = drawEnding;\n","var sprintf = require('./sprintf');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawGlissando(renderer, params, selectables) {\n\tif (!params.anchor1 || !params.anchor2 || !params.anchor1.heads || !params.anchor2.heads || params.anchor1.heads.length === 0 || params.anchor2.heads.length === 0)\n\t\twindow.console.error(\"Glissando Element not set.\");\n\n\tvar margin = 4;\n\tvar leftY = renderer.calcY(params.anchor1.heads[0].pitch)\n\tvar rightY = renderer.calcY(params.anchor2.heads[0].pitch)\n\tvar leftX = params.anchor1.x + params.anchor1.w / 2\n\tvar rightX = params.anchor2.x + params.anchor2.w / 2\n\t\n\tvar len = lineLength(leftX, leftY, rightX, rightY)\n\tvar marginLeft = params.anchor1.w / 2 + margin\n\tvar marginRight = params.anchor2.w / 2 + margin\n\tvar s = slope(leftX, leftY, rightX, rightY)\n\tvar leftYAdj = getY(leftY, s, marginLeft)\n\tvar rightYAdj = getY(rightY, s, -marginRight)\n\tvar num = numSquigglies(len - marginLeft - marginRight)\n\n\tvar el = drawSquiggly(renderer, leftX + marginLeft, leftYAdj, num, s)\n\tselectables.wrapSvgEl({ el_type: \"glissando\", startChar: -1, endChar: -1 }, el);\n\treturn [el];\n}\n\nfunction lineLength(leftX, leftY, rightX, rightY) {\n\t// The length from notehead center to notehead center.\n\tvar w = rightX - leftX\n\tvar h = rightY - leftY\n\treturn Math.sqrt(w * w + h * h)\n}\n\nfunction slope(leftX, leftY, rightX, rightY) {\n\treturn (rightY - leftY) / (rightX - leftX)\n}\n\nfunction getY(y, slope, xOfs) {\n\treturn roundNumber(y + (xOfs) * slope);\n}\n\nfunction numSquigglies(length) {\n\tvar endLen = 5; // The width of the end - that is, the non repeating part\n\treturn Math.max(2, Math.floor((length - endLen * 2) / 6));\n}\n\nvar leftStart = [[3.5, -4.8]]\nvar right = [[1.5, -1], [.3, -.3], [-3.5, 3.8]]\nvar leftEnd = [[-1.5, 2]]\nvar top = [[3, 4], [3, -4]]\nvar bottom = [[-3, 4], [-3, -4]]\n\nfunction segment(arr, slope) {\n\tvar ret = \"\";\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tret += 'l' + arr[i][0] + ' ' + getY(arr[i][1], slope, arr[i][0])\n\t}\n\treturn ret\n}\n\nvar drawSquiggly = function (renderer, x, y, num, slope) {\n\tvar p = sprintf(\"M %f %f\", x, y);\n\tp += segment(leftStart, slope)\n\tvar i\n\tfor (i = 0; i < num; i++) {\n\t\tp += segment(top, slope)\n\t}\n\tp += segment(right, slope)\n\tfor (i = 0; i < num; i++)\n\t\tp += segment(bottom, slope)\n\tp += segment(leftEnd, slope) + 'z'\n\treturn printPath(renderer, { path: p, highlight: \"stroke\", stroke: renderer.foregroundColor, 'class': renderer.controller.classes.generate('decoration'), \"data-name\": \"glissando\" });\n}\n\nmodule.exports = drawGlissando;\n","/**\n * Begin a group of glyphs that will always be moved, scaled and highlighted together\n */\n\nvar roundNumber = require(\"./round-number\");\n\nfunction Group() {\n\tthis.ingroup = false;\n}\n\nGroup.prototype.beginGroup = function (paper, controller) {\n\tthis.paper = paper;\n\tthis.controller = controller;\n\tthis.path = [];\n\tthis.lastM = [0, 0];\n\tthis.ingroup = true;\n\tthis.paper.openGroup();\n};\n\nGroup.prototype.isInGroup = function () {\n\treturn this.ingroup;\n}\n\nGroup.prototype.addPath = function (path) {\n\tpath = path || [];\n\tif (path.length === 0) return;\n\tpath[0][0] = \"m\";\n\tpath[0][1] = roundNumber(path[0][1] - this.lastM[0]);\n\tpath[0][2] = roundNumber(path[0][2] - this.lastM[1]);\n\tthis.lastM[0] += path[0][1];\n\tthis.lastM[1] += path[0][2];\n\tthis.path.push(path[0]);\n\tfor (var i = 1, ii = path.length; i < ii; i++) {\n\t\tif (path[i][0] === \"m\") {\n\t\t\tthis.lastM[0] += path[i][1];\n\t\t\tthis.lastM[1] += path[i][2];\n\t\t}\n\t\tthis.path.push(path[i]);\n\t}\n};\n\n/**\n * End a group of glyphs that will always be moved, scaled and highlighted together\n */\nGroup.prototype.endGroup = function (klass, name) {\n\tthis.ingroup = false;\n\t//if (this.path.length === 0) return null;\n\tvar path = \"\";\n\tfor (var i = 0; i < this.path.length; i++)\n\t\tpath += this.path[i].join(\" \");\n\tthis.path = [];\n\n\tvar ret = this.paper.closeGroup();\n\tif (ret) {\n\t\tret.setAttribute(\"class\", this.controller.classes.generate(klass))\n\t\tret.setAttribute(\"fill\", this.controller.renderer.foregroundColor)\n\t\tret.setAttribute(\"stroke\", \"none\")\n\t\tret.setAttribute(\"data-name\", name)\n\t}\n\treturn ret;\n};\n\n// There is just a singleton of this object.\nvar elementGroup = new Group();\n\nmodule.exports = elementGroup;\n","var drawSeparator = require('./separator');\nvar renderText = require('./text');\n\nfunction nonMusic(renderer, obj, selectables) {\n\tfor (var i = 0; i < obj.rows.length; i++) {\n\t\tvar row = obj.rows[i];\n\t\tif (row.absmove) {\n\t\t\trenderer.absolutemoveY(row.absmove);\n\t\t} else if (row.move) {\n\t\t\trenderer.moveY(row.move);\n\t\t} else if (row.text || row.phrases) {\n\t\t\tvar x = row.left ? row.left : 0;\n\t\t\tvar el = renderText(renderer, {\n\t\t\t\tx: x,\n\t\t\t\ty: renderer.y,\n\t\t\t\ttext: row.text,\n\t\t\t\tphrases: row.phrases,\n\t\t\t\t'dominant-baseline': row['dominant-baseline'],\n\t\t\t\ttype: row.font,\n\t\t\t\tklass: row.klass,\n\t\t\t\tname: row.name,\n\t\t\t\tanchor: row.anchor\n\t\t\t});\n\t\t\tif (row.absElemType) {\n\t\t\t\tselectables.wrapSvgEl({\n\t\t\t\t\tel_type: row.absElemType,\n\t\t\t\t\tname: row.name,\n\t\t\t\t\tstartChar: row.startChar,\n\t\t\t\t\tendChar: row.endChar,\n\t\t\t\t\ttext: row.text\n\t\t\t\t}, el);\n\t\t\t}\n\t\t} else if (row.separator) {\n\t\t\tdrawSeparator(renderer, row.separator)\n\t\t} else if (row.startGroup) {\n\t\t\trenderer.paper.openGroup({ klass: row.klass, \"data-name\": row.name });\n\t\t} else if (row.endGroup) {\n\t\t\t// TODO-PER: also create a history element with the title \"row.endGroup\"\n\t\t\tvar g = renderer.paper.closeGroup();\n\t\t\tif (row.absElemType)\n\t\t\t\tselectables.wrapSvgEl({\n\t\t\t\t\tel_type: row.absElemType,\n\t\t\t\t\tname: row.name,\n\t\t\t\t\tstartChar: row.startChar,\n\t\t\t\t\tendChar: row.endChar,\n\t\t\t\t\ttext: \"\"\n\t\t\t\t}, g);\n\t\t}\n\t}\n}\n\nmodule.exports = nonMusic;\n","var sprintf = require('./sprintf');\nvar roundNumber = require(\"./round-number\");\n\nfunction printLine(renderer, x1, x2, y, klass, name, dy) {\n\tvar fill = renderer.foregroundColor;\n\tx1 = roundNumber(x1);\n\tx2 = roundNumber(x2);\n\tvar y1 = roundNumber(y - dy);\n\tvar y2 = roundNumber(y + dy);\n\t// TODO-PER: This fixes a firefox bug where it isn't displayed\n\tif (renderer.firefox112) {\n\t\ty += dy / 2; // Because the y coordinate is the edge of where the line goes but the width widens from the middle.\n\t\tvar attr = {\n\t\t\tx1: x1,\n\t\t\tx2: x2,\n\t\t\ty1: y,\n\t\t\ty2: y,\n\t\t\tstroke: renderer.foregroundColor,\n\t\t\t'stroke-width': Math.abs(dy*2)\n\t\t}\n\t\tif (klass)\n\t\t\tattr['class'] = klass;\n\t\tif (name)\n\t\t\tattr['data-name'] = name;\n\t\t\n\t\treturn renderer.paper.lineToBack(attr);\n\t}\n\n\tvar pathString = sprintf(\"M %f %f L %f %f L %f %f L %f %f z\", x1, y1, x2, y1,\n\t\tx2, y2, x1, y2);\n\tvar options = { path: pathString, stroke: \"none\", fill: fill };\n\tif (name)\n\t\toptions['data-name'] = name;\n\tif (klass)\n\t\toptions['class'] = klass;\n\tvar ret = renderer.paper.pathToBack(options);\n\n\treturn ret;\n}\n\nmodule.exports = printLine;\n\n","function printPath(renderer, attrs, params) {\n\tvar ret = renderer.paper.path(attrs);\n\n\treturn ret;\n}\n\nmodule.exports = printPath;\n","var elementGroup = require('./group-elements');\nvar roundNumber = require(\"./round-number\");\n\nfunction printStem(renderer, x, dx, y1, y2, klass, name) {\n\tif (dx < 0 || y1 < y2) { // correct path \"handedness\" for intersection with other elements\n\t\tvar tmp = roundNumber(y2);\n\t\ty2 = roundNumber(y1);\n\t\ty1 = tmp;\n\t} else {\n\t\ty1 = roundNumber(y1);\n\t\ty2 = roundNumber(y2);\n\t}\n\tx = roundNumber(x);\n\tvar x2 = roundNumber(x + dx);\n\t// TODO-PER: This fixes a firefox bug where it isn't displayed\n\tif (renderer.firefox112) {\n\t\tx += dx / 2; // Because the x coordinate is the edge of where the line goes but the width widens from the middle.\n\t\tvar attr = {\n\t\t\tx1: x,\n\t\t\tx2: x,\n\t\t\ty1: y1,\n\t\t\ty2: y2,\n\t\t\tstroke: renderer.foregroundColor,\n\t\t\t'stroke-width': Math.abs(dx)\n\t\t}\n\t\tif (klass)\n\t\t\tattr['class'] = klass;\n\t\tif (name)\n\t\t\tattr['data-name'] = name;\n\t\t\n\t\treturn renderer.paper.lineToBack(attr);\n\t}\n\tvar pathArray = [[\"M\", x, y1], [\"L\", x, y2], [\"L\", x2, y2], [\"L\", x2, y1], [\"z\"]];\n\tvar attr = { path: \"\" };\n\tfor (var i = 0; i < pathArray.length; i++)\n\t\tattr.path += pathArray[i].join(\" \");\n\tif (klass)\n\t\tattr['class'] = klass;\n\tif (name)\n\t\tattr['data-name'] = name;\n\tif (!elementGroup.isInGroup()) {\n\t\tattr.stroke = \"none\";\n\t\tattr.fill = renderer.foregroundColor;\n\t}\n\treturn renderer.paper.pathToBack(attr);\n}\n\nmodule.exports = printStem;\n","var renderText = require('./text');\nvar glyphs = require('../creation/glyphs');\nvar elementGroup = require('./group-elements');\n\n/**\n * assumes this.y is set appropriately\n * if symbol is a multichar string without a . (as in scripts.staccato) 1 symbol per char is assumed\n * not scaled if not in printgroup\n */\nfunction printSymbol(renderer, x, offset, symbol, options) {\n\t// TODO-PER: what happened to scalex, and scaley? That might have been a bug introduced in refactoring\n\tvar el;\n\tvar ycorr;\n\tif (!symbol) return null;\n\tif (symbol.length > 1 && symbol.indexOf(\".\") < 0) {\n\t\tvar groupClass = elementGroup.isInGroup() ? '' : options.klass // If this is already in a group then don't repeat the classes for the sub-group)\n\t\trenderer.paper.openGroup({ \"data-name\": options.name, klass: groupClass });\n\t\tvar dx = 0;\n\t\tfor (var i = 0; i < symbol.length; i++) {\n\t\t\tvar s = symbol[i];\n\t\t\tycorr = glyphs.getYCorr(s);\n\t\t\tel = glyphs.printSymbol(x + dx, renderer.calcY(offset + ycorr), s, renderer.paper, { stroke: options.stroke, fill: options.fill });\n\t\t\tif (el) {\n\t\t\t\tif (i < symbol.length - 1)\n\t\t\t\t\tdx += kernSymbols(s, symbol[i + 1], glyphs.getSymbolWidth(s));\n\t\t\t} else {\n\t\t\t\trenderText(renderer, { x: x, y: renderer.y, text: \"no symbol:\" + symbol, type: \"debugfont\", klass: 'debug-msg', anchor: 'start' }, false);\n\t\t\t}\n\t\t}\n\t\tvar g = renderer.paper.closeGroup();\n\t\treturn g;\n\t} else {\n\t\tycorr = glyphs.getYCorr(symbol);\n\t\tif (elementGroup.isInGroup()) {\n\t\t\tel = glyphs.printSymbol(x, renderer.calcY(offset + ycorr), symbol, renderer.paper, { \"data-name\": options.name });\n\t\t} else {\n\t\t\tel = glyphs.printSymbol(x, renderer.calcY(offset + ycorr), symbol, renderer.paper, { klass: options.klass, stroke: options.stroke, fill: options.fill, \"data-name\": options.name });\n\t\t}\n\t\tif (el) {\n\t\t\treturn el;\n\t\t}\n\t\trenderText(renderer, { x: x, y: renderer.y, text: \"no symbol:\" + symbol, type: \"debugfont\", klass: 'debug-msg', anchor: 'start' }, false);\n\t\treturn null;\n\t}\n}\n\nfunction kernSymbols(lastSymbol, thisSymbol, lastSymbolWidth) {\n\t// This is just some adjustments to make it look better.\n\tvar width = lastSymbolWidth;\n\tif (lastSymbol === 'f' && thisSymbol === 'f')\n\t\twidth = width * 2 / 3;\n\tif (lastSymbol === 'p' && thisSymbol === 'p')\n\t\twidth = width * 5 / 6;\n\tif (lastSymbol === 'f' && thisSymbol === 'z')\n\t\twidth = width * 5 / 8;\n\treturn width;\n}\n\nmodule.exports = printSymbol;\n","var renderText = require('./text');\nvar printStem = require('./print-stem');\nvar printStaffLine = require('./staff-line');\nvar printSymbol = require('./print-symbol');\n\nfunction drawRelativeElement(renderer, params, bartop) {\n\tif (params.pitch === undefined)\n\t\twindow.console.error(params.type + \" Relative Element y-coordinate not set.\");\n\tvar y = renderer.calcY(params.pitch);\n\tswitch (params.type) {\n\t\tcase \"symbol\":\n\t\t\tif (params.c === null) return null;\n\t\t\tvar klass = \"symbol\";\n\t\t\tif (params.klass) klass += \" \" + params.klass;\n\t\t\tparams.graphelem = printSymbol(renderer, params.x, params.pitch, params.c, {\n\t\t\t\tscalex: params.scalex,\n\t\t\t\tscaley: params.scaley,\n\t\t\t\tklass: renderer.controller.classes.generate(klass),\n\t\t\t\t//\t\t\t\tfill:\"none\",\n\t\t\t\t//\t\t\t\tstroke: renderer.foregroundColor,\n\t\t\t\tname: params.name\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: renderer.calcY(15), text: \"\" + params.c, type: \"debugfont\", klass: renderer.controller.classes.generate('debug-msg'), anchor: 'start', centerVertically: false, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"tabNumber\":\n\t\t\tvar hAnchor = \"middle\";\n\t\t\tvar tabFont = \"tabnumberfont\";\n\t\t\tvar tabClass = 'abcjs-tab-number';\n\t\t\tif (params.isGrace) {\n\t\t\t\ttabFont = \"tabgracefont\";\n\t\t\t\ty += 2.5;\n\t\t\t\ttabClass = 'tab-grace'\n\t\t\t}\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: \"\" + params.c, type: tabFont, klass: renderer.controller.classes.generate(tabClass), anchor: hAnchor, centerVertically: false, dim: params.dim, cursor: 'default' }, false);\n\t\t\tbreak;\n\t\tcase \"barNumber\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: \"\" + params.c, type: \"measurefont\", klass: renderer.controller.classes.generate('bar-number'), anchor: \"middle\", dim: params.dim, name: \"bar-number\" }, true);\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: \"vocalfont\", klass: renderer.controller.classes.generate('lyric'), anchor: \"middle\", dim: params.dim, name: \"lyric\" }, false);\n\t\t\tbreak;\n\t\tcase \"chord\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'gchordfont', klass: renderer.controller.classes.generate(\"chord\"), anchor: \"middle\", dim: params.dim, lane: params.getLane(), name: \"chord\" }, false);\n\t\t\tbreak;\n\t\tcase \"decoration\":\n\t\t\t// The +6 is to compensate for the placement of text in svg: to be on the same row as symbols, the y-coord needs to compensate for the center line.\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y + 6, text: params.c, type: 'annotationfont', klass: renderer.controller.classes.generate(\"annotation\"), anchor: params.anchor, centerVertically: true, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'annotationfont', klass: renderer.controller.classes.generate(\"annotation\"), anchor: \"start\", centerVertically: params.centerVertically, dim: params.dim, lane: params.getLane(), name: \"annotation\" }, false);\n\t\t\tbreak;\n\t\tcase \"multimeasure-text\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x + params.w / 2, y: y, text: params.c, type: 'tempofont', klass: renderer.controller.classes.generate(\"rest\"), anchor: \"middle\", centerVertically: false, dim: params.dim }, false);\n\t\t\tbreak;\n\t\tcase \"part\":\n\t\t\tparams.graphelem = renderText(renderer, { x: params.x, y: y, text: params.c, type: 'partsfont', klass: renderer.controller.classes.generate(\"part\"), anchor: \"start\", dim: params.dim, name: params.c }, true);\n\t\t\tbreak;\n\t\tcase \"bar\":\n\t\t\tparams.graphelem = printStem(renderer, params.x, params.linewidth + renderer.lineThickness, y, (bartop) ? bartop : renderer.calcY(params.pitch2), null, \"bar\"); break; // bartop can't be 0\n\t\tcase \"stem\":\n\t\t\tvar stemWidth = params.linewidth > 0 ? params.linewidth + renderer.lineThickness : params.linewidth - renderer.lineThickness\n\t\t\tparams.graphelem = printStem(renderer, params.x, stemWidth, y, renderer.calcY(params.pitch2), 'abcjs-stem', 'stem'); break;\n\t\tcase \"ledger\":\n\t\t\tparams.graphelem = printStaffLine(renderer, params.x, params.x + params.w, params.pitch, \"abcjs-ledger\", \"ledger\", 0.35 + renderer.lineThickness); break;\n\t}\n\tif (params.scalex !== 1 && params.graphelem) {\n\t\tscaleExistingElem(renderer.paper, params.graphelem, params.scalex, params.scaley, params.x, y);\n\t}\n\treturn params.graphelem;\n}\n\nfunction scaleExistingElem(paper, elem, scaleX, scaleY, x, y) {\n\tpaper.setAttributeOnElement(elem, { style: \"transform:scale(\" + scaleX + \",\" + scaleY + \");transform-origin:\" + x + \"px \" + y + \"px;\" });\n}\n\nmodule.exports = drawRelativeElement;\n","function roundNumber(x) {\n\treturn parseFloat(x.toFixed(2));\n}\n\nmodule.exports = roundNumber;\n","var highlight = require('../interactive/highlight');\nvar unhighlight = require('../interactive/unhighlight');\n\nfunction Selectables(paper, selectTypes, tuneNumber) {\n\tthis.elements = [];\n\tthis.paper = paper;\n\tthis.tuneNumber = tuneNumber;\n\tthis.selectTypes = selectTypes;\n}\n\nSelectables.prototype.getElements = function () {\n\treturn this.elements;\n};\n\nSelectables.prototype.add = function (absEl, svgEl, isNoteOrTabNumber, staffPos) {\n\tif (!this.canSelect(absEl))\n\t\treturn;\n\tvar params;\n\tif (this.selectTypes === undefined)\n\t\tparams = { selectable: false, \"data-index\": this.elements.length }; // This is the old behavior.\n\telse\n\t\tparams = { selectable: true, tabindex: 0, \"data-index\": this.elements.length };\n\tthis.paper.setAttributeOnElement(svgEl, params);\n\tvar sel = { absEl: absEl, svgEl: svgEl, isDraggable: isNoteOrTabNumber };\n\tif (staffPos !== undefined)\n\t\tsel.staffPos = staffPos;\n\tthis.elements.push(sel);\n\n};\n\nSelectables.prototype.canSelect = function (absEl) {\n\tif (this.selectTypes === false)\n\t\treturn false;\n\tif (!absEl || !absEl.abcelem)\n\t\treturn false;\n\tif (this.selectTypes === true)\n\t\treturn true;\n\tif (this.selectTypes === undefined) {\n\t\t// by default, only notes and tab numbers can be clicked.\n\t\tif (absEl.abcelem.el_type === 'note' || absEl.abcelem.el_type === 'tabNumber') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\treturn this.selectTypes.indexOf(absEl.abcelem.el_type) >= 0;\n};\n\nSelectables.prototype.wrapSvgEl = function (abcelem, el) {\n\tvar absEl = {\n\t\ttuneNumber: this.tuneNumber,\n\t\tabcelem: abcelem,\n\t\telemset: [el],\n\t\thighlight: highlight,\n\t\tunhighlight: unhighlight\n\t};\n\tthis.add(absEl, el, false);\n};\n\nmodule.exports = Selectables;\n","function drawSeparator(renderer, width) {\n\tvar fill = \"rgba(0,0,0,255)\";\n\tvar stroke = \"rgba(0,0,0,0)\";\n\tvar y = Math.round(renderer.y);\n\tvar staffWidth = renderer.controller.width;\n\tvar x1 = (staffWidth - width) / 2;\n\tvar x2 = x1 + width;\n\tvar pathString = 'M ' + x1 + ' ' + y +\n\t\t' L ' + x2 + ' ' + y +\n\t\t' L ' + x2 + ' ' + (y + 1) +\n\t\t' L ' + x1 + ' ' + (y + 1) +\n\t\t' L ' + x1 + ' ' + y + ' z';\n\trenderer.paper.pathToBack({ path: pathString, stroke: stroke, fill: fill, 'class': renderer.controller.classes.generate('defined-text') });\n}\n\nmodule.exports = drawSeparator;\n","function setPaperSize(renderer, maxwidth, scale, responsive) {\n\tvar w = (maxwidth + renderer.padding.left + renderer.padding.right) * scale;\n\tvar h = (renderer.y + renderer.padding.bottom) * scale;\n\tif (renderer.isPrint)\n\t\th = Math.max(h, 1056); // 11in x 72pt/in x 1.33px/pt\n\t// TODO-PER: We are letting the page get as long as it needs now, but eventually that should go to a second page.\n\n\t// for accessibility\n\tif (renderer.ariaLabel !== '') {\n\t\tvar text = \"Sheet Music\";\n\t\tif (renderer.abctune && renderer.abctune.metaText && renderer.abctune.metaText.title)\n\t\t\ttext += \" for \\\"\" + renderer.abctune.metaText.title + '\"';\n\t\trenderer.paper.setTitle(text);\n\t\tvar label = renderer.ariaLabel ? renderer.ariaLabel : text;\n\t\trenderer.paper.setAttribute(\"aria-label\", label);\n\t}\n\n\t// for dragging - don't select during drag\n\tvar styles = [\n\t\t\"-webkit-touch-callout: none;\",\n\t\t\"-webkit-user-select: none;\",\n\t\t\"-khtml-user-select: none;\",\n\t\t\"-moz-user-select: none;\",\n\t\t\"-ms-user-select: none;\",\n\t\t\"user-select: none;\"\n\t];\n\trenderer.paper.insertStyles(\".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {\" + styles.join(\" \") + \"}\");\n\n\tvar parentStyles = { overflow: \"hidden\" };\n\tif (responsive === 'resize') {\n\t\trenderer.paper.setResponsiveWidth(w, h);\n\t} else {\n\t\tparentStyles.width = \"\";\n\t\tparentStyles.height = h + \"px\";\n\t\tif (scale < 1) {\n\t\t\tparentStyles.width = w + \"px\";\n\t\t\trenderer.paper.setSize(w / scale, h / scale);\n\t\t} else\n\t\t\trenderer.paper.setSize(w, h);\n\t}\n\trenderer.paper.setScale(scale);\n\trenderer.paper.setParentStyles(parentStyles);\n}\n\nmodule.exports = setPaperSize;\n","/**\n * sprintf() for JavaScript v.0.4\n *\n Copyright (c) 2007-present, Alexandru Mărășteanu \n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n * Neither the name of this software nor the names of its contributors may be\n used to endorse or promote products derived from this software without\n specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n//function str_repeat(i, m) { for (var o = []; m > 0; o[--m] = i); return(o.join('')); }\n\nvar sprintf = function () {\n\tvar i = 0, a, f = arguments[i++], o = [], m, p, c, x;\n\twhile (f) {\n\t\tif (m = /^[^\\x25]+/.exec(f)) o.push(m[0]);\n\t\telse if (m = /^\\x25{2}/.exec(f)) o.push('%');\n\t\telse if (m = /^\\x25(?:(\\d+)\\$)?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosuxX])/.exec(f)) {\n\t\t\tif (((a = arguments[m[1] || i++]) == null) || (a == undefined)) throw (\"Too few arguments.\");\n\t\t\tif (/[^s]/.test(m[7]) && (typeof (a) != 'number'))\n\t\t\t\tthrow (\"Expecting number but found \" + typeof (a));\n\t\t\tswitch (m[7]) {\n\t\t\t\tcase 'b': a = a.toString(2); break;\n\t\t\t\tcase 'c': a = String.fromCharCode(a); break;\n\t\t\t\tcase 'd': a = parseInt(a); break;\n\t\t\t\tcase 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;\n\t\t\t\tcase 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;\n\t\t\t\tcase 'o': a = a.toString(8); break;\n\t\t\t\tcase 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;\n\t\t\t\tcase 'u': a = Math.abs(a); break;\n\t\t\t\tcase 'x': a = a.toString(16); break;\n\t\t\t\tcase 'X': a = a.toString(16).toUpperCase(); break;\n\t\t\t}\n\t\t\ta = (/[def]/.test(m[7]) && m[2] && a > 0 ? '+' + a : a);\n\t\t\tc = m[3] ? m[3] == '0' ? '0' : m[3][1] : ' ';\n\t\t\tx = m[5] - String(a).length;\n\t\t\tp = m[5] ? str_repeat(c, x) : '';\n\t\t\to.push(m[4] ? a + p : p + a);\n\t\t}\n\t\telse throw (\"Huh ?!\");\n\t\tf = f.substring(m[0].length);\n\t}\n\treturn o.join('');\n};\n\nmodule.exports = sprintf;\n","var spacing = require('../helpers/spacing');\nvar drawBrace = require('./brace');\nvar drawVoice = require('./voice');\nvar printStaff = require('./staff');\nvar printDebugBox = require('./debug-box');\nvar printStem = require('./print-stem');\nvar nonMusic = require('./non-music');\n\nfunction drawStaffGroup(renderer, params, selectables, lineNumber) {\n\t// We enter this method with renderer.y pointing to the topmost coordinate that we're allowed to draw.\n\t// All of the children that will be drawn have a relative \"pitch\" set, where zero is the first ledger line below the staff.\n\t// renderer.y will be offset at the beginning of each staff by the amount required to make the relative pitch work.\n\t// If there are multiple staves, then renderer.y will be incremented for each new staff.\n\n\tvar colorIndex;\n\n\t// An invisible marker is useful to be able to find where each system starts.\n\t//addInvisibleMarker(renderer, \"abcjs-top-of-system\");\n\n\tvar startY = renderer.y; // So that it can be restored after we're done.\n\t// Set the absolute Y position for each staff here, so the voice drawing below can just use if.\n\tfor (var j = 0; j < params.staffs.length; j++) {\n\t\tvar staff1 = params.staffs[j];\n\t\t//renderer.printHorizontalLine(50, renderer.y, \"start\");\n\t\trenderer.moveY(spacing.STEP, staff1.top);\n\t\tstaff1.absoluteY = renderer.y;\n\t\tif (renderer.showDebug) {\n\t\t\tif (renderer.showDebug.indexOf(\"box\") >= 0 && staff1.voices) {\n\t\t\t\tboxAllElements(renderer, params.voices, staff1.voices);\n\t\t\t}\n\t\t\tif (renderer.showDebug.indexOf(\"grid\") >= 0) {\n\t\t\t\trenderer.paper.dottedLine({ x1: renderer.padding.left, x2: renderer.padding.left + renderer.controller.width, y1: startY, y2: startY, stroke: \"#0000ff\" });\n\t\t\t\tprintDebugBox(renderer,\n\t\t\t\t\t{\n\t\t\t\t\t\tx: renderer.padding.left,\n\t\t\t\t\t\ty: renderer.calcY(staff1.originalTop),\n\t\t\t\t\t\twidth: renderer.controller.width,\n\t\t\t\t\t\theight: renderer.calcY(staff1.originalBottom) - renderer.calcY(staff1.originalTop),\n\t\t\t\t\t\tfill: renderer.foregroundColor,\n\t\t\t\t\t\tstroke: renderer.foregroundColor,\n\t\t\t\t\t\t\"fill-opacity\": 0.1,\n\t\t\t\t\t\t\"stroke-opacity\": 0.1\n\t\t\t\t\t});\n\t\t\t\tcolorIndex = 0;\n\t\t\t\tdebugPrintGridItem(staff1, 'chordHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'chordHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'dynamicHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'dynamicHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'endingHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'lyricHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'lyricHeightBelow');\n\t\t\t\tdebugPrintGridItem(staff1, 'partHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'tempoHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'volumeHeightAbove');\n\t\t\t\tdebugPrintGridItem(staff1, 'volumeHeightBelow');\n\t\t\t}\n\t\t}\n\t\trenderer.moveY(spacing.STEP, -staff1.bottom);\n\t\tif (renderer.showDebug) {\n\t\t\tif (renderer.showDebug.indexOf(\"grid\") >= 0) {\n\t\t\t\trenderer.paper.dottedLine({\n\t\t\t\t\tx1: renderer.padding.left,\n\t\t\t\t\tx2: renderer.padding.left + renderer.controller.width,\n\t\t\t\t\ty1: renderer.y,\n\t\t\t\t\ty2: renderer.y,\n\t\t\t\t\tstroke: \"#0000aa\"\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tvar topLine; // these are to connect multiple staves. We need to remember where they are.\n\tvar bottomLine;\n\n\tvar linePitch = 2;\n\tvar bartop = 0;\n\tfor (var i = 0; i < params.voices.length; i++) {\n\t\tvar staff = params.voices[i].staff;\n\t\tvar tabName = params.voices[i].tabNameInfos;\n\t\trenderer.y = staff.absoluteY;\n\t\trenderer.controller.classes.incrVoice();\n\t\t//renderer.y = staff.y;\n\t\t// offset for starting the counting at middle C\n\t\tif (!params.voices[i].duplicate) {\n\t\t\t//\t\t\trenderer.moveY(spacing.STEP, staff.top);\n\t\t\tif (!topLine) topLine = renderer.calcY(10);\n\t\t\tbottomLine = renderer.calcY(linePitch);\n\t\t\tif (staff.lines !== 0) {\n\t\t\t\tif (staff.linePitch) {\n\t\t\t\t\tlinePitch = staff.linePitch;\n\t\t\t\t}\n\t\t\t\trenderer.controller.classes.newMeasure();\n\t\t\t\tvar lines = printStaff(renderer, params.startx, params.w, staff.lines, staff.linePitch, 0.35);\n\t\t\t\tbottomLine = lines[1];\n\t\t\t\tstaff.bottomLine = bottomLine;\n\t\t\t\tstaff.topLine = lines[0];\n\t\t\t\t// rework bartop when tabs are present with current staff\n\t\t\t\tif (staff.hasTab) {\n\t\t\t\t\t// do not link to staff above (ugly looking)\n\t\t\t\t\tbartop = staff.topLine;\n\t\t\t\t}\n\t\t\t\tif (staff.hasStaff) {\n\t\t\t\t\t// this is a tab\n\t\t\t\t\tbartop = staff.hasStaff.topLine;\n\t\t\t\t\tparams.voices[i].barto = true;\n\t\t\t\t\tparams.voices[i].topLine = topLine;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tprintBrace(renderer, staff.absoluteY, params.brace, i, selectables);\n\t\t\tprintBrace(renderer, staff.absoluteY, params.bracket, i, selectables);\n\t\t}\n\t\tdrawVoice(renderer, params.voices[i], bartop, selectables, {\n\t\t\ttop: startY,\n\t\t\tzero: renderer.y,\n\t\t\theight: params.height * spacing.STEP\n\t\t});\n\t\tvar tabNameHeight = 0;\n\t\tif (tabName) {\n\t\t\t// print tab infos on staffBottom\n\t\t\tvar r = { rows: [] };\n\t\t\tr.rows.push({ absmove: bottomLine + 2 });\n\t\t\tvar leftMargin = 8;\n\t\t\tr.rows.push({ left: params.startx + leftMargin, text: tabName.name, font: 'tablabelfont', klass: 'text instrument-name', anchor: 'start' });\n\t\t\tr.rows.push({ move: tabName.textSize.height });\n\t\t\tnonMusic(renderer, r);\n\t\t\ttabNameHeight = tabName.textSize.height;\n\t\t}\n\n\t\trenderer.controller.classes.newMeasure();\n\t\tif (!params.voices[i].duplicate) {\n\t\t\tbartop = renderer.calcY(2 + tabNameHeight); // This connects the bar lines between two different staves.\n\t\t\t//\t\t\tif (staff.bottom < 0)\n\t\t\t//\t\t\t\trenderer.moveY(spacing.STEP, -staff.bottom);\n\t\t}\n\t}\n\trenderer.controller.classes.newMeasure();\n\n\t// connect all the staves together with a vertical line\n\tvar staffSize = params.staffs.length;\n\tif (staffSize > 1) {\n\t\ttopLine = params.staffs[0].topLine;\n\t\tbottomLine = params.staffs[staffSize - 1].bottomLine;\n\t\tprintStem(renderer, params.startx, 0.6, topLine, bottomLine, null);\n\t}\n\trenderer.y = startY;\n\n\tfunction debugPrintGridItem(staff, key) {\n\t\tvar colors = [\"rgb(207,27,36)\", \"rgb(168,214,80)\", \"rgb(110,161,224)\", \"rgb(191,119,218)\", \"rgb(195,30,151)\",\n\t\t\t\"rgb(31,170,177)\", \"rgb(220,166,142)\"];\n\t\tif (staff.positionY && staff.positionY[key]) {\n\t\t\tvar height = staff.specialY[key] * spacing.STEP;\n\t\t\tif (key === \"chordHeightAbove\" && staff.specialY.chordLines && staff.specialY.chordLines.above)\n\t\t\t\theight *= staff.specialY.chordLines.above;\n\t\t\tif (key === \"chordHeightBelow\" && staff.specialY.chordLines && staff.specialY.chordLines.below)\n\t\t\t\theight *= staff.specialY.chordLines.below;\n\t\t\tprintDebugBox(renderer,\n\t\t\t\t{\n\t\t\t\t\tx: renderer.padding.left,\n\t\t\t\t\ty: renderer.calcY(staff.positionY[key]),\n\t\t\t\t\twidth: renderer.controller.width,\n\t\t\t\t\theight: height,\n\t\t\t\t\tfill: colors[colorIndex],\n\t\t\t\t\tstroke: colors[colorIndex],\n\t\t\t\t\t\"fill-opacity\": 0.4,\n\t\t\t\t\t\"stroke-opacity\": 0.4\n\t\t\t\t},\n\t\t\t\tkey.substr(0, 4));\n\t\t\tcolorIndex += 1; if (colorIndex > 6) colorIndex = 0;\n\t\t}\n\t}\n}\n\nfunction printBrace(renderer, absoluteY, brace, index, selectables) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tif (brace[i].isStartVoice(index)) {\n\t\t\t\tbrace[i].startY = absoluteY - spacing.STEP * 10;\n\t\t\t\tbrace[i].elemset = drawBrace(renderer, brace[i], selectables);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// function addInvisibleMarker(renderer, className) {\n// \tvar y = Math.round(renderer.y);\n// \trenderer.paper.pathToBack({path:\"M 0 \" + y + \" L 0 0\", stroke:\"none\", fill:\"none\", \"stroke-opacity\": 0, \"fill-opacity\": 0, 'class': renderer.controller.classes.generate(className), 'data-vertical': y });\n// }\n\nfunction boxAllElements(renderer, voices, which) {\n\tfor (var i = 0; i < which.length; i++) {\n\t\tvar children = voices[which[i]].children;\n\t\tfor (var j = 0; j < children.length; j++) {\n\t\t\tvar elem = children[j];\n\t\t\tvar coords = elem.getFixedCoords();\n\t\t\tif (elem.invisible || coords.t === undefined || coords.b === undefined)\n\t\t\t\tcontinue;\n\t\t\tvar height = (coords.t - coords.b) * spacing.STEP;\n\t\t\tprintDebugBox(renderer,\n\t\t\t\t{\n\t\t\t\t\tx: coords.x,\n\t\t\t\t\ty: renderer.calcY(coords.t),\n\t\t\t\t\twidth: coords.w,\n\t\t\t\t\theight: height,\n\t\t\t\t\tfill: \"#88e888\",\n\t\t\t\t\t\"fill-opacity\": 0.4,\n\t\t\t\t\tstroke: \"#4aa93d\",\n\t\t\t\t\t\"stroke-opacity\": 0.8\n\t\t\t\t});\n\n\t\t\tfor (var k = 0; k < elem.children.length; k++) {\n\t\t\t\tvar relElem = elem.children[k];\n\t\t\t\tvar chord = relElem.getChordDim();\n\t\t\t\tif (chord) {\n\t\t\t\t\tvar y = renderer.calcY(relElem.pitch);\n\t\t\t\t\ty += relElem.dim.font.size * relElem.getLane();\n\t\t\t\t\tprintDebugBox(renderer,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tx: chord.left,\n\t\t\t\t\t\t\ty: y,\n\t\t\t\t\t\t\twidth: chord.right - chord.left,\n\t\t\t\t\t\t\theight: relElem.dim.font.size,\n\t\t\t\t\t\t\tfill: \"none\",\n\t\t\t\t\t\t\tstroke: \"#4aa93d\",\n\t\t\t\t\t\t\t\"stroke-opacity\": 0.8\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = drawStaffGroup;\n","var printLine = require('./print-line');\n\nfunction printStaffLine(renderer, x1, x2, pitch, klass, name, dy) {\n\tvar y = renderer.calcY(pitch);\n\treturn printLine(renderer, x1, x2, y, klass, name, dy);\n}\n\nmodule.exports = printStaffLine;\n\n","var printStaffLine = require('./staff-line');\n\nfunction printStaff(renderer, startx, endx, numLines, linePitch, dy) {\n\tvar klass = \"abcjs-top-line\";\n\tvar pitch = 2;\n\tif (linePitch) {\n\t\tpitch = linePitch;\n\t}\n\trenderer.paper.openGroup({ prepend: true, klass: renderer.controller.classes.generate(\"abcjs-staff\") });\n\t// If there is one line, it is the B line. Otherwise, the bottom line is the E line.\n\tvar firstYLine = 0;\n\tvar lastYLine = 0;\n\tif (numLines === 1) {\n\t\tprintStaffLine(renderer, startx, endx, 6, klass, null, dy + renderer.lineThickness);\n\t\tfirstYLine = renderer.calcY(10);\n\t\tlastYLine = renderer.calcY(2);\n\t} else {\n\n\t\tfor (var i = numLines - 1; i >= 0; i--) {\n\t\t\tvar curpitch = (i + 1) * pitch;\n\t\t\tlastYLine = renderer.calcY(curpitch);\n\t\t\tif (firstYLine === 0) {\n\t\t\t\tfirstYLine = lastYLine;\n\t\t\t}\n\t\t\tprintStaffLine(renderer, startx, endx, curpitch, klass, null, dy + renderer.lineThickness);\n\t\t\tklass = undefined;\n\t\t}\n\t}\n\trenderer.paper.closeGroup();\n\treturn [firstYLine, lastYLine];\n}\n\nmodule.exports = printStaff;\n","var drawRelativeElement = require('./relative');\nvar renderText = require('./text');\n\nfunction drawTempo(renderer, params) {\n\tvar x = params.x;\n\tif (params.pitch === undefined)\n\t\twindow.console.error(\"Tempo Element y-coordinate not set.\");\n\n\t//var tempoGroup;\n\tparams.tempo.el_type = \"tempo\";\n\t//\trenderer.wrapInAbsElem(params.tempo, \"abcjs-tempo\", function () {\n\t//renderer.paper.openGroup({klass: renderer.controller.classes.generate(\"tempo wha\")});\n\t// The text is aligned with extra room for descenders but numbers look like they are a little too high, so bump it a little.\n\tvar descenderHeight = 2;\n\tvar y = renderer.calcY(params.pitch) + 2;\n\tvar text;\n\tvar size;\n\tif (params.tempo.preString) {\n\t\ttext = renderText(renderer, { x: x, y: y, text: params.tempo.preString, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"pre\" }, true);\n\t\tsize = renderer.controller.getTextSize.calc(params.tempo.preString, 'tempofont', 'tempo', text);\n\t\tvar preWidth = size.width;\n\t\tvar charWidth = preWidth / params.tempo.preString.length; // Just get some average number to increase the spacing.\n\t\tx += preWidth + charWidth;\n\t}\n\tif (params.note) {\n\t\tparams.note.setX(x);\n\t\tfor (var i = 0; i < params.note.children.length; i++)\n\t\t\tdrawRelativeElement(renderer, params.note.children[i], x);\n\t\tx += (params.note.w + 5);\n\t\tvar str = \"= \" + params.tempo.bpm;\n\t\ttext = renderText(renderer, { x: x, y: y, text: str, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"beats\" });\n\t\tsize = renderer.controller.getTextSize.calc(str, 'tempofont', 'tempo', text);\n\t\tvar postWidth = size.width;\n\t\tvar charWidth2 = postWidth / str.length; // Just get some average number to increase the spacing.\n\t\tx += postWidth + charWidth2;\n\t}\n\tif (params.tempo.postString) {\n\t\trenderText(renderer, { x: x, y: y, text: params.tempo.postString, type: 'tempofont', klass: 'abcjs-tempo', anchor: \"start\", noClass: true, name: \"post\" }, true);\n\t}\n\t//tempoGroup = renderer.paper.closeGroup();\n\t//\t});\n\t//return [tempoGroup];\n}\n\nmodule.exports = drawTempo;\n","var roundNumber = require(\"./round-number\");\n\nfunction renderText(renderer, params, alreadyInGroup) {\n\tvar y = params.y;\n\n\t// TODO-PER: Probably need to merge the regular text and rich text better. At the least, rich text loses the font box.\n\tif (params.phrases) {\n\t\t//richTextLine = function (phrases, x, y, klass, anchor, target)\n\t\tvar elem = renderer.paper.richTextLine(params.phrases, params.x, params.y, params.klass, params.anchor);\n\t\treturn elem;\n\t}\n\n\tif (params.lane) {\n\t\tvar laneMargin = params.dim.font.size * 0.25;\n\t\ty += (params.dim.font.size + laneMargin) * params.lane;\n\t}\n\n\tvar hash;\n\tif (params.dim) {\n\t\thash = params.dim;\n\t\thash.attr.class = params.klass;\n\t} else\n\t\thash = renderer.controller.getFontAndAttr.calc(params.type, params.klass);\n\tif (params.anchor)\n\t\thash.attr[\"text-anchor\"] = params.anchor;\n\tif (params['dominant-baseline'])\n\t\thash.attr[\"dominant-baseline\"] = params['dominant-baseline'];\n\thash.attr.x = params.x;\n\thash.attr.y = y;\n\tif (!params.centerVertically)\n\t\thash.attr.y += hash.font.size;\n\tif (params.type === 'debugfont') {\n\t\tconsole.log(\"Debug msg: \" + params.text);\n\t\thash.attr.stroke = \"#ff0000\";\n\t}\n\tif (params.cursor) {\n\t\thash.attr.cursor = params.cursor;\n\t}\n\n\tvar text = params.text.replace(/\\n\\n/g, \"\\n \\n\");\n\ttext = text.replace(/^\\n/, \"\\xA0\\n\");\n\n\tif (hash.font.box) {\n\t\tif (!alreadyInGroup)\n\t\t\trenderer.paper.openGroup({ klass: hash.attr['class'], fill: renderer.foregroundColor, \"data-name\": params.name });\n\t\tif (hash.attr[\"text-anchor\"] === \"end\") {\n\t\t\thash.attr.x -= hash.font.padding;\n\t\t} else if (hash.attr[\"text-anchor\"] === \"start\") {\n\t\t\thash.attr.x += hash.font.padding;\n\t\t}\n\t\thash.attr.y += hash.font.padding;\n\t\tdelete hash.attr['class'];\n\t}\n\tif (params.noClass)\n\t\tdelete hash.attr['class'];\n\thash.attr.x = roundNumber(hash.attr.x);\n\thash.attr.y = roundNumber(hash.attr.y);\n\tif (params.name)\n\t\thash.attr[\"data-name\"] = params.name;\n\tvar elem = renderer.paper.text(text, hash.attr);\n\tif (hash.font.box) {\n\t\tvar size = elem.getBBox();\n\n\t\tvar delta = 0;\n\t\tif (hash.attr[\"text-anchor\"] === \"middle\") {\n\t\t\tdelta = size.width / 2 + hash.font.padding;\n\t\t} else if (hash.attr[\"text-anchor\"] === \"end\") {\n\t\t\tdelta = size.width + hash.font.padding * 2;\n\t\t}\n\t\tvar deltaY = 0;\n\t\tif (params.centerVertically) {\n\t\t\tdeltaY = size.height - hash.font.padding;\n\t\t}\n\t\trenderer.paper.rect({ \"data-name\": \"box\", x: Math.round(params.x - delta), y: Math.round(y - deltaY), width: Math.round(size.width + hash.font.padding * 2), height: Math.round(size.height + hash.font.padding * 2) });\n\t\tif (!alreadyInGroup)\n\t\t\telem = renderer.paper.closeGroup();\n\t}\n\treturn elem;\n}\n\nmodule.exports = renderText;\n","var sprintf = require('./sprintf');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawTie(renderer, params, linestartx, lineendx, selectables) {\n\tlayout(params, linestartx, lineendx);\n\n\tvar klass = '';\n\tif (params.anchor1) {\n\t\tklass += 'abcjs-start-m' + params.anchor1.parent.counters.measure + '-n' + params.anchor1.parent.counters.note;\n\t} else\n\t\tklass += 'abcjs-start-edge';\n\tif (params.anchor2) {\n\t\tklass += ' abcjs-end-m' + params.anchor2.parent.counters.measure + '-n' + params.anchor2.parent.counters.note;\n\t} else\n\t\tklass += ' abcjs-end-edge';\n\tif (params.hint)\n\t\tklass = \"abcjs-hint\";\n\tvar fudgeY = params.fixedY ? 1.5 : 0; // TODO-PER: This just compensates for drawArc, which contains too much knowledge of ties and slurs.\n\tvar el = drawArc(renderer, params.startX, params.endX, params.startY + fudgeY, params.endY + fudgeY, params.above, klass, params.isTie, params.dotted);\n\tvar startChar = -1\n\t// This gets the start and end points of the contents of the slur. We assume that the parenthesis are just to the outside of that.\n\tif (params.anchor1 && !params.isTie)\n\t\tstartChar = params.anchor1.parent.abcelem.startChar - 1\n\tvar endChar = -1\n\tif (params.anchor2 && !params.isTie)\n\t\tendChar = params.anchor2.parent.abcelem.endChar + 1\n\n\tselectables.wrapSvgEl({ el_type: \"slur\", startChar: startChar, endChar: endChar }, el);\n\treturn [el];\n}\n\n// TODO-PER: I think params part should have been done earlier in the layout pass.\nvar layout = function (params, lineStartX, lineEndX) {\n\t// We now have all of the input variables set, so we can figure out the start and ending x,y coordinates, and finalize the direction of the arc.\n\n\t// Ties and slurs are handled a little differently, so do calculations for them separately.\n\tif (!params.anchor1 || !params.anchor2)\n\t\tparams.isTie = true; // if the slur goes off the end of the line, then draw it like a tie\n\telse if (params.anchor1.pitch === params.anchor2.pitch && params.internalNotes.length === 0)\n\t\tparams.isTie = true;\n\telse\n\t\tparams.isTie = false;\n\n\tif (params.isTie) {\n\t\tparams.calcTieDirection();\n\t\tparams.calcX(lineStartX, lineEndX);\n\t\tparams.calcTieY();\n\n\t} else {\n\t\tparams.calcSlurDirection();\n\t\tparams.calcX(lineStartX, lineEndX);\n\t\tparams.calcSlurY();\n\t}\n\tparams.avoidCollisionAbove();\n};\n\nvar drawArc = function (renderer, x1, x2, pitch1, pitch2, above, klass, isTie, dotted) {\n\t// If it is a tie vs. a slur, draw it shallower.\n\tvar spacing = isTie ? 1.2 : 1.5;\n\n\tx1 = roundNumber(x1 + 6);\n\tx2 = roundNumber(x2 + 4);\n\tpitch1 = pitch1 + ((above) ? spacing : -spacing);\n\tpitch2 = pitch2 + ((above) ? spacing : -spacing);\n\tvar y1 = roundNumber(renderer.calcY(pitch1));\n\tvar y2 = roundNumber(renderer.calcY(pitch2));\n\n\t//unit direction vector\n\tvar dx = x2 - x1;\n\tvar dy = y2 - y1;\n\tvar norm = Math.sqrt(dx * dx + dy * dy);\n\tvar ux = dx / norm;\n\tvar uy = dy / norm;\n\n\tvar flatten = norm / 3.5;\n\tvar maxFlatten = isTie ? 10 : 25; // If it is a tie vs. a slur, draw it shallower.\n\tvar curve = ((above) ? -1 : 1) * Math.min(maxFlatten, Math.max(4, flatten));\n\n\tvar controlx1 = roundNumber(x1 + flatten * ux - curve * uy);\n\tvar controly1 = roundNumber(y1 + flatten * uy + curve * ux);\n\tvar controlx2 = roundNumber(x2 - flatten * ux - curve * uy);\n\tvar controly2 = roundNumber(y2 - flatten * uy + curve * ux);\n\tvar thickness = 2;\n\tif (klass)\n\t\tklass += ' slur';\n\telse\n\t\tklass = 'slur';\n\tklass += isTie ? ' tie' : ' legato';\n\tvar ret;\n\tif (dotted) {\n\t\tklass += ' dotted';\n\t\tvar pathString2 = sprintf(\"M %f %f C %f %f %f %f %f %f\", x1, y1,\n\t\t\tcontrolx1, controly1, controlx2, controly2, x2, y2);\n\t\tret = renderer.paper.path({ path: pathString2, stroke: renderer.foregroundColor, fill: \"none\", 'stroke-dasharray': \"5 5\", 'class': renderer.controller.classes.generate(klass), \"data-name\": isTie ? \"tie\" : \"slur\" });\n\t} else {\n\t\tvar pathString = sprintf(\"M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z\", x1, y1,\n\t\t\tcontrolx1, controly1, controlx2, controly2, x2, y2,\n\t\t\troundNumber(controlx2 - thickness * uy), roundNumber(controly2 + thickness * ux), roundNumber(controlx1 - thickness * uy), roundNumber(controly1 + thickness * ux), x1, y1);\n\t\tret = renderer.paper.path({ path: pathString, stroke: \"none\", fill: renderer.foregroundColor, 'class': renderer.controller.classes.generate(klass), \"data-name\": isTie ? \"tie\" : \"slur\" });\n\t}\n\n\treturn ret;\n};\n\nmodule.exports = drawTie;\n","var sprintf = require('./sprintf');\nvar renderText = require('./text');\nvar printPath = require('./print-path');\nvar roundNumber = require(\"./round-number\");\n\nfunction drawTriplet(renderer, params, selectables) {\n\trenderer.paper.openGroup({ klass: renderer.controller.classes.generate('triplet ' + params.durationClass), \"data-name\": \"triplet\" });\n\tif (!params.hasBeam) {\n\t\tdrawBracket(renderer, params.anchor1.x, params.startNote, params.anchor2.x + params.anchor2.w, params.endNote);\n\t}\n\t// HACK: adjust the position of \"3\". It is too high in all cases so we fudge it by subtracting 1 here.\n\trenderText(renderer, { x: params.xTextPos, y: renderer.calcY(params.yTextPos - 1), text: \"\" + params.number, type: 'tripletfont', anchor: \"middle\", centerVertically: true, noClass: true, name: \"\" + params.number }, true);\n\tvar g = renderer.paper.closeGroup();\n\tselectables.wrapSvgEl({ el_type: \"triplet\", startChar: -1, endChar: -1 }, g);\n\treturn g;\n}\n\nfunction drawLine(l, t, r, b) {\n\treturn sprintf(\"M %f %f L %f %f\", roundNumber(l), roundNumber(t), roundNumber(r), roundNumber(b));\n}\n\nfunction drawBracket(renderer, x1, y1, x2, y2) {\n\ty1 = renderer.calcY(y1);\n\ty2 = renderer.calcY(y2);\n\tvar bracketHeight = 5;\n\n\t// Draw vertical lines at the beginning and end\n\tvar pathString = \"\";\n\tpathString += drawLine(x1, y1, x1, y1 + bracketHeight);\n\tpathString += drawLine(x2, y2, x2, y2 + bracketHeight);\n\n\t// figure out midpoints to draw the broken line.\n\tvar midX = x1 + (x2 - x1) / 2;\n\t//var midY = y1 + (y2-y1)/2;\n\tvar gapWidth = 8;\n\tvar slope = (y2 - y1) / (x2 - x1);\n\tvar leftEndX = midX - gapWidth;\n\tvar leftEndY = y1 + (leftEndX - x1) * slope;\n\tpathString += drawLine(x1, y1, leftEndX, leftEndY);\n\tvar rightStartX = midX + gapWidth;\n\tvar rightStartY = y1 + (rightStartX - x1) * slope;\n\tpathString += drawLine(rightStartX, rightStartY, x2, y2);\n\tprintPath(renderer, { path: pathString, stroke: renderer.foregroundColor, \"data-name\": \"triplet-bracket\" });\n}\n\nmodule.exports = drawTriplet;\n","var drawGlissando = require('./glissando');\nvar drawCrescendo = require('./crescendo');\nvar drawDynamics = require('./dynamics');\nvar drawTriplet = require('./triplet');\nvar drawEnding = require('./ending');\nvar drawTie = require('./tie');\nvar drawBeam = require('./beam');\nvar renderText = require('./text');\nvar drawAbsolute = require('./absolute');\n\nfunction drawVoice(renderer, params, bartop, selectables, staffPos) {\n\tvar width = params.w - 1;\n\trenderer.staffbottom = params.staff.bottom;\n\tvar saveColor = renderer.foregroundColor\n\tif (params.color)\n\t\trenderer.foregroundColor = params.color\n\n\tif (params.header) { // print voice name\n\t\tvar textEl = renderText(renderer, { x: renderer.padding.left, y: renderer.calcY(params.headerPosition), text: params.header, type: 'voicefont', klass: 'staff-extra voice-name', anchor: 'start', centerVertically: true, name: \"voice-name\" }, true);\n\t\tselectables.wrapSvgEl({ el_type: \"voiceName\", startChar: -1, endChar: -1, text: params.header }, textEl);\n\t}\n\n\tvar i;\n\tvar child;\n\tvar foundNote = false;\n\tfor (i = 0; i < params.children.length; i++) {\n\t\tchild = params.children[i];\n\t\tif (child.type === 'note' || child.type === 'rest')\n\t\t\tfoundNote = true;\n\t\tvar justInitializedMeasureNumber = false;\n\t\tif (child.type !== 'staff-extra' && !renderer.controller.classes.isInMeasure()) {\n\t\t\trenderer.controller.classes.startMeasure();\n\t\t\tjustInitializedMeasureNumber = true;\n\t\t}\n\t\tif (params.staff.isTabStaff) {\n\t\t\tchild.invisible = false;\n\t\t\tif (child.type == 'bar') {\n\t\t\t\tif (child.abcelem.lastBar) {\n\t\t\t\t\tbartop = params.topLine;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdrawAbsolute(renderer, child, (params.barto || i === params.children.length - 1) ? bartop : 0, selectables, staffPos);\n\n\t\tif (child.type === 'note' || isNonSpacerRest(child))\n\t\t\trenderer.controller.classes.incrNote();\n\t\tif (child.type === 'bar' && !justInitializedMeasureNumber && foundNote) {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t}\n\t}\n\n\trenderer.controller.classes.startMeasure();\n\n\tfor (i = 0; i < params.beams.length; i++) {\n\t\tvar beam = params.beams[i];\n\t\tif (beam === 'bar') {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t} else\n\t\t\tdrawBeam(renderer, beam, selectables); // beams must be drawn first for proper printing of triplets, slurs and ties.\n\t}\n\n\trenderer.controller.classes.startMeasure();\n\tfor (i = 0; i < params.otherchildren.length; i++) {\n\t\tchild = params.otherchildren[i];\n\t\tif (child === 'bar') {\n\t\t\trenderer.controller.classes.incrMeasure();\n\t\t} else {\n\t\t\tswitch (child.type) {\n\t\t\t\tcase \"GlissandoElem\":\n\t\t\t\t\tchild.elemset = drawGlissando(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CrescendoElem\":\n\t\t\t\t\tchild.elemset = drawCrescendo(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DynamicDecoration\":\n\t\t\t\t\tchild.elemset = drawDynamics(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"TripletElem\":\n\t\t\t\t\tdrawTriplet(renderer, child, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EndingElem\":\n\t\t\t\t\tchild.elemset = drawEnding(renderer, child, params.startx + 10, width, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"TieElem\":\n\t\t\t\t\tchild.elemset = drawTie(renderer, child, params.startx + 10, width, selectables);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.log(child);\n\t\t\t\t\tdrawAbsolute(renderer, child, params.startx + 10, width, selectables, staffPos);\n\t\t\t}\n\t\t}\n\t}\n\trenderer.foregroundColor = saveColor\n\n}\n\nfunction isNonSpacerRest(elem) {\n\tif (elem.type !== 'rest')\n\t\treturn false;\n\tif (elem.abcelem && elem.abcelem.rest && elem.abcelem.rest.type !== 'spacer')\n\t\treturn true;\n\treturn false;\n}\n\nmodule.exports = drawVoice;\n","// abc_engraver_controller.js: Controls the engraving process of an ABCJS abstract syntax tree as produced by ABCJS/parse\n\n/*global Math */\n\nvar spacing = require('./helpers/spacing');\nvar AbstractEngraver = require('./creation/abstract-engraver');\nvar Renderer = require('./renderer');\nvar FreeText = require('./creation/elements/free-text');\nvar Separator = require('./creation/elements/separator');\nvar Subtitle = require('./creation/elements/subtitle');\nvar TopText = require('./creation/elements/top-text');\nvar BottomText = require('./creation/elements/bottom-text');\nvar setupSelection = require('./interactive/selection');\nvar layout = require('./layout/layout');\nvar Classes = require('./helpers/classes');\nvar GetFontAndAttr = require('./helpers/get-font-and-attr');\nvar GetTextSize = require('./helpers/get-text-size');\nvar draw = require('./draw/draw');\nvar tablatures = require('../tablatures/abc_tablatures');\nvar findSelectableElement = require('./interactive/find-selectable-element');\n\n/**\n * @class\n * Controls the engraving process, from ABCJS Abstract Syntax Tree (ABCJS AST) to rendered score sheet\n *\n * Call engraveABC to run the process. This creates a graphelems ABCJS Abstract Engraving Structure (ABCJS AES) that can be accessed through this.staffgroups\n * this data structure is first laid out (giving the graphelems x and y coordinates) and then drawn onto the renderer\n * each ABCJS AES represents a single staffgroup - all elements that are not in a staffgroup are rendered directly by the controller\n *\n * elements in ABCJS AES know their \"source data\" in the ABCJS AST, and their \"target shape\"\n * in the renderer for highlighting purposes\n *\n */\nvar EngraverController = function (paper, params) {\n\tparams = params || {};\n\tthis.findSelectableElement = findSelectableElement;\n\tthis.oneSvgPerLine = params.oneSvgPerLine;\n\tthis.selectionColor = params.selectionColor;\n\tthis.dragColor = params.dragColor ? params.dragColor : params.selectionColor;\n\tthis.dragging = !!params.dragging;\n\tthis.selectTypes = params.selectTypes;\n\tthis.responsive = params.responsive;\n\tthis.space = 3 * spacing.SPACE;\n\tthis.initialClef = params.initialClef;\n\tthis.timeBasedLayout = params.timeBasedLayout;\n\tthis.expandToWidest = !!params.expandToWidest;\n\tthis.scale = params.scale ? parseFloat(params.scale) : 0;\n\tthis.classes = new Classes({ shouldAddClasses: params.add_classes });\n\tif (!(this.scale > 0.1))\n\t\tthis.scale = undefined;\n\n\tif (params.staffwidth) {\n\t\t// Note: Normally all measurements to the engraver are in POINTS. However, if a person is formatting for the\n\t\t// screen and directly inputting the width, then it is more logical to have the measurement in pixels.\n\t\tthis.staffwidthScreen = params.staffwidth;\n\t\tthis.staffwidthPrint = params.staffwidth;\n\t} else {\n\t\tthis.staffwidthScreen = 740; // TODO-PER: Not sure where this number comes from, but this is how it's always been.\n\t\tthis.staffwidthPrint = 680; // The number of pixels in 8.5\", after 1cm of margin has been removed.\n\t}\n\tthis.listeners = [];\n\tif (params.clickListener)\n\t\tthis.addSelectListener(params.clickListener);\n\n\tthis.renderer = new Renderer(paper);\n\tthis.renderer.setPaddingOverride(params);\n\tif (params.showDebug)\n\t\tthis.renderer.showDebug = params.showDebug;\n\tif (params.jazzchords)\n\t\tthis.jazzchords = params.jazzchords;\n\tif (params.accentAbove)\n\t\tthis.accentAbove = params.accentAbove;\n\tif (params.germanAlphabet)\n\t\tthis.germanAlphabet = params.germanAlphabet;\n\tif (params.lineThickness)\n\t\tthis.lineThickness = params.lineThickness;\n\tthis.renderer.controller = this; // TODO-GD needed for highlighting\n\tthis.renderer.foregroundColor = params.foregroundColor ? params.foregroundColor : \"currentColor\";\n\tif (params.ariaLabel !== undefined)\n\t\tthis.renderer.ariaLabel = params.ariaLabel;\n\tthis.renderer.minPadding = params.minPadding ? params.minPadding : 0;\n\n\tthis.reset();\n};\n\nEngraverController.prototype.reset = function () {\n\tthis.selected = [];\n\tthis.staffgroups = [];\n\tif (this.engraver)\n\t\tthis.engraver.reset();\n\tthis.engraver = null;\n\tthis.renderer.reset();\n\tthis.dragTarget = null;\n\tthis.dragIndex = -1;\n\tthis.dragMouseStart = { x: -1, y: -1 };\n\tthis.dragYStep = 0;\n\tif (this.lineThickness)\n\t\tthis.renderer.setLineThickness(this.lineThickness)\n};\n\n/**\n * run the engraving process\n */\nEngraverController.prototype.engraveABC = function (abctunes, tuneNumber, lineOffset) {\n\tif (abctunes[0] === undefined) {\n\t\tabctunes = [abctunes];\n\t}\n\tthis.reset();\n\n\tfor (var i = 0; i < abctunes.length; i++) {\n\t\tif (tuneNumber === undefined)\n\t\t\ttuneNumber = i;\n\t\tthis.getFontAndAttr = new GetFontAndAttr(abctunes[i].formatting, this.classes);\n\t\tthis.getTextSize = new GetTextSize(this.getFontAndAttr, this.renderer.paper);\n\t\tthis.engraveTune(abctunes[i], tuneNumber, lineOffset);\n\t}\n};\n\n/**\n * Some of the items on the page are not scaled, so adjust them in the opposite direction of scaling to cancel out the scaling.\n */\nEngraverController.prototype.adjustNonScaledItems = function (scale) {\n\tthis.width /= scale;\n\tthis.renderer.adjustNonScaledItems(scale);\n};\n\nEngraverController.prototype.getMeasureWidths = function (abcTune) {\n\tthis.reset();\n\tthis.getFontAndAttr = new GetFontAndAttr(abcTune.formatting, this.classes);\n\tthis.getTextSize = new GetTextSize(this.getFontAndAttr, this.renderer.paper);\n\tvar origJazzChords = this.jazzchords\n\n\tthis.setupTune(abcTune, 0);\n\tthis.constructTuneElements(abcTune);\n\t// layout() sets the x-coordinate of the abcTune element here:\n\t// abcTune.lines[0].staffGroup.voices[0].children[0].x\n\tlayout(this.renderer, abcTune, 0, this.space, this.timeBasedLayout);\n\n\tvar ret = [];\n\tvar section;\n\n\tvar needNewSection = true;\n\tfor (var i = 0; i < abcTune.lines.length; i++) {\n\t\tvar abcLine = abcTune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\tif (needNewSection) {\n\t\t\t\tsection = {\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tmeasureWidths: [],\n\t\t\t\t\t//height: this.renderer.padding.top + this.renderer.spacing.music + this.renderer.padding.bottom + 24, // the 24 is the empirical value added to the bottom of all tunes.\n\t\t\t\t\ttotal: 0\n\t\t\t\t};\n\t\t\t\tret.push(section);\n\t\t\t\tneedNewSection = false;\n\t\t\t}\n\t\t\t// At this point, the voices are laid out so that the bar lines are even with each other. So we just need to get the placement of the first voice.\n\t\t\tif (abcLine.staffGroup.voices.length > 0) {\n\t\t\t\tvar voice = abcLine.staffGroup.voices[0];\n\t\t\t\tvar foundNotStaffExtra = false;\n\t\t\t\tvar lastXPosition = 0;\n\t\t\t\tfor (var k = 0; k < voice.children.length; k++) {\n\t\t\t\t\tvar child = voice.children[k];\n\t\t\t\t\tif (!foundNotStaffExtra && !child.isClef && !child.isKeySig) {\n\t\t\t\t\t\tfoundNotStaffExtra = true;\n\t\t\t\t\t\tsection.left = child.x;\n\t\t\t\t\t\tlastXPosition = child.x;\n\t\t\t\t\t}\n\t\t\t\t\tif (child.type === 'bar') {\n\t\t\t\t\t\tsection.measureWidths.push(child.x - lastXPosition);\n\t\t\t\t\t\tsection.total += (child.x - lastXPosition);\n\t\t\t\t\t\tlastXPosition = child.x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//section.height += calcHeight(abcLine.staffGroup) * spacing.STEP;\n\t\t} else\n\t\t\tneedNewSection = true;\n\t}\n\tthis.jazzchords = origJazzChords\n\treturn ret;\n};\n\nEngraverController.prototype.setupTune = function (abcTune, tuneNumber) {\n\tthis.classes.reset();\n\n\tif (abcTune.formatting.jazzchords !== undefined)\n\t\tthis.jazzchords = abcTune.formatting.jazzchords;\n\tif (abcTune.formatting.accentAbove !== undefined)\n\t\tthis.accentAbove = abcTune.formatting.accentAbove;\n\n\tthis.renderer.newTune(abcTune);\n\tthis.engraver = new AbstractEngraver(this.getTextSize, tuneNumber, {\n\t\tbagpipes: abcTune.formatting.bagpipes,\n\t\tflatbeams: abcTune.formatting.flatbeams,\n\t\tgraceSlurs: abcTune.formatting.graceSlurs !== false, // undefined is the default, which is true\n\t\tpercmap: abcTune.formatting.percmap,\n\t\tinitialClef: this.initialClef,\n\t\tjazzchords: this.jazzchords,\n\t\ttimeBasedLayout: this.timeBasedLayout,\n\t\taccentAbove: this.accentAbove,\n\t\tgermanAlphabet: this.germanAlphabet\n\t});\n\tthis.engraver.setStemHeight(this.renderer.spacing.stemHeight);\n\tthis.engraver.measureLength = abcTune.getMeterFraction().num / abcTune.getMeterFraction().den;\n\tif (abcTune.formatting.staffwidth) {\n\t\tthis.width = abcTune.formatting.staffwidth * 1.33; // The width is expressed in pt; convert to px.\n\t} else {\n\t\tthis.width = this.renderer.isPrint ? this.staffwidthPrint : this.staffwidthScreen;\n\t}\n\n\tvar scale = abcTune.formatting.scale ? abcTune.formatting.scale : this.scale;\n\tif (this.responsive === \"resize\") // The resizing will mess with the scaling, so just don't do it explicitly.\n\t\tscale = undefined;\n\tif (scale === undefined) scale = this.renderer.isPrint ? 0.75 : 1;\n\tthis.adjustNonScaledItems(scale);\n\treturn scale;\n};\n\nEngraverController.prototype.constructTuneElements = function (abcTune) {\n\tabcTune.topText = new TopText(abcTune.metaText, abcTune.metaTextInfo, abcTune.formatting, abcTune.lines, this.width, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n\n\t// Generate the raw staff line data\n\tvar i;\n\tvar abcLine;\n\tvar hasPrintedTempo = false;\n\tvar hasSeenNonSubtitle = false;\n\tfor (i = 0; i < abcTune.lines.length; i++) {\n\t\tabcLine = abcTune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.staffGroup = this.engraver.createABCLine(abcLine.staff, !hasPrintedTempo ? abcTune.metaText.tempo : null, i);\n\t\t\thasPrintedTempo = true;\n\t\t} else if (abcLine.subtitle) {\n\t\t\t// If the subtitle is at the top, then it was already accounted for. So skip all subtitles until the first non-subtitle line.\n\t\t\tif (hasSeenNonSubtitle) {\n\t\t\t\tvar center = this.width / 2 + this.renderer.padding.left;\n\t\t\t\tabcLine.nonMusic = new Subtitle(this.renderer.spacing.subtitle, abcTune.formatting, abcLine.subtitle, center, this.renderer.padding.left, this.getTextSize);\n\t\t\t}\n\t\t} else if (abcLine.text !== undefined) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.nonMusic = new FreeText(abcLine.text, abcLine.vskip, this.getFontAndAttr, this.renderer.padding.left, this.width, this.getTextSize);\n\t\t} else if (abcLine.separator !== undefined && abcLine.separator.lineLength) {\n\t\t\thasSeenNonSubtitle = true;\n\t\t\tabcLine.nonMusic = new Separator(abcLine.separator.spaceAbove, abcLine.separator.lineLength, abcLine.separator.spaceBelow);\n\t\t}\n\t}\n\tabcTune.bottomText = new BottomText(abcTune.metaText, this.width, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n};\n\nEngraverController.prototype.engraveTune = function (abcTune, tuneNumber, lineOffset) {\n\n\tvar origJazzChords = this.jazzchords\n\tvar scale = this.setupTune(abcTune, tuneNumber);\n \n\t// Create all of the element objects that will appear on the page.\n\tthis.constructTuneElements(abcTune);\n \n\t//Set the top text now that we know the width\n \n\t// Do all the positioning, both horizontally and vertically\n\tvar maxWidth = layout(this.renderer, abcTune, this.width, this.space, this.expandToWidest, this.timeBasedLayout);\n \n\t//Set the top text now that we know the width\n\tif (this.expandToWidest && maxWidth > this.width + 1) {\n \n\t\tabcTune.topText = new TopText(abcTune.metaText, abcTune.metaTextInfo, abcTune.formatting, abcTune.lines, maxWidth, this.renderer.isPrint, this.renderer.padding.left, this.renderer.spacing, this.classes.shouldAddClasses, this.getTextSize);\n \n\t\tif ((abcTune.lines)&&(abcTune.lines.length > 0)){\n\t\t\tvar nlines = abcTune.lines.length;\n\n\t\t\tfor (var i=0;i 0)){\n\t\t\t\t\t\tvar nRows = entry.nonMusic.rows.length;\n\t\t\t\t\t\tfor (var j=0;j0)){\n\t\t\t\t\t\t\t\t\t\tif (entry.text[0].center){\n\t\t\t\t\t\t\t\t\t\t\tthisRow.left = (maxWidth/2) + this.renderer.padding.left;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Deal with tablature for staff\n\tif (abcTune.tablatures) {\n\t tablatures.layoutTablatures(this.renderer, abcTune);\n\t}\n \n\t// Do all the writing to the SVG\n\tvar ret = draw(this.renderer, this.classes, abcTune, this.width, maxWidth, this.responsive, scale, this.selectTypes, tuneNumber, lineOffset);\n\tthis.staffgroups = ret.staffgroups;\n\tthis.selectables = ret.selectables;\n\tif (this.oneSvgPerLine) {\n\t var div = this.renderer.paper.svg.parentNode;\n\t this.svgs = splitSvgIntoLines(this.renderer, div, abcTune.metaText.title, this.responsive, scale);\n\t} else {\n\t this.svgs = [this.renderer.paper.svg];\n\t}\n\tsetupSelection(this, this.svgs);\n\t\n\tthis.jazzchords = origJazzChords\n};\n\nfunction splitSvgIntoLines(renderer, output, title, responsive, scale) {\n\t// Each line is a top level in the svg. To split it into separate\n\t// svgs iterate through each of those and put them in a new svg. Since\n\t// they are placed absolutely, the viewBox needs to be manipulated to\n\t// get the correct vertical positioning.\n\t// We copy all the attributes from the original svg except for the aria-label\n\t// since we want that to include a count. And the height is now a fraction of the original svg.\n\tif (!title) title = \"Untitled\"\n\tvar source = output.querySelector(\"svg\")\n\tif (responsive === 'resize')\n\t\toutput.style.paddingBottom = ''\n\tvar style = source.querySelector(\"style\")\n\tvar width = responsive === 'resize' ? source.viewBox.baseVal.width : source.getAttribute(\"width\")\n\tvar sections = output.querySelectorAll(\"svg > g\") // each section is a line, or the top matter or the bottom matter, or text that has been inserted.\n\tvar nextTop = 0 // There are often gaps between the elements for spacing, so the actual top and height needs to be inferred.\n\tvar wrappers = [] // Create all the elements and place them at once because we use the current svg to get data. It would disappear after placing the first line.\n\tvar svgs = []\n\tfor (var i = 0; i < sections.length; i++) {\n\t\tvar section = sections[i]\n\t\tvar box = section.getBBox()\n\t\tvar gapBetweenLines = box.y - nextTop // take the margin into account\n\t\tvar height = box.height + gapBetweenLines;\n\t\tvar wrapper = document.createElement(\"div\");\n\t\tvar divStyles = \"overflow: hidden;\"\n\t\tif (responsive !== 'resize')\n\t\t\tdivStyles += \"height:\" + (height * scale) + \"px;\"\n\t\twrapper.setAttribute(\"style\", divStyles)\n\t\tvar svg = duplicateSvg(source)\n\t\tvar fullTitle = \"Sheet Music for \\\"\" + title + \"\\\" section \" + (i + 1)\n\t\tsvg.setAttribute(\"aria-label\", fullTitle)\n\t\tif (responsive !== 'resize')\n\t\t\tsvg.setAttribute(\"height\", height)\n\t\tif (responsive === 'resize')\n\t\t\tsvg.style.position = ''\n\t\t// TODO-PER: Hack! Not sure why this is needed.\n\t\tvar viewBoxHeight = renderer.firefox112 ? height+1 : height\n\t\tsvg.setAttribute(\"viewBox\", \"0 \" + nextTop + \" \" + width + \" \" + viewBoxHeight)\n\t\tsvg.appendChild(style.cloneNode(true))\n\t\tvar titleEl = document.createElement(\"title\")\n\t\ttitleEl.innerText = fullTitle\n\t\tsvg.appendChild(titleEl)\n\t\tsvg.appendChild(section)\n\n\t\twrapper.appendChild(svg)\n\t\tsvgs.push(svg)\n\t\toutput.appendChild(wrapper)\n\t\t//wrappers.push(wrapper)\n\t\tnextTop = box.y + box.height\n\t}\n\t// for (i = 0; i < wrappers.length; i++)\n\t// \toutput.appendChild(wrappers[i])\n\toutput.removeChild(source)\n\treturn svgs;\n}\n\nfunction duplicateSvg(source) {\n\tvar svgNS = \"http://www.w3.org/2000/svg\";\n\tvar svg = document.createElementNS(svgNS, \"svg\");\n\tfor (var i = 0; i < source.attributes.length; i++) {\n\t\tvar attr = source.attributes[i];\n\t\tif (attr.name !== \"height\" && attr.name != \"aria-label\")\n\t\t\tsvg.setAttribute(attr.name, attr.value)\n\t}\n\treturn svg;\n}\n\nEngraverController.prototype.getDim = function (historyEl) {\n\t// Get the dimensions on demand because the getBBox call is expensive.\n\tif (!historyEl.dim) {\n\t\tvar box = historyEl.svgEl.getBBox();\n\t\thistoryEl.dim = { left: Math.round(box.x), top: Math.round(box.y), right: Math.round(box.x + box.width), bottom: Math.round(box.y + box.height) };\n\t}\n\treturn historyEl.dim;\n};\n\nEngraverController.prototype.addSelectListener = function (clickListener) {\n\tthis.listeners[this.listeners.length] = clickListener;\n};\n\nmodule.exports = EngraverController;\n","var Classes = function Classes(options) {\n\tthis.shouldAddClasses = options.shouldAddClasses;\n\tthis.reset();\n}\n\nClasses.prototype.reset = function () {\n\tthis.lineNumber = null;\n\tthis.voiceNumber = null;\n\tthis.measureNumber = null;\n\tthis.measureTotalPerLine = [];\n\tthis.noteNumber = null;\n}\n\nClasses.prototype.incrLine = function () {\n\tif (this.lineNumber === null)\n\t\tthis.lineNumber = 0;\n\telse\n\t\tthis.lineNumber++;\n\tthis.voiceNumber = null;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.incrVoice = function () {\n\tif (this.voiceNumber === null)\n\t\tthis.voiceNumber = 0;\n\telse\n\t\tthis.voiceNumber++;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.isInMeasure = function () {\n\treturn this.measureNumber !== null;\n};\n\nClasses.prototype.newMeasure = function () {\n\tif (this.measureNumber)\n\t\tthis.measureTotalPerLine[this.lineNumber] = this.measureNumber;\n\tthis.measureNumber = null;\n\tthis.noteNumber = null;\n};\n\nClasses.prototype.startMeasure = function () {\n\tthis.measureNumber = 0;\n\tthis.noteNumber = 0;\n};\n\nClasses.prototype.incrMeasure = function () {\n\tthis.measureNumber++;\n\tthis.noteNumber = 0;\n};\n\nClasses.prototype.incrNote = function () {\n\tthis.noteNumber++;\n};\n\nClasses.prototype.measureTotal = function () {\n\tvar total = 0;\n\tfor (var i = 0; i < this.lineNumber; i++)\n\t\ttotal += this.measureTotalPerLine[i] ? this.measureTotalPerLine[i] : 0; // This can be null when non-music things are present.\n\tif (this.measureNumber)\n\t\ttotal += this.measureNumber;\n\treturn total;\n};\n\nClasses.prototype.getCurrent = function (c) {\n\treturn {\n\t\tline: this.lineNumber,\n\t\tmeasure: this.measureNumber,\n\t\tmeasureTotal: this.measureTotal(),\n\t\tvoice: this.voiceNumber,\n\t\tnote: this.noteNumber\n\t};\n};\n\nClasses.prototype.generate = function (c) {\n\tif (!this.shouldAddClasses)\n\t\treturn \"\";\n\tvar ret = [];\n\tif (c && c.length > 0) ret.push(c);\n\tif (c === \"abcjs-tab-number\") // TODO-PER-HACK! straighten out the tablature\n\t\treturn ret.join(' ')\n\tif (c === \"text instrument-name\")\n\t\treturn \"abcjs-text abcjs-instrument-name\"\n\tif (this.lineNumber !== null) ret.push(\"l\" + this.lineNumber);\n\tif (this.measureNumber !== null) ret.push(\"m\" + this.measureNumber);\n\tif (this.measureNumber !== null) ret.push(\"mm\" + this.measureTotal()); // measureNumber is null between measures so this is still the test for measureTotal\n\tif (this.voiceNumber !== null) ret.push(\"v\" + this.voiceNumber);\n\tif (c && (c.indexOf('note') >= 0 || c.indexOf('rest') >= 0 || c.indexOf('lyric') >= 0) && this.noteNumber !== null) ret.push(\"n\" + this.noteNumber);\n\t// add a prefix to all classes that abcjs adds.\n\tif (ret.length > 0) {\n\t\tret = ret.join(' '); // Some strings are compound classes - that is, specify more than one class in a string.\n\t\tret = ret.split(' ');\n\t\tfor (var i = 0; i < ret.length; i++) {\n\t\t\tif (ret[i].indexOf('abcjs-') !== 0 && ret[i].length > 0) // if the prefix doesn't already exist and the class is not blank.\n\t\t\t\tret[i] = 'abcjs-' + ret[i];\n\t\t}\n\t}\n\treturn ret.join(' ');\n};\n\n\nmodule.exports = Classes;\n","var GetFontAndAttr = function GetFontAndAttr(formatting, classes) {\n\tthis.formatting = formatting;\n\tthis.classes = classes;\n};\n\nGetFontAndAttr.prototype.updateFonts = function (fontOverrides) {\n\tif (fontOverrides.gchordfont)\n\t\tthis.formatting.gchordfont = fontOverrides.gchordfont;\n\tif (fontOverrides.tripletfont)\n\t\tthis.formatting.tripletfont = fontOverrides.tripletfont;\n\tif (fontOverrides.annotationfont)\n\t\tthis.formatting.annotationfont = fontOverrides.annotationfont;\n\tif (fontOverrides.vocalfont)\n\t\tthis.formatting.vocalfont = fontOverrides.vocalfont;\n};\n\nGetFontAndAttr.prototype.getFamily = function (type) {\n\tif (type[0] === '\"' && type[type.length-1] === '\"') {\n\t\treturn type.substring(1, type.length-1)\n\t}\n\treturn type\n};\n\nGetFontAndAttr.prototype.calc = function (type, klass) {\n\tvar font;\n\tif (typeof type === 'string') {\n\t\tfont = this.formatting[type];\n\t\t// Raphael deliberately changes the font units to pixels for some reason, so we need to change points to pixels here.\n\t\tif (font)\n\t\t\tfont = { face: font.face, size: Math.round(font.size * 4 / 3), decoration: font.decoration, style: font.style, weight: font.weight, box: font.box };\n\t\telse\n\t\t\tfont = { face: \"Arial\", size: Math.round(12 * 4 / 3), decoration: \"underline\", style: \"normal\", weight: \"normal\" };\n\t} else\n\t\tfont = { face: type.face, size: Math.round(type.size * 4 / 3), decoration: type.decoration, style: type.style, weight: type.weight, box: type.box };\n\tvar paddingPercent = this.formatting.fontboxpadding ? this.formatting.fontboxpadding : 0.1\n\tfont.padding = font.size * paddingPercent;\n\n\tvar attr = {\n\t\t\"font-size\": font.size, 'font-style': font.style,\n\t\t\"font-family\": this.getFamily(font.face), 'font-weight': font.weight, 'text-decoration': font.decoration,\n\t\t'class': this.classes.generate(klass)\n\t};\n\treturn { font: font, attr: attr };\n};\n\nmodule.exports = GetFontAndAttr;\n","var GetTextSize = function GetTextSize(getFontAndAttr, svg) {\n\tthis.getFontAndAttr = getFontAndAttr;\n\tthis.svg = svg;\n};\n\nGetTextSize.prototype.updateFonts = function (fontOverrides) {\n\tthis.getFontAndAttr.updateFonts(fontOverrides);\n};\n\nGetTextSize.prototype.attr = function (type, klass) {\n\treturn this.getFontAndAttr.calc(type, klass);\n};\n\nGetTextSize.prototype.getFamily = function (type) {\n\tif (type[0] === '\"' && type[type.length-1] === '\"') {\n\t\treturn type.substring(1, type.length-1)\n\t}\n\treturn type\n};\n\nGetTextSize.prototype.calc = function (text, type, klass, el) {\n\tvar hash;\n\t// This can be passed in either a string or a font. If it is a string it names one of the standard fonts.\n\tif (typeof type === 'string')\n\t\thash = this.attr(type, klass);\n\telse {\n\t\thash = {\n\t\t\tfont: {\n\t\t\t\tface: type.face,\n\t\t\t\tsize: type.size,\n\t\t\t\tdecoration: type.decoration,\n\t\t\t\tstyle: type.style,\n\t\t\t\tweight: type.weight\n\t\t\t},\n\t\t\tattr: {\n\t\t\t\t\"font-size\": type.size,\n\t\t\t\t\"font-style\": type.style,\n\t\t\t\t\"font-family\": this.getFamily(type.face),\n\t\t\t\t\"font-weight\": type.weight,\n\t\t\t\t\"text-decoration\": type.decoration,\n\t\t\t\t\"class\": this.getFontAndAttr.classes.generate(klass)\n\t\t\t}\n\t\t}\n\t}\n\tvar size = this.svg.getTextSize(text, hash.attr, el);\n\tif (hash.font.box) {\n\t\t// Add padding and an equal margin to each side.\n\t\treturn { height: size.height + hash.font.padding * 4, width: size.width + hash.font.padding * 4 };\n\t}\n\treturn size;\n};\n\nGetTextSize.prototype.baselineToCenter = function (text, type, klass, index, total) {\n\t// This is for the case where SVG wants to use the baseline of the first line as the Y coordinate.\n\t// If there are multiple lines of text or there is an array of text then that will not be centered so this adjusts it.\n\tvar height = this.calc(text, type, klass).height;\n\tvar fontHeight = this.attr(type, klass).font.size;\n\n\treturn height * 0.5 + (total - index - 2) * fontHeight;\n};\n\n\nmodule.exports = GetTextSize;\n","var setClass = function (elemset, addClass, removeClass, color) {\n\tif (!elemset)\n\t\treturn;\n\tfor (var i = 0; i < elemset.length; i++) {\n\t\tvar el = elemset[i];\n\t\tvar attr = el.getAttribute(\"highlight\");\n\t\tif (!attr) attr = \"fill\";\n\t\tel.setAttribute(attr, color);\n\t\tvar kls = el.getAttribute(\"class\");\n\t\tif (!kls) kls = \"\";\n\t\tkls = kls.replace(removeClass, \"\");\n\t\tkls = kls.replace(addClass, \"\");\n\t\tif (addClass.length > 0) {\n\t\t\tif (kls.length > 0 && kls[kls.length - 1] !== ' ') kls += \" \";\n\t\t\tkls += addClass;\n\t\t}\n\t\tel.setAttribute(\"class\", kls);\n\t}\n};\n\nmodule.exports = setClass;\n","var spacing = {};\n\nspacing.FONTEM = 360;\nspacing.FONTSIZE = 30;\nspacing.STEP = spacing.FONTSIZE * 93 / 720;\nspacing.SPACE = 10;\nspacing.TOPNOTE = 15;\nspacing.STAVEHEIGHT = 100;\nspacing.INDENT = 50;\n\nmodule.exports = spacing;\n","function findNumber(klass, match, target, name) {\n\tif (klass.indexOf(match) === 0) {\n\t\tvar value = klass.replace(match, '');\n\t\tvar num = parseInt(value, 10);\n\t\tif ('' + num === value)\n\t\t\ttarget[name] = num;\n\t}\n}\n\nfunction createAnalysis(target, ev) {\n\tvar classes = [];\n\tif (target.absEl.elemset) {\n\t\tvar classObj = {};\n\t\tfor (var j = 0; j < target.absEl.elemset.length; j++) {\n\t\t\tvar es = target.absEl.elemset[j];\n\t\t\tif (es) {\n\t\t\t\tvar klass = es.getAttribute(\"class\").split(' ');\n\t\t\t\tfor (var k = 0; k < klass.length; k++)\n\t\t\t\t\tclassObj[klass[k]] = true;\n\t\t\t}\n\t\t}\n\t\tfor (var kk = 0; kk < Object.keys(classObj).length; kk++)\n\t\t\tclasses.push(Object.keys(classObj)[kk]);\n\t}\n\tvar analysis = {};\n\tfor (var ii = 0; ii < classes.length; ii++) {\n\t\tfindNumber(classes[ii], \"abcjs-v\", analysis, \"voice\");\n\t\tfindNumber(classes[ii], \"abcjs-l\", analysis, \"line\");\n\t\tfindNumber(classes[ii], \"abcjs-m\", analysis, \"measure\");\n\t}\n\tif (target.staffPos)\n\t\tanalysis.staffPos = target.staffPos;\n\tvar closest = ev.target;\n\twhile (closest && closest.dataset && !closest.dataset.name && closest.tagName.toLowerCase() !== 'svg')\n\t\tclosest = closest.parentNode;\n\tvar parent = ev.target;\n\twhile (parent && parent.dataset && !parent.dataset.index && parent.tagName.toLowerCase() !== 'svg')\n\t\tparent = parent.parentNode;\n\tif (parent && parent.dataset) {\n\t\tanalysis.name = parent.dataset.name;\n\t\tanalysis.clickedName = closest.dataset.name;\n\t\tanalysis.parentClasses = parent.classList;\n\t}\n\tif (closest && closest.classList)\n\t\tanalysis.clickedClasses = closest.classList;\n\tanalysis.selectableElement = target.svgEl;\n\treturn {classes: classes, analysis: analysis}\n}\n\nmodule.exports = createAnalysis;\n","var createAnalysis = require('./create-analysis');\n\nfunction findSelectableElement(event) {\n\tvar selectable = event\n\twhile (selectable && selectable.attributes && selectable.tagName.toLowerCase() !== 'svg' && !selectable.attributes.selectable) {\n\t\tselectable = selectable.parentNode\n\t}\n\tif (selectable && selectable.attributes && selectable.attributes.selectable) {\n\t\tvar index = selectable.attributes['data-index'].nodeValue\n\t\tif (index) {\n\t\t\tindex = parseInt(index, 10)\n\t\t\tif (index >= 0 && index < this.selectables.length) {\n\t\t\t\tvar element = this.selectables[index]\n\t\t\t\tvar ret = createAnalysis(element, event)\n\t\t\t\tret.index = index\n\t\t\t\tret.element = element\n\t\t\t\treturn ret\n\t\t\t}\n\t\t}\n\t}\n\treturn null\n}\n\nmodule.exports = findSelectableElement;\n","var setClass = require('../helpers/set-class');\n\nvar highlight = function (klass, color) {\n\tif (klass === undefined)\n\t\tklass = \"abcjs-note_selected\";\n\tif (color === undefined)\n\t\tcolor = \"#ff0000\";\n\tsetClass(this.elemset, klass, \"\", color);\n};\n\nmodule.exports = highlight;\n","var spacing = require('../helpers/spacing');\nvar createAnalysis = require('./create-analysis');\n\nfunction setupSelection(engraver, svgs) {\n\tengraver.rangeHighlight = rangeHighlight;\n\tif (engraver.dragging) {\n\t\tfor (var h = 0; h < engraver.selectables.length; h++) {\n\t\t\tvar hist = engraver.selectables[h];\n\t\t\tif (hist.svgEl.getAttribute(\"selectable\") === \"true\") {\n\t\t\t\thist.svgEl.setAttribute(\"tabindex\", 0);\n\t\t\t\thist.svgEl.setAttribute(\"data-index\", h);\n\t\t\t\thist.svgEl.addEventListener(\"keydown\", keyboardDown.bind(engraver));\n\t\t\t\thist.svgEl.addEventListener(\"keyup\", keyboardSelection.bind(engraver));\n\t\t\t\thist.svgEl.addEventListener(\"focus\", elementFocused.bind(engraver));\n\t\t\t}\n\t\t}\n\t}\n\tfor (var i = 0; i < svgs.length; i++) {\n\t\tsvgs[i].addEventListener('touchstart', mouseDown.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('touchmove', mouseMove.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('touchend', mouseUp.bind(engraver), { passive: true });\n\t\tsvgs[i].addEventListener('mousedown', mouseDown.bind(engraver));\n\t\tsvgs[i].addEventListener('mousemove', mouseMove.bind(engraver));\n\t\tsvgs[i].addEventListener('mouseup', mouseUp.bind(engraver));\n\t}\n}\n\nfunction getCoord(ev) {\n\tvar scaleX = 1;\n\tvar scaleY = 1;\n\tvar svg = ev.target.closest('svg')\n\tvar yOffset = 0\n\n\t// when renderer.options.responsive === 'resize' the click coords are in relation to the HTML\n\t// element, we need to convert to the SVG viewBox coords\n\tif (svg && svg.viewBox && svg.viewBox.baseVal) { // Firefox passes null to this when no viewBox is given\n\t\t// Chrome makes these values null when no viewBox is given.\n\t\tif (svg.viewBox.baseVal.width !== 0)\n\t\t\tscaleX = svg.viewBox.baseVal.width / svg.clientWidth\n\t\tif (svg.viewBox.baseVal.height !== 0)\n\t\t\tscaleY = svg.viewBox.baseVal.height / svg.clientHeight\n\t\tyOffset = svg.viewBox.baseVal.y\n\t}\n\n\tvar svgClicked = ev.target && ev.target.tagName === \"svg\";\n\tvar x;\n\tvar y;\n\tif (svgClicked) {\n\t\tx = ev.offsetX;\n\t\ty = ev.offsetY;\n\t} else {\n\t\tx = ev.layerX;\n\t\ty = ev.layerY;\n\t}\n\n\tx = x * scaleX;\n\ty = y * scaleY;\n\t//console.log(x, y)\n\n\treturn [x, y + yOffset];\n}\n\nfunction elementFocused(ev) {\n\t// If there had been another element focused and is being dragged, then report that before setting the new element up.\n\tif (this.dragMechanism === \"keyboard\" && this.dragYStep !== 0 && this.dragTarget)\n\t\tnotifySelect.bind(this)(this.dragTarget, this.dragYStep, this.selectables.length, this.dragIndex, ev);\n\n\tthis.dragYStep = 0;\n}\n\nfunction keyboardDown(ev) {\n\t// Swallow the up and down arrow events - they will be used for dragging with the keyboard\n\tswitch (ev.keyCode) {\n\t\tcase 38:\n\t\tcase 40:\n\t\t\tev.preventDefault();\n\t}\n}\n\nfunction keyboardSelection(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar handled = false;\n\tvar index = ev.target.dataset.index;\n\tswitch (ev.keyCode) {\n\t\tcase 13:\n\t\tcase 32:\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tthis.dragMechanism = \"keyboard\";\n\t\t\tmouseUp.bind(this)(ev);\n\t\t\tbreak;\n\t\tcase 38: // arrow up\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tif (this.dragTarget && this.dragTarget.isDraggable) {\n\t\t\t\tif (this.dragging && this.dragTarget.isDraggable)\n\t\t\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t\t\tthis.dragYStep--;\n\t\t\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (this.dragYStep * spacing.STEP) + \")\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 40: // arrow down\n\t\t\thandled = true;\n\t\t\tthis.dragTarget = this.selectables[index];\n\t\t\tthis.dragIndex = index;\n\t\t\tthis.dragMechanism = \"keyboard\";\n\t\t\tif (this.dragTarget && this.dragTarget.isDraggable) {\n\t\t\t\tif (this.dragging && this.dragTarget.isDraggable)\n\t\t\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t\t\tthis.dragYStep++;\n\t\t\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (this.dragYStep * spacing.STEP) + \")\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 9: // tab\n\t\t\t// This is losing focus - if there had been dragging, then do the callback\n\t\t\tif (this.dragYStep !== 0) {\n\t\t\t\tmouseUp.bind(this)(ev);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t//console.log(ev);\n\t\t\tbreak;\n\t}\n\tif (handled)\n\t\tev.preventDefault();\n}\n\nfunction findElementInHistory(selectables, el) {\n\tif (!el)\n\t\treturn -1;\n\tfor (var i = 0; i < selectables.length; i++) {\n\t\tif (el.dataset.index === selectables[i].svgEl.dataset.index)\n\t\t\treturn i;\n\t}\n\treturn -1;\n}\n\nfunction findElementByCoord(self, x, y) {\n\tvar minDistance = 9999999;\n\tvar closestIndex = -1;\n\tfor (var i = 0; i < self.selectables.length && minDistance > 0; i++) {\n\t\tvar el = self.selectables[i];\n\n\t\tself.getDim(el);\n\t\tif (el.dim.left < x && el.dim.right > x && el.dim.top < y && el.dim.bottom > y) {\n\t\t\t// See if it is a direct hit on an element - if so, definitely take it (there are no overlapping elements)\n\t\t\tclosestIndex = i;\n\t\t\tminDistance = 0;\n\t\t} else if (el.dim.top < y && el.dim.bottom > y) {\n\t\t\t// See if it is the same vertical as the element. Then the distance is the x difference\n\t\t\tvar horiz = Math.min(Math.abs(el.dim.left - x), Math.abs(el.dim.right - x));\n\t\t\tif (horiz < minDistance) {\n\t\t\t\tminDistance = horiz;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t} else if (el.dim.left < x && el.dim.right > x) {\n\t\t\t// See if it is the same horizontal as the element. Then the distance is the y difference\n\t\t\tvar vert = Math.min(Math.abs(el.dim.top - y), Math.abs(el.dim.bottom - y));\n\t\t\tif (vert < minDistance) {\n\t\t\t\tminDistance = vert;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t} else {\n\t\t\t// figure out the distance to this element.\n\t\t\tvar dx = Math.abs(x - el.dim.left) > Math.abs(x - el.dim.right) ? Math.abs(x - el.dim.right) : Math.abs(x - el.dim.left);\n\t\t\tvar dy = Math.abs(y - el.dim.top) > Math.abs(y - el.dim.bottom) ? Math.abs(y - el.dim.bottom) : Math.abs(y - el.dim.top);\n\t\t\tvar hypotenuse = Math.sqrt(dx * dx + dy * dy);\n\t\t\tif (hypotenuse < minDistance) {\n\t\t\t\tminDistance = hypotenuse;\n\t\t\t\tclosestIndex = i;\n\t\t\t}\n\t\t}\n\t}\n\treturn (closestIndex >= 0 && minDistance <= 12) ? closestIndex : -1;\n}\n\nfunction getBestMatchCoordinates(dim, ev, scale) {\n\t// Different browsers have conflicting meanings for the coordinates that are returned.\n\t// If the item we want is clicked on directly, then we will just see what is the best match.\n\t// This seems like less of a hack than browser sniffing.\n\tif (dim.x <= ev.offsetX && dim.x + dim.width >= ev.offsetX &&\n\t\tdim.y <= ev.offsetY && dim.y + dim.height >= ev.offsetY)\n\t\treturn [ev.offsetX, ev.offsetY];\n\t// Firefox returns a weird value for offset, but layer is correct.\n\t// Safari and Chrome return the correct value for offset, but layer is multiplied by the scale (that is, if it were rendered with { scale: 2 })\n\t// For instance (if scale is 2):\n\t// Firefox: { offsetY: 5, layerY: 335 }\n\t// Others: {offsetY: 335, layerY: 670} (there could be a little rounding, so the number might not be exactly 2x)\n\t// So, if layerY/scale is approx. offsetY, then use offsetY, otherwise use layerY\n\tvar epsilon = Math.abs(ev.layerY / scale - ev.offsetY);\n\tif (epsilon < 3)\n\t\treturn [ev.offsetX, ev.offsetY];\n\telse\n\t\treturn [ev.layerX, ev.layerY];\n}\n\nfunction getTarget(target) {\n\t// This searches up the dom for the first item containing the attribute \"selectable\", or stopping at the SVG.\n\tif (!target)\n\t\treturn null;\n\tif (target.tagName === \"svg\")\n\t\treturn target;\n\n\tif (!target.getAttribute)\n\t\treturn null;\t\n\tvar found = target.getAttribute(\"selectable\");\n\twhile (!found) {\n\t\tif (!target.parentElement)\n\t\t\tfound = true;\n\t\telse {\n\t\t\ttarget = target.parentElement;\n\t\t\tif (target.tagName === \"svg\")\n\t\t\t\tfound = true;\n\t\t\telse\n\t\t\t\tfound = target.getAttribute(\"selectable\");\n\t\t}\n\t}\n\treturn target;\n}\n\nfunction getMousePosition(self, ev) {\n\t// if the user clicked exactly on an element that we're interested in, then we already have the answer.\n\t// This is more reliable than the calculations because firefox returns different coords for offsetX, offsetY\n\tvar x;\n\tvar y;\n\tvar box;\n\tvar clickedOn = findElementInHistory(self.selectables, getTarget(ev.target));\n\tif (clickedOn >= 0) {\n\t\t// There was a direct hit on an element.\n\t\tbox = getBestMatchCoordinates(self.selectables[clickedOn].svgEl.getBBox(), ev, self.scale);\n\t\tx = box[0];\n\t\ty = box[1];\n\t\t//console.log(\"clicked on\", clickedOn, x, y, self.selectables[clickedOn].svgEl.getBBox(), ev.target.getBBox());\n\t} else {\n\t\t// See if they clicked close to an element.\n\t\tbox = getCoord(ev);\n\t\tx = box[0];\n\t\ty = box[1];\n\t\tclickedOn = findElementByCoord(self, x, y);\n\t\t//console.log(\"clicked near\", clickedOn, x, y, printEl(ev.target));\n\t}\n\treturn { x: x, y: y, clickedOn: clickedOn };\n}\n\nfunction attachMissingTouchEventAttributes(touchEv) {\n\tif (!touchEv || !touchEv.target || !touchEv.touches || touchEv.touches.length < 1)\n\t\treturn\n\tvar rect = touchEv.target.getBoundingClientRect();\n\tvar offsetX = touchEv.touches[0].pageX - rect.left;\n\tvar offsetY = touchEv.touches[0].pageY - rect.top;\n\n\ttouchEv.touches[0].offsetX = offsetX;\n\ttouchEv.touches[0].offsetY = offsetY;\n\n\ttouchEv.touches[0].layerX = touchEv.touches[0].pageX;\n\ttouchEv.touches[0].layerY = touchEv.touches[0].pageY;\n}\n\nfunction mouseDown(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar _ev = ev;\n\tif (ev.type === 'touchstart') {\n\t\tattachMissingTouchEventAttributes(ev);\n\t\tif (ev.touches.length > 0)\n\t\t\t_ev = ev.touches[0];\n\t}\n\n\tvar positioning = getMousePosition(this, _ev);\n\n\t// Only start dragging if the user clicked close enough to an element and clicked with the main mouse button.\n\tif (positioning.clickedOn >= 0 && (ev.type === 'touchstart' || ev.button === 0) && this.selectables[positioning.clickedOn]) {\n\t\tthis.dragTarget = this.selectables[positioning.clickedOn];\n\t\tthis.dragIndex = positioning.clickedOn;\n\t\tthis.dragMechanism = \"mouse\";\n\t\tthis.dragMouseStart = { x: positioning.x, y: positioning.y };\n\t\tif (this.dragging && this.dragTarget.isDraggable) {\n\t\t\taddGlobalClass(this.renderer.paper, \"abcjs-dragging-in-progress\");\n\t\t\tthis.dragTarget.absEl.highlight(undefined, this.dragColor);\n\t\t}\n\t}\n}\n\nfunction mouseMove(ev) {\n\tvar _ev = ev;\n\tif (ev.type === 'touchmove') {\n\t\tattachMissingTouchEventAttributes(ev);\n\t\tif (ev.touches.length > 0)\n\t\t\t_ev = ev.touches[0];\n\t}\n\tthis.lastTouchMove = ev;\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\n\tif (!this.dragTarget || !this.dragging || !this.dragTarget.isDraggable || this.dragMechanism !== 'mouse' || !this.dragMouseStart)\n\t\treturn;\n\n\tvar positioning = getMousePosition(this, _ev);\n\n\tvar yDist = Math.round((positioning.y - this.dragMouseStart.y) / spacing.STEP);\n\tif (yDist !== this.dragYStep) {\n\t\tthis.dragYStep = yDist;\n\t\tthis.dragTarget.svgEl.setAttribute(\"transform\", \"translate(0,\" + (yDist * spacing.STEP) + \")\");\n\t}\n}\n\nfunction mouseUp(ev) {\n\t// \"this\" is the EngraverController because of the bind(this) when setting the event listener.\n\tvar _ev = ev;\n\tif (ev.type === 'touchend' && this.lastTouchMove) {\n\t\tattachMissingTouchEventAttributes(this.lastTouchMove);\n\t\tif (this.lastTouchMove && this.lastTouchMove.touches && this.lastTouchMove.touches.length > 0)\n\t\t\t_ev = this.lastTouchMove.touches[0];\n\t}\n\n\tif (!this.dragTarget)\n\t\treturn;\n\n\tclearSelection.bind(this)();\n\tif (this.dragTarget.absEl && this.dragTarget.absEl.highlight) {\n\t\tthis.selected = [this.dragTarget.absEl];\n\t\tthis.dragTarget.absEl.highlight(undefined, this.selectionColor);\n\t}\n\n\tnotifySelect.bind(this)(this.dragTarget, this.dragYStep, this.selectables.length, this.dragIndex, _ev);\n\tif (this.dragTarget.svgEl && this.dragTarget.svgEl.focus) {\n\t\tthis.dragTarget.svgEl.focus();\n\t\tthis.dragTarget = null;\n\t\tthis.dragIndex = -1;\n\t}\n\tremoveGlobalClass(this.renderer.svg, \"abcjs-dragging-in-progress\");\n}\n\nfunction setSelection(dragIndex) {\n\tif (dragIndex >= 0 && dragIndex < this.selectables.length) {\n\t\tthis.dragTarget = this.selectables[dragIndex];\n\t\tthis.dragIndex = dragIndex;\n\t\tthis.dragMechanism = \"keyboard\";\n\t\tmouseUp.bind(this)({ target: this.dragTarget.svgEl });\n\t}\n}\n\n\nfunction notifySelect(target, dragStep, dragMax, dragIndex, ev) {\n\tvar ret = createAnalysis(target, ev)\n\tvar classes = ret.classes\n\tvar analysis = ret.analysis\n\n\tfor (var i = 0; i < this.listeners.length; i++) {\n\t\tthis.listeners[i](target.absEl.abcelem, target.absEl.tuneNumber, classes.join(' '), analysis, { step: dragStep, max: dragMax, index: dragIndex, setSelection: setSelection.bind(this) }, ev);\n\t}\n}\n\nfunction clearSelection() {\n\tfor (var i = 0; i < this.selected.length; i++) {\n\t\tthis.selected[i].unhighlight(undefined, this.renderer.foregroundColor);\n\t}\n\tthis.selected = [];\n}\n\nfunction rangeHighlight(start, end) {\n\tclearSelection.bind(this)();\n\tfor (var line = 0; line < this.staffgroups.length; line++) {\n\t\tvar voices = this.staffgroups[line].voices;\n\t\tfor (var voice = 0; voice < voices.length; voice++) {\n\t\t\tvar elems = voices[voice].children;\n\t\t\tfor (var elem = 0; elem < elems.length; elem++) {\n\t\t\t\t// Since the user can highlight more than an element, or part of an element, a hit is if any of the endpoints\n\t\t\t\t// is inside the other range.\n\t\t\t\tvar elStart = elems[elem].abcelem.startChar;\n\t\t\t\tvar elEnd = elems[elem].abcelem.endChar;\n\t\t\t\tif ((end > elStart && start < elEnd) || ((end === start) && end === elEnd)) {\n\t\t\t\t\t//\t\tif (elems[elem].abcelem.startChar>=start && elems[elem].abcelem.endChar<=end) {\n\t\t\t\t\tthis.selected[this.selected.length] = elems[elem];\n\t\t\t\t\telems[elem].highlight(undefined, this.selectionColor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getClassSet(el) {\n\tvar oldClass = el.getAttribute('class');\n\tif (!oldClass)\n\t\toldClass = \"\";\n\tvar klasses = oldClass.split(\" \");\n\tvar obj = {};\n\tfor (var i = 0; i < klasses.length; i++)\n\t\tobj[klasses[i]] = true;\n\treturn obj;\n}\n\nfunction setClassSet(el, klassSet) {\n\tvar klasses = [];\n\tfor (var key in klassSet) {\n\t\tif (klassSet.hasOwnProperty(key))\n\t\t\tklasses.push(key);\n\t}\n\tel.setAttribute('class', klasses.join(' '));\n}\n\nfunction addGlobalClass(svg, klass) {\n\tif (svg) {\n\t\tvar obj = getClassSet(svg.svg);\n\t\tobj[klass] = true;\n\t\tsetClassSet(svg.svg, obj);\n\t}\n}\n\nfunction removeGlobalClass(svg, klass) {\n\tif (svg) {\n\t\tvar obj = getClassSet(svg.svg);\n\t\tdelete obj[klass];\n\t\tsetClassSet(svg.svg, obj);\n\t}\n}\n\nmodule.exports = setupSelection;\n","var setClass = require('../helpers/set-class');\n\nvar unhighlight = function (klass, color) {\n\tif (klass === undefined)\n\t\tklass = \"abcjs-note_selected\";\n\tif (color === undefined)\n\t\tcolor = \"#000000\";\n\tsetClass(this.elemset, \"\", klass, color);\n};\n\nmodule.exports = unhighlight;\n","var RelativeElement = require('../creation/elements/relative-element');\nvar spacing = require('../helpers/spacing');\nvar getBarYAt = require('./get-bar-y-at');\n\nvar layoutBeam = function (beam) {\n\tif (beam.elems.length === 0 || beam.allrests) return;\n\n\tvar dy = calcDy(beam.stemsUp, beam.isgrace); // This is the width of the beam line.\n\n\t// create the main beam\n\tvar firstElement = beam.elems[0];\n\tvar lastElement = beam.elems[beam.elems.length - 1];\n\tvar minStemHeight = 0; // The following is to leave space for \"!///!\" marks.\n\tvar referencePitch = beam.stemsUp ? firstElement.abcelem.maxpitch : firstElement.abcelem.minpitch;\n\tminStemHeight = minStem(firstElement, beam.stemsUp, referencePitch, minStemHeight);\n\tminStemHeight = minStem(lastElement, beam.stemsUp, referencePitch, minStemHeight);\n\tminStemHeight = Math.max(beam.stemHeight, minStemHeight + 3); // TODO-PER: The 3 is the width of a 16th beam. The actual height of the beam should be used instead.\n\tvar yPos = calcYPos(beam.average, beam.elems.length, minStemHeight, beam.stemsUp, firstElement.abcelem.averagepitch, lastElement.abcelem.averagepitch, beam.isflat, beam.min, beam.max, beam.isgrace);\n\tvar xPos = calcXPos(beam.stemsUp, firstElement, lastElement);\n\tbeam.addBeam({ startX: xPos[0], endX: xPos[1], startY: yPos[0], endY: yPos[1], dy: dy });\n\n\t// create the rest of the beams (in the case of 1/16th notes, etc.\n\tvar beams = createAdditionalBeams(beam.elems, beam.stemsUp, beam.beams[0], beam.isgrace, dy);\n\tfor (var i = 0; i < beams.length; i++)\n\t\tbeam.addBeam(beams[i]);\n\n\t// Now that the main beam is defined, we know how tall the stems should be, so create them and attach them to the original notes.\n\tcreateStems(beam.elems, beam.stemsUp, beam.beams[0], dy, beam.mainNote);\n};\n\nvar getDurlog = function (duration) {\n\t// TODO-PER: This is a hack to prevent a Chrome lockup. Duration should have been defined already,\n\t// but there's definitely a case where it isn't. [Probably something to do with triplets.]\n\tif (duration === undefined) {\n\t\treturn 0;\n\t}\n\t// console.log(\"getDurlog: \" + duration);\n\treturn Math.floor(Math.log(duration) / Math.log(2));\n};\n\n//\n// private functions\n//\nfunction minStem(element, stemsUp, referencePitch, minStemHeight) {\n\tif (!element.children)\n\t\treturn minStemHeight;\n\tfor (var i = 0; i < element.children.length; i++) {\n\t\tvar elem = element.children[i];\n\t\tif (stemsUp && elem.top !== undefined && elem.c === \"flags.ugrace\")\n\t\t\tminStemHeight = Math.max(minStemHeight, elem.top - referencePitch);\n\t\telse if (!stemsUp && elem.bottom !== undefined && elem.c === \"flags.ugrace\")\n\t\t\tminStemHeight = Math.max(minStemHeight, referencePitch - elem.bottom + 7); // The extra 7 is because we are measuring the slash from the top.\n\t}\n\treturn minStemHeight;\n}\n\nfunction calcSlant(leftAveragePitch, rightAveragePitch, numStems, isFlat) {\n\tif (isFlat)\n\t\treturn 0;\n\tvar slant = leftAveragePitch - rightAveragePitch;\n\tvar maxSlant = numStems / 2;\n\n\tif (slant > maxSlant) slant = maxSlant;\n\tif (slant < -maxSlant) slant = -maxSlant;\n\treturn slant;\n}\n\nfunction calcDy(asc, isGrace) {\n\tvar dy = (asc) ? spacing.STEP : -spacing.STEP;\n\tif (isGrace) dy = dy * 0.4;\n\treturn dy;\n}\n\nfunction calcXPos(asc, firstElement, lastElement) {\n\tvar starthead = firstElement.heads[asc ? 0 : firstElement.heads.length - 1];\n\tvar endhead = lastElement.heads[asc ? 0 : lastElement.heads.length - 1];\n\tvar startX = starthead.x;\n\tif (asc) startX += starthead.w - 0.6;\n\tvar endX = endhead.x;\n\tendX += (asc) ? endhead.w : 0.6;\n\treturn [startX, endX];\n}\n\nfunction calcYPos(average, numElements, stemHeight, asc, firstAveragePitch, lastAveragePitch, isFlat, minPitch, maxPitch, isGrace) {\n\tvar barpos = stemHeight - 2; // (isGrace)? 5:7;\n\tvar barminpos = stemHeight - 2;\n\tvar pos = Math.round(asc ? Math.max(average + barpos, maxPitch + barminpos) : Math.min(average - barpos, minPitch - barminpos));\n\n\tvar slant = calcSlant(firstAveragePitch, lastAveragePitch, numElements, isFlat);\n\tvar startY = pos + Math.floor(slant / 2);\n\tvar endY = pos + Math.floor(-slant / 2);\n\n\t// If the notes are too high or too low, make the beam go down to the middle\n\tif (!isGrace) {\n\t\tif (asc && pos < 6) {\n\t\t\tstartY = 6;\n\t\t\tendY = 6;\n\t\t} else if (!asc && pos > 6) {\n\t\t\tstartY = 6;\n\t\t\tendY = 6;\n\t\t}\n\t}\n\n\treturn [startY, endY];\n}\n\nfunction createStems(elems, asc, beam, dy, mainNote) {\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tif (elem.abcelem.rest)\n\t\t\tcontinue;\n\t\t// TODO-PER: This is odd. If it is a regular beam then elems is an array of AbsoluteElements, if it is a grace beam then it is an array of objects , so we directly attach the element to the parent. We tell it if is a grace note because they are passed in as a generic object instead of an AbsoluteElement.\n\t\tvar isGrace = elem.addExtra ? false : true;\n\t\tvar parent = isGrace ? mainNote : elem;\n\t\tvar furthestHead = elem.heads[(asc) ? 0 : elem.heads.length - 1];\n\t\tvar ovalDelta = 1 / 5;//(isGrace)?1/3:1/5;\n\t\tvar pitch = furthestHead.pitch + ((asc) ? ovalDelta : -ovalDelta);\n\t\tvar dx = asc ? furthestHead.w : 0; // down-pointing stems start on the left side of the note, up-pointing stems start on the right side, so we offset by the note width.\n\t\tif (!isGrace)\n\t\t\tdx += furthestHead.dx;\n\t\tvar x = furthestHead.x + dx; // this is now the actual x location in pixels.\n\t\tvar bary = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, x);\n\t\tvar lineWidth = (asc) ? -0.6 : 0.6;\n\t\tif (!asc)\n\t\t\tbary -= (dy / 2) / spacing.STEP;\t// TODO-PER: This is just a fudge factor so the down-pointing stems don't overlap.\n\t\tif (isGrace)\n\t\t\tdx += elem.heads[0].dx;\n\t\t// TODO-PER-HACK: One type of note head has a different placement of the stem. This should be more generically calculated:\n\t\tif (furthestHead.c === 'noteheads.slash.quarter') {\n\t\t\tif (asc)\n\t\t\t\tpitch += 1;\n\t\t\telse\n\t\t\t\tpitch -= 1;\n\t\t}\n\t\tvar stem = new RelativeElement(null, dx, 0, pitch, {\n\t\t\t\"type\": \"stem\",\n\t\t\t\"pitch2\": bary,\n\t\t\tlinewidth: lineWidth\n\t\t});\n\t\tstem.setX(parent.x); // This is after the x coordinates were set, so we have to set it directly.\n\t\tparent.addRight(stem);\n\t}\n\n}\n\nfunction createAdditionalBeams(elems, asc, beam, isGrace, dy) {\n\tvar beams = [];\n\tvar auxBeams = []; // auxbeam will be {x, y, durlog, single} auxbeam[0] should match with durlog=-4 (16th) (j=-4-durlog)\n\tfor (var i = 0; i < elems.length; i++) {\n\t\tvar elem = elems[i];\n\t\tif (elem.abcelem.rest)\n\t\t\tcontinue;\n\t\tvar furthestHead = elem.heads[(asc) ? 0 : elem.heads.length - 1];\n\t\tvar x = furthestHead.x + ((asc) ? furthestHead.w : 0);\n\t\tvar bary = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, x);\n\n\t\tvar sy = (asc) ? -1.5 : 1.5;\n\t\tif (isGrace) sy = sy * 2 / 3; // This makes the second beam on grace notes closer to the first one.\n\t\tvar duration = elem.abcelem.duration; // get the duration via abcelem because of triplets\n\t\tif (duration === 0) duration = 0.25; // if this is stemless, then we use quarter note as the duration.\n\t\tfor (var durlog = getDurlog(duration); durlog < -3; durlog++) {\n\t\t\tvar index = -4 - durlog;\n\t\t\tif (auxBeams[index]) {\n\t\t\t\tauxBeams[index].single = false;\n\t\t\t} else {\n\t\t\t\tauxBeams[index] = {\n\t\t\t\t\tx: x + ((asc) ? -0.6 : 0), y: bary + sy * (index + 1),\n\t\t\t\t\tdurlog: durlog, single: true\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (i > 0 && elem.abcelem.beambr && elem.abcelem.beambr <= (index + 1)) {\n\t\t\t\tif (!auxBeams[index].split)\n\t\t\t\t\tauxBeams[index].split = [auxBeams[index].x];\n\t\t\t\tvar xPos = calcXPos(asc, elems[i - 1], elem);\n\t\t\t\tif (auxBeams[index].split[auxBeams[index].split.length - 1] >= xPos[0]) {\n\t\t\t\t\t// the reduction in beams leaves a note unattached so create a small flag for it.\n\t\t\t\t\txPos[0] += elem.w;\n\t\t\t\t}\n\t\t\t\tauxBeams[index].split.push(xPos[0]);\n\t\t\t\tauxBeams[index].split.push(xPos[1]);\n\t\t\t}\n\t\t}\n\n\t\tfor (var j = auxBeams.length - 1; j >= 0; j--) {\n\t\t\tif (i === elems.length - 1 || getDurlog(elems[i + 1].abcelem.duration) > (-j - 4)) {\n\n\t\t\t\tvar auxBeamEndX = x;\n\t\t\t\tvar auxBeamEndY = bary + sy * (j + 1);\n\n\n\t\t\t\tif (auxBeams[j].single) {\n\t\t\t\t\tauxBeamEndX = (i === 0) ? x + 5 : x - 5;\n\t\t\t\t\tauxBeamEndY = getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, auxBeamEndX) + sy * (j + 1);\n\t\t\t\t}\n\t\t\t\tvar b = { startX: auxBeams[j].x, endX: auxBeamEndX, startY: auxBeams[j].y, endY: auxBeamEndY, dy: dy }\n\t\t\t\tif (auxBeams[j].split !== undefined) {\n\t\t\t\t\tvar split = auxBeams[j].split;\n\t\t\t\t\tif (b.endX <= split[split.length - 1]) {\n\t\t\t\t\t\t// the reduction in beams leaves the last note by itself, so create a little flag for it\n\t\t\t\t\t\tsplit[split.length - 1] -= elem.w;\n\t\t\t\t\t}\n\t\t\t\t\tsplit.push(b.endX);\n\t\t\t\t\tb.split = auxBeams[j].split;\n\t\t\t\t}\n\t\t\t\tbeams.push(b);\n\t\t\t\tauxBeams = auxBeams.slice(0, j);\n\t\t\t}\n\t\t}\n\t}\n\treturn beams;\n}\n\nmodule.exports = layoutBeam;\n","function getBarYAt(startx, starty, endx, endy, x) {\n\treturn starty + (endy - starty) / (endx - startx) * (x - startx);\n}\n\nmodule.exports = getBarYAt;\n\n","function getLeftEdgeOfStaff(renderer, getTextSize, voices, brace, bracket) {\n\tvar x = renderer.padding.left;\n\n\t// find out how much space will be taken up by voice headers\n\tvar voiceheaderw = 0;\n\tvar i;\n\tvar size;\n\tfor (i = 0; i < voices.length; i++) {\n\t\tif (voices[i].header) {\n\t\t\tsize = getTextSize.calc(voices[i].header, 'voicefont', '');\n\t\t\tvoiceheaderw = Math.max(voiceheaderw, size.width);\n\t\t}\n\t}\n\tvoiceheaderw = addBraceSize(voiceheaderw, brace, getTextSize);\n\tvoiceheaderw = addBraceSize(voiceheaderw, bracket, getTextSize);\n\n\tif (voiceheaderw) {\n\t\t// Give enough spacing to the right - we use the width of an A for the amount of spacing.\n\t\tvar sizeW = getTextSize.calc(\"A\", 'voicefont', '');\n\t\tvoiceheaderw += sizeW.width;\n\t}\n\tx += voiceheaderw;\n\n\tvar ofs = 0;\n\tofs = setBraceLocation(brace, x, ofs);\n\tofs = setBraceLocation(bracket, x, ofs);\n\treturn x + ofs;\n}\n\nfunction addBraceSize(voiceheaderw, brace, getTextSize) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tif (brace[i].header) {\n\t\t\t\tvar size = getTextSize.calc(brace[i].header, 'voicefont', '');\n\t\t\t\tvoiceheaderw = Math.max(voiceheaderw, size.width);\n\t\t\t}\n\t\t}\n\t}\n\treturn voiceheaderw;\n}\n\nfunction setBraceLocation(brace, x, ofs) {\n\tif (brace) {\n\t\tfor (var i = 0; i < brace.length; i++) {\n\t\t\tsetLocation(x, brace[i]);\n\t\t\tofs = Math.max(ofs, brace[i].getWidth());\n\t\t}\n\t}\n\treturn ofs;\n}\n\nfunction setLocation(x, element) {\n\telement.x = x;\n}\n\nmodule.exports = getLeftEdgeOfStaff;\n","var getLeftEdgeOfStaff = require('./get-left-edge-of-staff');\n\nfunction layoutInGrid(renderer, staffGroup, timeBasedLayout) {\n\tvar leftEdge = getLeftEdgeOfStaff(renderer, staffGroup.getTextSize, staffGroup.voices, staffGroup.brace, staffGroup.bracket);\n\tvar ret = getTotalDuration(staffGroup, timeBasedLayout.minPadding)\n\tvar totalDuration = ret.totalDuration\n\tvar minSpacing = ret.minSpacing\n\tvar totalWidth = minSpacing * totalDuration\n\tif (timeBasedLayout.minWidth)\n\t\ttotalWidth = Math.max(totalWidth, timeBasedLayout.minWidth)\n\tvar leftAlignPadding = timeBasedLayout.minPadding ? timeBasedLayout.minPadding/2 : 2 // If the padding isn't specified still give it some\n\n\tstaffGroup.startx = leftEdge\n\tstaffGroup.w = totalWidth + leftEdge\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar voice = staffGroup.voices[i]\n\t\tvoice.startx = leftEdge\n\t\tvoice.w = totalWidth + leftEdge\n\n\t\tvar x = leftEdge\n\t\tvar afterFixedLeft = false\n\t\tvar durationUnit = 0\n\t\tfor (var j = 0; j < voice.children.length; j++) {\n\t\t\tvar child = voice.children[j]\n\t\t\tif (!afterFixedLeft) {\n\t\t\t\tif (child.duration !== 0) {\n\t\t\t\t\t// We got to the first music element on the line\n\t\t\t\t\tafterFixedLeft = true\n\t\t\t\t\tdurationUnit = (totalWidth + leftEdge - x) / totalDuration\n\t\t\t\t\tstaffGroup.gridStart = x\n\t\t\t\t} else {\n\t\t\t\t\t// We are still doing the preliminary stuff - clef, time sig, etc.\n\t\t\t\t\tchild.x = x\n\t\t\t\t\tx += child.w + child.minspacing\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (afterFixedLeft) {\n\t\t\t\tif (timeBasedLayout.align === 'center')\n\t\t\t\t\tchild.x = x + (child.duration * durationUnit) / 2 - child.w / 2\n\t\t\t\telse {\n\t\t\t\t\t// left align with padding - but no padding for barlines, they should be right aligned.\n\t\t\t\t\t// TODO-PER: it looks better to move bar lines one pixel to right. Not sure why.\n\t\t\t\t\tif (child.duration === 0) {\n\t\t\t\t\t\tchild.x = x + 1 - child.w\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// child.extraw has the width of the accidentals - push the note to the right to take that into consideration. It will be 0 if there is nothing to the left.\n\t\t\t\t\t\tchild.x = x + leftAlignPadding - child.extraw\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tx += child.duration * durationUnit\n\t\t\t}\n\t\t\tfor (var k = 0; k < child.children.length; k++) {\n\t\t\t\tvar grandchild = child.children[k]\n\t\t\t\t// some elements don't have a dx - Tempo, for instance\n\t\t\t\tvar dx = grandchild.dx ? grandchild.dx : 0\n\t\t\t\tgrandchild.x = child.x + dx\n\t\t\t}\n\t\t}\n\t\tstaffGroup.gridEnd = x\n\t}\n\treturn totalWidth\n}\n\nfunction getTotalDuration(staffGroup, timeBasedLayout) {\n\tvar maxSpacing = 0\n\tvar maxCount = 0\n\tfor (var i = 0; i < staffGroup.voices.length; i++) {\n\t\tvar count = 0\n\t\tvar voice = staffGroup.voices[i]\n\t\tfor (var j = 0; j < voice.children.length; j++) {\n\t\t\tvar element = voice.children[j]\n\t\t\tcount += element.duration\n\t\t\tif (element.duration) {\n\t\t\t\tvar width = (element.w+timeBasedLayout) / element.duration\n\t\t\t\tmaxSpacing = Math.max(maxSpacing, width)\n\t\t\t}\n\t\t}\n\t\tmaxCount = Math.max(maxCount, count)\n\t}\n\treturn { totalDuration: maxCount, minSpacing: maxSpacing}\n}\n\nmodule.exports = layoutInGrid;\n","var layoutVoice = require('./voice');\nvar setUpperAndLowerElements = require('./set-upper-and-lower-elements');\nvar layoutStaffGroup = require('./staff-group');\nvar getLeftEdgeOfStaff = require('./get-left-edge-of-staff');\nvar layoutInGrid = require('./layout-in-grid');\n\n// This sets the \"x\" attribute on all the children in abctune.lines\n// It also sets the \"w\" and \"startx\" attributes on \"voices\"\n// It also sets the \"w\" and \"startx\" attributes on \"voices.children\"\nvar layout = function (renderer, abctune, width, space, expandToWidest, timeBasedLayout) {\n\tvar i;\n\tvar abcLine;\n\t// Adjust the x-coordinates to their absolute positions\n\tvar maxWidth = width;\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staff) {\n\t\t\t// console.log(\"=== line\", i)\n\t\t\tvar thisWidth;\n\t\t\tif (timeBasedLayout !== undefined)\n\t\t\t\tthisWidth = layoutInGrid(renderer, abcLine.staffGroup, timeBasedLayout);\n\t\t\telse\n\t\t\t\tthisWidth = setXSpacing(renderer, maxWidth, space, abcLine.staffGroup, abctune.formatting, i === abctune.lines.length - 1, false);\n\t\t\t// console.log(thisWidth, maxWidth)\n\t\t\tif (Math.round(thisWidth) > Math.round(maxWidth)) { // to take care of floating point weirdness\n\t\t\t\tmaxWidth = thisWidth\n\t\t\t\tif (expandToWidest)\n\t\t\t\t\ti = -1 // do the calculations over with the new width\n\t\t\t}\n\t\t}\n\t}\n\n\t// Layout the beams and add the stems to the beamed notes.\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staffGroup && abcLine.staffGroup.voices) {\n\t\t\tfor (var j = 0; j < abcLine.staffGroup.voices.length; j++)\n\t\t\t\tlayoutVoice(abcLine.staffGroup.voices[j]);\n\t\t\tsetUpperAndLowerElements(renderer, abcLine.staffGroup);\n\t\t}\n\t}\n\n\t// Set the staff spacing\n\t// TODO-PER: we should have been able to do this by the time we called setUpperAndLowerElements, but for some reason the \"bottom\" element seems to be set as a side effect of setting the X spacing.\n\tfor (i = 0; i < abctune.lines.length; i++) {\n\t\tabcLine = abctune.lines[i];\n\t\tif (abcLine.staffGroup) {\n\t\t\tabcLine.staffGroup.setHeight();\n\t\t}\n\t}\n\treturn maxWidth;\n}\n// Do the x-axis positioning for a single line (a group of related staffs)\nvar setXSpacing = function (renderer, width, space, staffGroup, formatting, isLastLine, debug) {\n\tvar leftEdge = getLeftEdgeOfStaff(renderer, staffGroup.getTextSize, staffGroup.voices, staffGroup.brace, staffGroup.bracket);\n\tvar newspace = space;\n\t//dumpGroup(\"before\", staffGroup)\n\tfor (var it = 0; it < 8; it++) { // TODO-PER: shouldn't need multiple passes, but each pass gets it closer to the right spacing. (Only affects long lines: normal lines break out of this loop quickly.)\n\t\t// console.log(\"iteration\", it)\n\t\tvar ret = layoutStaffGroup(newspace, renderer.minPadding, debug, staffGroup, leftEdge);\n\t\tnewspace = calcHorizontalSpacing(isLastLine, formatting.stretchlast, width + renderer.padding.left, staffGroup.w, newspace, ret.spacingUnits, ret.minSpace, renderer.padding.left + renderer.padding.right);\n\t\tif (debug)\n\t\t\tconsole.log(\"setXSpace\", it, staffGroup.w, newspace, staffGroup.minspace);\n\t\tif (newspace === null) break;\n\t}\n\t//dumpGroup(\"after\",staffGroup)\n\tcenterWholeRests(staffGroup.voices);\n\treturn staffGroup.w - leftEdge\n};\n\nfunction replacer(key, value) {\n\t// Filtering out properties\n\tif (key === 'parent') {\n\t\treturn 'parent';\n\t}\n\tif (key === 'beam') {\n\t\treturn 'beam';\n\t}\n\treturn value;\n}\n\nfunction dumpGroup(label, staffGroup) {\n\tconsole.log(\"=================== \" + label + \" =========================\")\n\tconsole.log(staffGroup)\n\tconsole.log(JSON.stringify(staffGroup, replacer, \"\\t\"))\n}\n\nfunction calcHorizontalSpacing(isLastLine, stretchLast, targetWidth, lineWidth, spacing, spacingUnits, minSpace, padding) {\n\tif (isLastLine) {\n\t\tif (stretchLast === undefined) {\n\t\t\tif (lineWidth / targetWidth < 0.66) return null; // keep this for backward compatibility. The break isn't quite the same for some reason.\n\t\t} else {\n\t\t\t// \"Stretch the last music line of a tune when it lacks less than the float fraction of the page width.\"\n\t\t\tvar lack = 1 - (lineWidth + padding) / targetWidth;\n\t\t\tvar stretch = lack < stretchLast;\n\t\t\tif (!stretch) return null; // don't stretch last line too much\n\t\t}\n\t}\n\tif (Math.abs(targetWidth - lineWidth) < 2) return null; // if we are already near the target width, we're done.\n\tvar relSpace = spacingUnits * spacing;\n\tvar constSpace = lineWidth - relSpace;\n\tif (spacingUnits > 0) {\n\t\tspacing = (targetWidth - constSpace) / spacingUnits;\n\t\tif (spacing * minSpace > 50) {\n\t\t\tspacing = 50 / minSpace;\n\t\t}\n\t\treturn spacing;\n\t}\n\treturn null;\n}\n\nfunction centerWholeRests(voices) {\n\t// whole rests are a special case: if they are by themselves in a measure, then they should be centered.\n\t// (If they are not by themselves, that is probably a user error, but we'll just center it between the two items to either side of it.)\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvar voice = voices[i];\n\t\t// Look through all of the elements except for the first and last. If the whole note appears there then there isn't anything to center it between anyway.\n\t\tfor (var j = 1; j < voice.children.length - 1; j++) {\n\t\t\tvar absElem = voice.children[j];\n\t\t\tif (absElem.abcelem.rest && (absElem.abcelem.rest.type === 'whole' || absElem.abcelem.rest.type === 'multimeasure')) {\n\t\t\t\tvar before = voice.children[j - 1];\n\t\t\t\tvar after = voice.children[j + 1];\n\t\t\t\tabsElem.center(before, after);\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = layout;\n","var spacing = require('../helpers/spacing');\n\nvar setUpperAndLowerElements = function (renderer, staffGroup) {\n\t// Each staff already has the top and bottom set, now we see if there are elements that are always on top and bottom, and resolve their pitch.\n\t// Also, get the overall height of all the staves in this group.\n\tvar lastStaffBottom;\n\tfor (var i = 0; i < staffGroup.staffs.length; i++) {\n\t\tvar staff = staffGroup.staffs[i];\n\t\t// the vertical order of elements that are above is: tempo, part, volume/dynamic, ending/chord, lyric\n\t\t// the vertical order of elements that are below is: lyric, chord, volume/dynamic\n\t\tvar positionY = {\n\t\t\ttempoHeightAbove: 0,\n\t\t\tpartHeightAbove: 0,\n\t\t\tvolumeHeightAbove: 0,\n\t\t\tdynamicHeightAbove: 0,\n\t\t\tendingHeightAbove: 0,\n\t\t\tchordHeightAbove: 0,\n\t\t\tlyricHeightAbove: 0,\n\n\t\t\tlyricHeightBelow: 0,\n\t\t\tchordHeightBelow: 0,\n\t\t\tvolumeHeightBelow: 0,\n\t\t\tdynamicHeightBelow: 0\n\t\t};\n\n\t\tif (renderer.showDebug && renderer.showDebug.indexOf(\"box\") >= 0) {\n\t\t\tstaff.originalTop = staff.top; // This is just being stored for debugging purposes.\n\t\t\tstaff.originalBottom = staff.bottom; // This is just being stored for debugging purposes.\n\t\t}\n\n\t\tincTop(staff, positionY, 'lyricHeightAbove');\n\t\tincTop(staff, positionY, 'chordHeightAbove', staff.specialY.chordLines.above);\n\t\tif (staff.specialY.endingHeightAbove) {\n\t\t\tif (staff.specialY.chordHeightAbove)\n\t\t\t\tstaff.top += 2;\n\t\t\telse\n\t\t\t\tstaff.top += staff.specialY.endingHeightAbove + margin;\n\t\t\tpositionY.endingHeightAbove = staff.top;\n\t\t}\n\t\tif (staff.specialY.dynamicHeightAbove && staff.specialY.volumeHeightAbove) {\n\t\t\tstaff.top += Math.max(staff.specialY.dynamicHeightAbove, staff.specialY.volumeHeightAbove) + margin;\n\t\t\tpositionY.dynamicHeightAbove = staff.top;\n\t\t\tpositionY.volumeHeightAbove = staff.top;\n\t\t} else {\n\t\t\tincTop(staff, positionY, 'dynamicHeightAbove');\n\t\t\tincTop(staff, positionY, 'volumeHeightAbove');\n\t\t}\n\t\tincTop(staff, positionY, 'partHeightAbove');\n\t\tincTop(staff, positionY, 'tempoHeightAbove');\n\n\t\tif (staff.specialY.lyricHeightBelow) {\n\t\t\tstaff.specialY.lyricHeightBelow += renderer.spacing.vocal / spacing.STEP;\n\t\t\tpositionY.lyricHeightBelow = staff.bottom;\n\t\t\tstaff.bottom -= (staff.specialY.lyricHeightBelow + margin);\n\t\t}\n\t\tif (staff.specialY.chordHeightBelow) {\n\t\t\tpositionY.chordHeightBelow = staff.bottom;\n\t\t\tvar hgt = staff.specialY.chordHeightBelow;\n\t\t\tif (staff.specialY.chordLines.below)\n\t\t\t\thgt *= staff.specialY.chordLines.below;\n\t\t\tstaff.bottom -= (hgt + margin);\n\t\t}\n\t\tif (staff.specialY.volumeHeightBelow && staff.specialY.dynamicHeightBelow) {\n\t\t\tpositionY.volumeHeightBelow = staff.bottom;\n\t\t\tpositionY.dynamicHeightBelow = staff.bottom;\n\t\t\tstaff.bottom -= (Math.max(staff.specialY.volumeHeightBelow, staff.specialY.dynamicHeightBelow) + margin);\n\t\t} else if (staff.specialY.volumeHeightBelow) {\n\t\t\tpositionY.volumeHeightBelow = staff.bottom; staff.bottom -= (staff.specialY.volumeHeightBelow + margin);\n\t\t} else if (staff.specialY.dynamicHeightBelow) {\n\t\t\tpositionY.dynamicHeightBelow = staff.bottom; staff.bottom -= (staff.specialY.dynamicHeightBelow + margin);\n\t\t}\n\n\t\tif (renderer.showDebug && renderer.showDebug.indexOf(\"box\") >= 0)\n\t\t\tstaff.positionY = positionY; // This is just being stored for debugging purposes.\n\n\t\tfor (var j = 0; j < staff.voices.length; j++) {\n\t\t\tvar voice = staffGroup.voices[staff.voices[j]];\n\t\t\tsetUpperAndLowerVoiceElements(positionY, voice, renderer.spacing);\n\t\t}\n\t\t// We might need a little space in between staves if the staves haven't been pushed far enough apart by notes or extra vertical stuff.\n\t\t// Only try to put in extra space if this isn't the top staff.\n\t\tif (lastStaffBottom !== undefined) {\n\t\t\tvar thisStaffTop = staff.top - 10;\n\t\t\tvar forcedSpacingBetween = lastStaffBottom + thisStaffTop;\n\t\t\tvar minSpacingInPitches = renderer.spacing.systemStaffSeparation / spacing.STEP;\n\t\t\tvar addedSpace = minSpacingInPitches - forcedSpacingBetween;\n\t\t\tif (addedSpace > 0)\n\t\t\t\tstaff.top += addedSpace;\n\t\t}\n\t\tstaff.top += renderer.spacing.staffTopMargin / spacing.STEP\n\n\t\tlastStaffBottom = 2 - staff.bottom; // the staff starts at position 2 and the bottom variable is negative. Therefore to find out how large the bottom is, we reverse the sign of the bottom, and add the 2 in.\n\n\t\t// Now we need a little margin on the top, so we'll just throw that in.\n\t\t//staff.top += 4;\n\t\t//console.log(\"Staff Y: \",i,heightInPitches,staff.top,staff.bottom);\n\t}\n\t//console.log(\"Staff Height: \",heightInPitches,this.height);\n};\n\nvar margin = 1;\nfunction incTop(staff, positionY, item, count) {\n\tif (staff.specialY[item]) {\n\t\tvar height = staff.specialY[item];\n\t\tif (count)\n\t\t\theight *= count;\n\t\tstaff.top += height + margin;\n\t\tpositionY[item] = staff.top;\n\t}\n}\n\nfunction setUpperAndLowerVoiceElements(positionY, voice, spacing) {\n\tvar i;\n\tvar abselem;\n\tfor (i = 0; i < voice.children.length; i++) {\n\t\tabselem = voice.children[i];\n\t\tsetUpperAndLowerAbsoluteElements(positionY, abselem, spacing);\n\t}\n\tfor (i = 0; i < voice.otherchildren.length; i++) {\n\t\tabselem = voice.otherchildren[i];\n\t\tswitch (abselem.type) {\n\t\t\tcase 'CrescendoElem':\n\t\t\t\tsetUpperAndLowerCrescendoElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'DynamicDecoration':\n\t\t\t\tsetUpperAndLowerDynamicElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'EndingElem':\n\t\t\t\tsetUpperAndLowerEndingElements(positionY, abselem);\n\t\t\t\tbreak;\n\t\t\tcase 'TieElem':\n\t\t\t\t// If a tie element is the highest or lowest thing then space might need to make room for it.\n\t\t\t\tvar yBounds = abselem.getYBounds()\n\t\t\t\tvoice.staff.top = Math.max(voice.staff.top, yBounds[0])\n\t\t\t\tvoice.staff.top = Math.max(voice.staff.top, yBounds[1])\n\t\t\t\tvoice.staff.bottom = Math.min(voice.staff.bottom, yBounds[0])\n\t\t\t\tvoice.staff.bottom = Math.min(voice.staff.bottom, yBounds[1])\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\n// For each of the relative elements that can't be placed in advance (because their vertical placement depends on everything\n// else on the line), this iterates through them and sets their pitch. By the time this is called, specialYResolved contains a\n// hash with the vertical placement (in pitch units) for each type.\n// TODO-PER: I think this needs to be separated by \"above\" and \"below\". How do we know that for dynamics at the point where they are being defined, though? We need a pass through all the relative elements to set \"above\" and \"below\".\nfunction setUpperAndLowerAbsoluteElements(specialYResolved, element, spacing) {\n\t// specialYResolved contains the actual pitch for each of the classes of elements.\n\tfor (var i = 0; i < element.children.length; i++) {\n\t\tvar child = element.children[i];\n\t\tfor (var key in element.specialY) { // for each class of element that needs to be placed vertically\n\t\t\tif (element.specialY.hasOwnProperty(key)) {\n\t\t\t\tif (child[key]) { // If this relative element has defined a height for this class of element\n\t\t\t\t\tchild.pitch = specialYResolved[key];\n\t\t\t\t\tif (child.top === undefined) { // TODO-PER: HACK! Not sure this is the right place to do this.\n\t\t\t\t\t\tif (child.type === 'TempoElement') {\n\t\t\t\t\t\t\tsetUpperAndLowerTempoElement(specialYResolved, child);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetUpperAndLowerRelativeElements(specialYResolved, child, spacing);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telement.pushTop(child.top);\n\t\t\t\t\t\telement.pushBottom(child.bottom);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction setUpperAndLowerCrescendoElements(positionY, element) {\n\tif (element.dynamicHeightAbove)\n\t\telement.pitch = positionY.dynamicHeightAbove;\n\telse\n\t\telement.pitch = positionY.dynamicHeightBelow;\n}\n\nfunction setUpperAndLowerDynamicElements(positionY, element) {\n\tif (element.volumeHeightAbove)\n\t\telement.pitch = positionY.volumeHeightAbove;\n\telse\n\t\telement.pitch = positionY.volumeHeightBelow;\n}\n\nfunction setUpperAndLowerEndingElements(positionY, element) {\n\telement.pitch = positionY.endingHeightAbove - 2;\n}\n\nfunction setUpperAndLowerTempoElement(positionY, element) {\n\telement.pitch = positionY.tempoHeightAbove;\n\telement.top = positionY.tempoHeightAbove;\n\telement.bottom = positionY.tempoHeightAbove;\n\tif (element.note) {\n\t\tvar tempoPitch = element.pitch - element.totalHeightInPitches + 1; // The pitch we receive is the top of the allotted area: change that to practically the bottom.\n\t\telement.note.top = tempoPitch;\n\t\telement.note.bottom = tempoPitch;\n\t\tfor (var i = 0; i < element.note.children.length; i++) {\n\t\t\tvar child = element.note.children[i];\n\t\t\tchild.top += tempoPitch;\n\t\t\tchild.bottom += tempoPitch;\n\t\t\tchild.pitch += tempoPitch;\n\t\t\tif (child.pitch2 !== undefined)\n\t\t\t\tchild.pitch2 += tempoPitch;\n\t\t}\n\t}\n}\n\nfunction setUpperAndLowerRelativeElements(positionY, element, renderSpacing) {\n\tswitch (element.type) {\n\t\tcase \"part\":\n\t\t\telement.top = positionY.partHeightAbove + element.height;\n\t\t\telement.bottom = positionY.partHeightAbove;\n\t\t\tbreak;\n\t\tcase \"text\":\n\t\tcase \"chord\":\n\t\t\tif (element.chordHeightAbove) {\n\t\t\t\telement.top = positionY.chordHeightAbove;\n\t\t\t\telement.bottom = positionY.chordHeightAbove;\n\t\t\t} else {\n\t\t\t\telement.top = positionY.chordHeightBelow;\n\t\t\t\telement.bottom = positionY.chordHeightBelow;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"lyric\":\n\t\t\tif (element.lyricHeightAbove) {\n\t\t\t\telement.top = positionY.lyricHeightAbove;\n\t\t\t\telement.bottom = positionY.lyricHeightAbove;\n\t\t\t} else {\n\t\t\t\telement.top = positionY.lyricHeightBelow + renderSpacing.vocal / spacing.STEP;\n\t\t\t\telement.bottom = positionY.lyricHeightBelow + renderSpacing.vocal / spacing.STEP;\n\t\t\t\telement.pitch -= renderSpacing.vocal / spacing.STEP;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\telement.top = positionY.chordHeightAbove;\n\t\t\telement.bottom = positionY.chordHeightAbove;\n\t\t\tbreak;\n\t}\n\tif (element.pitch === undefined || element.top === undefined)\n\t\tconsole.error(\"RelativeElement position not set.\", element.type, element.pitch, element.top, positionY);\n}\n\nmodule.exports = setUpperAndLowerElements;\n","var layoutVoiceElements = require('./voice-elements');\n\nfunction checkLastBarX(voices) {\n\tvar maxX = 0;\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tvar curVoice = voices[i];\n\t\tif (curVoice.children.length > 0) {\n\t\t\tvar lastChild = curVoice.children.length - 1;\n\t\t\tvar maxChild = curVoice.children[lastChild];\n\t\t\tif (maxChild.abcelem.el_type === 'bar') {\n\t\t\t\tvar barX = maxChild.children[0].x;\n\t\t\t\tif (barX > maxX) {\n\t\t\t\t\tmaxX = barX;\n\t\t\t\t} else {\n\t\t\t\t\tmaxChild.children[0].x = maxX;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvar layoutStaffGroup = function (spacing, minPadding, debug, staffGroup, leftEdge) {\n\tvar epsilon = 0.0000001; // Fudging for inexactness of floating point math.\n\tvar spacingunits = 0; // number of times we will have ended up using the spacing distance (as opposed to fixed width distances)\n\tvar minspace = 1000; // a big number to start off with - used to find out what the smallest space between two notes is -- GD 2014.1.7\n\n\tvar x = leftEdge;\n\tstaffGroup.startx = x;\n\tvar i;\n\n\tvar currentduration = 0;\n\tif (debug) console.log(\"init layout\", spacing);\n\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\tlayoutVoiceElements.beginLayout(x, staffGroup.voices[i]);\n\t}\n\n\tvar spacingunit = 0; // number of spacingunits coming from the previously laid out element to this one\n\twhile (!finished(staffGroup.voices)) {\n\t\t// find first duration level to be laid out among candidates across voices\n\t\tcurrentduration = null; // candidate smallest duration level\n\t\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\t\tif (!layoutVoiceElements.layoutEnded(staffGroup.voices[i]) && (!currentduration || getDurationIndex(staffGroup.voices[i]) < currentduration))\n\t\t\t\tcurrentduration = getDurationIndex(staffGroup.voices[i]);\n\t\t}\n\n\n\t\t// isolate voices at current duration level\n\t\tvar currentvoices = [];\n\t\tvar othervoices = [];\n\t\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\t\tvar durationIndex = getDurationIndex(staffGroup.voices[i]);\n\t\t\t// PER: Because of the inexactness of JS floating point math, we just get close.\n\t\t\tif (durationIndex - currentduration > epsilon) {\n\t\t\t\tothervoices.push(staffGroup.voices[i]);\n\t\t\t\t//console.log(\"out: voice \",i);\n\t\t\t} else {\n\t\t\t\tcurrentvoices.push(staffGroup.voices[i]);\n\t\t\t\t//if (debug) console.log(\"in: voice \",i);\n\t\t\t}\n\t\t}\n\n\t\t// among the current duration level find the one which needs starting furthest right\n\t\tspacingunit = 0; // number of spacingunits coming from the previously laid out element to this one\n\t\tvar spacingduration = 0;\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\t//console.log(\"greatest spacing unit\", x, layoutVoiceElements.getNextX(currentvoices[i]), layoutVoiceElements.getSpacingUnits(currentvoices[i]), currentvoices[i].spacingduration);\n\t\t\tif (layoutVoiceElements.getNextX(currentvoices[i]) > x) {\n\t\t\t\tx = layoutVoiceElements.getNextX(currentvoices[i]);\n\t\t\t\tspacingunit = layoutVoiceElements.getSpacingUnits(currentvoices[i]);\n\t\t\t\tspacingduration = currentvoices[i].spacingduration;\n\t\t\t}\n\t\t}\n\t\tspacingunits += spacingunit;\n\t\tminspace = Math.min(minspace, spacingunit);\n\t\tif (debug) console.log(\"currentduration: \", currentduration, spacingunits, minspace);\n\n\t\tvar lastTopVoice = undefined;\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\tvar v = currentvoices[i];\n\t\t\tif (v.voicenumber === 0)\n\t\t\t\tlastTopVoice = i;\n\t\t\tvar topVoice = (lastTopVoice !== undefined && currentvoices[lastTopVoice].voicenumber !== v.voicenumber) ? currentvoices[lastTopVoice] : undefined;\n\t\t\tif (!isSameStaff(v, topVoice))\n\t\t\t\ttopVoice = undefined;\n\t\t\tvar voicechildx = layoutVoiceElements.layoutOneItem(x, spacing, v, minPadding, topVoice);\n\t\t\tvar dx = voicechildx - x;\n\t\t\tif (dx > 0) {\n\t\t\t\tx = voicechildx; //update x\n\t\t\t\tfor (var j = 0; j < i; j++) { // shift over all previously laid out elements\n\t\t\t\t\tlayoutVoiceElements.shiftRight(dx, currentvoices[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remove the value of already counted spacing units in other voices (e.g. if a voice had planned to use up 5 spacing units but is not in line to be laid out at this duration level - where we've used 2 spacing units - then we must use up 3 spacing units, not 5)\n\t\tfor (i = 0; i < othervoices.length; i++) {\n\t\t\tothervoices[i].spacingduration -= spacingduration;\n\t\t\tlayoutVoiceElements.updateNextX(x, spacing, othervoices[i]); // adjust other voices expectations\n\t\t}\n\n\t\t// update indexes of currently laid out elems\n\t\tfor (i = 0; i < currentvoices.length; i++) {\n\t\t\tvar voice = currentvoices[i];\n\t\t\tlayoutVoiceElements.updateIndices(voice);\n\t\t}\n\t} // finished laying out\n\n\n\t// find the greatest remaining x as a base for the width\n\tfor (i = 0; i < staffGroup.voices.length; i++) {\n\t\tif (layoutVoiceElements.getNextX(staffGroup.voices[i]) > x) {\n\t\t\tx = layoutVoiceElements.getNextX(staffGroup.voices[i]);\n\t\t\tspacingunit = layoutVoiceElements.getSpacingUnits(staffGroup.voices[i]);\n\t\t}\n\t}\n\n\t// adjust lastBar when needed (multi staves)\n\tcheckLastBarX(staffGroup.voices);\n\t//console.log(\"greatest remaining\",spacingunit,x);\n\tspacingunits += spacingunit;\n\tstaffGroup.setWidth(x);\n\n\treturn { spacingUnits: spacingunits, minSpace: minspace };\n};\n\n\nfunction finished(voices) {\n\tfor (var i = 0; i < voices.length; i++) {\n\t\tif (!layoutVoiceElements.layoutEnded(voices[i])) return false;\n\t}\n\treturn true;\n}\n\nfunction getDurationIndex(element) {\n\treturn element.durationindex - (element.children[element.i] && (element.children[element.i].duration > 0) ? 0 : 0.0000005); // if the ith element doesn't have a duration (is not a note), its duration index is fractionally before. This enables CLEF KEYSIG TIMESIG PART, etc. to be laid out before we get to the first note of other voices\n}\n\nfunction isSameStaff(voice1, voice2) {\n\tif (!voice1 || !voice1.staff || !voice1.staff.voices || voice1.staff.voices.length === 0)\n\t\treturn false;\n\tif (!voice2 || !voice2.staff || !voice2.staff.voices || voice2.staff.voices.length === 0)\n\t\treturn false;\n\treturn (voice1.staff.voices[0] === voice2.staff.voices[0]);\n}\n\nmodule.exports = layoutStaffGroup;\n","var getBarYAt = require('./get-bar-y-at');\n\nfunction layoutTriplet(element) {\n\t// TODO end and beginning of line (PER: P.S. I'm not sure this can happen: I think the parser will always specify both the start and end points.)\n\tif (element.anchor1 && element.anchor2) {\n\t\telement.hasBeam = !!element.anchor1.parent.beam && element.anchor1.parent.beam === element.anchor2.parent.beam;\n\t\tvar beam = element.anchor1.parent.beam;\n\t\t// if hasBeam is true, then the first and last element in the triplet have the same beam.\n\t\t// We also need to check if the beam doesn't contain other notes so that `(3 dcdcc` will do a bracket.\n\t\tif (element.hasBeam && (beam.elems[0] !== element.anchor1.parent || beam.elems[beam.elems.length - 1] !== element.anchor2.parent))\n\t\t\telement.hasBeam = false;\n\n\t\tif (element.hasBeam) {\n\t\t\t// If there is a beam then we don't need to draw anything except the text. The beam could either be above or below.\n\t\t\tvar left = isAbove(beam) ? element.anchor1.x + element.anchor1.w : element.anchor1.x;\n\t\t\telement.yTextPos = heightAtMidpoint(left, element.anchor2.x, beam);\n\t\t\telement.yTextPos += isAbove(beam) ? 3 : -2; // This creates some space between the beam and the number.\n\t\t\telement.xTextPos = xAtMidpoint(left, element.anchor2.x);\n\t\t\telement.top = element.yTextPos + 1;\n\t\t\telement.bottom = element.yTextPos - 2;\n\t\t\tif (isAbove(beam))\n\t\t\t\telement.endingHeightAbove = 4;\n\t\t} else {\n\t\t\t// If there isn't a beam, then we need to draw the bracket and the text. The bracket is always above.\n\t\t\t// The bracket is never lower than the 'a' line, but is 4 pitches above the first and last notes. If there is\n\t\t\t// a tall note in the middle, the bracket is horizontal and above the highest note.\n\t\t\telement.startNote = Math.max(element.anchor1.parent.top, 9) + 4;\n\t\t\telement.endNote = Math.max(element.anchor2.parent.top, 9) + 4;\n\t\t\t// If it starts or ends on a rest, make the beam horizontal\n\t\t\tif (element.anchor1.parent.type === \"rest\" && element.anchor2.parent.type !== \"rest\")\n\t\t\t\telement.startNote = element.endNote;\n\t\t\telse if (element.anchor2.parent.type === \"rest\" && element.anchor1.parent.type !== \"rest\")\n\t\t\t\telement.endNote = element.startNote;\n\t\t\t// See if the middle note is really high.\n\t\t\tvar max = 0;\n\t\t\tfor (var i = 0; i < element.middleElems.length; i++) {\n\t\t\t\tmax = Math.max(max, element.middleElems[i].top);\n\t\t\t}\n\t\t\tmax += 4;\n\t\t\tif (max > element.startNote || max > element.endNote) {\n\t\t\t\telement.startNote = max;\n\t\t\t\telement.endNote = max;\n\t\t\t}\n\t\t\tif (element.flatBeams) {\n\t\t\t\telement.startNote = Math.max(element.startNote, element.endNote);\n\t\t\t\telement.endNote = Math.max(element.startNote, element.endNote);\n\t\t\t}\n\n\t\t\telement.yTextPos = element.startNote + (element.endNote - element.startNote) / 2;\n\t\t\telement.xTextPos = element.anchor1.x + (element.anchor2.x + element.anchor2.w - element.anchor1.x) / 2;\n\t\t\telement.top = element.yTextPos + 1;\n\t\t}\n\t}\n\tdelete element.middleElems;\n\tdelete element.flatBeams;\n}\n\nfunction isAbove(beam) {\n\treturn beam.stemsUp;\n}\n\n// We can't just use the entire beam for the calculation. The range has to be passed in, because the beam might extend into some unrelated notes. for instance, (3_a'f'e'f'2 when L:16\nfunction heightAtMidpoint(startX, endX, beam) {\n\tif (beam.beams.length === 0)\n\t\treturn 0;\n\tbeam = beam.beams[0];\n\tvar midPoint = startX + (endX - startX) / 2;\n\treturn getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, midPoint);\n}\n\nfunction xAtMidpoint(startX, endX) {\n\treturn startX + (endX - startX) / 2;\n}\n\nmodule.exports = layoutTriplet;\n","var VoiceElement = function VoiceElements() { }\n\nVoiceElement.beginLayout = function (startx, voice) {\n\tvoice.i = 0;\n\tvoice.durationindex = 0;\n\t//this.ii=this.children.length;\n\tvoice.startx = startx;\n\tvoice.minx = startx; // furthest left to where negatively positioned elements are allowed to go\n\tvoice.nextx = startx; // x position where the next element of this voice should be placed assuming no other voices and no fixed width constraints\n\tvoice.spacingduration = 0; // duration left to be laid out in current iteration (omitting additional spacing due to other aspects, such as bars, dots, sharps and flats)\n};\n\nVoiceElement.layoutEnded = function (voice) {\n\treturn (voice.i >= voice.children.length);\n};\n\nVoiceElement.getNextX = function (voice) {\n\treturn Math.max(voice.minx, voice.nextx);\n};\n\n// number of spacing units expected for next positioning\nVoiceElement.getSpacingUnits = function (voice) {\n\treturn Math.sqrt(voice.spacingduration * 8);\n};\n\n// Try to layout the element at index this.i\n// x - position to try to layout the element at\n// spacing - base spacing\n// can't call this function more than once per iteration\nVoiceElement.layoutOneItem = function (x, spacing, voice, minPadding, firstVoice) {\n\tvar child = voice.children[voice.i];\n\tif (!child) return 0;\n\tvar er = x - voice.minx; // available extrawidth to the left\n\tvar pad = voice.durationindex + child.duration > 0 ? minPadding : 0; // only add padding to the items that aren't fixed to the left edge.\n\t// See if this item overlaps the item in the first voice. If firstVoice is undefined then there's nothing to compare.\n\tif (child.abcelem.el_type === \"note\" && !child.abcelem.rest && voice.voicenumber !== 0 && firstVoice) {\n\t\tvar firstChild = firstVoice.children[firstVoice.i];\n\t\t// It overlaps if the either the child's top or bottom is inside the firstChild's or at least within 1\n\t\t// A special case is if the element is on the same line then it can share a note head, if the notehead is the same\n\t\tvar overlaps = firstChild &&\n\t\t\t((child.abcelem.maxpitch <= firstChild.abcelem.maxpitch + 1 && child.abcelem.maxpitch >= firstChild.abcelem.minpitch - 1) ||\n\t\t\t\t(child.abcelem.minpitch <= firstChild.abcelem.maxpitch + 1 && child.abcelem.minpitch >= firstChild.abcelem.minpitch - 1))\n\t\t// See if they can share a note head\n\t\tif (overlaps && child.abcelem.minpitch === firstChild.abcelem.minpitch && child.abcelem.maxpitch === firstChild.abcelem.maxpitch &&\n\t\t\tfirstChild.heads && firstChild.heads.length > 0 && child.heads && child.heads.length > 0 &&\n\t\t\tfirstChild.heads[0].c === child.heads[0].c)\n\t\t\toverlaps = false;\n\t\t// If this note overlaps the note in the first voice and we haven't moved the note yet (this can be called multiple times)\n\t\tif (overlaps) {\n\t\t\t// I think that firstChild should always have at least one note head, but defensively make sure.\n\t\t\t// There was a problem with this being called more than once so if a value is adjusted then it is saved so it is only adjusted once.\n\t\t\tvar firstChildNoteWidth = firstChild.heads && firstChild.heads.length > 0 ? firstChild.heads[0].realWidth : firstChild.fixed.w;\n\t\t\tif (!child.adjustedWidth)\n\t\t\t\tchild.adjustedWidth = firstChildNoteWidth + child.w;\n\t\t\tchild.w = child.adjustedWidth\n\t\t\tfor (var j = 0; j < child.children.length; j++) {\n\t\t\t\tvar relativeChild = child.children[j];\n\t\t\t\tif (relativeChild.name.indexOf(\"accidental\") < 0) {\n\t\t\t\t\tif (!relativeChild.adjustedWidth)\n\t\t\t\t\t\trelativeChild.adjustedWidth = relativeChild.dx + firstChildNoteWidth;\n\t\t\t\t\trelativeChild.dx = relativeChild.adjustedWidth\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\tvar extraWidth = getExtraWidth(child, pad);\n\tif (er < extraWidth) { // shift right by needed amount\n\t\t// There's an exception if a bar element is after a Part element, there is no shift.\n\t\tif (voice.i === 0 || child.type !== 'bar' || (voice.children[voice.i - 1].type !== 'part' && voice.children[voice.i - 1].type !== 'tempo'))\n\t\t\tx += extraWidth - er;\n\t}\n\tchild.setX(x);\n\n\tvoice.spacingduration = child.duration;\n\t//update minx\n\tvoice.minx = x + getMinWidth(child); // add necessary layout space\n\tif (voice.i !== voice.children.length - 1) voice.minx += child.minspacing; // add minimumspacing except on last elem\n\n\tthis.updateNextX(x, spacing, voice);\n\n\t// contribute to staff y position\n\t//this.staff.top = Math.max(child.top,this.staff.top);\n\t//this.staff.bottom = Math.min(child.bottom,this.staff.bottom);\n\n\treturn x; // where we end up having placed the child\n};\n\nVoiceElement.shiftRight = function (dx, voice) {\n\tvar child = voice.children[voice.i];\n\tif (!child) return;\n\tchild.setX(child.x + dx);\n\tvoice.minx += dx;\n\tvoice.nextx += dx;\n};\n\n// call when spacingduration has been updated\nVoiceElement.updateNextX = function (x, spacing, voice) {\n\tvoice.nextx = x + (spacing * this.getSpacingUnits(voice));\n};\n\nVoiceElement.updateIndices = function (voice) {\n\tif (!this.layoutEnded(voice)) {\n\t\tvoice.durationindex += voice.children[voice.i].duration;\n\t\tif (voice.children[voice.i].type === 'bar') voice.durationindex = Math.round(voice.durationindex * 64) / 64; // everytime we meet a barline, do rounding to nearest 64th\n\t\tvoice.i++;\n\t}\n};\n\nfunction getExtraWidth(child, minPadding) { // space needed to the left of the note\n\tvar padding = 0;\n\tif (child.type === 'note' || child.type === 'bar')\n\t\tpadding = minPadding;\n\treturn -child.extraw + padding;\n}\n\nfunction getMinWidth(child) { // absolute space taken to the right of the note\n\treturn child.w;\n}\n\nmodule.exports = VoiceElement;\n","var layoutBeam = require('./beam');\nvar getBarYAt = require('./get-bar-y-at');\nvar layoutTriplet = require('./triplet');\n\nvar layoutVoice = function (voice) {\n\tfor (var i = 0; i < voice.beams.length; i++) {\n\t\tif (voice.beams[i].type === 'BeamElem') {\n\t\t\tlayoutBeam(voice.beams[i]);\n\t\t\tmoveDecorations(voice.beams[i]);\n\t\t\t// The above will change the top and bottom of the abselem children, so see if we need to expand our range.\n\t\t\tfor (var j = 0; j < voice.beams[i].elems.length; j++) {\n\t\t\t\tvoice.adjustRange(voice.beams[i].elems[j]);\n\t\t\t}\n\t\t}\n\t}\n\tvoice.staff.specialY.chordLines = setLaneForChord(voice.children);\n\n\t// Now we can layout the triplets\n\tfor (i = 0; i < voice.otherchildren.length; i++) {\n\t\tvar child = voice.otherchildren[i];\n\t\tif (child.type === 'TripletElem') {\n\t\t\tlayoutTriplet(child);\n\t\t\tvoice.adjustRange(child);\n\t\t}\n\t}\n\tvoice.staff.top = Math.max(voice.staff.top, voice.top);\n\tvoice.staff.bottom = Math.min(voice.staff.bottom, voice.bottom);\n};\n\nfunction moveDecorations(beam) {\n\tvar padding = 1.5; // This is the vertical padding between elements, in pitches.\n\tfor (var ch = 0; ch < beam.elems.length; ch++) {\n\t\tvar child = beam.elems[ch];\n\t\tif (child.top) {\n\t\t\t// We now know where the ornaments should have been placed, so move them if they would overlap.\n\t\t\tvar top = yAtNote(child, beam);\n\t\t\tfor (var i = 0; i < child.children.length; i++) {\n\t\t\t\tvar el = child.children[i];\n\t\t\t\tif (el.klass === 'ornament' && el.position !== 'below') {\n\t\t\t\t\tif (el.bottom - padding < top) {\n\t\t\t\t\t\tvar distance = top - el.bottom + padding; // Find the distance that it needs to move and add a little margin so the element doesn't touch the beam.\n\t\t\t\t\t\tel.bottom += distance;\n\t\t\t\t\t\tel.top += distance;\n\t\t\t\t\t\tel.pitch += distance;\n\t\t\t\t\t\ttop = child.top = el.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction placeInLane(rightMost, relElem) {\n\t// These items are centered so figure the coordinates accordingly.\n\t// The font reports some extra space so the margin is built in.\n\tvar xCoords = relElem.getChordDim();\n\tif (xCoords) {\n\t\tfor (var i = 0; i < rightMost.length; i++) {\n\t\t\tvar fits = rightMost[i] < xCoords.left;\n\t\t\tif (fits) {\n\t\t\t\tif (i > 0)\n\t\t\t\t\trelElem.putChordInLane(i);\n\t\t\t\trightMost[i] = xCoords.right;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// If we didn't return early, then we need a new row\n\t\trightMost.push(xCoords.right);\n\t\trelElem.putChordInLane(rightMost.length - 1);\n\t}\n}\n\nfunction setLaneForChord(absElems) {\n\t// Criteria:\n\t// 1) lane numbers start from the bottom so that as many items as possible are in lane 0, closest to the music.\n\t// 2) a chord can have more than one line (for instance \"C\\nD\") each line is a lane.\n\t// 3) if two adjoining items would touch then push the second one to the next lane.\n\t// 4) use as many lanes as is necessary to get everything to not touch.\n\t// 5) leave a margin between items, so use another lane if the chords would have less than a character's width.\n\t// 6) if the chord only has one character, allow it to be closer than if the chord has more than one character.\n\tvar rightMostAbove = [0];\n\tvar rightMostBelow = [0];\n\tvar i;\n\tvar j;\n\tvar relElem;\n\tfor (i = 0; i < absElems.length; i++) {\n\t\tfor (j = 0; j < absElems[i].children.length; j++) {\n\t\t\trelElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightAbove) {\n\t\t\t\tplaceInLane(rightMostAbove, relElem);\n\t\t\t}\n\t\t}\n\t\tfor (j = absElems[i].children.length - 1; j >= 0; j--) {\n\t\t\trelElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightBelow) {\n\t\t\t\tplaceInLane(rightMostBelow, relElem);\n\t\t\t}\n\t\t}\n\t}\n\t// If we used a second line, then we need to go back and set the first lines.\n\t// Also we need to flip the indexes of the names so that we can count from the top line.\n\tif (rightMostAbove.length > 1 || rightMostBelow.length > 1)\n\t\tsetLane(absElems, rightMostAbove.length, rightMostBelow.length);\n\treturn { above: rightMostAbove.length, below: rightMostBelow.length };\n}\n\nfunction numAnnotationsBelow(absElem) {\n\tvar count = 0;\n\tfor (var j = 0; j < absElem.children.length; j++) {\n\t\tvar relElem = absElem.children[j];\n\t\tif (relElem.chordHeightBelow)\n\t\t\tcount++;\n\t}\n\treturn count;\n}\n\nfunction setLane(absElems, numLanesAbove, numLanesBelow) {\n\tfor (var i = 0; i < absElems.length; i++) {\n\t\tvar below = numAnnotationsBelow(absElems[i]);\n\t\tfor (var j = 0; j < absElems[i].children.length; j++) {\n\t\t\tvar relElem = absElems[i].children[j];\n\t\t\tif (relElem.chordHeightAbove) {\n\t\t\t\trelElem.invertLane(numLanesAbove);\n\t\t\t\t// } else if (relElem.chordHeightBelow) {\n\t\t\t\t// \trelElem.invertLane(below);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction yAtNote(element, beam) {\n\tbeam = beam.beams[0];\n\treturn getBarYAt(beam.startX, beam.startY, beam.endX, beam.endY, element.x);\n}\n\n\nmodule.exports = layoutVoice;\n","// abc_renderer.js: API to render to SVG/Raphael/whatever rendering engine\n\n/*global Math */\n\nvar spacing = require('./helpers/spacing');\nvar Svg = require('./svg');\n\n/**\n * Implements the API for rendering ABCJS Abstract Rendering Structure to a canvas/paper (e.g. SVG, Raphael, etc)\n * @param {Object} paper\n */\nvar Renderer = function (paper) {\n\tthis.paper = new Svg(paper);\n\tthis.controller = null;\n\n\tthis.space = 3 * spacing.SPACE;\n\tthis.padding = {}; // renderer's padding is managed by the controller\n\tthis.reset();\n\tthis.firefox112 = navigator.userAgent.indexOf('Firefox/112.0') >= 0\n};\n\nRenderer.prototype.reset = function () {\n\n\tthis.paper.clear();\n\tthis.y = 0;\n\tthis.abctune = null;\n\tthis.path = null;\n\tthis.isPrint = false;\n\tthis.lineThickness = 0;\n\tthis.initVerticalSpace();\n};\n\nRenderer.prototype.newTune = function (abcTune) {\n\tthis.abctune = abcTune; // TODO-PER: this is just to get the font info.\n\tthis.setVerticalSpace(abcTune.formatting);\n\t//this.measureNumber = null;\n\t//this.noteNumber = null;\n\tthis.isPrint = abcTune.media === 'print';\n\tthis.setPadding(abcTune);\n};\n\nRenderer.prototype.setLineThickness = function (lineThickness) {\n\tthis.lineThickness = lineThickness\n};\n\nRenderer.prototype.setPaddingOverride = function (params) {\n\tthis.paddingOverride = {\n\t\ttop: params.paddingtop, bottom: params.paddingbottom,\n\t\tright: params.paddingright, left: params.paddingleft\n\t};\n};\n\nRenderer.prototype.setPadding = function (abctune) {\n\t// If the padding is set in the tune, then use that.\n\t// Otherwise, if the padding is set in the override, use that.\n\t// Otherwise, use the defaults (there are a different set of defaults for screen and print.)\n\tfunction setPaddingVariable(self, paddingKey, formattingKey, printDefault, screenDefault) {\n\t\tif (abctune.formatting[formattingKey] !== undefined)\n\t\t\tself.padding[paddingKey] = abctune.formatting[formattingKey];\n\t\telse if (self.paddingOverride[paddingKey] !== undefined)\n\t\t\tself.padding[paddingKey] = self.paddingOverride[paddingKey];\n\t\telse if (self.isPrint)\n\t\t\tself.padding[paddingKey] = printDefault;\n\t\telse\n\t\t\tself.padding[paddingKey] = screenDefault;\n\t}\n\t// 1cm x 0.393701in/cm x 72pt/in x 1.33px/pt = 38px\n\t// 1.8cm x 0.393701in/cm x 72pt/in x 1.33px/pt = 68px\n\tsetPaddingVariable(this, 'top', 'topmargin', 38, 15);\n\tsetPaddingVariable(this, 'bottom', 'botmargin', 38, 15);\n\tsetPaddingVariable(this, 'left', 'leftmargin', 68, 15);\n\tsetPaddingVariable(this, 'right', 'rightmargin', 68, 15);\n};\n\n/**\n * Some of the items on the page are not scaled, so adjust them in the opposite direction of scaling to cancel out the scaling.\n * @param {float} scale\n */\nRenderer.prototype.adjustNonScaledItems = function (scale) {\n\tthis.padding.top /= scale;\n\tthis.padding.bottom /= scale;\n\tthis.padding.left /= scale;\n\tthis.padding.right /= scale;\n\tthis.abctune.formatting.headerfont.size /= scale;\n\tthis.abctune.formatting.footerfont.size /= scale;\n};\n\n/**\n * Set the the values for all the configurable vertical space options.\n */\nRenderer.prototype.initVerticalSpace = function () {\n\t// conversion: 37.7953 = conversion factor for cm to px.\n\t// All of the following values are in px.\n\tthis.spacing = {\n\t\tcomposer: 7.56, // Set the vertical space above the composer.\n\t\tgraceBefore: 8.67, // Define the space before, inside and after the grace notes.\n\t\tgraceInside: 10.67,\n\t\tgraceAfter: 16,\n\t\tinfo: 0, // Set the vertical space above the infoline.\n\t\tlineSkipFactor: 1.1, // Set the factor for spacing between lines of text. (multiply this by the font size)\n\t\tmusic: 7.56, // Set the vertical space above the first staff.\n\t\tparagraphSkipFactor: 0.4, // Set the factor for spacing between text paragraphs. (multiply this by the font size)\n\t\tparts: 11.33, // Set the vertical space above a new part.\n\t\tslurHeight: 1.0, // Set the slur height factor.\n\t\tstaffSeparation: 61.33, // Do not put a staff system closer than from the previous system.\n\t\tstaffTopMargin: 0,\n\t\tstemHeight: 26.67 + 10, // Set the stem height.\n\t\tsubtitle: 3.78, // Set the vertical space above the subtitle.\n\t\tsystemStaffSeparation: 48, // Do not place the staves closer than inside a system. * This values applies to all staves when in the tune header. Otherwise, it applies to the next staff\n\t\ttext: 18.9, // Set the vertical space above the history.\n\t\ttitle: 7.56, // Set the vertical space above the title.\n\t\ttop: 30.24, //Set the vertical space above the tunes and on the top of the continuation pages.\n\t\tvocal: 0, // Set the vertical space above the lyrics under the staves.\n\t\twords: 0 // Set the vertical space above the lyrics at the end of the tune.\n\t};\n\t/*\n\tTODO-PER: Handle the x-coordinate spacing items, too.\nmaxshrink Default: 0.65\nSet how much to compress horizontally when music line breaks\nare automatic.\n must be between 0 (natural spacing)\nand 1 (max shrinking).\n\n// This next value is used to compute the natural spacing of\n// the notes. The base spacing of the crotchet is always\n// 40 pts. When the duration of a note type is twice the\n// duration of an other note type, its spacing is multiplied\n// by this factor.\n// The default value causes the note spacing to be multiplied\n// by 2 when its duration is multiplied by 4, i.e. the\n// space of the semibreve is 80 pts and the space of the\n// semiquaver is 20 pts.\n// Setting this value to 1 sets all note spacing to 40 pts.\nnoteSpacingFactor: 1.414, // Set the note spacing factor to (range 1..2).\n\nscale Default: 0.75 Set the page scale factor. Note that the header and footer are not scaled.\n\nstretchlast Default: 0.8\nStretch the last music line of a tune when it exceeds\nthe fraction of the page width.\n range is 0.0 to 1.0.\n\t */\n};\n\nRenderer.prototype.setVerticalSpace = function (formatting) {\n\t// conversion from pts to px 4/3\n\tif (formatting.staffsep !== undefined)\n\t\tthis.spacing.staffSeparation = formatting.staffsep * 4 / 3;\n\tif (formatting.composerspace !== undefined)\n\t\tthis.spacing.composer = formatting.composerspace * 4 / 3;\n\tif (formatting.partsspace !== undefined)\n\t\tthis.spacing.parts = formatting.partsspace * 4 / 3;\n\tif (formatting.textspace !== undefined)\n\t\tthis.spacing.text = formatting.textspace * 4 / 3;\n\tif (formatting.musicspace !== undefined)\n\t\tthis.spacing.music = formatting.musicspace * 4 / 3;\n\tif (formatting.titlespace !== undefined)\n\t\tthis.spacing.title = formatting.titlespace * 4 / 3;\n\tif (formatting.sysstaffsep !== undefined)\n\t\tthis.spacing.systemStaffSeparation = formatting.sysstaffsep * 4 / 3;\n\tif (formatting.stafftopmargin !== undefined)\n\t\tthis.spacing.staffTopMargin = formatting.stafftopmargin * 4 / 3;\n\tif (formatting.subtitlespace !== undefined)\n\t\tthis.spacing.subtitle = formatting.subtitlespace * 4 / 3;\n\tif (formatting.topspace !== undefined)\n\t\tthis.spacing.top = formatting.topspace * 4 / 3;\n\tif (formatting.vocalspace !== undefined)\n\t\tthis.spacing.vocal = formatting.vocalspace * 4 / 3;\n\tif (formatting.wordsspace !== undefined)\n\t\tthis.spacing.words = formatting.wordsspace * 4 / 3;\n};\n\n\n/**\n * Calculates the y for a given pitch value (relative to the stave the renderer is currently printing)\n * @param {number} ofs pitch value (bottom C on a G clef = 0, D=1, etc.)\n */\nRenderer.prototype.calcY = function (ofs) {\n\treturn this.y - ofs * spacing.STEP;\n};\n\nRenderer.prototype.moveY = function (em, numLines) {\n\tif (numLines === undefined) numLines = 1;\n\tthis.y += em * numLines;\n};\n\nRenderer.prototype.absolutemoveY = function (y) {\n\tthis.y = y;\n};\n\nmodule.exports = Renderer;\n","// abc_voice_element.js: Definition of the VoiceElement class.\n\n/*global module */\n\nvar svgNS = \"http://www.w3.org/2000/svg\";\n\nfunction Svg(wrapper) {\n\tthis.svg = createSvg();\n\tthis.currentGroup = [];\n\twrapper.appendChild(this.svg);\n}\n\nSvg.prototype.clear = function () {\n\tif (this.svg) {\n\t\tvar wrapper = this.svg.parentNode;\n\t\tthis.svg = createSvg();\n\t\tthis.currentGroup = [];\n\t\tif (wrapper) {\n\t\t\t// TODO-PER: If the wrapper is not present, then the underlying div was pulled out from under this instance. It's possible that is still useful (for creating the music off page?)\n\t\t\twrapper.innerHTML = \"\";\n\t\t\twrapper.appendChild(this.svg);\n\t\t}\n\t}\n};\n\nSvg.prototype.setTitle = function (title) {\n\tvar titleEl = document.createElement(\"title\");\n\tvar titleNode = document.createTextNode(title);\n\ttitleEl.appendChild(titleNode);\n\tthis.svg.insertBefore(titleEl, this.svg.firstChild);\n};\n\nSvg.prototype.setResponsiveWidth = function (w, h) {\n\t// this technique is from: http://thenewcode.com/744/Make-SVG-Responsive, thx to https://github.com/iantresman\n\tthis.svg.setAttribute(\"viewBox\", \"0 0 \" + w + \" \" + h);\n\tthis.svg.setAttribute(\"preserveAspectRatio\", \"xMinYMin meet\");\n\tthis.svg.removeAttribute(\"height\");\n\tthis.svg.removeAttribute(\"width\");\n\tthis.svg.style['display'] = \"inline-block\";\n\tthis.svg.style['position'] = \"absolute\";\n\tthis.svg.style['top'] = \"0\";\n\tthis.svg.style['left'] = \"0\";\n\n\tif (this.svg.parentNode) {\n\t\tvar cls = this.svg.parentNode.getAttribute(\"class\");\n\t\tif (!cls)\n\t\t\tthis.svg.parentNode.setAttribute(\"class\", \"abcjs-container\");\n\t\telse if (cls.indexOf(\"abcjs-container\") < 0)\n\t\t\tthis.svg.parentNode.setAttribute(\"class\", cls + \" abcjs-container\");\n\t\tthis.svg.parentNode.style['display'] = \"inline-block\";\n\t\tthis.svg.parentNode.style['position'] = \"relative\";\n\t\tthis.svg.parentNode.style['width'] = \"100%\";\n\t\t// PER: I changed the padding from 100% to this through trial and error.\n\t\t// The example was using a square image, but this music might be either wider or taller.\n\t\tvar padding = h / w * 100;\n\t\tthis.svg.parentNode.style['padding-bottom'] = padding + \"%\";\n\t\tthis.svg.parentNode.style['vertical-align'] = \"middle\";\n\t\tthis.svg.parentNode.style['overflow'] = \"hidden\";\n\t}\n};\n\nSvg.prototype.setSize = function (w, h) {\n\tthis.svg.setAttribute('width', w);\n\tthis.svg.setAttribute('height', h);\n};\n\nSvg.prototype.setAttribute = function (attr, value) {\n\tthis.svg.setAttribute(attr, value);\n};\n\nSvg.prototype.setScale = function (scale) {\n\tif (scale !== 1) {\n\t\tthis.svg.style.transform = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['-ms-transform'] = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['-webkit-transform'] = \"scale(\" + scale + \",\" + scale + \")\";\n\t\tthis.svg.style['transform-origin'] = \"0 0\";\n\t\tthis.svg.style['-ms-transform-origin-x'] = \"0\";\n\t\tthis.svg.style['-ms-transform-origin-y'] = \"0\";\n\t\tthis.svg.style['-webkit-transform-origin-x'] = \"0\";\n\t\tthis.svg.style['-webkit-transform-origin-y'] = \"0\";\n\t} else {\n\t\tthis.svg.style.transform = \"\";\n\t\tthis.svg.style['-ms-transform'] = \"\";\n\t\tthis.svg.style['-webkit-transform'] = \"\";\n\t}\n};\n\nSvg.prototype.insertStyles = function (styles) {\n\tvar el = document.createElementNS(svgNS, \"style\");\n\tel.textContent = styles;\n\tthis.svg.insertBefore(el, this.svg.firstChild); // prepend is not available on older browsers.\n\t//\tthis.svg.prepend(el);\n};\n\nSvg.prototype.setParentStyles = function (attr) {\n\t// This is needed to get the size right when there is scaling involved.\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (this.svg.parentNode)\n\t\t\t\tthis.svg.parentNode.style[key] = attr[key];\n\t\t}\n\t}\n\t// This is the last thing that gets called, so delete the temporary SVG if one was created\n\tif (this.dummySvg) {\n\t\tvar body = document.querySelector('body');\n\t\tbody.removeChild(this.dummySvg);\n\t\tthis.dummySvg = null;\n\t}\n\n};\n\nfunction constructHLine(x1, y1, x2) {\n\tvar len = x2 - x1;\n\treturn \"M \" + x1 + \" \" + y1 +\n\t\t\" l \" + len + ' ' + 0 +\n\t\t\" l \" + 0 + \" \" + 1 + \" \" +\n\t\t\" l \" + (-len) + \" \" + 0 + \" \" + \" z \";\n}\n\nfunction constructVLine(x1, y1, y2) {\n\tvar len = y2 - y1;\n\treturn \"M \" + x1 + \" \" + y1 +\n\t\t\" l \" + 0 + ' ' + len +\n\t\t\" l \" + 1 + \" \" + 0 + \" \" +\n\t\t\" l \" + 0 + \" \" + (-len) + \" \" + \" z \";\n}\n\nSvg.prototype.rect = function (attr) {\n\t// This uses path instead of rect so that it can be hollow and the color changes with \"fill\" instead of \"stroke\".\n\tvar lines = [];\n\tvar x1 = attr.x;\n\tvar y1 = attr.y;\n\tvar x2 = attr.x + attr.width;\n\tvar y2 = attr.y + attr.height;\n\tlines.push(constructHLine(x1, y1, x2));\n\tlines.push(constructHLine(x1, y2, x2));\n\tlines.push(constructVLine(x2, y1, y2));\n\tlines.push(constructVLine(x1, y2, y1));\n\n\treturn this.path({ path: lines.join(\" \"), stroke: \"none\", \"data-name\": attr[\"data-name\"] });\n};\n\nSvg.prototype.dottedLine = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'line');\n\tel.setAttribute(\"x1\", attr.x1);\n\tel.setAttribute(\"x2\", attr.x2);\n\tel.setAttribute(\"y1\", attr.y1);\n\tel.setAttribute(\"y2\", attr.y2);\n\tel.setAttribute(\"stroke\", attr.stroke);\n\tel.setAttribute(\"stroke-dasharray\", \"5,5\");\n\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.rectBeneath = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'rect');\n\tel.setAttribute(\"x\", attr.x);\n\tel.setAttribute(\"width\", attr.width);\n\tel.setAttribute(\"y\", attr.y);\n\tel.setAttribute(\"height\", attr.height);\n\tif (attr.stroke)\n\t\tel.setAttribute(\"stroke\", attr.stroke);\n\tif (attr['stroke-opacity'])\n\t\tel.setAttribute(\"stroke-opacity\", attr['stroke-opacity']);\n\tif (attr.fill)\n\t\tel.setAttribute(\"fill\", attr.fill);\n\tif (attr['fill-opacity'])\n\t\tel.setAttribute(\"fill-opacity\", attr['fill-opacity']);\n\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.text = function (text, attr, target) {\n\tvar el = document.createElementNS(svgNS, 'text');\n\tel.setAttribute(\"stroke\", \"none\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tel.setAttribute(key, attr[key]);\n\t\t}\n\t}\n\tvar lines = (\"\" + text).split(\"\\n\");\n\tfor (var i = 0; i < lines.length; i++) {\n\t\tvar line = document.createElementNS(svgNS, 'tspan');\n\t\tline.setAttribute(\"x\", attr.x ? attr.x : 0);\n\t\tif (i !== 0)\n\t\t\tline.setAttribute(\"dy\", \"1.2em\");\n\t\tif (lines[i].indexOf(\"\\x03\") !== -1) {\n\t\t\tvar parts = lines[i].split('\\x03')\n\t\t\tline.textContent = parts[0];\n\t\t\tif (parts[1]) {\n\t\t\t\tvar ts2 = document.createElementNS(svgNS, 'tspan');\n\t\t\t\tts2.setAttribute(\"dy\", \"-0.3em\");\n\t\t\t\tts2.setAttribute(\"style\", \"font-size:0.7em\");\n\t\t\t\tts2.textContent = parts[1];\n\t\t\t\tline.appendChild(ts2);\n\t\t\t}\n\t\t\tif (parts[2]) {\n\t\t\t\tvar dist = parts[1] ? \"0.4em\" : \"0.1em\";\n\t\t\t\tvar ts3 = document.createElementNS(svgNS, 'tspan');\n\t\t\t\tts3.setAttribute(\"dy\", dist);\n\t\t\t\tts3.setAttribute(\"style\", \"font-size:0.7em\");\n\t\t\t\tts3.textContent = parts[2];\n\t\t\t\tline.appendChild(ts3);\n\t\t\t}\n\t\t} else\n\t\t\tline.textContent = lines[i];\n\t\tel.appendChild(line);\n\t}\n\tif (target)\n\t\ttarget.appendChild(el);\n\telse\n\t\tthis.append(el);\n\treturn el;\n};\n\nSvg.prototype.richTextLine = function (phrases, x, y, klass, anchor, target) {\n\tvar el = document.createElementNS(svgNS, 'text');\n\tel.setAttribute(\"stroke\", \"none\");\n\tel.setAttribute(\"class\", klass);\n\tel.setAttribute(\"x\", x);\n\tel.setAttribute(\"y\", y);\n\tel.setAttribute(\"text-anchor\", anchor);\n\tel.setAttribute(\"dominant-baseline\", \"middle\");\n\n\tfor (var i = 0; i < phrases.length; i++) {\n\t\tvar phrase = phrases[i]\n\t\tvar tspan = document.createElementNS(svgNS, 'tspan');\n\t\tvar attrs = Object.keys(phrase.attrs)\n\t\tfor (var j = 0; j < attrs.length; j++) {\n\t\t\tvar value = phrase.attrs[attrs[j]]\n\t\t\tif (value !== '')\n\t\t\t\ttspan.setAttribute(attrs[j], value)\n\t\t}\n\t\ttspan.textContent = phrase.content;\n\n\t\tel.appendChild(tspan);\n\t}\n\n\tif (target)\n\t\ttarget.appendChild(el);\n\telse\n\t\tthis.append(el);\n\treturn el;\n}\n\nSvg.prototype.guessWidth = function (text, attr) {\n\tvar svg = this.createDummySvg();\n\tvar el = this.text(text, attr, svg);\n\tvar size;\n\ttry {\n\t\tsize = el.getBBox();\n\t\tif (isNaN(size.height) || !size.height) // TODO-PER: I don't think this can happen unless there isn't a browser at all.\n\t\t\tsize = { width: attr['font-size'] / 2, height: attr['font-size'] + 2 }; // Just a wild guess.\n\t\telse\n\t\t\tsize = { width: size.width, height: size.height };\n\t} catch (ex) {\n\t\tsize = { width: attr['font-size'] / 2, height: attr['font-size'] + 2 }; // Just a wild guess.\n\t}\n\tsvg.removeChild(el);\n\treturn size;\n};\n\nSvg.prototype.createDummySvg = function () {\n\tif (!this.dummySvg) {\n\t\tthis.dummySvg = createSvg();\n\t\tvar styles = [\n\t\t\t\"display: block !important;\",\n\t\t\t\"height: 1px;\",\n\t\t\t\"width: 1px;\",\n\t\t\t\"position: absolute;\"\n\t\t];\n\t\tthis.dummySvg.setAttribute('style', styles.join(\"\"));\n\t\tvar body = document.querySelector('body');\n\t\tbody.appendChild(this.dummySvg);\n\t}\n\n\treturn this.dummySvg;\n};\n\nvar sizeCache = {};\n\nSvg.prototype.getTextSize = function (text, attr, el) {\n\tif (typeof text === 'number')\n\t\ttext = '' + text;\n\tif (!text || text.match(/^\\s+$/))\n\t\treturn { width: 0, height: 0 };\n\tvar key;\n\tif (text.length < 20) {\n\t\t// The short text tends to be repetitive and getBBox is really slow, so lets cache.\n\t\tkey = text + JSON.stringify(attr);\n\t\tif (sizeCache[key])\n\t\t\treturn sizeCache[key];\n\t}\n\tvar removeLater = !el;\n\tif (!el)\n\t\tel = this.text(text, attr);\n\tvar size;\n\ttry {\n\t\tsize = el.getBBox();\n\t\tif (isNaN(size.height) || !size.height)\n\t\t\tsize = this.guessWidth(text, attr);\n\t\telse\n\t\t\tsize = { width: size.width, height: size.height };\n\t} catch (ex) {\n\t\tsize = this.guessWidth(text, attr);\n\t}\n\tif (removeLater) {\n\t\tif (this.currentGroup.length > 0)\n\t\t\tthis.currentGroup[0].removeChild(el);\n\t\telse\n\t\t\tthis.svg.removeChild(el);\n\t}\n\tif (key)\n\t\tsizeCache[key] = size;\n\treturn size;\n};\n\nSvg.prototype.openGroup = function (options) {\n\toptions = options ? options : {};\n\tvar el = document.createElementNS(svgNS, \"g\");\n\tif (options.klass)\n\t\tel.setAttribute(\"class\", options.klass);\n\tif (options.fill)\n\t\tel.setAttribute(\"fill\", options.fill);\n\tif (options.stroke)\n\t\tel.setAttribute(\"stroke\", options.stroke);\n\tif (options['data-name'])\n\t\tel.setAttribute(\"data-name\", options['data-name']);\n\n\tif (options.prepend)\n\t\tthis.prepend(el);\n\telse\n\t\tthis.append(el);\n\tthis.currentGroup.unshift(el);\n\treturn el;\n};\n\nSvg.prototype.closeGroup = function () {\n\tvar g = this.currentGroup.shift();\n\tif (g && g.children.length === 0) {\n\t\t// If nothing was added to the group it is because all the elements were invisible. We don't need the group, then.\n\t\tg.parentElement.removeChild(g);\n\t\treturn null;\n\t}\n\treturn g;\n};\n\nSvg.prototype.path = function (attr) {\n\tvar el = document.createElementNS(svgNS, \"path\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (key === 'path')\n\t\t\t\tel.setAttributeNS(null, 'd', attr.path);\n\t\t\telse if (key === 'klass')\n\t\t\t\tel.setAttributeNS(null, \"class\", attr[key]);\n\t\t\telse if (attr[key] !== undefined)\n\t\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n\tthis.append(el);\n\treturn el;\n};\n\nSvg.prototype.pathToBack = function (attr) {\n\tvar el = document.createElementNS(svgNS, \"path\");\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tif (key === 'path')\n\t\t\t\tel.setAttributeNS(null, 'd', attr.path);\n\t\t\telse if (key === 'klass')\n\t\t\t\tel.setAttributeNS(null, \"class\", attr[key]);\n\t\t\telse\n\t\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n\tthis.prepend(el);\n\treturn el;\n};\n\nSvg.prototype.lineToBack = function (attr) {\n\tvar el = document.createElementNS(svgNS, 'line');\n\tvar keys = Object.keys(attr)\n\tfor (var i = 0; i < keys.length; i++)\n\t\tel.setAttribute(keys[i], attr[keys[i]]);\n\tthis.prepend(el);\n\treturn el;\n};\n\n\nSvg.prototype.append = function (el) {\n\tif (this.currentGroup.length > 0)\n\t\tthis.currentGroup[0].appendChild(el);\n\telse\n\t\tthis.svg.appendChild(el);\n};\n\nSvg.prototype.prepend = function (el) {\n\t// The entire group is prepended, so don't prepend the individual elements.\n\tif (this.currentGroup.length > 0)\n\t\tthis.currentGroup[0].appendChild(el);\n\telse\n\t\tthis.svg.insertBefore(el, this.svg.firstChild);\n};\n\nSvg.prototype.setAttributeOnElement = function (el, attr) {\n\tfor (var key in attr) {\n\t\tif (attr.hasOwnProperty(key)) {\n\t\t\tel.setAttributeNS(null, key, attr[key]);\n\t\t}\n\t}\n};\n\nSvg.prototype.moveElementToChild = function (parent, child) {\n\tparent.appendChild(child);\n};\n\nfunction createSvg() {\n\tvar svg = document.createElementNS(svgNS, \"svg\");\n\tsvg.setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:xlink\", \"http://www.w3.org/1999/xlink\");\n\tsvg.setAttribute('role', 'img'); // for accessibility\n\tsvg.setAttribute('fill', 'currentColor'); // for automatically picking up dark mode and high contrast\n\tsvg.setAttribute('stroke', 'currentColor'); // for automatically picking up dark mode and high contrast\n\treturn svg;\n}\n\n\nmodule.exports = Svg;\n","var version = '6.4.3';\n\nmodule.exports = version;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./index.js\");\n",""],"names":["version","require","animation","tuneBook","sequence","strTranspose","abcjs","signature","Object","keys","forEach","key","renderAbc","tuneMetrics","TimingCallbacks","glyphs","setGlyph","setSymbol","CreateSynth","instrumentIndexToName","pitchToNoteName","SynthSequence","CreateSynthControl","registerAudioContext","activeAudioContext","supportsAudio","playEvent","SynthController","getMidiFile","midiRenderer","synth","module","exports","timer","cursor","startAnimation","paper","tune","options","stop","undefined","showCursor","querySelector","document","createElement","className","style","position","appendChild","hideMeasures","elements","i","length","element","classList","contains","display","lastMeasure","disappearMeasuresAfter","selector","querySelectorAll","disappearMeasuresBefore","measureCallback","hideCurrentMeasure","hideFinishedMeasures","getLineAndMeasure","line","measureNumber","setCursor","range","measureStart","left","top","width","height","qpm","bpm","eventCallback","start","pauseAnimation","pause","stopAnimation","target","params","self","parseInt","tempo","metaText","getBpm","extraMeasuresAtBeginning","beatCallback","lineEndCallback","lineEndAnticipation","beatSubdivisions","joggerTimer","replaceTarget","newTarget","noteTimings","setTiming","lineEndTimings","getLineEndTimings","startTime","currentBeat","currentEvent","currentLine","currentTime","isPaused","isRunning","pausedPercent","justUnpaused","newSeekPercent","lastTimestamp","millisecondsPerBeat","lastMoment","milliseconds","totalBeats","Math","round","doTiming","timestamp","type","thisStartTime","leftEvent","endTimings","requestAnimationFrame","ret","doBeatCallback","ret2","promise","shouldStop","then","Promise","resolve","result","next","endMs","ev","max","debugInfo","offMs","gapMs","gapPx","endX","offPx","JOGGING_INTERVAL","animationJogger","performance","now","setTimeout","offsetPercent","units","setProgress","reset","reportNext","clearTimeout","currentMillisecond","percent","oldEvent","oldBeat","floor","timings","anticipation","callbackTimes","lastTop","timing","push","bottom","Parse","bookParser","tablatures","tunebook","numberOfTunes","abc","tunes","split","num","TuneBook","book","parsed","header","prototype","getTuneById","id","getTuneByTitle","title","parseOnly","numTunes","output","callback","renderEngine","isArray","testObject","propertyIsEnumerable","_typeof","currentTune","startingTune","abcParser","div","getElementById","parse","startPos","getTune","tablature","preparePlugins","warnings","getWarnings","override","innerHTML","flattenTune","tuneObj","staves","j","lines","staff","k","voices","concat","measuresParser","lastChord","measureStartChord","fragStart","hasNotes","voice","elem","startChar","chord","el_type","frag","substring","endChar","measure","name","startEnding","endEnding","extractMeasures","arr","arr2","measures","hasPickup","getPickupLength","kk","kkk","Tune","EngraverController","wrap","resizeDivs","resizeOuter","window","innerWidth","hasOwnProperty","outer","ofs","offsetLeft","addEventListener","e","renderOne","tuneNumber","lineOffset","viewportHorizontal","scrollHorizontal","overflowX","overflowY","overflow","children","viewportVertical","engraver_controller","engraveABC","engraver","parent","parentNode","parserParams","engraverParams","renderParams","warnings_id","warning_id","highlight","clickListener","abcString","removeDiv","setAttribute","body","staffwidth","doLineWrapping","afterParsing","removeChild","widths","getMeasureWidths","calcLineWraps","reParse","revisedParams","explanation","sections","_require","relativeMajor","key1sharp","acc","note","key2sharp","key3sharp","key4sharp","key5sharp","key6sharp","key7sharp","key1flat","key2flat","key3flat","key4flat","key5flat","key6flat","key7flat","keyAccidentals","newKey","JSON","stringify","modes","stepsFromC","keyReverse","createKeyReverse","allKeys","keyObj","toLowerCase","mode","match","maj","relativeMode","majorKey","group","regMode","thisMode","ind","indexOf","transposeKey","steps","fromC","parseCommon","spacing","flatten","delineTune","media","metaTextInfo","formatting","staffNum","voiceNum","lineNum","runningFonts","visualTranspose","copy","dest","src","prop","attrs","copyTopInfo","copyBottomInfo","getBeatLength","meter","getMeterFraction","multiplier","den","computePickupLength","barLength","pickupLength","v","tripletMultiplier","el","isSpacer","rest","startTriplet","duration","endTriplet","getBarLength","getTotalTime","totalTime","getTotalBeats","millisecondsPerMeasure","bpmOverride","beatsPerMeasure","getBeatsPerMeasure","minutesPerMeasure","beatLen","barLen","getMeter","value","getKeySignature","getElementFromChar","char","ii","addVerticalInfo","timingEvents","lastBarTop","lastBarBottom","lastEventTop","lastEventBottom","nextTop","nextBottom","makeSortedArray","hash","sort","a","b","diff","addElementToEvents","eventHash","voiceTimeMilliseconds","timeDivider","isTiedState","nextIsBar","hint","realDuration","durationClass","abcelem","es","elemset","isTiedToNext","startTie","startCharArray","endCharArray","x","w","midiPitches","cloneArray","midiGraceNotePitches","min","makeVoicesArray","voicesArr","tempos","staffgroups","staffs","firstStaff","middleC","absoluteY","STEP","lastStaff","isTabStaff","noteFound","tempoLocations","setupEvents","startingDelay","startingBpm","warp","time","maxVoiceTimeMilliseconds","voiceTime","startingRepeatElem","endingRepeatElem","tempoDone","thisMeasure","lastHash","barType","endRepeat","startRepeat","lastVoiceTimeMilliseconds","el2","element2","addEndPoints","addUsefulCallbackInfo","skipTies","index","staffGroup","lastEl","beatLength","statedBeatLength","measuresOfDelay","console","log","naturalBpm","beatsPerSecond","measureLength","setUpAudio","seq","percmap","midi","deline","findSelectableElement","selectables","getSelectableArray","inputLines","lineBreaks","outputLines","inMusicLine","currentMeter","currentKey","currentClef","currentVocalFont","currentGChordFont","currentTripletFont","currentAnnotationFont","inputLine","vskip","outputLine","s","inputStaff","outputStaff","objEqual","addMeterToVoices","addKeyToVoices","abbrevTitle","clef","addClefToVoices","vocalfont","addFontToVoices","gchordfont","tripletfont","annotationfont","outputVoice","inputVoice","cloneLine","replacer","unshift","font","input","inputValue","outputValue","keys2","CustomEvent","event","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","Event","EditArea","textareaid","textarea","initialText","isDragging","addSelectionListener","listener","onmousemove","fireSelectionChanged","addChangeListener","changelistener","onkeyup","fireChanged","onmousedown","onmouseup","onchange","getSelection","selectionStart","end","selectionEnd","setSelection","setSelectionRange","createTextRange","collapse","moveEnd","moveStart","select","focus","getString","setString","str","getElem","gatherAbcParams","abcjsParams","midi_options","parser_options","render_options","Editor","editarea","indicate_changed","canvas_id","paper_id","insertBefore","selectionChangeCallback","clientClickListener","bind","cursorControl","generate_midi","generateDownload","midi_download_id","downloadMidi","generateInline","midi_id","inlineMidi","warningsdiv","generate_warnings","onchangeCallback","currentAbc","bReentry","parseABC","modelChanged","addClassName","hasClassName","elementClassName","RegExp","test","removeClassName","strip","replace","setReadOnly","readOnly","readonlyClass","removeAttribute","redrawMidi","midiPause","downloadMidiEl","inlineMidiEl","engravingEl","dispatchEvent","userAction","synthControl","load","setTune","timerId","disable","error","message","join","updateSelection","paramChanged","synthParamChanged","t","selection","rangeHighlight","setDirtyStyle","isDirty","bIsPaused","wasDirty","setNotDirty","classes","analysis","drag","mouseEvent","shouldPause","visualObj","pauseMidi","rendererFactory","create","baseDuration","abcTune","commands","msPerMeasure","setGlobalInfo","tracks","startTrack","notePlacement","cmd","setText","text","pan","instrument","setChannel","setInstrument","channel","gapLengthInBeats","gap","pitch","volume","cents","addNotes","endTrack","getData","times","h","parseFloat","lastTime","events","distance","addRest","startNote","endNote","source","destination","assign","cloneHashOfHash","property","cloneHashOfArrayOfHash","startsWith","pattern","endsWith","d","lastIndexOf","last","parseDirective","ParseHeader","ParseMusic","Tokenizer","TuneBuilder","tuneBuilder","tokenizer","wordsContinuation","symbolContinuation","addPositioning","positioning","addFont","fonts","multilineVars","iChar","accidentals","root","origMeter","hasMainTitle","default_length","verticalPos","octave","next_note_duration","start_new_line","is_in_header","partForNextLine","tempoForNextLine","havent_set_length","macros","currBarNumber","barCounter","ignoredDecorations","score_is_present","inEnding","inTie","inTieChord","vocalPosition","dynamicPosition","chordPosition","ornamentPosition","volumePosition","openSlurs","freegchord","endingHoldOver","differentFont","defaultFonts","decoration","face","size","weight","addFormattingOptions","elType","measurefont","repeatfont","duplicateStartEndingHoldOvers","restoreStartEndingHoldOvers","addWarning","addWarningObject","warningObject","warningObjects","encode","warn","col_num","bad_char","clean_line","lineIndex","column","music","getWarningObjects","addWords","words","word_list","last_divider","addWord","word","syllable","translateString","divider","escNext","skip","to","inSlur","pitches","shift","lyric","addSymbols","parseLine","err","addDirective","getCurrentVoice","lineContinuation","parseMusic","parseHeader","regular","newline","startNewLine","symbols","appendLastMeasure","nextVoice","addHintMeasure","nextStaff","stave","nextStave","addHintMeasures","nextLine","strTune","switches","i2","substr","all","backslash","comment","padding","Array","pop","print","globalTranspose","setVisualTranspose","format","globalFormatting","header_only","stop_on_warning","wasInHeader","setRunningFont","cleanUp","barsperstaff","staffnonote","ph","pl","papersize","landscape","pagewidth","pageheight","hint_measures","wrapLines","barNumbers","directives","initialWhiteSpace","tuneStrings","pos","dir","arrDir","pure","initialize","tokenizer_","warn_","multilineVars_","tune_","tuneBuilder_","initializeFonts","historyfont","infofont","partsfont","textfont","wordsfont","composerfont","subtitlefont","tempofont","titlefont","footerfont","headerfont","voicefont","tablabelfont","tabnumberfont","tabgracefont","fontTypeCanHaveBox","fontTranslation","fontFace","getFontParameter","tokens","currentSetting","processNumberOnly","token","box","state","hyphenLast","currToken","psFont","getChangingFont","getGlobalFont","setScale","scratch","tok","isNaN","scale","drumNames","interpretPercMap","restOfString","sound","noteHead","getRequiredMeasurement","points","getMeasurement","used","oneParameterMeasurement","addMultilineVar","intt","addMultilineVarBool","addMultilineVarOneParamChoice","choices","choice","found","midiCmdParam0","midiCmdParam1String","midiCmdParam1Integer","midiCmdParam1Integer1OptionalInteger","midiCmdParam2Integer","midiCmdParam4Integer","midiCmdParam5Integer","midiCmdParam1String1Integer","midiCmdParamFraction","midiCmdParam1StringVariableIntegers","midiCmdParam1Integer1OptionalString","parseMidiCommand","midi_cmd","midi_params","drummap","p","hasBeginMusic","appendElement","parseFontChangeLine","textstr","textParts","setfont","textarr","whichFont","positionChoices","tokenize","stripComment","bagpipes","flatbeams","jazzchords","accentAbove","germanAlphabet","graceSlurs","lt","parseStretchLast","lineThickness","sl","stretchlast","titlecaps","titleleft","measurebox","voiceScale","currentVoice","floatt","changeVoiceScale","voiceColor","color","changeVoiceColor","addSpacing","addSeparator","spaceAbove","spaceBelow","lenLine","partsBox","setBarNumberImmediate","textBlock","addText","continueall","centerstr","addCentered","sfTokens","sfNum","addVoice","newStaff","bracket","brace","continueBar","numVoices","connectBarLines","openParen","openBracket","openBrace","justOpenParen","justOpenBracket","justOpenBrace","lastVoice","addContinueBar","ty","vc","continueId","pgNum","getInt","addNewPage","digits","subCmd","addMetaText","footerStr","getMeat","footerArr","footer","center","right","addMetaTextObj","formatHash","fontboxpadding","stafftopmargin","parseKeyVoice","setTitle","origSize","addSubtitle","setMeter","parseNum","parseFraction","totalLength","mv","calcTempo","relTempo","dur","resolveTempo","addUserDefinition","equals","before","after","legalChars","setDefaultLength","len","len_arr","n","tempoString","larghissimo","adagissimo","sostenuto","grave","largo","lento","larghetto","adagio","adagietto","andante","andantino","moderato","allegretto","allegro","animato","agitato","veloce","vivace","vivacissimo","allegrissimo","presto","prestissimo","setTempo","delaySet","preString","suppressBpm","postString","printTempo","suppress","msg","letter_to_inline_header","startLine","needsNewLine","ws","eatWhiteSpace","appendStartingElement","parseKey","foundClef","foundKey","fixKey","part","parseVoice","letter_to_body_header","metaTextHeaders","A","B","C","D","F","G","I","N","O","R","S","W","Z","field","restOfLine","addMetaTextArray","peekLine","toUpperCase","theReverser","transpose","standardKey","keyName","localTranspose","keySignature","clefLines","mid","calcMiddle","oct","fixClef","clefPos","deepCopyKey","E","c","f","g","addPosToKey","impliedNaturals","fixedKey","parseMiddle","normalizeAccidentals","accs","isInline","retPitch","getKeyPitch","retAcc","getSharpFlat","retMode","getMode","oldKey","keyCompensate","savedOrigKey","globalTransposeOrigKeySig","getKeyAccidentals2","explicitAccidentals","splice","getPitchFromTokens","stafflines","staffscale","setCurrentVoice","getToken","isNew","staffInfo","startStaff","addNextTokenToStaffInfo","attr","getVoiceToken","addNextTokenToVoiceInfo","getNextToken","addNextNoteTokenToVoiceInfo","noteToTransposition","oct2","stem","suppressChords","cue","vi","spacing_below_offset","subname","legalAccents","volumeDecorations","dynamicDecorations","accentPseudonyms","accentDynamicPseudonyms","nonDecorations","durations","rests","accMap","tripletQ","MusicParser","_tokenizer","_warn","_multilineVars","_tune","_tuneBuilder","_header","isInTie","overlayLevel","voiceIndex","startOfLine","isWhiteSpace","delayStartNewLine","tripletNotesLeft","retHeader","startI","retInlineHeader","letter_to_spacer","letter_to_chord","chordName","addedChord","ci","rel_position","skipWhiteSpace","force_end_beam_last","letter_to_accent","beambr","letter_to_grace","gracenotes","letter_to_bar","measureNotEmpty","bar","barFirstEndingNum","isFirstVoice","barNumber","letter_to_overlay","letter_to_open_slurs_and_triplets","consumed","startSlur","dottedSlur","triplet","tripletR","num_notes","chordStartChar","chordDuration","rememberEndBeam","done","accent","chordNote","getCoreNote","end_beam","endTie","setIsInTie","postChordDone","addEndBeam","endSlur","br2","getBrokenRhythm","fraction","getFraction","ch","core","accidental","midipitch","graceNotes","durationOfMeasure","succeeded","getBrackettedSubstring","getFloat","y","gra","acciaccatura","endBeam","macro","includes","findIndex","curr_pos","getBarLine","orig_bar_len","ending","retRep","getTokenOf","scoreTranspose","targetKey","st","currentVoiceName","canHaveBrokenRhythm","isComplete","dottedTie","durationSetByPreviousNote","grace_notes","getNumber","addTieToLastNote","X","z","dblflat","flat","natural","sharp","dblsharp","quarterflat","quartersharp","finished","skipAlpha","firstThree","getClef","bExplicitOnly","strOrig","needsClef","strClef","isMatch","explicit","colons","getKeyAccidental","accTranslation","isLetter","isNumber","alphaUntilWhiteSpace","int2","float2","close","charMap","charMap1","charMap2","out","iSave","getTitleNumber","regex","exec","foundNumber","thePatterns","thisPattern","theTitleNumber","trim","substInChord","maxErrorChars","_matchChar","matchChar","esc","allNotes","transposeChordName","keyIndex","newKeyMinor","localTransposeVerticalMovement","localTransposePreferFlats","baseKey","thisKeyIndex","recognized","newKeyName","transposedKey","newKeySig","charCodeAt","ceil","pitchToLetter","accidentalChange","origPitch","newPitch","origKeySig","origPitchLetter","origAccidental","currentAccidental","delta","newPitchLetter","newAccidental","calcAccidental","accidentals2","accidentals3","actual","pitchIndex","noteName","allPitches","sharpChords","flatChords","sharpChordsFree","flatChordsFree","preferFlats","freeGCchord","extra1","bass","extra2","voiceDefs","currSlur","closeLine","simplifyMetaText","anyDeleted","hasAny","containsNotes","filter","wrapMusicLines","keepThis","containsNotesStrict","fixTitles","workingClef","resolveOverlays","cleanUpSlursInLine","getNextMusicLine","potentialStartBeam","potentialEndBeam","vskipPending","getLastNote","hashParams","getDuration","endBeamLast","endBeamHere","pushNote","hashParams2","info","pushLine","subtitle","newpage","lineLength","separator","createLine","createStaff","createVoice","lastElement","isFirstLine","currLine","currStaff","isArrayOfStrings","notes","history","madeChanges","durationsPerLines","overlayVoice","hasOverlay","snip","durationThisBar","inOverlay","overlayDuration","snipStart","ov","direction","indexOfLastBar","findLastBar","firstMusicLine","hasATitle","addEndSlur","obj","chordPos","offNum","slurNum","addStartSlur","usedNums","nextNum","label","gg","ggg","permanentItems","barNumThisLine","cp","ss","vv","startElement","section","slice","startBeam","hp","mid2","setLineFont","isDifferent","thisStaff","head","linesBreakElements","findLineBreaks","addLineBreaks","lastKeySig","lastStem","currentBarNumber","action","ogLine","currVoice","lineBreakArray","lineBreakIndexes","lbai","lineCounter","lineStart","lbi","freeFormLineBreaks","lineBreakPoint","totals","totalThisLine","attemptedWidth","oldDistance","newDistance","clone","newArr","oneTry","measureWidths","idealWidths","accumulator","lineAccumulator","lineWidths","lastVariance","highestVariance","startIndex","otherTries","measureWidth","thisVariance","abs","varianceIsClose","newWidths","newBreaks","optimizeLineWidths","numLines","total","idealWidth","otherTry","variances","aveVariance","lineWidth","attempts","smallest","smallestIndex","failed","variance","fixedMeasureLineBreaks","preferredMeasuresPerLine","thisWidth","getRevisedTuneParams","staffWidth","minSpacing","minSpacingLimit","maxSpacing","lastLineLimit","accumulatedLineBreaks","explanations","usableWidth","minLineSize","allowableVariance","minWidth","ff","reason","changes","transposeOneTune","changeAllKeySigs","transposeVoices","count","segment","destinationKey","transposeVoice","createKeyAccidentals","setLetterDistance","keyRoot","letterDistance","letters","measureAccidentals","transposedMeasureAccidentals","prefersFlats","newChord","replaceChord","parseNote","transposePitch","upper","replaceNote","grace","newGrace","replaceGrace","octaves","major","newMajor","newMode","origDistFromC","newDistFromC","adj","keyAcc","newNote","courtesy","regPitch","regNote","regOptionalNote","regSpace","reg","currentAcc","calcAdjustment","noteLen","trailingLen","leadingLen","regPreBracket","regOpenBracket","regCloseBracket","endLen","regOpenBrace","regCloseBrace","regPreBrace","regPreNote","thisAccidental","keyAccidental","measureAccidental","ChordTrack","pitchesToPerc","barAccidentals","startingTempo","startingMeter","tempoChangeFactor","currentInstrument","currentTrack","lastNoteDurationPosition","currentTrackName","lastEventTime","chordTrack","drumInstrument","lastBarTime","doBeatAccents","stressBeat1","stressBeatDown","stressBeatUp","beatFraction","nextVolume","nextVolumeDelta","slurCount","drumTrack","drumTrackFinished","drumDefinition","drumBars","normalBreakBetweenNotes","slurredBreakBetweenNotes","staccatoBreakBetweenNotes","percmap_","midiOptions","bassprog","bassvol","chordprog","chordvol","gchord","chordsOff","preProcess","setTranspose","setLastBarTime","voiceOff","voicesOff","trackName","writeNote","setKeySignature","getBeatFraction","alignDrumToMeter","setTempoChangeFactor","barEnd","writeDrum","setRhythmHead","timeToRealTime","program","normalizeDrumDefinition","gChordOn","beats","paramChange","finish","detuneOctave","findOctaves","addTrack","totalDuration","durationRounded","ties","timeCounter","tempoMultiplier","thisDuration","tie","item","calcBeat","currTime","distanceFromStart","processVolume","beat","barBeat","findNoteModifications","velocity","thisBreakBetweenNotes","noteModification","doModifiedNotes","noteTime","numNotes","pp","runningDuration","shortestNote","processChord","graces","processGraceNotes","writeGraceNotes","rt","ms","currentTrackMilliseconds","currentTrackWholeNotes","ePitches","actualPitch","adjustPitch","adjustForMicroTone","endType","realDur","getRealDuration","extractOctave","extractNote","lowercase","companionDuration","graceDuration","midiGrace","gp","durationInMeasures","quarterToneFactor","description","on","totalPlay","bars","playCount","measuresPerBeat","factor","measureLen","detuneCents","track","topEvent","topNote","centsToFactor","setAttributes","elm","Midi","trackstrings","trackcount","noteOnAndChannel","noteOffAndChannel","toHex","divisions","timeSignature","encodeString","noteWarped","trackInstrument","silencelength","tracklength","number","ccPrefix","toString","HALF_STEP","loudness","toDurationHex","bend","to7BitHex","embed","noplayer","data","link","href","firstChild","controller","autoplay","loop","enablejavascript","cmdType","nameArray","hex","sharpCount","flatCount","sig","dens","clocks","encodeHex","lower","higher","res","bits","PERCUSSION_PROGRAM","abctune","midiTranspose","channelExplicitlySet","drumPattern","drum","drumIntro","drumOn","drumOffAfterIntro","drumOff","rhythmHeadThisBar","crescendoSize","startingMidi","globals","drumbars","drumon","nobeataccents","interpretTempo","defaultQpm","startVoice","inCrescendo","inDiminuendo","durationCounter","tempoChanges","currentVolume","startRepeatPlaceholder","skipEndingPlaceholder","startingDrumSet","setDynamics","volumes","dynamicType","voiceNumber","numNotesToDecoration","endDec","endingVolume","n2","endDec2","voiceName","getTrackTitle","cl","addKey","addMeter","intro","drumoff","noteEventsInBar","tripletDurationTotal","tripletDurationCount","noteElem","durationTotal","chordVoiceOffThisBar","interpretMeter","drumChange","addIfDifferent","tacet","param","octaveShift","insertTempoChanges","pickups","insertPoint","counter","changePositions","lastTempo","noChordVoice","removeNaturals","newMeter","abcjsAudioContext","pow","chordTrackFinished","chordChannel","currentChords","chordLastBar","gChordTacet","hasRhythmHead","bassInstrument","chordInstrument","bassOctaveShift","chordOctaveShift","boomVolume","chickVolume","overridePattern","parseGChord","isRhythmHead","chick","note2","resolveChords","chordTrackEmpty","findChord","breakSynonyms","interpretChord","basses","chordTranspose","unshiftedBass","bass2","chordNotes","remaining","fifth","explicitBass","bassAcc","bassShift","boom","boom2","modifier","intervals","chordIntervals","M","m","noteLength","isEmpty","endTime","thisMeasureLength","portionOfAMeasure","currentChordsExpanded","expandCurrentChords","rhythmPatterns","beatsPresent","firstBoom","minLength","isBoom","newBass","resolvePitch","oo","currentChord","numChordNotes","num8thNotes","chords","current","createNoteMap","map","nextNote","inst","loopImage","playImage","pauseImage","loadingImage","resetImage","Error","HTMLElement","ac","buildDom","attachListeners","isDisabled","add","remove","setWarp","resetAll","pushedButtons","button","pushPlay","startButton","pushLoop","loopButton","progressBackground","progressThumb","clientWidth","clock","totalSeconds","minutes","seconds","secondsFormatted","afterResume","isResumed","hasLoop","loopHandler","hasRestart","restartHandler","hasPlay","playHandler","playPromiseHandler","hasProgress","progressHandler","hasWarp","warpHandler","hasClock","html","repeatTitle","repeatAria","restartTitle","restartAria","playTitle","playAria","randomTitle","randomAria","warpTitle","warpAria","acResumerMiddleWare","playBtn","isPromise","needsInit","status","resume","response","doNext","getNote","downloadBuffer","placeNote","soundsCache","notSupportedMessage","originalSoundFontUrl","defaultSoundFontUrl","alternateSoundFontUrl","audioBufferPossible","directSource","startTimeSec","pausedTimeSec","audioBuffers","init","audioContext","debugCallback","_deviceCapable","reject","soundFontUrl","soundFontVolumeMultiplier","programOffsets","fadeLength","NaN","noteEnd","meterSize","flattened","sequenceCallback","callbackContext","onEnded","meterFraction","cached","errorNotes","pitchNumber","label2","batches","CHUNK","results","loaded","_loadBatch","batch","delay","promises","pending","oneResponse","which","newBatch","list","prime","fadeTimeSec","totalSamples","sampleRate","noteMapTracks","swing","addSwing","panDistances","setPan","uniqueSounds","noteMap","trackNumber","panDistance","allPromises","audioBuffer","createBuffer","key2","parts","resolveData","me","suspend","numTracks","panParam","panNumber","even","currLow","currHigh","resumePosition","_kickOffSound","seek","offset","elapsed","download","getAudioBuffer","getIsRunning","trackNum","createBufferSource","buffer","connect","onended","volumeIncrease","halfbeatLength","swingDuration","oldEventStart","URL","createObjectURL","bufferToWave","numOfChan","numberOfChannels","ArrayBuffer","view","DataView","channels","sample","setUint32","setUint16","getChannelData","setInt16","Blob","midiCreate","midiOutputType","decoded","Uint8Array","generateMidiDownloadLink","isFunction","functionToCheck","getType","call","midiParams","divClasses","downloadClass","preTextDownload","downloadLabel","filename","fileName","postTextDownload","svg","url","instrumentCache","xhr","XMLHttpRequest","noteUrl","open","responseType","onload","noteDecoded","maybePromise","decodeAudioData","onerror","send","notesInOrder","noteToMidi","midiToNote","pitchMap","f0","n0","s0","x0","f1","n1","s1","x1","f2","s2","x2","f3","n3","s3","x3","f4","n4","s4","x4","f5","n5","s5","x5","f6","n6","s6","x6","f7","n7","s7","x7","f8","n8","s8","x8","f9","n9","s9","x9","f10","n10","s10","x10","f11","n11","s11","x11","f12","n12","s12","x12","f13","n13","s13","x13","f14","n14","s14","x14","f15","n15","s15","x15","f16","n16","s16","x16","pitchObj","outputAudioBuffer","startArray","volumeMultiplier","ofsMs","noteEndSec","OfflineAC","OfflineAudioContext","webkitOfflineAudioContext","offlineCtx","noteBufferPromise","gainNode","createGain","createStereoPanner","panNode","setValueAtTime","gain","linearRampToValueAtTime","playbackRate","noteOff","fnResolve","oncomplete","renderedBuffer","copyToChannel","startRendering","toBuffer","fromBuffer","fromData","toData","midiGracePitches","appendNote","doPlay","AudioContext","webkitAudioContext","navigator","mozAudioContext","msAudioContext","aac","midiBuffer","currentTempo","control","isLooping","isStarted","isLoaded","isLoading","visualOptions","displayPlay","displayProgress","displayLoop","toggleLoop","displayRestart","restart","play","randomAccess","displayWarp","onWarp","audioParams","go","loadingResponse","subdivisions","onReady","notesStatus","destroy","runWhenReady","_play","sleep","fn","arg1","onStart","_randomAccess","background","getBoundingClientRect","offsetWidth","newWarp","wasPlaying","startPercent","onFinished","beatNumber","onBeat","onEvent","lineEvent","onLineEnd","getUrl","click","revokeObjectURL","starts","instrumentNumber","TabString","pluginTab","defaultTuning","isTabBig","tabSymbolOffset","abcTablatures","inited","plugins","register","plugin","setError","warning","returned","nbPlugins","tabs","args","tabName","abcSrc","pluginInstance","classz","instance","tabType","layoutTablatures","renderer","staffLineCount","nTabs","firstStaffOnly","curStaff","maxStaves","jj","tabPlugin","render","TabNote","tabNotes","buildCapo","capoTuning","tuning","capo","iii","curNote","jjj","emit","buildPatterns","strings","highestNote","stringNotes","buildSecond","first","sameString","jjjj","curPos","nextPos","noteToNumber","secondPos","handleChordNotes","retNotes","iiii","clefTranspose","checkKeyAccidentals","toNumber","stringNumber","secondPosition","firstSize","emitNoAccidentals","isFlat","noteEquiv","getAccidentalEquiv","isAltered","isDouble","isSharp","stringPitches","pitchAltered","quarter","StringPatterns","stringToPitch","startingPitch","linePitch","invalidNumber","notesToNumber","retGraces","replaceAll","tabInfos","tunePos","inError","StringTablature","lineSpace","verticalSize","pitch2","bypass","isPercussion","setRelative","child","relative","hasComma","hasQuote","isKeySharp","isKeyFlat","isLower","isQuoted","cloneNote","newTabNote","sameNoteAs","isLowerThan","curAccidentals","cloned","prevNote","fromNote","toNote","fromN","toN","from","tn","buildReturned","toIndex","tabRenderer","Plugin","tabSettings","nbLines","hideTabSymbol","semantics","staffIndex","AbcStringTab","AbsoluteElement","RelativeElement","isObject","constructor","cloneObject","cloneAbsolute","absSrc","cloneAbsoluteAndRelatives","buildTabAbsolute","absX","relX","tabIcon","tabYPos","icon","Ypos","tabAbsolute","tabRelative","lyricsDim","extra","TabAbsoluteElements","getInitialStaffSize","tabNameInfos","buildRelativeTabNote","def","isGrace","strNote","opt","tabNoteRelative","getXGrace","graceInRest","absElem","convertToNumber","tabPos","posNote","buildGraceRelativesForRest","absChild","tabVoice","mm","defGrace","graceX","curGrace","tabGraceRelative","build","staffAbsolute","keySig","tabVoiceIndex","staffSize","defNote","isClef","lastBar","bn","abselem","restGraces","heads","lyricDim","ll","dx","VoiceElement","initSpecialY","tempoHeightAbove","partHeightAbove","volumeHeightAbove","dynamicHeightAbove","endingHeightAbove","chordHeightAbove","lyricHeightAbove","lyricHeightBelow","chordHeightBelow","volumeHeightBelow","dynamicHeightBelow","getLyricHeight","maxLyricHeight","curAbs","specialY","buildTabName","stringSemantics","textSize","getTextSize","doDraw","calc","islastTabInStaff","getStaffNumbers","nbStaffs","getParentStaffIndex","linkStaffAndTabs","parentIndex","hasStaff","hasTab","isMultiVoiceSingleStaff","getNextTabPos","tabIndex","handledVoices","inProgress","nbVoices","getLastStaff","lastTab","checkVoiceKeySig","curVoice","elem0","absolutes","tabStaff","tabSize","firstVoice","lyricsHeight","padd","prevIndex","previousStaff","tabTop","staffGroupInfos","dy","nextTabPos","parentStaff","duplicate","nameHeight","BeamElem","BraceElem","createClef","createKeySignature","createNoteHead","createTimeSignature","Decoration","EndingElem","StaffGroupElement","TempoElement","TieElem","TripletElem","addChord","chartable","rhythm","nostem","harmonic","triangle","uflags","dflags","AbstractEngraver","isBagpipes","flatBeams","initialClef","slurs","slursbyvoice","tiesbyvoice","endingsbyvoice","scaleByVoice","colorByVoice","tripletmultiplier","abcline","accidentalSlot","accidentalshiftx","dotshiftx","hasVocals","minY","partstartelem","startlimitelem","stemdir","setStemHeight","heightInPixels","stemHeight","getCurrentVoiceId","pushCrossLineElems","popCrossLineElems","containsLyrics","createABCLine","l","staffgroup","tempoSet","restoreState","createABCStaff","abcstaff","updateFonts","barfrom","barto","headerPosition","baselineToCenter","addMeasureNumber","addChild","ts","staffLines","isSingleLineStaff","createABCVoice","setStaffLimits","setBottomStaff","continuing","getBeamGroup","addOther","voicetotal","voicenumber","slur","force","stemDir","dotted","setHint","setAveragePitch","minpitch","isFirstStaff","abselems","createABCElement","tempoElement","addFixedX","saveState","tiesSave","slursSave","slursbyvoiceSave","tiesbyvoiceSave","createBeam","createNote","isClosed","createBarLine","invisible","absKey","dim","abselem3","abselem2","addFixed","sortPitch","sum","averagepitch","maxpitch","elems","abselemset","beamelem","runningDirection","setStemDirection","tempStemDir","stemsUp","calcDir","addBeam","sorted","tmp","ledgerLines","minPitch","maxPitch","isRest","symbolWidth","additionalLedgers","addGraceNotes","notehead","roomtaken","gracescale","graceScaleStem","gracebeam","flag","mainNote","graceoffsets","gracepitch","headx","extrax","highestVert","addSlursAndTies","addExtra","dAcciaccatura","addRight","scalex","scaley","pseudoabselem","p1","p2","linewidth","getSymbolWidth","isInvisibleRest","anchor1","anchor2","addRestToAbsElement","dot","isMultiVoice","durlog","restpitch","roomTaken","roomTakenRight","mmWidth","addHead","numMeasures","addIfNotExist","addNoteToAbcElement","zeroDuration","noteSymbol","prev","curr","printer_shift","percHead","isTopWhenStemIsDown","isBottomWhenStemIsUp","hasStem","shouldExtendStem","printAccidentals","extraw","extraLeft","addLyric","lyricStr","ly","roomtakenright","tot","inc","durationForSpacing","absType","durationClassOveride","ret1","createDecoration","ret3","setCloseAnchor","middleNote","pitchelem","setEndAnchor","setRange","slurid","setStartX","addInternalNote","measureNumDim","vert","anchor","firstdots","firstthin","thick","secondthin","seconddots","setEndX","textWidth","minspacing","translateChord","noteheadWidth","isAnnotation","klass","chordString","chordWidth","chordHeight","realWidth","relPositionY","pos2","addTextIf","rows","marginLeft","marginTop","move","absElemType","inGroup","noMove","marginBottom","calcHeight","symbolHeightInPitches","clefOffsets","adjustspacing","isKeySig","symbol","fudge","thickness","newDotShiftX","shiftheadx","adjust","opts","xdelta","dotadjusty","symb","accSlotFound","accPlace","numWidth","denWidth","maxWidth","i3","DynamicDecoration","CrescendoElem","GlissandoElem","startDiminuendoX","startCrescendoX","minTop","minBottom","closeDecoration","yPos","deltaX","getSymbolAlign","yPos2","blank1","blank2","fixedY","above","below","volumeDecoration","compoundDecoration","highestPitch","lowestPitch","placement","stackedDecoration","incrementPlacement","getPlacement","textDecoration","textFudge","textHeight","symbolDecoration","symbolList","hasOne","leftDecoration","dynamicDecoration","diminuendo","crescendo","glissando","startGlissandoX","unhighlight","fixed","getFixedCoords","_addChild","half","setLimit","member","pushTop","pushBottom","setX","midpoint","firstElement","isflat","isgrace","forceup","forcedown","average","allrests","beams","beam","calcAverage","middleLine","numElements","richText","BottomText","isPrint","paddingLeft","shouldAddClasses","unalignedWords","extraText","defFont","space","addMultiLine","addSingleLine","preface","content","groupName","startGroup","endGroup","discography","transcription","endVoice","lastContinuedVoice","getWidth","isStartVoice","dec","FreeText","getFontAndAttr","maxHeight","leftSide","currentFont","centerVertically","getChordDim","margin","invertLane","lane","putChordInLane","getLane","largestY","row","phrases","thisWord","phrase","getFamily","Separator","staffnumber","setHeight","setWidth","Subtitle","tAnchor","tLeft","totalHeightInPitches","temposcale","tempoNote","internalNotes","startLimitElem","startLimitX","endLimitElem","endLimitX","calcTieDirection","referencePitch","calcSlurDirection","hasDownStem","calcX","lineStartX","lineEndX","startX","calcTieY","startY","endY","calcSlurY","beamInterferes","midPoint","hasBeam1","hasBeam2","isLastInBeam","isFirstInBeam","avoidCollisionAbove","maxInnerHeight","getYBounds","isTie","TopText","headerTextHeight","origin","composer","hasSimpleComposerLine","composerLine","ingroup","author","partOrder","middleElems","otherchildren","firstItem","adjustRange","pathClone","pathArray","pathScale","kx","ky","Glyphs","printSymbol","path","getPathForSymbol","getYCorr","germanNote","baseChord","bassNote","marker","drawTempo","drawRelativeElement","setClass","elementGroup","drawAbsolute","bartop","staffPos","isTempo","beginGroup","counters","getCurrent","overrideClasses","baseVal","isSelectable","notePositions","zero","printPath","roundNumber","drawBeam","pathString","slope","getSlope","xes","y1","getY","y2","draw","klasses","generate","stroke","fill","foregroundColor","calcY","startY2","endY2","currentX","sprintf","renderText","drawBrace","straightPath","xLeft","yTop","yBottom","xLineWidth","yOverlap","wCurve","hCurve","curvyPath","yHeight","curve","xCurve","yCurve","openGroup","closeGroup","wrapSvgEl","drawCrescendo","drawLine","y3","y4","printDebugBox","rectBeneath","drawStaffGroup","setPaperSize","nonMusic","Selectables","responsive","selectTypes","groupClasses","moveY","topText","incrLine","abcLine","lineNumber","addStaffPadding","staffSeparation","engraveStaffLine","bottomText","getElements","lastStaffGroup","thisStaffGroup","lastBottomLine","nextTopLine","naturalSeparation","separationInPixels","drawDynamics","drawEnding","linestartx","lineendx","noClass","drawGlissando","leftY","rightY","leftX","rightX","marginRight","leftYAdj","rightYAdj","numSquigglies","drawSquiggly","sqrt","xOfs","leftStart","leftEnd","Group","lastM","isInGroup","addPath","drawSeparator","absmove","absolutemoveY","printLine","firefox112","lineToBack","pathToBack","printStem","ycorr","groupClass","kernSymbols","lastSymbol","thisSymbol","lastSymbolWidth","printStaffLine","graphelem","hAnchor","tabFont","tabClass","stemWidth","scaleExistingElem","scaleX","scaleY","setAttributeOnElement","toFixed","absEl","svgEl","isNoteOrTabNumber","canSelect","selectable","tabindex","sel","isDraggable","maxwidth","ariaLabel","styles","insertStyles","parentStyles","setResponsiveWidth","setSize","setParentStyles","arguments","o","String","fromCharCode","toExponential","str_repeat","drawVoice","printStaff","colorIndex","staff1","showDebug","boxAllElements","dottedLine","originalTop","originalBottom","debugPrintGridItem","topLine","bottomLine","incrVoice","newMeasure","startx","printBrace","tabNameHeight","r","leftMargin","colors","positionY","chordLines","coords","relElem","endx","prepend","firstYLine","lastYLine","curpitch","descenderHeight","preWidth","charWidth","postWidth","charWidth2","alreadyInGroup","richTextLine","laneMargin","getBBox","deltaY","rect","drawTie","layout","fudgeY","drawArc","pitch1","norm","ux","uy","maxFlatten","controlx1","controly1","controlx2","controly2","pathString2","drawTriplet","hasBeam","drawBracket","xTextPos","yTextPos","bracketHeight","midX","gapWidth","leftEndX","leftEndY","rightStartX","rightStartY","staffbottom","saveColor","textEl","foundNote","justInitializedMeasureNumber","isInMeasure","startMeasure","isNonSpacerRest","incrNote","incrMeasure","Renderer","setupSelection","Classes","GetFontAndAttr","GetTextSize","oneSvgPerLine","selectionColor","dragColor","dragging","SPACE","timeBasedLayout","expandToWidest","add_classes","staffwidthScreen","staffwidthPrint","listeners","addSelectListener","setPaddingOverride","minPadding","selected","dragTarget","dragIndex","dragMouseStart","dragYStep","setLineThickness","abctunes","engraveTune","adjustNonScaledItems","origJazzChords","setupTune","constructTuneElements","needNewSection","foundNotStaffExtra","lastXPosition","newTune","hasPrintedTempo","hasSeenNonSubtitle","nlines","entry","nRows","thisRow","svgs","splitSvgIntoLines","paddingBottom","viewBox","getAttribute","wrappers","gapBetweenLines","wrapper","divStyles","duplicateSvg","fullTitle","viewBoxHeight","cloneNode","titleEl","innerText","svgNS","createElementNS","attributes","getDim","historyEl","measureTotalPerLine","noteNumber","measureTotal","fontOverrides","paddingPercent","fontHeight","addClass","removeClass","kls","FONTEM","FONTSIZE","TOPNOTE","STAVEHEIGHT","INDENT","findNumber","createAnalysis","classObj","closest","dataset","tagName","clickedName","parentClasses","clickedClasses","selectableElement","nodeValue","hist","keyboardDown","keyboardSelection","elementFocused","mouseDown","passive","mouseMove","mouseUp","getCoord","yOffset","clientHeight","svgClicked","offsetX","offsetY","layerX","layerY","dragMechanism","notifySelect","keyCode","preventDefault","handled","findElementInHistory","findElementByCoord","minDistance","closestIndex","horiz","hypotenuse","getBestMatchCoordinates","epsilon","getTarget","parentElement","getMousePosition","clickedOn","attachMissingTouchEventAttributes","touchEv","touches","pageX","pageY","_ev","addGlobalClass","lastTouchMove","yDist","clearSelection","removeGlobalClass","dragStep","dragMax","step","elStart","elEnd","getClassSet","oldClass","setClassSet","klassSet","getBarYAt","layoutBeam","calcDy","minStemHeight","minStem","calcYPos","xPos","calcXPos","createAdditionalBeams","createStems","getDurlog","calcSlant","leftAveragePitch","rightAveragePitch","numStems","slant","maxSlant","asc","starthead","endhead","firstAveragePitch","lastAveragePitch","barpos","barminpos","furthestHead","ovalDelta","bary","auxBeams","sy","single","auxBeamEndX","auxBeamEndY","starty","endy","getLeftEdgeOfStaff","voiceheaderw","addBraceSize","sizeW","setBraceLocation","setLocation","layoutInGrid","leftEdge","getTotalDuration","totalWidth","leftAlignPadding","afterFixedLeft","durationUnit","gridStart","align","grandchild","gridEnd","maxCount","layoutVoice","setUpperAndLowerElements","layoutStaffGroup","setXSpacing","isLastLine","debug","newspace","it","calcHorizontalSpacing","spacingUnits","minSpace","minspace","centerWholeRests","dumpGroup","stretchLast","targetWidth","lack","stretch","relSpace","constSpace","lastStaffBottom","incTop","vocal","hgt","setUpperAndLowerVoiceElements","thisStaffTop","forcedSpacingBetween","minSpacingInPitches","systemStaffSeparation","addedSpace","staffTopMargin","setUpperAndLowerAbsoluteElements","setUpperAndLowerCrescendoElements","setUpperAndLowerDynamicElements","setUpperAndLowerEndingElements","yBounds","specialYResolved","setUpperAndLowerTempoElement","setUpperAndLowerRelativeElements","tempoPitch","renderSpacing","layoutVoiceElements","checkLastBarX","maxX","lastChild","maxChild","barX","spacingunits","currentduration","beginLayout","spacingunit","layoutEnded","getDurationIndex","currentvoices","othervoices","durationIndex","spacingduration","getNextX","getSpacingUnits","lastTopVoice","topVoice","isSameStaff","voicechildx","layoutOneItem","shiftRight","updateNextX","updateIndices","durationindex","voice1","voice2","layoutTriplet","isAbove","heightAtMidpoint","xAtMidpoint","VoiceElements","minx","nextx","er","pad","overlaps","firstChildNoteWidth","adjustedWidth","relativeChild","extraWidth","getExtraWidth","getMinWidth","moveDecorations","setLaneForChord","yAtNote","placeInLane","rightMost","xCoords","fits","absElems","rightMostAbove","rightMostBelow","setLane","numAnnotationsBelow","numLanesAbove","numLanesBelow","Svg","userAgent","clear","initVerticalSpace","setVerticalSpace","setPadding","paddingOverride","paddingtop","paddingbottom","paddingright","paddingleft","setPaddingVariable","paddingKey","formattingKey","printDefault","screenDefault","graceBefore","graceInside","graceAfter","lineSkipFactor","paragraphSkipFactor","slurHeight","staffsep","composerspace","partsspace","textspace","musicspace","titlespace","sysstaffsep","subtitlespace","topspace","vocalspace","wordsspace","em","createSvg","currentGroup","titleNode","createTextNode","cls","transform","textContent","dummySvg","constructHLine","constructVLine","ts2","dist","ts3","append","tspan","guessWidth","createDummySvg","ex","sizeCache","removeLater","setAttributeNS","moveElementToChild"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/abcjs-plugin-min.js b/dist/abcjs-plugin-min.js index e3184d7e..e67c7246 100644 --- a/dist/abcjs-plugin-min.js +++ b/dist/abcjs-plugin-min.js @@ -1,3 +1,3 @@ -/*! abcjs_plugin v6.4.2 Copyright © 2009-2023 Paul Rosen and Gregory Dyke (https://abcjs.net) */ +/*! abcjs_plugin v6.4.3 Copyright © 2009-2024 Paul Rosen and Gregory Dyke (https://abcjs.net) */ /*! For license information please see abcjs_plugin.LICENSE */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={7001:function(e,t,r){"use strict";var a=r(1592).TuneBook,i=r(8905),n=r(5253),s=new function(){var e=!1;try{e=abcjs_is_user_script}catch(e){}this.show_midi=!e,this.hide_abc=!1,this.render_before=!1,this.midi_options={},this.render_options={},this.render_classname="abcrendered",this.text_classname="abctext",this.auto_render_threshold=20,this.show_text="show score for: ",this.debug=!1};s.start=function(){var e=window.document.body;this.errors="";var t=this.getABCContainingElements(e);if(0!==t.length){if(this.debug)for(var r=0;r=0&&h0,v=0;v=0&&(u=C.startChar,d=void 0===C.chord?h:null),C.chord&&(h=C),"bar"===C.el_type){if(p){var S={abc:n.abc.substring(u,C.endChar)};(h=d&&d.chord&&d.chord.length>0?d.chord[0].name:null)&&(S.lastChord=h),C.startEnding&&(S.startEnding=C.startEnding),C.endEnding&&(S.endEnding=C.endEnding),f.push(S),u=null,p=!1}}else"note"===C.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=o},9447:function(e,t,r){var a=r(4914).relativeMajor,i={acc:"sharp",note:"f"},n={acc:"sharp",note:"c"},s={acc:"sharp",note:"g"},o={acc:"sharp",note:"d"},c={acc:"sharp",note:"A"},l={acc:"sharp",note:"e"},h={acc:"flat",note:"B"},d={acc:"flat",note:"e"},u={acc:"flat",note:"A"},f={acc:"flat",note:"d"},p={acc:"flat",note:"G"},m={acc:"flat",note:"c"},g={"C#":[i,n,s,o,c,l,{acc:"sharp",note:"B"}],"F#":[i,n,s,o,c,l],B:[i,n,s,o,c],E:[i,n,s,o],A:[i,n,s],D:[i,n],G:[i],C:[],F:[h],Bb:[h,d],Eb:[h,d,u],Cm:[h,d,u],Ab:[h,d,u,f],Db:[h,d,u,f,p],Gb:[h,d,u,f,p,m],Cb:[h,d,u,f,p,m,{acc:"flat",note:"F"}],"A#":[h,d],"B#":[],"D#":[h,d,u],"E#":[h],"G#":[h,d,u,f],none:[]};e.exports=function(e){var t=g[a(e)];return t?JSON.parse(JSON.stringify(t)):null}},4914:function(e){var t={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=null;e.exports={relativeMajor:function(e){r||function(){r={};for(var e=Object.keys(t),a=0;a=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;ee)return c}}return null},this.addElementToEvents=function(e,t,r,i,n,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var d=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(d=0),d>0){for(var u=[],f=0;f0)for(var s=n.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=n.staffs[n.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,d=n.voices,u=0;u0&&o["event"+p]&&(w="event"+p),p=Math.round(1e3*f),"bar"===T.type){var S=T.abcelem.type,E="bar_right_repeat"===S||"bar_dbl_repeat"===S,N="1"===T.abcelem.startEnding,M="bar_left_repeat"===S||"bar_dbl_repeat"===S||"bar_right_repeat"===S;if(E){x>0&&(o[w].endX=T.x),-1===g&&(g=x);var _=0;y=-1;for(var A=m;A=0;n--){var s=e[n];"bar"===s.type?(s.top=a,s.nextTop=t,t=a,s.bottom=i,s.nextBottom=r,r=i):"event"===s.type&&(a=s.top,i=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(e,r){if(!(r.length<1)){for(var a=0;ai.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=r[r.length-1];o.endX=e[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:d}),this.addUsefulCallbackInfo(s,b*i),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),a=0;a0?e.duration[0]:r)/r}if(!t){t=180;var a=this.getMeterFraction();a&&3!==a.num&&a.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var r=this.metaText?this.metaText.tempo:null,a=this.getBpm(r),i=1;e?r&&(i=e/a):e=a;var n=this.getBeatLength(),s=e/60,o=this.getBarLength()/n*t/s;o&&(o-=this.getPickupLength()/n/s);var c=n*s;return this.noteTimings=this.setupEvents(o,c,e,i),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=n(this,e);return s(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return o(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r=0&&e.lastIndexOf(t)===r},last:function(e){return 0===e.length?null:e[e.length-1]}};e.exports=t},8905:function(e,t,r){var a=r(5008),i=r(8360),n=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),d="",u="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,metaTextInfo:t.metaTextInfo,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline,findSelectableElement:t.findSelectableElement,getSelectableArray:t.getSelectableArray};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e/g,">")},y=function(t,r,a){r||(r=" ");var i=r[a];" "!==i&&i||(i="SPACE");var n,s=b(r.substring(a-64,a))+''+i+""+b(r.substring(a+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(a+1)+": "+t+": "+s),n={message:t,line:r,startChar:v.iChar+a,column:a},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(n)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var x=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=a.strip(r))[r.length-1]&&(r+=" ");for(var i=[],n=0,s=!1,o=function(t){var o=a.strip(r.substring(n,t));if(o=o.replace(/\\([-_*|~])/g,"$1"),n=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=!1,l=0;l0&&(a.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":c||(o(l),i.push({skip:!0,to:"slur"}));break;case"*":c||(o(l),i.push({skip:!0,to:"next"}));break;case"|":c||(o(l),i.push({skip:!0,to:"bar"}));break;case"~":c||(s=!0)}c="\\"===r[l]}t.forEach((function(e){if(0!==i.length)if(i[0].skip){switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=a.strip(r))[r.length-1]&&(r+=" ");for(var i=[],n=0,s=!1,o=function(t){var o=a.strip(r.substring(n,t));if(n=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c0&&(a.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==i.length)if(i[0].skip)switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},w=function(e){if(a.startsWith(e,"%%")){var t=i.addDirective(e.substring(2));t&&y(t,e,2)}else{var n=e.indexOf("%");if(n>=0&&(e=e.substring(0,n)),0!==(e=e.replace(/\s+$/,"")).length)if(d)x(r.getCurrentVoice(),e.substring(2));else if(u)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e[1]||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&x(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function T(e,t){e.push({el_type:"hint"});for(var r=0;r1){for(var b=1;b0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join(" ")}var T=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===a.last(T).length&&T.pop(),e=new o(T,v),m=new n(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&i.globalFormatting(h.format);for(var S=e.nextLine();S;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var E=v.is_in_header;w(S),E&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),S=e.nextLine()}d&&x(r.getCurrentVoice(),""),u&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var N=792,M=612;switch(v.papersize){case"legal":N=1008,M=612;break;case"A4":N=842.4,M=597.6}if(v.landscape){var _=N;N=M,M=_}t.formatting.pagewidth||(t.formatting.pagewidth=M),t.formatting.pageheight||(t.formatting.pageheight=N),h.hint_measures&&function(){for(var e=0;e1&&!a.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(e){a.startsWith(e,"%%")&&(t+=e+"\n")}));var c=t;return o.forEach((function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var i=e.pure.split("T:");i.length>1&&(i=i[1].split("\n"),e.title=a.strip(i[0]));var n=e.pure.substring(2,e.pure.indexOf("\n"));e.id=a.strip(n)})),{header:c,tunes:o}}},8360:function(e,t,r){var a=r(5008),i={};!function(){"use strict";var e,t,r,n,s;i.initialize=function(a,i,o,c,l){e=a,t=i,n=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},n.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},n.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},n.formatting.annotationfont=r.annotationfont,n.formatting.gchordfont=r.gchordfont,n.formatting.historyfont=r.historyfont,n.formatting.infofont=r.infofont,n.formatting.measurefont=r.measurefont,n.formatting.partsfont=r.partsfont,n.formatting.repeatfont=r.repeatfont,n.formatting.textfont=r.textfont,n.formatting.tripletfont=r.tripletfont,n.formatting.vocalfont=r.vocalfont,n.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,a,i,n){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[n]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",a,i),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",a,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",a,i)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",d="normal",u="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",a,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?d="italic":"underline"===v?u="underline":"box"===v?(o[n]?f=!0:t('This font style doesn\'t support "box"',a,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",a,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",a,i):c=g.token:t("Expected font size in font definition.",a,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?d="italic":"underline"===v?u="underline":"box"===v?(o[n]?f=!0:t('This font style doesn\'t support "box"',a,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",a,i);break;case"finished":t('Extra characters found after "box" in font definition.',a,i)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",a,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",a,i),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=d,y.decoration=u,y.size=c,f&&(y.box=!0),y)},l=function(e,t,a){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],a,0,e),r.is_in_header&&(n.formatting[e]=r[e]),null)},h=function(e,t){var r="";t.forEach((function(e){r+=e.token}));var a=parseFloat(r);if(isNaN(a)||0===a)return'Directive "'+e+'" requires a number as a parameter.';n.formatting.scale=a},d=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],u=function(e,t,a,i,n){if(1!==a.length||"number"!==a[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=a[0].intt;return void 0!==i&&sn?'Directive "'+t+'" requires a number less than or equal to '+n+" as a parameter.":(r[e]=s,null)},f=function(e,t,a){if(1===a.length&&("true"===a[0].token||"false"===a[0].token))return r[e]="true"===a[0].token,null;var i=u(e,t,a,0,1);return null!==i?i:(r[e]=1===r[e],null)},p=function(e,t,a,i){if(1!==a.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var n=a[0].token,s=!1,o=0;!s&&o1&&r.setfont){var a=[];""!==t[0]&&a.push({text:t[0]});for(var i=1;i=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}i.addDirective=function(o){var M=e.tokenize(o,0,o.length);if(0===M.length||"alpha"!==M[0].type)return null;var _=o.substring(o.indexOf(M[0].token)+M[0].token.length);_=e.stripComment(_);var A,B=M.shift().token.toLowerCase(),P="";switch(B){case"bagpipes":n.formatting.bagpipes=!0;break;case"flatbeams":n.formatting.flatbeams=!0;break;case"jazzchords":n.formatting.jazzchords=!0;break;case"accentAbove":n.formatting.accentAbove=!0;break;case"germanAlphabet":n.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=_;break;case"graceslurs":if(1!==M.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===M[0].token||"false"===M[0].token)n.formatting.graceSlurs=!1;else{if("1"!==M[0].token&&"true"!==M[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+M[0].token+")";n.formatting.graceSlurs=!0}break;case"lineThickness":var L=N(M);if(void 0!==L.value&&(n.formatting.lineThickness=L.value),L.error)return L.error;break;case"stretchlast":var z=N(M);if(void 0!==z.value&&(n.formatting.stretchlast=z.value),z.error)return z.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":n.formatting.titleleft=!0;break;case"measurebox":n.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",B,M,E);case"dynamic":return p("dynamicPosition",B,M,E);case"gchord":return p("chordPosition",B,M,E);case"ornament":return p("ornamentPosition",B,M,E);case"volume":return p("volumePosition",B,M,E);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var a=e.getMeasurement(r);return 0===a.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(n.formatting[t]=a.value,null)}(B,M);case"voicescale":if(1!==M.length||"number"!==M[0].type)return"voicescale requires one float as a parameter";var O=M.shift();return r.currentVoice&&(r.currentVoice.scale=O.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(1!==M.length)return"voicecolor requires one string as a parameter";var H=M.shift();return r.currentVoice&&(r.currentVoice.color=H.token,s.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var D=Math.round(function(t,r){var a=e.getMeasurement(r);return 0===a.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:a.value}(B,M));return D.error?D.error:(s.addSpacing(D),null);case"scale":h(B,M);break;case"sep":if(0===M.length)s.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var I=e.getMeasurement(M);if(0===I.used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var F=I.value;if(0===(I=e.getMeasurement(M)).used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var V=I.value;if(0===(I=e.getMeasurement(M)).used||0!==M.length)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var Y=I.value;s.addSeparator(F,V,Y,{startChar:r.iChar,endChar:r.iChar+_.length})}break;case"barsperstaff":if(null!==(P=u("barsperstaff",B,M)))return P;break;case"staffnonote":if(1!==M.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===M[0].token)r.staffnonote=!0;else{if("1"!==M[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+M[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(P=f("printTempo",B,M)))return P;break;case"partsbox":if(null!==(P=f("partsBox",B,M)))return P;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(P=f("freegchord",B,M)))return P;break;case"measurenb":case"barnumbers":if(null!==(P=u("barNumbers",B,M)))return P;break;case"setbarnb":if(1!==M.length||"number"!==M[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(M[0].intt);break;case"begintext":var j="";for(A=e.nextLine();A&&0!==A.indexOf("%%endtext");)a.startsWith(A,"%%")?j+=A.substring(2)+"\n":j+=A+"\n",A=e.nextLine();s.addText(j,{startChar:r.iChar,endChar:r.iChar+j.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(A=e.nextLine();A&&0!==A.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":_.length>0&&r.ignoredDecorations.push(_.substring(0,_.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var G=e.translateString(_);s.addText(i.parseFontChangeLine(G),{startChar:r.iChar,endChar:r.iChar+_.length+7});break;case"center":var W=e.translateString(_);s.addCentered(i.parseFontChangeLine(W));break;case"font":break;case"setfont":var q=e.tokenize(_,0,_.length);if(q.length>=4&&"-"===q[0].token&&"number"===q[1].type){var X=parseInt(q[1].token);X>=1&&X<=9&&(r.setfont||(r.setfont=[]),q.shift(),q.shift(),r.setfont[X]=c(q,r.setfont[X],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(B,M,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n.formatting[e]=c(t,n.formatting[e],r,0,e),null)}(B,M,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",M,o);case"staves":case"score":r.score_is_present=!0;for(var R,U=function(e,t,i,n,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=a.last(r.staves);void 0!==i&&void 0===o.bracket&&(o.bracket=i),void 0!==n&&void 0===o.brace&&(o.brace=n),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},K=!1,$=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,re=function(){if(te=!0,R){var e="start";R.staffNum>0&&("start"!==r.staves[R.staffNum-1].connectBarLines&&"continue"!==r.staves[R.staffNum-1].connectBarLines||(e="continue")),r.staves[R.staffNum].connectBarLines=e}};M.length;){var ae=M.shift();switch(ae.token){case"(":K?t("Can't nest parenthesis in %%score",o,ae.start):(K=!0,J=!0);break;case")":!K||J?t("Unexpected close parenthesis in %%score",o,ae.start):K=!1;break;case"[":$?t("Can't nest brackets in %%score",o,ae.start):($=!0,Z=!0);break;case"]":!$||Z?t("Unexpected close bracket in %%score",o,ae.start):($=!1,r.staves[R.staffNum].bracket="end");break;case"{":Q?t("Can't nest braces in %%score",o,ae.start):(Q=!0,ee=!0);break;case"}":!Q||ee?t("Unexpected close brace in %%score",o,ae.start):(Q=!1,r.staves[R.staffNum].brace="end");break;case"|":re();break;default:for(var ie="";("alpha"===ae.type||"number"===ae.type)&&(ie+=ae.token,ae.continueId);)ae=M.shift();U(ie,!K||J,Z?"start":$?"continue":void 0,ee?"start":Q?"continue":void 0,te),J=!1,Z=!1,ee=!1,te=!1,R=r.voices[ie],"staves"===B&&re()}}break;case"newpage":var ne=e.getInt(_);s.addNewPage(0===ne.digits?-1:ne.value);break;case"abc":var se=_.split(" ");switch(se[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var oe=se.shift();s.addMetaText(B+oe,se.join(" "),{startChar:r.iChar,endChar:r.iChar+_.length+5});break;default:return"Unknown directive: "+B+se[0]}break;case"header":case"footer":var ce=e.getMeat(_,0,_.length);'"'===(ce=_.substring(ce.start,ce.end))[0]&&'"'===ce[ce.length-1]&&(ce=ce.substring(1,ce.length-1));var le=ce.split("\t"),he={};he=1===le.length?{left:"",center:le[0],right:""}:2===le.length?{left:le[0],center:le[1],right:""}:{left:le[0],center:le[1],right:le[2]},le.length>3&&t("Too many tabs in "+B+": "+le.length+" found.",_,0),s.addMetaTextObj(B,he,{startChar:r.iChar,endChar:r.iChar+o.length});break;case"midi":var de=e.tokenize(_,0,_.length,!0);de.length>0&&"="===de[0].token&&de.shift(),0===de.length?t("Expected midi command",_,0):function(e,r,a){var i=e.shift().token,n=[];if(m.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,a,0);else if(g.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,a,0):n.push(e[0].token);else if(v.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,a,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,a,0):n.push(e[0].intt);else if(b.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,a,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,a,0):(n.push(e[0].intt),2===e.length&&n.push(e[1].intt));else if(y.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,a,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[1].intt));else if(w.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,a,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,a,0):(n.push(e[0].token),n.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,n=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,n=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,a,0);else if(T.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[2].intt));else if(x.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,a,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[1].intt),n.push(e[2].intt),n.push(e[3].intt));else if(k.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,a,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[1].intt),n.push(e[2].intt),n.push(e[3].intt),n.push(e[4].intt));else if(b.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,a,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,a,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,a,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,a,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,a,0)):(n.push(e[0].intt),4===e.length&&n.push(e[3].intt));else if(C.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,a,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,a,0);else{var o=e.shift();for(n.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,a,0),n.push(o.intt)}else if(S.indexOf(i)>=0)if(1!==e.length&&2!==e.length)t("Expected one or two parameters in MIDI "+i,a,0);else if("number"!==e[0].type)t("Expected integer parameter in MIDI "+i,a,0);else if(2===e.length&&"alpha"!==e[1].type)t("Expected alpha parameter in MIDI "+i,a,0);else if(n.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?t("Expected octave value in MIDI"+i):(c<-1&&(t("Expected octave= in MIDI "+i+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(t("Expected octave= in MIDI "+i+" to be <= 3 (recv:"+c+")"),c=3),n.push(c))):t("Expected octave= in MIDI"+i)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:n}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[i]=n)}(de,n,_);break;case"percmap":var ue=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],a=parseInt(t[1],10);if((isNaN(a)||a<35||a>81)&&t[1]&&(a=d.indexOf(t[1].toLowerCase())+35),isNaN(a)||a<35||a>81)return{error:'Expected drum name, received "'+t[1]+'"'};var i={sound:a};return 3===t.length&&(i.noteHead=t[2]),{key:r,value:i}}(_);ue.error?t(ue.error,o,8):(n.formatting.percmap||(n.formatting.percmap={}),n.formatting.percmap[ue.key]=ue.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":n.formatting[B]=_;break;default:return"Unknown directive: "+B}return null},i.globalFormatting=function(a){for(var i in a)if(a.hasOwnProperty(i)){var s,o=""+a[i],c=e.tokenize(o,0,o.length);switch(i){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=f("partsBox",i,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),n.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),n.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var d=N(c);if(void 0!==d.value&&(n.formatting.stretchlast=d.value),d.error)return d.error;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},9928:function(e,t,r){var a=r(5008),i=r(8360),n=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,a){n.initialize(e,t,r,a,o),i.initialize(e,t,r,a,o)},this.reset(e,t,r,s),this.setTitle=function(e,t){r.hasMainTitle?o.addSubtitle(e,{startChar:r.iChar,endChar:r.iChar+t+2}):(o.addMetaText("title",e,{startChar:r.iChar,endChar:r.iChar+t+2}),r.hasMainTitle=!0)},this.setMeter=function(a){if("C"===(a=e.stripComment(a)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===a.length||"none"===a.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var i=e.tokenize(a,0,a.length);try{var n=function(){var e=function(){var e={value:0,num:""},t=i.shift();for("("===t.token&&(t=i.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===i.length||"/"===i[0].token)return e;if(")"===(t=i.shift()).token){if(0===i.length||"/"===i[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===i.length)throw"Expected top number of meter";t=i.shift()}return e}();if(0===i.length)return e;var t=i.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=i.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===i.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=n();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===i.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,a,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var a=0;a0&&(r.default_length=n/s,r.havent_set_length=!1)}else 1===i.length&&"1"===i[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(a,i,n,s){try{var o=e.tokenize(a,i,n);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:s+i-2,endChar:s+n},h=!0,d=o.shift();if("quote"===d.type&&(l.preString=d.token,d=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===d.type&&"C"===d.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(d=o.shift()).type&&"="===d.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(d=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(d.token)}else{if("number"!==d.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(d.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(d=o.shift()).type||"="!==d.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(d=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(d.token)}}else{if("number"!==d.type)throw"Unknown value in Q: field";var u=parseInt(d.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=u;else{if(h=!1,"punct"!==(d=o.shift()).type&&"/"!==d.token)throw"Expected fraction in Q: field";if("number"!==(d=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(d.token);for(l.duration=[u/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(d=o.shift()).type)throw"Expected fraction in Q: field";if(u=parseInt(d.token),"punct"!==(d=o.shift()).type&&"/"!==d.token)throw"Expected fraction in Q: field";if("number"!==(d=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(d.token),l.duration.push(u/f)}if("punct"!==(d=o.shift()).type&&"="!==d.token)throw"Expected = in Q: field";if("number"!==(d=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(d.token)}}if(0!==o.length&&("quote"===(d=o.shift()).type&&(l.postString=d.token,d=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(l.suppress=!0),{type:h?"delaySet":"immediate",tempo:l}}catch(e){return t(e,a,i),{type:"none"}}},this.letter_to_inline_header=function(a,c,l){var h=!1,d=e.eatWhiteSpace(a,c);if(c+=d,a.length>=c+5&&"["===a[c]&&":"===a[c+2]){var u=a.indexOf("]",c),f=r.iChar+c,p=r.iChar+u+1;switch(a.substring(c,c+3)){case"[I:":var m=i.addDirective(a.substring(c+3,u));return m&&t(m,a,c),[u-c+1+d];case"[M:":var g=this.setMeter(a.substring(c+3,u));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):r.meter=g,[u-c+1+d];case"[K:":var v=n.parseKey(a.substring(c+3,u),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,r.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,n.fixKey(r.clef,r.key)),[u-c+1+d];case"[P:":var b=i.parseFontChangeLine(a.substring(c+3,u));return l||s.lines.length<=s.lineNum?r.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[u-c+1+d];case"[L:":return this.setDefaultLength(a,c+3,u),[u-c+1+d];case"[Q:":if(u>0){var y=this.setTempo(a,c+3,u,r.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):r.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):r.tempoForNextLine=["tempo",f,p,y.tempo]),[u-c+1+d,a[c+1],a.substring(c+3,u)]}break;case"[V:":if(u>0)return h=n.parseVoice(a,c+3,u),[u-c+1+d,a[c+1],a.substring(c+3,u),h];break;case"[r:":return[u-c+1+d]}}return[0]},this.letter_to_body_header=function(e,s){var c=!1;if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var l=i.addDirective(e.substring(s+2));return l&&t(l,e,s),[e.length];case"M:":var h=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&h&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,h),[e.length];case"K:":var d=n.parseKey(e.substring(s+2),o.hasBeginMusic());return d.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),d.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,n.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var u=e.indexOf("",s+2);-1===u&&(u=e.length);var f=this.setTempo(e,s+2,u,r.iChar);return"delaySet"===f.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,f.tempo),[u,e[s],a.strip(e.substring(s+2))];case"V:":return c=n.parseVoice(e,s+2,e.length),[e.length,e[s],a.strip(e.substring(s+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(a){var c=l[a[0]],h=a.length-2,d=e.translateString(e.stripComment(a.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length});else if(void 0!==c)o.addMetaText(c,i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length});else{var u=r.iChar,f=u+a.length;switch(a[0]){case"H":for(o.addMetaTextArray("history",i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length}),a=e.peekLine();a&&":"!==a[1];)e.nextLine(),o.addMetaTextArray("history",i.parseFontChangeLine(e.translateString(e.stripComment(a))),{startChar:r.iChar,endChar:r.iChar+a.length}),a=e.peekLine();break;case"K":this.resolveTempo();var p=n.parseKey(a.substring(2),!1);!r.is_in_header&&o.hasBeginMusic()&&(p.foundClef&&o.appendStartingElement("clef",u,f,r.clef),p.foundKey&&o.appendStartingElement("key",u,f,n.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(a,2,a.length);break;case"M":r.origMeter=r.meter=this.setMeter(a.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length}):r.partForNextLine={title:d,startChar:u,endChar:f};break;case"Q":var m=this.setTempo(a,2,a.length,r.iChar);"delaySet"===m.type?r.tempo=m.tempo:"immediate"===m.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",u,f,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":r.titlecaps&&(d=d.toUpperCase()),this.setTitle(i.parseFontChangeLine(e.theReverser(d)),h);break;case"U":this.addUserDefinition(a,2,a.length);break;case"V":if(n.parseVoice(a,2,a.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",a,0);break;default:return{regular:!0}}}return{}}}},9708:function(e,t,r){var a=r(8360),i=r(2821),n={};!function(){var e,t,r,s;n.initialize=function(a,i,n,o,c){e=a,t=i,r=n,s=c},n.standardKey=function(e,t,a,n){return i.keySignature(r,e,t,a,n)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var r=o[e];return(r?r.mid:0)+t};n.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},n.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};n.addPosToKey=function(e,t){var r=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),r<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},n.fixKey=function(e,t){var r=Object.assign({},t);return n.addPosToKey(e,r),r};var h=function(e){var t=0,r=e[t++];"^"!==r&&"_"!==r||(r=e[t++]);var a=l[r];for(void 0===a&&(a=6);t0){l.foundKey=!0;var d="",u="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=h.token;if(o.length>0){var p=e.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,d=p.token),o.length>0){var m=e.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,u=m.token)}if(void 0===n.standardKey(f,h.token,d,0))return t("Unsupported key signature: "+f,i,0),l}var g,v=n.deepCopyKey(r.key),b=!s&&r.globalTranspose?-r.globalTranspose:0;if(s&&(g=r.globalTransposeOrigKeySig),r.key=n.deepCopyKey(n.standardKey(f,h.token,d,b)),s&&(r.globalTransposeOrigKeySig=g),r.key.mode=u,v){for(var y,x=0;x0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return t("Expected = after middle",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after middle",i,k.start);break}if(0===o.length)return t("Expected parameter after middle=",i,0),l;var N=e.getPitchFromTokens(o);N.warn&&t(N.warn,i,0),N.position&&(r.clef.verticalPos=N.position-6);break;case"transpose":if(o.shift(),0===o.length)return t("Expected = after transpose",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after transpose",i,k.start);break}if(0===o.length)return t("Expected parameter after transpose=",i,0),l;if("number"!==o[0].type){t("Expected number after transpose",i,o[0].start);break}r.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return t("Expected = after stafflines",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after stafflines",i,k.start);break}if(0===o.length)return t("Expected parameter after stafflines=",i,0),l;if("number"!==o[0].type){t("Expected number after stafflines",i,o[0].start);break}r.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return t("Expected = after staffscale",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after staffscale",i,k.start);break}if(0===o.length)return t("Expected parameter after staffscale=",i,0),l;if("number"!==o[0].type){t("Expected number after staffscale",i,o[0].start);break}r.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return t("Expected = after octave",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after octave",i,k.start);break}if(0===o.length)return t("Expected parameter after octave=",i,0),l;if("number"!==o[0].type){t("Expected number after octave",i,o[0].start);break}r.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return t("Expected = after style",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after style",i,k.start);break}if(0===o.length)return t("Expected parameter after style=",i,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=o[0].token,o.shift();break;default:t("error parsing style element: "+o[0].token,i,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return t("Expected = after clef",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after clef",i,k.start);break}if(0===o.length)return t("Expected parameter after clef=",i,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=o.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":M.token="alto";break;case"F":case"f":M.token="bass";break;case"G":case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,i,M.start)}o.length>0&&"number"===o[0].type&&(M.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(M.token+=o[0].token+o[1].token,o.shift(),o.shift()),r.clef={type:M.token,verticalPos:c(M.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),l.foundClef=!0;break;default:t("Unknown parameter: "+o[0].token,i,o[0].start),o.shift()}return l},n.parseVoice=function(a,i,n){var o=e.getMeat(a,i,n),l=o.start,d=o.end,u=e.getToken(a,l,d);if(0!==u.length){var f=!1;void 0===r.voices[u]&&(r.voices[u]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",a,l)),l+=u.length,l+=e.eatWhiteSpace(a,l);for(var p={startStaff:f},m=function(r){var i=e.getVoiceToken(a,l,d);void 0!==i.warn?t("Expected value for "+r+" in voice: "+i.warn,a,l):void 0!==i.err?t("Expected value for "+r+" in voice: "+i.err,a,l):0===i.token.length&&'"'!==a[l]?t("Expected value for "+r+" in voice",a,l):p[r]=i.token,l+=i.len},g=function(i,n,s){var o=e.getVoiceToken(a,l,d);void 0!==o.warn?t("Expected value for "+n+" in voice: "+o.warn,a,l):void 0!==o.err?t("Expected value for "+n+" in voice: "+o.err,a,l):0===o.token.length&&'"'!==a[l]?t("Expected value for "+n+" in voice",a,l):("number"===s&&(o.token=parseFloat(o.token)),r.voices[i][n]=o.token),l+=o.len},v=function(r,i){var n=e.getVoiceToken(a,l,d);if(void 0!==n.warn)t("Expected value for "+r+" in voice: "+n.warn,a,l);else if(void 0!==n.err)t("Expected value for "+r+" in voice: "+n.err,a,l);else{if(0!==n.token.length||'"'===a[l])return"number"===i&&(n.token=parseFloat(n.token)),n.token;t("Expected value for "+r+" in voice",a,l)}l+=n.len},b=function(i,n){var s=e.getVoiceToken(a,l,d);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+n+" in voice: "+s.warn,a,l);else if(0===s.token.length&&'"'!==a[l])t("Expected one of (_B, _E, _b, _e) for "+n+" in voice",a,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[i][n]=o:t("Expected one of (_B, _E, _b, _e) for "+n+" in voice",a,l)}l+=s.len};l0&&(t+=d[0],"V"===d[1]&&this.startNewLine());for(var u=0;t0)t+=p[0],"V"===p[1]&&(l=!0);else{var m;for((!o.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((m=a.eatWhiteSpace(e,t))>0&&(t+=m),t>0&&""===e[t-1]&&(m=c.letter_to_body_header(e,t))[0]>0&&("V"===m[1]&&this.startNewLine(),t=m[0],n.start_new_line=!1),(m=P(e,t))[0]>0&&(t+=m[0]),(m=N(e,t))[0]>0){S.chord||(S.chord=[]);var g=a.translateString(m[1]);g=g.replace(/;/g,"\n");for(var y=!1,x=0;x0&&(S.force_end_beam_last=!0),t+=k}else if((m=-1===v.indexOf(e[t])?B(e,t):[0])[0]>0)null===m[1]?t+10&&(0===m[1].indexOf("style=")?S.style=m[1].substr(6):(void 0===S.decoration&&(S.decoration=[]),"beambr1"===m[1]?S.beambr=1:"beambr2"===m[1]?S.beambr=2:S.decoration.push(m[1]))),t+=m[0];else{if(!((m=M(e,t))[0]>0))break;S.gracenotes=m[1],t+=m[0]}if((m=L(e,t))[0]>0){u=0,void 0!==S.gracenotes&&(S.rest={type:"spacer"},S.duration=.125,n.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+t,r+t+m[0],S),n.measureNotEmpty=!0,S={});var w={type:m[1]};0===w.type.length?i("Unknown bar type",e,t):(n.inEnding&&"bar_thin"!==w.type&&(w.endEnding=!0,n.inEnding=!1),m[2]&&(w.startEnding=m[2],n.inEnding&&(w.endEnding=!0),n.inEnding=!0,"bar_right_repeat"===m[1]?n.restoreStartEndingHoldOvers():n.duplicateStartEndingHoldOvers()),void 0!==S.decoration&&(w.decoration=S.decoration),void 0!==S.chord&&(w.chord=S.chord),w.startEnding&&void 0===n.barFirstEndingNum?n.barFirstEndingNum=n.currBarNumber:w.startEnding&&w.endEnding&&n.barFirstEndingNum?n.currBarNumber=n.barFirstEndingNum:w.endEnding&&(n.barFirstEndingNum=void 0),"bar_invisible"!==w.type&&n.measureNotEmpty&&(void 0===n.currentVoice||0===n.currentVoice.staffNum&&0===n.currentVoice.index)&&(n.currBarNumber++,n.barNumbers&&n.currBarNumber%n.barNumbers==0&&(w.barNumber=n.currBarNumber)),n.addFormattingOptions(S,s.formatting,"bar"),o.appendElement("bar",r+f,r+t+m[0],w),n.measureNotEmpty=!1,S={}),t+=m[0]}else if("&"===e[t])(m=_(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,u++);else{if((m=z(e,t)).consumed>0&&(void 0!==m.startSlur&&(S.startSlur=m.startSlur),m.dottedSlur&&(S.dottedSlur=!0),void 0!==m.triplet&&(h>0?i("Can't nest triplets",e,t):(S.startTriplet=m.triplet,S.tripletMultiplier=m.tripletQ/m.triplet,S.tripletR=m.num_notes,h=void 0===m.num_notes?m.triplet:m.num_notes)),t+=m.consumed),"["===e[t]){t++;for(var T=null,I=!1,F=!1;!F;){var V=B(e,t);V[0]>0&&(t+=V[0]);var Y=H(e,t,{},!1);if(null!==Y&&void 0!==Y.pitch)V[0]>0&&0!==V[1].indexOf("style=")&&(void 0===S.decoration&&(S.decoration=[]),S.decoration.push(V[1])),Y.end_beam&&(S.end_beam=!0,delete Y.end_beam),void 0===S.pitches?(S.duration=Y.duration,S.pitches=[Y]):S.pitches.push(Y),delete Y.duration,V[0]>0&&0===V[1].indexOf("style=")&&(S.pitches[S.pitches.length-1].style=V[1].substr(6)),n.inTieChord[S.pitches.length]&&(Y.endTie=!0,n.inTieChord[S.pitches.length]=void 0),Y.startTie&&(n.inTieChord[S.pitches.length]=!0),t=Y.endChar,delete Y.endChar;else if(" "===e[t])i("Spaces are not allowed in chords",e,t),t++;else{if(t0&&(!S.rest||"spacer"!==S.rest.type)&&0==--h&&(S.endTriplet=!0);for(var j=!1;t":case"<":var G=D(e,t);t+=G[0]-1,n.next_note_duration=G[2],T?T*=G[1]:T=G[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var W=a.getFraction(e,t);T=W.value;var q=e[t=W.index];" "===q&&(I=!0),"-"===q||")"===q||" "===q||"<"===q||">"===q?t--:j=!0;break;case"0":T=0;break;default:j=!0}j||t++}}else i("Expected ']' to end the chords",e,t);void 0!==S.pitches&&(null!==T&&(S.duration=S.duration*T,I&&O(S)),n.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S),n.measureNotEmpty=!0,S={}),F=!0}}}else{var X={},R=H(e,t,X,!0);void 0!==X.endTie&&E(n,u,!0),null!==R&&(void 0!==R.pitch?(S.pitches=[{}],void 0!==R.accidental&&(S.pitches[0].accidental=R.accidental),S.pitches[0].pitch=R.pitch,S.pitches[0].name=R.name,(R.midipitch||0===R.midipitch)&&(S.pitches[0].midipitch=R.midipitch),void 0!==R.endSlur&&(S.pitches[0].endSlur=R.endSlur),void 0!==R.endTie&&(S.pitches[0].endTie=R.endTie),void 0!==R.startSlur&&(S.pitches[0].startSlur=R.startSlur),void 0!==S.startSlur&&(S.pitches[0].startSlur=S.startSlur),void 0!==S.dottedSlur&&(S.pitches[0].dottedSlur=!0),void 0!==R.startTie&&(S.pitches[0].startTie=R.startTie),void 0!==S.startTie&&(S.pitches[0].startTie=S.startTie)):(S.rest=R.rest,void 0!==R.endSlur&&(S.endSlur=R.endSlur),void 0!==R.endTie&&(S.rest.endTie=R.endTie),void 0!==R.startSlur&&(S.startSlur=R.startSlur),void 0!==R.startTie&&(S.rest.startTie=R.startTie),void 0!==S.startTie&&(S.rest.startTie=S.startTie)),void 0!==R.chord&&(S.chord=R.chord),void 0!==R.duration&&(S.duration=R.duration),void 0!==R.decoration&&(S.decoration=R.decoration),void 0!==R.graceNotes&&(S.graceNotes=R.graceNotes),delete S.startSlur,delete S.dottedSlur,C(n,u,S)&&(void 0!==S.pitches?S.pitches[0].endTie=!0:"spacer"!==S.rest.type&&(S.rest.endTie=!0),E(n,u,!1)),(R.startTie||S.startTie)&&E(n,u,!0),t=R.endChar,h>0&&(!R.rest||"spacer"!==R.rest.type)&&0==--h&&(S.endTriplet=!0),R.end_beam&&O(S),S.rest&&"rest"===S.rest.type&&1===S.duration&&A(n)<=1&&(S.rest.type="whole",S.duration=A(n)),S.duration<1&&-1===b.indexOf(S.duration)&&0!==S.duration&&(S.rest&&"spacer"===S.rest.type||i("Duration not representable: "+e.substring(f,t),e,t)),n.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S)||(this.startNewLine(),o.appendElement("note",r+f,r+t,S)),n.measureNotEmpty=!0,S={})}t===f&&(" "!==e[t]&&"`"!==e[t]&&i("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||d[0]>0,this.lineContinuation||(S={})}};var E=function(e,t,r){var a=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][a]=r},N=function(e,t){if('"'===e[t]){var r=a.getBrackettedSubstring(e,t,5);if(r[2]||i("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1][0])r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1][0])r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1][0])r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1][0])r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1][0]){r[1]=r[1].substring(1);var s=a.getFloat(r[1]);0===s.digits&&i("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(s.digits),","!==r[1][0]&&i("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var o=a.getFloat(r[1]);0===o.digits&&i("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(o.digits);var c=a.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==n.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=h.chordName(n,r[1]);return r}return[0,""]},M=function(e,t){if("{"===e[t]){var r=a.getBrackettedSubstring(e,t,1,"}");r[2]||i("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o0&&(s[s.length-1].endBeam=!0):i("Unknown character '"+r[1][o]+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function _(e,t){if("&"===e[t]){for(var r=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-r,e.substring(r+1,t)]}return[0]}function A(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var B=function(e,t){var r=n.macros[e[t]];if(void 0!==r)return"!"!==r[0]&&"+"!==r[0]||(r=r.substring(1)),"!"!==r[r.length-1]&&"+"!==r[r.length-1]||(r=r.substring(0,r.length-1)),u.includes(r)?[1,r]:f.includes(r)?("hidden"===n.volumePosition&&(r=""),[1,r]):p.includes(r)?("hidden"===n.dynamicPosition&&(r=""),[1,r]):(n.ignoredDecorations.includes(r)||i("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=a.getBrackettedSubstring(e,t,5);if(s[1].length>1&&("^"===s[1][0]||"_"===s[1][0])&&(s[1]=s[1].substring(1)),u.includes(s[1]))return s;if(f.includes(s[1]))return"hidden"===n.volumePosition&&(s[1]=""),s;if(p.includes(s[1]))return"hidden"===n.dynamicPosition&&(s[1]=""),s;var o=m.findIndex((function(e){return s[1]===e[0]}));return o>=0?(s[1]=m[o][1],s):(o=g.findIndex((function(e){return s[1]===e[0]})))>=0?(s[1]=g[o][1],"hidden"===n.dynamicPosition&&(s[1]=""),s):"!"!==e[t]||1!==s[0]&&"!"===e[t+s[0]-1]?(i("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},P=function(e,t){for(var r=t;a.isWhiteSpace(e[t]);)t++;return[t-r]},L=function(e,t){var r=a.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return i(r.warn,e,t),[r.len,""];for(var n=0;n="2"&&e[t+1]<="9"?(void 0!==r.triplet?i("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=w[r.triplet],r.num_notes=r.triplet,t+2="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):i("expected number after the two colons after the triplet to mark the duration",e,t):t+3="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):i("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-n,r};T.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};n.partForNextLine.title&&(e.part=n.partForNextLine),e.clef=n.currentVoice&&void 0!==n.staves[n.currentVoice.staffNum].clef?Object.assign({},n.staves[n.currentVoice.staffNum].clef):Object.assign({},n.clef);var t=n.currentVoice?n.currentVoice.scoreTranspose:0;if(e.key=l.standardKey(n.key.root+n.key.acc+n.key.mode,n.key.root,n.key.acc,t),e.key.mode=n.key.mode,n.key.impliedNaturals&&(e.key.impliedNaturals=n.key.impliedNaturals),n.key.explicitAccidentals)for(var r=0;r=0?(r.duration=s.getBarLength(),r.rest.text=1,d="Zduration"):(i&&0!==n.next_note_duration?(r.duration=n.default_length*n.next_note_duration,n.next_note_duration=0,u=!0):r.duration=n.default_length,d="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===d||"duration"===d){var p=a.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index"!==e[t])return r;t--,d="broken_rhythm";break;case">":case"<":if(!l(d))return null;if(!i)return r.endChar=t,r;var g=D(e,t);t+=g[0]-1,n.next_note_duration=g[2],r.duration=g[1]*r.duration,d="end_slur";break;default:return l(d)?(r.endChar=t,r):null}if(++t===e.length)return l(d)?(r.endChar=t,r):null}return null},D=function(e,t){switch(e[t]){case">":return t"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],e.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],e.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",e.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],e.exports.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},e.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},e.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},e.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}},1881:function(e,t,r){var a=r(5008),i=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},a=this.skipWhiteSpace(e);if(r(e,a))return{len:0};var i=e.substring(a,a+3).toLowerCase();switch((i.length>1&&" "===i[1]||"^"===i[1]||"_"===i[1]||"="===i[1])&&(i=i[0]),i){case"mix":return{len:t(e,a),token:"Mix"};case"dor":return{len:t(e,a),token:"Dor"};case"phr":return{len:t(e,a),token:"Phr"};case"lyd":return{len:t(e,a),token:"Lyd"};case"loc":return{len:t(e,a),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,a),token:"m"};case"maj":case"ion":return{len:t(e,a),token:""}}return{len:0}},this.getClef=function(e,t){var i=e,n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var s=!1,o=e.substring(n);if(a.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),n+=5),0===o.length&&s)return{len:n+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(n+=c,o=o.substring(c));var l=null;if(a.startsWith(o,"treble"))l="treble";else if(a.startsWith(o,"bass3"))l="bass3";else if(a.startsWith(o,"bass"))l="bass";else if(a.startsWith(o,"tenor"))l="tenor";else if(a.startsWith(o,"alto2"))l="alto2";else if(a.startsWith(o,"alto1"))l="alto1";else if(a.startsWith(o,"alto"))l="alto";else if(!t&&s&&a.startsWith(o,"none"))l="none";else if(a.startsWith(o,"perc"))l="perc";else if(!t&&s&&a.startsWith(o,"C"))l="tenor";else if(!t&&s&&a.startsWith(o,"F"))l="bass";else{if(t||!s||!a.startsWith(o,"G"))return{len:n+5,warn:"Unknown clef specified: "+i};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:n+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e[t+r];)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},a=this.skipWhiteSpace(e);if(r(e,a))return{len:0};var i=null;switch(e[a]){case"^":case"_":case"=":i=e[a];break;default:return{len:0}}if(a++,r(e,a))return{len:1,warn:"Expected note name after accidental"};switch(e[a]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:a+1,token:{acc:t[i],note:e[a]}};case"^":case"_":case"/":if(i+=e[a],a++,r(e,a))return{len:2,warn:"Expected note name after accidental"};switch(e[a]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:a+1,token:{acc:t[i],note:e[a]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var a=e.indexOf("%",t);for(a>=0&&a="A"&&e<="Z"||e>="a"&&e<="z"},n=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,a){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t=r?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(a+1,i))}}for(var n=a;n=0?a.strip(e.substring(0,t)):a.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var a=e.shift();if("."===a.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(a=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};a=e.shift()}switch(a.token){case"pt":case"px":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(a),{used:t,value:parseFloat(r)}}};var d=function(e){return e=(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,r,a){for(var i=a||e[t],n=t+1,s=!1;ne.length-1&&(n=e.length-1),[n-t+1,d(e.substring(t+1,n)),!1])}};i.prototype.peekLine=function(){return this.lines[this.lineIndex]},i.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex11&&(f%=12);var p="m"===t[0]?l[f]:c[f],m=p+t,g=n(m);g.length>0&&"flat"===g[0].acc&&(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==h[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==h[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),u?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:a}},s.chordName=function(e,t){return i(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var h=["c","d","e","f","g","a","b"],d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},u={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};s.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var i=t.accidental?t.name.substring(1):t.name,n=t.accidental?t.name[0]:"",s=a.pitchIndex(i);t.name=n+a.noteName(s+e.localTransposeVerticalMovement)}if(t.accidental){var o=function(e,t,r,a,i){for(var n=h[(e+49)%7],s=0,o=0;o2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=o[0],t.accidental=u[o[1]],t.name&&(t.name=f[o[1]]+t.name.replace(/[_^=]/g,""))}}},e.exports=s},867:function(e){var t={},r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];t.pitchIndex=function(e){return r.indexOf(e)},t.noteName=function(e){return r[e]},e.exports=t},4208:function(e){var t=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],i=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];e.exports=function(e,n,s,o){if(!n||n%12==0)return e;for(;n<0;)n+=12;n>11&&(n%=12);var c=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return e;var l,h=c[1],d=c[2],u=c[3],f=c[4];return(l=t.indexOf(h))<0&&(l=r.indexOf(h)),l<0&&(l=a.indexOf(h)),l<0&&(l=i.indexOf(h)),l<0||(l+=n,l%=12,e=s?o?i[l]:r[l]:o?a[l]:t[l],d&&(e+=d),u&&((l=t.indexOf(u))<0&&(l=r.indexOf(u)),l<0&&(l=a.indexOf(u)),l<0&&(l=i.indexOf(u)),e+="/",l>=0?(l+=n,l%=12,e+=s?o?i[l]:r[l]:o?a[l]:t[l]):e+=u),f&&(e+=f)),e}},575:function(e,t,r){var a=r(9708);function n(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t0&&o[l].voice.push({el_type:"note",duration:d,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),o[l].voice.push(g)),d=0):"note"===g.el_type?u?o[l].voice.push(g):(d+=g.duration,r[a]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type&&"color"!==g.el_type||o[l].voice.push(g);else{t=!0,u=!0,p=m,o[l].hasOverlay=!0,0===f&&(f=r[a]);for(var v=0;v=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:r[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}o[l].hasOverlay&&0===o[l].snip.length&&o[l].snip.push({start:p,len:h.length-p})}for(l=0;l=0;y--){var x=b.snip[y];s.voices[l].splice(x.start,x.len),s.voices[l].splice(x.start+1,0,{el_type:"stem",direction:"auto"});var k=c(s.voices[l],x.start);s.voices[l].splice(k,0,{el_type:"stem",direction:"up"})}for(y=0;y0&&"bar"!==e[r].el_type;r--);return r}function l(e,t,r,a){var i;a[t]||(a[t]=[]),a[t][r]||(a[t][r]=[]);for(var n=function(e,n,s){if(void 0===a[t][r][s]){for(i=0;i=t&&ot;){if(e[t].staff)return e[t];t++}return null}function u(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function f(e){for(var t=0;t0){if(void 0!==a.voices[0]){for(var i=!1,n=0;n0&&x[x.length-1].barNumber){var w=d(e.lines,b);w&&(w.staff[0].barNumber=x[x.length-1].barNumber),delete x[x.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,i},this.addTieToLastNote=function(t){var r=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var a=t[r];if("note"===a.el_type)return a}return null}(e);return!!(r&&r.pitches&&r.pitches.length>0)&&(r.pitches[0].startTie={},t&&(r.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(a,n,s,o){var c;return o.el_type=a,null!==n&&(o.startChar=n),null!==s&&(o.endChar=s),"note"===a?((c=o).duration?c.duration:0)>=.25||o.force_end_beam_last&&void 0!==e.potentialStartBeam?g(e):o.end_beam&&void 0!==e.potentialStartBeam?void 0===o.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(o,e):g(e):void 0===o.rest&&(void 0===e.potentialStartBeam?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o):g(e),delete o.end_beam,delete o.force_end_beam_last,o.rest&&"invisible"===o.rest.type&&delete o.decoration,!(e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum||(function(e,t,r,a,i){var n=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==r.pitches){var s=n.workingClef.verticalPos;r.pitches.forEach((function(e){e.verticalPos=e.pitch-s}))}if(void 0!==r.gracenotes){var o=n.workingClef.verticalPos;r.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}n.voices.length<=t.voiceNum&&(a[i]||(a[i]={}),y(e,t,a[i])),n.voices[t.voiceNum].push(r)}(t,e,o,r,i),0))},this.appendStartingElement=function(t,r,a,i){var n;u(e),"key"===t&&(n=i.impliedNaturals,delete i.impliedNaturals,delete i.explicitAccidentals);var s=Object.assign({},i);if(e.lines[e.lineNum]){var o=e.lines[e.lineNum].staff;if(o){o.length<=e.staffNum&&(o[e.staffNum]={},o[e.staffNum].clef=Object.assign({},o[0].clef),o[e.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[e.staffNum].meter=Object.assign({},o[0].meter)),o[e.staffNum].workingClef=Object.assign({},o[0].workingClef),o[e.staffNum].voices=[[]]),"clef"===t&&(o[e.staffNum].workingClef=s);for(var c=o[e.staffNum].voices[e.voiceNum],l=0;l0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r,a){e.staffNum=t,e.voiceNum=r,i=a;for(var n=0;n0?(r.push(n-1),a.push(Math.round(i-s)),i=s):ns&&us?(l.push(u-1),c++,o=Math.max(o,s),s=Math.abs(a-t[c]),n.push(i-f),i=f):s=p}n.push(i)}function i(e,t,r,i){for(var n=Math.ceil(e.total/t),s=Math.floor(e.total/n),o=[],c=0;ct&&(s=!0),o%r==r-1&&(o!==e.length-1&&a.push(o),i.push(Math.round(n)),n=0);return{failed:s,totals:i,lineBreaks:a}}e.exports={wrapLines:function(e,t,r){if(t&&0!==e.lines.length){var a=e.deline({lineBreaks:!1}),i=function(e,t){for(var r=[],a=0,i=0,n=0,s=0;s0&&(a[c.line].staff[c.staff].barNumber=s);for(var h=Object.keys(l),d=0;d=0;p--)if("key"===f[p].el_type){i[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){n[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==r&&0===c.staff&&0===c.voice)for(p=0;p0&&p.measureWidths.length<25&&(k=i(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}d.push(y),u.push(b)}var w=function(e,t,r){var a={lineBreaks:e,staffwidth:t};for(var i in r)r.hasOwnProperty(i)&&"wrap"!==i&&"staffwidth"!==i&&(a[i]=r[i]);return{revisedParams:a}}(d,a.staffwidth,a);return w.explanation=u,w.reParse=!0,w}}},9716:function(e,t,r){var a,i=r(7207),n=r(5058);!function(){"use strict";var e,t,r,s,o,c,l,h,d,u,f,p,m,g,v,b,y,x,k=1,w={num:4,den:4},T=128,C=!0,S=105,E=95,N=85,M=.25,_=0,A={},B=0;function P(e){for(var t=d.length-1;t>=0;t--)if("program"===d[t].cmd)return void(d[t].channel=e)}function L(e){return e/1e6}function z(e){return Math.round(e*k*1e6)/1e6}function O(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function H(e,t){var r=t.start,a=t.duration,i=z(1/32);switch(e){case"trill":for(var n=1;a>0;)d.push({cmd:"note",pitch:t.pitch+n,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n=1===n?0:1,a-=i,r+=i;break;case"mordent":d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h});break;case"lowermordent":d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h});break;case"turn":i=t.duration/5,d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+i,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+2*i,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+3*i,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+4*i,duration:i,gap:0,instrument:h});break;case"roll":for(;a>0;)d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=2*i,r+=2*i}}function D(e,t){var r,a=function(e,t){if(t)return 0;var r;if(null!=g)r=g,g=void 0;else if(C)if(B>e)r=N;else{var a=(e-m)/O(w);r=0===a?S:parseInt(a,10)===a?E:N}else r=E;return v&&(r+=v,v=void 0),r<0&&(r=0),r>127&&(r=127),t?0:r}(L(e.time),t);if(p.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,a=0,i=[],s=0;s0?I.endType="tenuto":u&&(I.endType=u),I.endType){case"tenuto":I.gap=-.001;break;case"staccato":var V=.4*I.duration;I.gap=o/60*V;break;default:I.gap=0}d.push(I)}}}d.length}var j=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);f=Math.max(f,L(e.time)+z(j))}a=function(a,n,T,z){n||(n={}),z||(z={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=n.qpm,c=void 0,k=1,l=void 0,h=void 0,d=void 0,u=void 0,f=0,x=T,w={num:4,den:4},C=!0,S=105,E=95,N=85,M=.25,g=void 0,v=void 0,_=0,b=[],A={},y=1,a.length>0&&a[0].length>0&&(B=a[0][0].pickupLength),void 0===n.bassprog||z.bassprog||(z.bassprog=[n.bassprog]),void 0===n.bassvol||z.bassvol||(z.bassvol=[n.bassvol]),void 0===n.chordprog||z.chordprog||(z.chordprog=[n.chordprog]),void 0===n.chordvol||z.chordvol||(z.chordvol=[n.chordvol]),void 0===n.gchord||z.gchord||(z.gchord=[n.gchord]),p=new i(a.length,n.chordsOff,z,w),function(e,t){for(var r=0;r=0)&&(F=!0);for(var Y=0;Y0&&"program"===d[d.length-1].cmd)d[d.length-1].instrument=j.program;else{var X;for(X=d.length-1;X>=0&&"program"!==d[X].cmd;X--);(X<0||d[X].instrument!==j.program)&&d.push({cmd:"program",channel:0,instrument:j.program})}break;case"channel":P(j.channel);break;case"drum":A=G(j.params),W();break;case"gchordOn":p.gChordOn(j);break;case"beat":S=j.beats[0],E=j.beats[1],N=j.beats[2];break;case"vol":g=j.volume;break;case"volinc":v=j.volume;break;case"beataccents":C=j.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(j);break;default:console.log("MIDI creation. Unknown el_type: "+j.el_type+"\n")}}void 0===d[0].instrument&&(d[0].instrument=l||0),u&&d.unshift(u),s.push(d),p.finish(),b.length}return n.detuneOctave&&function(e,t){for(var r={},a=0;a1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(i=0;!h&&i0&&s.push(b),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var I=[0,2,4,5,7,9,11];function F(a){if(void 0!==a.midipitch)return a.midipitch;var i=a.pitch;if(a.accidental)switch(a.accidental){case"sharp":e[i]=1;break;case"flat":e[i]=-1;break;case"natural":e[i]=0;break;case"dblsharp":e[i]=2;break;case"dblflat":e[i]=-2;break;case"quartersharp":e[i]=.25;break;case"quarterflat":e[i]=-.25}var n=12*function(e){return Math.floor(e/7)}(i)+I[j(i)]+60;return void 0!==e[i]?n+=e[i]:n+=t[j(i)],n+=r}function V(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function j(e){return(e%=7)<0&&(e+=7),e}function G(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],a="",i=0,n=0;n=0)return a;return a}function n(e,t,r){for(var a=Math.min(e.length,t+3),i=t;i=0)return e[i].decoration[n];return null}function s(e){for(var t=0;t=0&&"bar"!==r[a].el_type;)r[a].noChordVoice=!0,a--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var a=60;return e.bpm&&(a=e.bpm),r*a/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}a=function(a,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;a.visualTranspose&&(g-=a.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",x=h.drumBars||1,k=h.drumIntro||0,w=""!==y,T=!!h.drumOff,C=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),x=parseInt(x,10),k=parseInt(k,10);var S=a.formatting.bagpipes;S&&(m=71);var E=[];if(a.formatting.midi){var N=a.formatting.midi;N.program&&N.program.length>0&&(m=N.program[0],N.program.length>1&&(m=N.program[1],v=N.program[0]),b=!0),N.transpose&&(g=N.transpose[0]),N.channel&&(v=N.channel[0],b=!0),N.drum&&(y=N.drum),N.drumbars&&(x=N.drumbars[0]),N.drumon&&(w=!0),10===v&&(m=t),N.beat&&E.push({el_type:"beat",beats:N.beat}),N.nobeataccents&&E.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):a.metaText.tempo?c(a.metaText.tempo,a.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var M=[];S&&M.push({el_type:"bagpipes"}),M.push({el_type:"instrument",program:m}),v&&M.push({el_type:"channel",channel:v}),g&&M.push({el_type:"transpose",transpose:g}),M.push({el_type:"tempo",qpm:p});for(var _=0;_=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(A=a[t].slice(0),B[W].push({el_type:"beat",beats:A.slice(0)}),P[R]=!1,L[R]=!1),e.decoration.indexOf("crescendo(")>=0){var i=r(U,te,"crescendo)"),s=Math.min(127,A[0]+50),o=n(U,te+i+1,Object.keys(a));o&&(s=a[o][0]),P[R]=i>0&&Math.floor((s-A[0])/i),L[R]=!1}else if(e.decoration.indexOf("crescendo)")>=0)P[R]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=r(U,te,"diminuendo)"),l=Math.max(15,A[0]-50),h=n(U,te+c+1,Object.keys(a));h&&(l=a[h][0]),P[R]=!1,L[R]=c>0&&Math.floor((l-A[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(L[R]=!1)},G=Y.staff,W=0,q=0;q=0?B[W].push({el_type:"transpose",transpose:-12}):X.clef.type.indexOf("+8")>=0&&B[W].push({el_type:"transpose",transpose:12})),a.formatting.midi&&a.formatting.midi.drumoff&&(B[W].push({el_type:"bar"}),B[W].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,J=0,Z=0,ee=0;A=[105,95,85,1];for(var te=0;te=0?B[W].push({el_type:"transpose",transpose:-12}):re.type.indexOf("+8")>=0&&B[W].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(re,a.getBeatLength()),B[W].push({el_type:"tempo",qpm:p,timing:z[W]}),O[""+z[W]]={el_type:"tempo",qpm:p,timing:z[W]};break;case"bar":Q>0&&B[W].push({el_type:"bar"}),j(re),Q=0;var se="bar_right_repeat"===re.type||"bar_dbl_repeat"===re.type,oe="1"===re.startEnding,ce="bar_left_repeat"===re.type||"bar_dbl_repeat"===re.type||"bar_right_repeat"===re.type;if(se){var le=H[W];le||(le=0);var he=D[W];he||(he=B[W].length);for(var de=le;de=0&&n!==t[""+o.timing].qpm&&(n=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[a].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(B,O),k)for(var pe=a.getPickupLength(),me=0;mege;)ge++;if(B[me].length>ge){for(ne=0;ne0&&B[0].length>0&&(B[0][0].pickupLength=a.getPickupLength()),B}}(),e.exports=a},7207:function(e){var t=function(e,t,r,a){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=a,this.tempoChangeFactor=1,this.bassInstrument=r.bassprog&&r.bassprog.length>=1?r.bassprog[0]:0,this.chordInstrument=r.chordprog&&r.chordprog.length>=1?r.chordprog[0]:0,this.bassOctaveShift=r.bassprog&&2===r.bassprog.length?r.bassprog[1]:0,this.chordOctaveShift=r.chordprog&&2===r.chordprog.length?r.chordprog[1]:0,this.boomVolume=r.bassvol&&1===r.bassvol.length?r.bassvol[0]:64,this.chickVolume=r.chordvol&&1===r.chordvol.length?r.chordvol[0]:48,r.gchord&&r.gchord.length>0?this.overridePattern=i(r.gchord[0]):this.overridePattern=void 0};function r(e,t,r,i){var n=[];if(!e)return n;t.indexOf("boom")>=0?n.push(r?e.boom:e.boom2):i&&n.push(e.boom);var s=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,n(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},t.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},t.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=i(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},t.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},t.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},t.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t=0)return"break"}return null},t.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var a=this.transpose;a<-8;)a+=12;for(;a>8;)a-=12;var i,n=r+=a,s=(r+=12*this.bassOctaveShift)-5;1===e.length&&(i=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(n--,r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(n++,r++,s++,o=o.substring(1));var l=o.split("/");if((i=this.chordNotes(n,l[0])).length>=3&&(s=s+(i[2]-i[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=this.basses[l[1].substring(0,1)]+h+a,s=r+=12*this.bassOctaveShift}return{boom:r,boom2:s,chick:i}}}},t.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var a=[],i=0;i0&&c[d-1]&&c[d]&&c[d-1].boom!==c[d].boom&&(u=!0);var p=l[d],m=p.indexOf("boom")>=0,g=!m&&0!==d&&l[0].indexOf("boom")>=0&&(!c[d-1]||c[d-1].boom!==c[d].boom),v=r(c[d],p,u,g);m&&(u=!1);for(var b=0;b4)for(i=i.toLowerCase(),t-=5;t>0;)i+="'",t--;else for(;t<4;)i+=",",t++;return i}}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},2426:function(e,t,r){var a=r(6074),i={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},n={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new a),this.inited=!0);var n=null;if(r.tablature){var s=r.tablature;n=[];for(var o=0;o0)for(var i=r.length,n=0;n1&&r&&r.length>0)for(i=r.length,n=0;n=0;a--)if(t.pitch+t.pitchAltered>=e.stringPitches[a]){var i=t.pitch+t.pitchAltered-e.stringPitches[a];return"^"===t.quarter?i-=.5:"v"===t.quarter&&(i+=.5),{num:Math.round(i),str:e.stringPitches.length-1-a,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function l(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}function h(e){var t=e.tuning,r=e.capo,s=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var o=0;o0&&(this.capoTuning=function(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var a=0;a0&&(r=e.capoTuning);for(var a=r.length-1,i=0;i1?(o=s(this,e)).error&&(n=o.error):e[0].endTie||((r=new i(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(a=c(this,r))?o.push(a):(l(o,r),n=o.error))),n)return o;var h=null;if(t){h=[];for(var d=0;d0&&(r+=" capo:"+e.capo),t=t.replace("%T",r)),t}return""},h.prototype.suppress=function(e){return!!e.params.suppress},e.exports=h},8918:function(e){function t(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}t.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},t.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var a=this.bar.pitch2/2;if("dots.dot"==e.name)return r?(t.pitch=a,!1):(t.pitch=a+this.lineSpace,!0)}return r},e.exports=t},6776:function(e,t,r){var a=r(2842),i=a.noteToMidi,n=a.midiToNote;function s(e,t){var r=i(e);t&&(r+=t);var a,s=n(r),o=!1,c=!1,l=null,h=null,d=!1,u=0;e.startsWith("_")?(o=!0,u=-1,"/"==e[1]?(o=!1,h="v",u=0):"_"==e[1]&&(d=!0,u-=1)):e.startsWith("^")?(c=!0,u=1,"/"==e[1]?(c=!1,h="^",u=0):"^"==e[1]&&(d=!0,u+=1)):e.startsWith("=")&&(l=!0,u=0),((a=o||c||null!=h)||l)&&(s=null!=h||d?e.slice(2):e.slice(1));var f=(s.match(/,/g)||[]).length,p=(s.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=s,this.acc=u,this.isSharp=c,this.isKeySharp=!1,this.isDouble=d,this.isAltered=a,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=h,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}s.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},s.prototype.isLowerThan=function(e){return e.pitch>this.pitch},s.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var r=this.name,a=0;a=0){if(r===t)return e.extra[a].x+e.extra[a].w/2;r++}return-1}function f(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function p(e,t,r){var a=e.semantics.notesToNumber(t,r);if(a.error)return e.setError(a.error),a;if(a.graces&&a.notes){var i=a.notes.length-1;a.notes[i].graces=a.graces}return a}function m(e,t,r,a,i){for(var n=0;n=0&&(e.semantics.clefTranspose=-12),k.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),k.type){case"staff-extra key-signature":this.accidentals=k.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var C=!1;x===g.children.length-1&&(C=!0);var S=o(k,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var E=0;E0&&(y.abselem=M,r.push(y),v.children.push(M))}}},e.exports=h},4785:function(e,t,r){var a=r(3197),i=r(4240),n=r(4331);function s(e,t,r){var a=e.semantics,i=t.controller.getTextSize,n=a.tabInfos(e),s=!0;if(a.suppress(e)&&(s=!1),s){var o=i.calc(n,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:o.height,width:o.width},name:n},o.height}return 0}function o(e,t){return!(!t[e].isTabStaff||e!==t.length-1&&t[e+1].isTabStaff)}function c(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function l(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}e.exports=function(e,t,r,h){var d=new i,u={clef:{type:"TAB"}},f=e.linePitch*e.nbLines,p=r.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void e.setError("No tablatures when stafflines=0");p.splice(p.length,0,u)}var g=r.staffGroup,v=g.voices,b=function(e){for(var t=0,r=0;rt&&(t=a.specialY.lyricHeightBelow)}return t}(v[0]),y=h,x=g.staffs[y],k=f+3-x.bottom-b;x.isTabStaff&&(k=x.top);var w={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:k},T=function(e,t){for(var r=0,a=0,i=0;;){if(!t[r])return-1;if(t[r].isTabStaff||(i=t[r].voices.length),t[r].isTabStaff){if(a++,o(r,t)&&a=e){if(r+1==t.length)return r+1;if(!t[r+1].isTabStaff)return r+1}if(++r>t.length)return-1}}(h,g.staffs);if(-1!==T){w.parentIndex=T-1,g.staffs.splice(T,0,w),g.height+=f+3;var C=function(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}(g.staffs,T),S=1;(function(e,t){return 1===function(e){for(var t=0,r=0;r1})(g.staffs,C)&&(S=C.voices.length),u.voices=[];for(var E=0;E0&&(N.duplicate=!0);var M=s(e,t,N)/n.STEP;M=Math.max(M,1),g.staffs[h].top+=1,g.height+=M,N.staff=w;var _=v.length;v.splice(v.length,0,N);var A=l(v,E+h);u.voices[E]=[],d.build(e,v,u.voices[E],E,h,A,_)}!function(e){for(var t=0;t0&&(n[0].invisible=!0);break;case"meter":n[0]=l(i,this.tuneNumber),this.startlimitelem=n[0],r.duplicate&&n.length>0&&(n[0].invisible=!0);break;case"clef":if(n[0]=s(i,this.tuneNumber),!n[0])return null;r.duplicate&&n.length>0&&(n[0].invisible=!0);break;case"key":var h=o(i,this.tuneNumber);h&&(n[0]=h,this.startlimitelem=n[0]),r.duplicate&&n.length>0&&(n[0].invisible=!0);break;case"stem":this.stemdir="auto"===i.direction?void 0:i.direction;break;case"part":var d=new a(i,0,0,"part",this.tuneNumber),u=this.getTextSize.calc(i.title,"partsfont","part");d.addFixedX(new f(i.title,0,0,void 0,{type:"part",height:u.height/p.STEP})),n[0]=d;break;case"tempo":var m=new a(i,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(i,this.tuneNumber,c)),n[0]=m;break;case"style":"normal"===i.head?delete this.style:this.style=i.head;break;case"hint":C=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=i.size;break;case"color":this.voiceColor=i.color,r.color=this.voiceColor;break;default:var v=new a(i,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+i.el_type,0,0,void 0,{type:"debug"})),n[0]=v}return n},E.prototype.createBeam=function(e,t,r){var a=[],n=new i(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);C&&n.setHint();for(var s=0;se.pitches[r+1].pitch){t=!1;var a=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=a}}while(!t)},A=function(e,t,r,a,i,n,s,o,c){for(var l=r;l>11;l--)l%2!=0||a||e.addFixed(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||a||e.addFixed(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l1&&(p=new i(n,"grace",s),C&&p.setHint(),p.mainNote=r);var m=[];for(d=e.gracenotes.length-1;d>=0;d--)o+=10,m[d]=o,e.gracenotes[d].accidental&&(o+=7);for(d=0;d=6?"down":"up";for(a&&(E=a),(i=t.style?t.style:i)&&"normal"!==i||(i="note"),(m=n?S[i].nostem:S[i][-s])||console.log("noteSymbol:",i,s,n),g="down"===E?t.pitches.length-2:1;"down"===E?g>=0:g11||M.verticalPos<1)&&x.push(M.verticalPos-M.verticalPos%2),"down"===E?b=u.getSymbolWidth(m)+2:v=u.getSymbolWidth(m)+2)}var A=t.pitches.length;for(g=0;g0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=H.accidentalshiftx,y=Math.max(y,H.dotshiftx)}if(O){var D=Math.round(70*this.voiceScale)/10,I="down"===E?t.minpitch-D:t.minpitch+1/3;I>6&&!a&&(I=6);var F="down"===E?t.maxpitch-1/3:t.maxpitch+D;F<6&&!a&&(F=6);var V="down"===E||0===e.heads.length?0:e.heads[0].w,Y="down"===E?1:-1;h&&"noteheads.slash.quarter"===h.c&&("down"===E?F-=1:I+=1),h&&"noteheads.triangle.quarter"===h.c&&("down"===E?F-=.7:I-=1.2),e.addRight(new f(null,V,0,I,{type:"stem",pitch2:F,linewidth:Y,bottom:I-1})),d=Math.min(I,F)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:d,additionalLedgers:x,dir:E,symbolWidth:C}},E.prototype.addLyric=function(e,t){var r="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var a=this.getTextSize.calc(r,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,a.width,void 0,{type:"lyric",position:i,height:a.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},E.prototype.createNote=function(e,t,r,i){var n,s=null,o=0,l=0,h=0,d=[],p=T(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y1,this.stemdir,r,g,this.voiceScale);s=M.noteHead,o=M.roomTaken,l=M.roomTakenRight}else{var _=this.addNoteToAbcElement(N,e,v,this.stemdir,this.style,m,g,t,i);void 0!==_.min&&(this.minY=Math.min(_.min,this.minY)),s=_.noteHead,o=_.roomTaken,l=_.roomTakenRight,d=_.additionalLedgers,n=_.dir,h=_.symbolWidth}if(void 0!==e.lyric&&this.addLyric(N,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,i,N,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration){var B=t&&"up"!==n?Math.min(-3,N.bottom-6):N.bottom;this.decoration.createDecoration(i,e.decoration,N.top,s?s.w:0,N,o,n,B,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&N.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),A(N,e.minpitch,e.maxpitch,e.rest,h,d,n,-2,1),void 0!==e.chord){var P=x(this.getTextSize,N,e,o,l,h,this.jazzchords,this.germanAlphabet);o=P.roomTaken,l=P.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),N},E.prototype.addSlursAndTies=function(e,t,r,a,i,n){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o10&&"treble"===t.abcelem.type?13:11;t.addFixed(new f(e,a,r.width,i+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},E.prototype.createBarLine=function(e,t,r){var i=new a(t,0,10,"bar",this.tuneNumber),n=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,i);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,u="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||u){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(i);this.startlimitelem=i}if(o&&(i.addRight(new f("dots.dot",s,1,7)),i.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(n=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(n)),"bar_invisible"===t.type&&(n=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),i.addRight(n)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,i,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),l&&(n=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),i.addRight(n),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=n,this.partstartelem=null),h&&(n=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(n)),u&&(s+=3,i.addRight(new f("dots.dot",s,1,7)),i.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;i.minspacing+=m+10,this.partstartelem=new d(t.startEnding,n,null),e.addOther(this.partstartelem)}return i.extraw-=5,void 0!==t.chord&&x(this.getTextSize,i,t,0,0,0,!1,this.germanAlphabet),i},e.exports=E},2652:function(e,t,r){var a=r(6658),i=r(4331),n=r(5810);function s(e,t,r,s,o,c,l,h,d,u,f,p,m,g,v){for(var b=e.split("\n"),y=b.length-1;y>=0;y--){var x,k=b[y],w=0;s||(k=n(k,g,v));var T=h.calc(k,o,c),C=T.width,S=T.height/i.STEP;switch(t){case"left":w=-(f+=C+7),x=u.averagepitch,d.addExtra(new a(k,w,C+4,x,{type:"text",height:S,dim:l,position:"left"}));break;case"right":w=p+=4,x=u.averagepitch,d.addRight(new a(k,w,C+4,x,{type:"text",height:S,dim:l,position:"right"}));break;case"below":d.addRight(new a(k,0,0,void 0,{type:"text",position:"below",height:S,dim:l,realWidth:C}));break;case"above":d.addRight(new a(k,0,0,void 0,{type:"text",position:"above",height:S,dim:l,realWidth:C}));break;default:if(r){var E=r.y+3*i.STEP;d.addRight(new a(k,w+r.x,0,u.minpitch+E/i.STEP,{position:"relative",type:"text",height:S,dim:l}))}else{var N="above";u.positioning&&u.positioning.chordPosition&&(N=u.positioning.chordPosition),"hidden"!==N&&d.addCentered(new a(k,m/2,C,void 0,{type:"chord",position:N,height:S,dim:l,realWidth:C}))}}}return{roomTaken:f,roomTakenRight:p}}e.exports=function(e,t,r,a,i,n,o,c){for(var l=0;l0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(u=3,d=0),o.addRight(new n("8",5+d,i.getSymbolWidth("8")*h,u,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},3923:function(e,t,r){var a=r(1409),i=r(6020),n=r(6658);e.exports=function(e,t){if(e.el_type="keySignature",!e.accidentals||0===e.accidentals.length)return null;var r=new a(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var s=0;return e.accidentals.forEach((function(e){var t,a=0;switch(e.acc){case"sharp":t="accidentals.sharp",a=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",a=-1.2;break;case"quartersharp":t="accidentals.halfsharp",a=-2.5;break;case"quarterflat":t="accidentals.halfflat",a=-1.2;break;default:t="accidentals.flat"}r.addRight(new n(t,s,i.getSymbolWidth(t),e.verticalPos,{thickness:i.symbolHeightInPitches(t),top:e.verticalPos+i.symbolHeightInPitches(t)+a,bottom:e.verticalPos+a})),s+=i.getSymbolWidth(t)+2}),this),r}},2143:function(e,t,r){var a=r(6020),i=r(6658);e.exports=function(e,t,r,n){n||(n={});var s,o=void 0!==n.dir?n.dir:null,c=void 0!==n.headx?n.headx:0,l=void 0!==n.extrax?n.extrax:0,h=void 0!==n.flag?n.flag:null,d=void 0!==n.dot?n.dot:0,u=void 0!==n.dotshiftx?n.dotshiftx:0,f=void 0!==n.scale?n.scale:1,p=void 0!==n.accidentalSlot?n.accidentalSlot:[],m=void 0!==n.shouldExtendStem&&n.shouldExtendStem,g=void 0===n.printAccidentals||n.printAccidentals,v=r.verticalPos,b=0,y=0,x=0;if(void 0===t)e.addFixed(new i("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new i(null,0,0,v);else{var k=c;if(r.printer_shift){var w="same"===r.printer_shift?1:0;k="down"===o?-a.getSymbolWidth(t)*f+w:a.getSymbolWidth(t)*f-w}var T={scalex:f,scaley:f,thickness:a.symbolHeightInPitches(t)*f,name:r.name};if((s=new i(t,k,a.getSymbolWidth(t)*f,v,T)).stemDir=o,h){var C=v+("down"===o?-7:7)*f;m&&("down"===o&&C>6&&(C=6),"up"===o&&C<6&&(C=6));var S="down"===o?c:c+s.w-.6;e.addRight(new i(h,S,a.getSymbolWidth(h)*f,C,{scalex:f,scaley:f}))}for(y=s.w+u-2+5*d;d>0;d--){var E=1-Math.abs(v)%2;e.addRight(new i("dots.dot",s.w+u-2+5*d,a.getSymbolWidth("dots.dot"),v+E))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var N;switch(r.accidental){case"quartersharp":N="accidentals.halfsharp";break;case"dblsharp":N="accidentals.dblsharp";break;case"sharp":N="accidentals.sharp";break;case"quarterflat":N="accidentals.halfflat";break;case"flat":N="accidentals.flat";break;case"dblflat":N="accidentals.dblflat";break;case"natural":N="accidentals.nat"}for(var M=!1,_=l,A=0;A=6){p[A][0]=v,_=p[A][1],M=!0;break}!1===M&&(_-=a.getSymbolWidth(N)*f+2,p.push([v,_]),b=a.getSymbolWidth(N)*f+2);var B=a.symbolHeightInPitches(N);e.addExtra(new i(N,_,a.getSymbolWidth(N),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),x=a.getSymbolWidth(N)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:x}}},2525:function(e,t,r){var a=r(1409),i=r(6020),n=r(6658);e.exports=function(e,t){e.el_type="timeSignature";var r=new a(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o",a)),o&&e.addOther(new i(o.start,o.stop,"<",a)),c&&e.addOther(new n(c.start,c.stop))},l.prototype.createDecoration=function(e,t,r,i,n,l,d,u,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,i){for(var n=0;n9&&u++;var m=a/2;"center"!==s.getSymbolAlign(p)&&(m-=s.getSymbolWidth(p)/2),i.addFixedX(new o(p,m,s.getSymbolWidth(p),u))}if("slide"===t[f]&&i.heads[0]){var g=i.heads[0].pitch,v=new o("",-n-15,0,(g-=2)-1),b=new o("",-n-5,0,g+1);i.addFixedX(v),i.addFixedX(b),e.addOther(new c({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===u&&(u=r),{above:u,below:i.bottom}}(e,t,r,i,n,l,d,u,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,u),function(e,t,r,a,i,n,c,l){function h(e,t){"above"===e?a.above+=t:a.below-=t}function d(e){var t;return"above"===e?(t=a.above)c&&(t=c),t}function u(e,a,i){var n=d(a);r.addFixedX(new o(e,t/2,0,n+2,{type:"decoration",klass:"ornament",thickness:3,anchor:i})),h(a,5)}function f(e,a){var i=t/2;"center"!==s.getSymbolAlign(e)&&(i-=s.getSymbolWidth(e)/2);var n=s.symbolHeightInPitches(e)+1,c=d(a);c="above"===a?c+n/2:c-n/2,r.addFixedX(new o(e,i,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e),position:a})),h(a,n)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=0;mthis.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},n.prototype.addFixed=function(e){this._addChild(e)},n.prototype.addFixedX=function(e){this._addChild(e)},n.prototype.addCentered=function(e){var t=e.w/2;-tthis.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},n.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},n.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},n.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},n.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},n.prototype.setX=function(e){this.x=e;for(var t=0;tthis.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setStemDirection=function(){this.average=r(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},t.prototype.calcDir=function(){this.average=r(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",t=0;t0&&this.unalignedWords(e.unalignedWords,a,i,n,s),this.extraText(e,a,i,n,s),e.footer&&r&&this.footer(e.footer,t,a,s)}function s(e,t,r,a,n,s,o){r&&(t&&(r="string"==typeof r?t+r:[{text:t}].concat(r)),i(e,r,"historyfont",n=s?"abcjs-extra-text "+n:"","description",a,{absElemType:"extraText",anchor:"start"},o))}function o(e,t,r,n,s,o,c,l,h,d,u,f){if(r){l=u?"abcjs-extra-text "+l:"";var p=f.calc("A",s,l);if("string"==typeof r)t&&(r=t+"\n"+r),a(e,{marginLeft:n,text:r,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle",klass:l},f);else{e.push({startGroup:c,klass:l,name:h}),e.push({move:d.info}),t&&(a(e,{marginLeft:n,text:t,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle"},f),e.push({move:3*p.height/4}));for(var m=0;m0&&this.startVoice.staff.voices[0]===e)},e.exports=t},6891:function(e){e.exports=function(e,t,r,a){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===a?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},3185:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},8256:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},3736:function(e){e.exports=function(e,t,r,a,i,n){var s,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o)this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:a,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),s=n.calc(o,"textfont","defined-text"),this.rows.push({move:s.height});else if(o){for(var l=0,h=a,d="textfont",u=0;uthis.top&&(this.top=this.pitch2),this.bottom=a,void 0!==this.pitch2&&this.pitch20?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.name?this.name=i.name:this.c?this.name=this.c:this.name=this.type,i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},6994:function(e,t,r){var a=r(1716);e.exports=function(e,t,r,i,n,s,o,c){var l=c.calc("i",r,i);if(""===t)e.push({move:l.height});else{if("string"==typeof t)return void a(e,{marginLeft:s,text:t,font:r,klass:i,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:n},c);o.marginTop&&e.push({move:o.marginTop});var h=0,d={left:s,anchor:o.anchor,phrases:[]};i&&(d.klass=i),e.push(d);for(var u=0;u0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;te&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.exports=t},1134:function(e,t,r){var a=r(1716),i=r(6994);e.exports=function(e,t,r,n,s,o,c,l,h,d){if(this.rows=[],e.header&&o){var u=d.calc("X","headerfont","abcjs-header abcjs-meta-top").height;a(this.rows,{marginLeft:c,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-u,info:t.header,name:"header"},d),a(this.rows,{marginLeft:c+s/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-u,anchor:"middle",info:t.header,name:"header"},d),a(this.rows,{marginLeft:c+s,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-u,anchor:"end",info:t.header,name:"header"},d)}o&&this.rows.push({move:l.top});var f=r.titleleft?"start":"middle",p=r.titleleft?c:c+s/2;if(e.title){var m=h?"abcjs-title":"";i(this.rows,e.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:t.title},d)}if(n.length)for(var g=0;g0){var v=!(!e.composer&&!e.origin);m=h?"abcjs-rhythm":"",a(this.rows,{marginLeft:c,text:e.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:t.rhythm,name:"rhythm"},d)}e.composer&&e.composer,e.origin&&e.origin;var b=e.composer?e.composer:"";e.origin&&("string"==typeof b&&"string"==typeof e.origin?b+=" ("+e.origin+")":"string"==typeof b&&"string"!=typeof e.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(e.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(e.origin)).push({text:")"}))),b&&(m=h?"abcjs-composer":"",i(this.rows,b,"composerfont",m,"composer",c+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},d))}e.author&&e.author.length>0&&(m=h?"abcjs-author":"",i(this.rows,e.author,"composerfont",m,"author",c+s,{anchor:"end",absElemType:"author",info:t.author},d)),e.partOrder&&e.partOrder.length>0&&(m=h?"abcjs-part-order":"",i(this.rows,e.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},d))}},2096:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},e.exports=t},3197:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var d=0;d=0&&f.setAttribute("class","abcjs-notehead")}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m0?g.classList[0]+" ":"";g.setAttribute("class",v+t.overrideClasses)}if(h)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,c.add(t,g,!1,l);else{t.elemset.push(g);var b=!1;"note"!==t.type&&"tabNumber"!==t.type||(b=!0),c.add(t,g,b,l)}}else t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l);if(t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var y=0;y=1&&l(e,e.spacing.staffSeparation,v[v.length-1],y.staffGroup);var x=c(e,y.staffGroup,m,b);x.line=p+b,v.push(x),e.paper.closeGroup()}else y.nonMusic&&(t.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),n(e,y.nonMusic,m),e.paper.closeGroup())}return t.reset(),r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),n(e,r.bottomText,m),e.paper.closeGroup()),i(e,s,d,h),{staffgroups:v,selectables:m.getElements()}}},9879:function(e,t,r){var a=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=a(e,t.anchor.x,t.pitch,t.dec,{scalex:1,scaley:1,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}},5947:function(e,t,r){var a=r(6764),i=r(5759),n=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=a("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=a("M %f %f L %f %f ",o,l,o,s(l+20))),h+=a("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending"),"data-name":"ending"}),n(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&i(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var d=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},d),[d]}},9045:function(e,t,r){var a=r(6764),i=r(6454),n=r(7199);function s(e,t,r){return n(e+r*t)}var o=[[3.5,-4.8]],c=[[1.5,-1],[.3,-.3],[-3.5,3.8]],l=[[-1.5,2]],h=[[3,4],[3,-4]],d=[[-3,4],[-3,-4]];function u(e,t){for(var r="",a=0;a1&&s.indexOf(".")<0){var p=n.isInGroup()?"":o.klass;e.paper.openGroup({"data-name":o.name,klass:p});for(var m=0,g=0;g0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=i(e,t.x,d,o,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=n(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness)}return 1!==t.scalex&&t.graphelem&&function(e,t,r,a,i,n){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+a+");transform-origin:"+i+"px "+n+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var a=r(5741),i=r(5829);function n(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}n.prototype.getElements=function(){return this.elements},n.prototype.add=function(e,t,r,a){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var n={absEl:e,svgEl:t,isDraggable:r};void 0!==a&&(n.staffPos=a),this.elements.push(n)}},n.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},n.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:a,unhighlight:i};this.add(r,t,!1)},e.exports=n},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),a=(e.controller.width-t)/2,i=a+t,n="M "+a+" "+r+" L "+i+" "+r+" L "+i+" "+(r+1)+" L "+a+" "+(r+1)+" L "+a+" "+r+" z";e.paper.pathToBack({path:n,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,a){var i=(t+e.padding.left+e.padding.right)*r,n=(e.y+e.padding.bottom)*r;if(e.isPrint&&(n=Math.max(n,1056)),""!==e.ariaLabel){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===a?e.paper.setResponsiveWidth(i,n):(c.width="",c.height=n+"px",r<1?(c.width=i+"px",e.paper.setSize(i/r,n/r)):e.paper.setSize(i,n)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(){for(var e,r,a,i,n,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,i=r[3]?"0"==r[3]?"0":r[3][1]:" ",n=r[5]-String(e).length,a=r[5]?str_repeat(i,n):"",c.push(r[4]?e+a:a+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var a=r(4331),i=r(129),n=r(3145),s=r(7641),o=r(1547),c=r(3624),l=r(5668);function h(e,t,r,n,s){if(r)for(var o=0;o=0&&v.voices&&d(e,t.voices,v.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:m,y2:m,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(v.originalTop),width:e.controller.width,height:e.calcY(v.originalBottom)-e.calcY(v.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),u=0,N(v,"chordHeightAbove"),N(v,"chordHeightBelow"),N(v,"dynamicHeightAbove"),N(v,"dynamicHeightBelow"),N(v,"endingHeightAbove"),N(v,"lyricHeightAbove"),N(v,"lyricHeightBelow"),N(v,"partHeightAbove"),N(v,"tempoHeightAbove"),N(v,"volumeHeightAbove"),N(v,"volumeHeightBelow"))),e.moveY(a.STEP,-v.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var b=2,y=0,x=0;x6&&(u=0)}}E>1&&(f=t.staffs[0].topLine,p=t.staffs[E-1].bottomLine,c(e,t.startx,.6,f,p,null)),e.y=m}},7865:function(e,t,r){var a=r(6637);e.exports=function(e,t,r,i,n,s,o){var c=e.calcY(i);return a(e,t,r,c,n,s,o)}},7641:function(e,t,r){var a=r(7865);e.exports=function(e,t,r,i,n,s){var o="abcjs-top-line",c=2;n&&(c=n),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var l=0,h=0;if(1===i)a(e,t,r,6,o,null,s+e.lineThickness),l=e.calcY(10),h=e.calcY(2);else for(var d=i-1;d>=0;d--){var u=(d+1)*c;h=e.calcY(u),0===l&&(l=h),a(e,t,r,u,o,null,s+e.lineThickness),o=void 0}return e.paper.closeGroup(),[l,h]}},3987:function(e,t,r){var a=r(2435),i=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var n,s=e.calcY(t.pitch)+2;if(t.tempo.preString){n=i(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",n).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new n(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",void 0!==t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};function x(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=0;r0)for(var o=s.staffGroup.voices[0],c=!1,l=0,h=0;hthis.width+1&&(e.topText=new l(e.metaText,e.metaTextInfo,e.formatting,e.lines,n,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o0)for(var h=c.nonMusic.rows.length,f=0;f0&&c.text[0].center)&&(p.left=n/2+this.renderer.padding.left)}}e.tablatures&&v.layoutTablatures(this.renderer,e);var m=g(this.renderer,this.classes,e,this.width,n,this.responsive,i,this.selectTypes,t,r);if(this.staffgroups=m.staffgroups,this.selectables=m.selectables,this.oneSvgPerLine){var b=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,r,a,i){r||(r="Untitled");var n=t.querySelector("svg");"resize"===a&&(t.style.paddingBottom="");for(var s=n.querySelector("style"),o="resize"===a?n.viewBox.baseVal.width:n.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,h=[],d=0;d0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},1328:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var a=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*a,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},9799:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t,r,a){var i;i="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var n=this.svg.getTextSize(e,i.attr,a);return i.font.box?{height:n.height+4*i.font.padding,width:n.width+4*i.font.padding}:n},t.prototype.baselineToCenter=function(e,t,r,a,i){return.5*this.calc(e,t,r).height+(i-a-2)*this.attr(t,r).font.size},e.exports=t},2187:function(e){e.exports=function(e,t,r,a){if(e)for(var i=0;i0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),n.setAttribute("class",o)}}},4331:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},8123:function(e){function t(e,t,r,a){if(0===e.indexOf(t)){var i=e.replace(t,""),n=parseInt(i,10);""+n===i&&(r[a]=n)}}e.exports=function(e,r){var a=[];if(e.absEl.elemset){for(var i={},n=0;n=0&&r=0?(i=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[n].svgEl.getBBox(),t,e.scale),r=i[0],a=i[1]):(i=function(e){var t,r,a=1,i=1,n=e.target.closest("svg"),s=0;return n&&n.viewBox&&n.viewBox.baseVal&&(0!==n.viewBox.baseVal.width&&(a=n.viewBox.baseVal.width/n.clientWidth),0!==n.viewBox.baseVal.height&&(i=n.viewBox.baseVal.height/n.clientHeight),s=n.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,r=e.offsetY):(t=e.layerX,r=e.layerY),[t*=a,(r*=i)+s]}(t),n=function(e,t,r){for(var a=9999999,i=-1,n=0;n0;n++){var s=e.selectables[n];if(e.getDim(s),s.dim.leftt&&s.dim.topr)i=n,a=0;else if(s.dim.topr){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));ot){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));cMath.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),d=Math.sqrt(l*l+h*h);d=0&&a<=12?i:-1}(e,r=i[0],a=i[1])),{x:r,y:a,clickedOn:n}}function l(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,a=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=a,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function h(e){var t=e;"touchstart"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0]));var r=c(this,t);r.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=v(e.svg);r[t]=!0,b(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function d(e){var t=e;if("touchmove"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=c(this,t),i=Math.round((r.y-this.dragMouseStart.y)/a.STEP);i!==this.dragYStep&&(this.dragYStep=i,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+i*a.STEP+")"))}}function u(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),p.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=v(e.svg);delete r[t],b(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function f(e){e>=0&&eo&&en&&(i=n),i<-n&&(i=-n),i}(x,k,v,w),A=M+Math.floor(_/2),B=M+Math.floor(-_/2),S||(y&&M<6||!y&&M>6)&&(A=6,B=6),[A,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:u[0],endY:u[1],dy:t});for(var p=function(e,t,r,a,i){for(var o=[],l=[],h=0;h0&&d.abcelem.beambr&&d.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],d);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=d.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var x=l.length-1;x>=0;x--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-x-4){var k=f,w=p+m*(x+1);l[x].single&&(k=0===h?f+5:f-5,w=n(r.startX,r.startY,r.endX,r.endY,k)+m*(x+1));var T={startX:l[x].x,endX:k,startY:l[x].y,endY:w,dy:i};if(void 0!==l[x].split){var C=l[x].split;T.endX<=C[C.length-1]&&(C[C.length-1]-=d.w),C.push(T.endX),T.split=l[x].split}o.push(T),l=l.slice(0,x)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m0?((i=(r-(a-n*i))/n)*s>50&&(i=50/s),i):null}e.exports=function(e,t,r,n,s,l){var h,d,u=r;for(h=0;hMath.round(u)&&(u=f,s&&(h=-1)))}for(h=0;h=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),n(c,l,"lyricHeightAbove"),n(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+i,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+i,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(n(c,l,"dynamicHeightAbove"),n(c,l,"volumeHeightAbove")),n(c,l,"partHeightAbove"),n(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/a.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+i),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+i}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+i):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+i):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+i),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var d=0;d0&&(c.top+=f)}c.top+=e.spacing.staffTopMargin/a.STEP,r=2-c.bottom}}},735:function(e,t,r){var a=r(937);function i(e){for(var t=0;t0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,d=o;s.startx=d;var u,f,p=0;for(r&&console.log("init layout",e),c=0;c1e-7?v.push(s.voices[c]):g.push(s.voices[c]);m=0;var b=0;for(c=0;cd&&(d=a.getNextX(g[c]),m=a.getSpacingUnits(g[c]),b=g[c].spacingduration);l+=m,h=Math.min(h,m),r&&console.log("currentduration: ",p,l,h);var y=void 0;for(c=0;c0){d=w;for(var C=0;Cd&&(d=a.getNextX(s.voices[c]),m=a.getSpacingUnits(s.voices[c]));return function(e){for(var t=0,r=0;r0){var i=a.children.length-1,n=a.children[i];if("bar"===n.abcelem.el_type){var s=n.children[0].x;s>t?t=s:n.children[0].x=t}}}}(s.voices),l+=m,s.setWidth(d),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var a=r(3721);function i(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=i(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var i=e+(t-e)/2;return a(r.startX,r.startY,r.endX,r.endY,i)}(r,e.anchor2.x,t),e.yTextPos+=i(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,i(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var n=0,s=0;se.startNote||n>e.endNote)&&(e.startNote=n,e.endNote=n),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},937:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,a,i){var n=r.children[r.i];if(!n)return 0;var s=e-r.minx,o=r.durationindex+n.duration>0?a:0;if("note"===n.abcelem.el_type&&!n.abcelem.rest&&0!==r.voicenumber&&i){var c=i.children[i.i],l=c&&(n.abcelem.maxpitch<=c.abcelem.maxpitch+1&&n.abcelem.maxpitch>=c.abcelem.minpitch-1||n.abcelem.minpitch<=c.abcelem.maxpitch+1&&n.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&n.abcelem.minpitch===c.abcelem.minpitch&&n.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&n.heads&&n.heads.length>0&&c.heads[0].c===n.heads[0].c&&(l=!1),l){var h=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;n.adjustedWidth||(n.adjustedWidth=h+n.w),n.w=n.adjustedWidth;for(var d=0;d0&&t.putChordInLane(a),void(e[a]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r=0;r--)(a=e[t].children[r]).chordHeightBelow&&o(n,a)}return(i.length>1||n.length>1)&&function(e,t,r){for(var a=0;a=0};n.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},n.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},n.prototype.setLineThickness=function(e){this.lineThickness=e},n.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},n.prototype.setPadding=function(e){function t(t,r,a,i,n){void 0!==e.formatting[a]?t.padding[r]=e.formatting[a]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=i:t.padding[r]=n}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},n.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},n.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},n.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},n.prototype.calcY=function(e){return this.y-e*a.STEP},n.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},n.prototype.absolutemoveY=function(e){this.y=e},e.exports=n},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function a(e,t,r){var a=r-e;return"M "+e+" "+t+" l "+a+" 0 l 0 1 l "+-a+" 0 z "}function i(e,t,r){var a=r-t;return"M "+e+" "+t+" l 0 "+a+" l 1 0 l 0 "+-a+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var a=t/e*100;this.svg.parentNode.style["padding-bottom"]=a+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,n=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(a(r,n,s)),t.push(a(r,o,s)),t.push(i(s,n,o)),t.push(i(r,o,n)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,a){var i=document.createElementNS(t,"text");for(var n in i.setAttribute("stroke","none"),r)r.hasOwnProperty(n)&&i.setAttribute(n,r[n]);for(var s=(""+e).split("\n"),o=0;o0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),a&&(n[a]=i),i},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e["data-name"]&&r.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(r):this.append(r),this.currentGroup.unshift(r),r},r.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var a in e)e.hasOwnProperty(a)&&("path"===a?r.setAttributeNS(null,"d",e.path):"klass"===a?r.setAttributeNS(null,"class",e[a]):void 0!==e[a]&&r.setAttributeNS(null,a,e[a]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var a in e)e.hasOwnProperty(a)&&("path"===a?r.setAttributeNS(null,"d",e.path):"klass"===a?r.setAttributeNS(null,"class",e[a]):r.setAttributeNS(null,a,e[a]));return this.prepend(r),r},r.prototype.lineToBack=function(e){for(var r=document.createElementNS(t,"line"),a=Object.keys(e),i=0;i0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r}},t={},r=function r(a){var i=t[a];if(void 0!==i)return i.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,r),n.exports}(7001),r;var e,t,r})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return e={7001:function(e,t,r){"use strict";var a=r(1592).TuneBook,i=r(8905),n=r(5253),s=new function(){var e=!1;try{e=abcjs_is_user_script}catch(e){}this.show_midi=!e,this.hide_abc=!1,this.render_before=!1,this.midi_options={},this.render_options={},this.render_classname="abcrendered",this.text_classname="abctext",this.auto_render_threshold=20,this.show_text="show score for: ",this.debug=!1};s.start=function(){var e=window.document.body;this.errors="";var t=this.getABCContainingElements(e);if(0!==t.length){if(this.debug)for(var r=0;r=0&&h0,v=0;v=0&&(u=C.startChar,d=void 0===C.chord?h:null),C.chord&&(h=C),"bar"===C.el_type){if(p){var S={abc:n.abc.substring(u,C.endChar)};(h=d&&d.chord&&d.chord.length>0?d.chord[0].name:null)&&(S.lastChord=h),C.startEnding&&(S.startEnding=C.startEnding),C.endEnding&&(S.endEnding=C.endEnding),f.push(S),u=null,p=!1}}else"note"===C.el_type&&(p=!0)}}r.push({header:l,measures:f,hasPickup:g})}return r}}(),e.exports=o},9447:function(e,t,r){var a=r(4914).relativeMajor,i={acc:"sharp",note:"f"},n={acc:"sharp",note:"c"},s={acc:"sharp",note:"g"},o={acc:"sharp",note:"d"},c={acc:"sharp",note:"A"},l={acc:"sharp",note:"e"},h={acc:"flat",note:"B"},d={acc:"flat",note:"e"},u={acc:"flat",note:"A"},f={acc:"flat",note:"d"},p={acc:"flat",note:"G"},m={acc:"flat",note:"c"},g={"C#":[i,n,s,o,c,l,{acc:"sharp",note:"B"}],"F#":[i,n,s,o,c,l],B:[i,n,s,o,c],E:[i,n,s,o],A:[i,n,s],D:[i,n],G:[i],C:[],F:[h],Bb:[h,d],Eb:[h,d,u],Cm:[h,d,u],Ab:[h,d,u,f],Db:[h,d,u,f,p],Gb:[h,d,u,f,p,m],Cb:[h,d,u,f,p,m,{acc:"flat",note:"F"}],"A#":[h,d],"B#":[],"D#":[h,d,u],"E#":[h],"G#":[h,d,u,f],none:[]};e.exports=function(e){var t=g[a(e)];return t?JSON.parse(JSON.stringify(t)):null}},4914:function(e){var t={C:{modes:["CMaj","Amin","Am","GMix","DDor","EPhr","FLyd","BLoc"],stepsFromC:0},Db:{modes:["DbMaj","Bbmin","Bbm","AbMix","EbDor","FPhr","GbLyd","CLoc"],stepsFromC:1},D:{modes:["DMaj","Bmin","Bm","AMix","EDor","F#Phr","GLyd","C#Loc"],stepsFromC:2},Eb:{modes:["EbMaj","Cmin","Cm","BbMix","FDor","GPhr","AbLyd","DLoc"],stepsFromC:3},E:{modes:["EMaj","C#min","C#m","BMix","F#Dor","G#Phr","ALyd","D#Loc"],stepsFromC:4},F:{modes:["FMaj","Dmin","Dm","CMix","GDor","APhr","BbLyd","ELoc"],stepsFromC:5},Gb:{modes:["GbMaj","Ebmin","Ebm","DbMix","AbDor","BbPhr","CbLyd","FLoc"],stepsFromC:6},G:{modes:["GMaj","Emin","Em","DMix","ADor","BPhr","CLyd","F#Loc"],stepsFromC:7},Ab:{modes:["AbMaj","Fmin","Fm","EbMix","BbDor","CPhr","DbLyd","GLoc"],stepsFromC:8},A:{modes:["AMaj","F#min","F#m","EMix","BDor","C#Phr","DLyd","G#Loc"],stepsFromC:9},Bb:{modes:["BbMaj","Gmin","Gm","FMix","CDor","DPhr","EbLyd","ALoc"],stepsFromC:10},B:{modes:["BMaj","G#min","G#m","F#Mix","C#Dor","D#Phr","ELyd","A#Loc"],stepsFromC:11},"C#":{modes:["C#Maj","A#min","A#m","G#Mix","D#Dor","E#Phr","F#Lyd","B#Loc"],stepsFromC:1},"F#":{modes:["F#Maj","D#min","D#m","C#Mix","G#Dor","A#Phr","BLyd","E#Loc"],stepsFromC:6},Cb:{modes:["CbMaj","Abmin","Abm","GbMix","DbDor","EbPhr","FbLyd","BbLoc"],stepsFromC:11}},r=null;e.exports={relativeMajor:function(e){r||function(){r={};for(var e=Object.keys(t),a=0;a=t&&(r-=t),"bar"===s[c].el_type)return r}return r}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.getTotalTime=function(){return this.totalTime},this.getTotalBeats=function(){return this.totalBeats},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var r=this.metaText?this.metaText.tempo:null;t=this.getBpm(r)}return t<=0&&(t=1),this.getBeatsPerMeasure()/t*6e4},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;ee)return c}}return null},this.addElementToEvents=function(e,t,r,i,n,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var d=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(d=0),d>0){for(var u=[],f=0;f0)for(var s=n.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=n.staffs[n.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,d=n.voices,u=0;u0&&o["event"+p]&&(w="event"+p),p=Math.round(1e3*f),"bar"===T.type){var S=T.abcelem.type,E="bar_right_repeat"===S||"bar_dbl_repeat"===S,M="1"===T.abcelem.startEnding,N="bar_left_repeat"===S||"bar_dbl_repeat"===S||"bar_right_repeat"===S;if(E){x>0&&(o[w].endX=T.x),-1===g&&(g=x);var _=0;y=-1;for(var A=m;A=0;n--){var s=e[n];"bar"===s.type?(s.top=a,s.nextTop=t,t=a,s.bottom=i,s.nextBottom=r,r=i):"event"===s.type&&(a=s.top,i=s.top+s.height)}}(s=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t.sort((function(e,t){var r=e.milliseconds-t.milliseconds;return 0!==r?r:"bar"===e.type?-1:1}))}(o)),function(e,r){if(!(r.length<1)){for(var a=0;ai.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=r[r.length-1];o.endX=e[o.line].staffGroup.w}}(this.lines,s),s.push({type:"end",milliseconds:d}),this.addUsefulCallbackInfo(s,b*i),s},this.addUsefulCallbackInfo=function(e,t){for(var r=this.millisecondsPerMeasure(t),a=0;a0?e.duration[0]:r)/r}if(!t){t=180;var a=this.getMeterFraction();a&&3!==a.num&&a.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),this.noteTimings=[],this.noteTimings;var r=this.metaText?this.metaText.tempo:null,a=this.getBpm(r),i=1;e?r&&(i=e/a):e=a;var n=this.getBeatLength(),s=e/60,o=this.getBarLength()/n*t/s;o&&(o-=this.getPickupLength()/n/s);var c=n*s;return this.noteTimings=this.setupEvents(o,c,e,i),this.noteTimings.length>0?(this.totalTime=this.noteTimings[this.noteTimings.length-1].milliseconds/1e3,this.totalBeats=this.totalTime*s):(this.totalTime=void 0,this.totalBeats=void 0),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=n(this,e);return s(t,e,this.formatting.percmap,this.formatting.midi)},this.deline=function(e){return o(this.lines,e)},this.findSelectableElement=function(e){return this.engraver&&this.engraver.selectables?this.engraver.findSelectableElement(e):null},this.getSelectableArray=function(){return this.engraver&&this.engraver.selectables?this.engraver.selectables:[]}}},351:function(e){function t(e,t){return"abselem"===e?"abselem":t}function r(e,t){e.el_type="meter",e.startChar=-1,e.endChar=-1;for(var r=0;r=0&&e.lastIndexOf(t)===r},last:function(e){return 0===e.length?null:e[e.length-1]}};e.exports=t},8905:function(e,t,r){var a=r(5008),i=r(8360),n=r(9928),s=r(6476),o=r(1881),c=r(1756),l=r(6780),h=r(575);e.exports=function(){"use strict";var e,t=new l,r=new h(t),d="",u="";function f(e,t,r){e.positioning||(e.positioning={}),e.positioning[t]=r}function p(e,t,r){e.fonts||(e.fonts={}),e.fonts[t]=r}this.getTune=function(){var e={formatting:t.formatting,lines:t.lines,media:t.media,metaText:t.metaText,metaTextInfo:t.metaTextInfo,version:t.version,addElementToEvents:t.addElementToEvents,addUsefulCallbackInfo:t.addUsefulCallbackInfo,getTotalTime:t.getTotalTime,getTotalBeats:t.getTotalBeats,getBarLength:t.getBarLength,getBeatLength:t.getBeatLength,getBeatsPerMeasure:t.getBeatsPerMeasure,getBpm:t.getBpm,getMeter:t.getMeter,getMeterFraction:t.getMeterFraction,getPickupLength:t.getPickupLength,getKeySignature:t.getKeySignature,getElementFromChar:t.getElementFromChar,makeVoicesArray:t.makeVoicesArray,millisecondsPerMeasure:t.millisecondsPerMeasure,setupEvents:t.setupEvents,setTiming:t.setTiming,setUpAudio:t.setUpAudio,deline:t.deline,findSelectableElement:t.findSelectableElement,getSelectableArray:t.getSelectableArray};return t.lineBreaks&&(e.lineBreaks=t.lineBreaks),t.visualTranspose&&(e.visualTranspose=t.visualTranspose),e};var m,g,v={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.octave=0,this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.ignoredDecorations=[],this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||this[e].face!==t[e].face||this[e].size!==t[e].size||this[e].style!==t[e].style||this[e].weight!==t[e].weight},addFormattingOptions:function(e,t,r){"note"===r?("auto"!==this.vocalPosition&&f(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&p(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&p(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&p(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&p(e,"tripletfont",this.tripletfont)):"bar"===r&&("auto"!==this.dynamicPosition&&f(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&f(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&f(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&f(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&p(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&p(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e/g,">")},y=function(t,r,a){r||(r=" ");var i=r[a];" "!==i&&i||(i="SPACE");var n,s=b(r.substring(a-64,a))+''+i+""+b(r.substring(a+1).substring(0,64));!function(e){v.warnings||(v.warnings=[]),v.warnings.push(e)}("Music Line:"+e.lineIndex+":"+(a+1)+": "+t+": "+s),n={message:t,line:r,startChar:v.iChar+a,column:a},v.warningObjects||(v.warningObjects=[]),v.warningObjects.push(n)};this.getWarnings=function(){return v.warnings},this.getWarningObjects=function(){return v.warningObjects};var x=function(t,r){if(r.indexOf("")>=0)d+=r;else if(r=d+r,d="",t){"-"!==(r=a.strip(r))[r.length-1]&&(r+=" ");for(var i=[],n=0,s=!1,o=function(t){var o=a.strip(r.substring(n,t));if(o=o.replace(/\\([-_*|~])/g,"$1"),n=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=!1,l=0;l0&&(a.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":c||(o(l),i.push({skip:!0,to:"slur"}));break;case"*":c||(o(l),i.push({skip:!0,to:"next"}));break;case"|":c||(o(l),i.push({skip:!0,to:"bar"}));break;case"~":c||(s=!0)}c="\\"===r[l]}t.forEach((function(e){if(0!==i.length)if(i[0].skip){switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add words before the first line of music",t,0)},k=function(t,r){if(r.indexOf("")>=0)u+=r;else if(r=u+r,u="",t){"-"!==(r=a.strip(r))[r.length-1]&&(r+=" ");for(var i=[],n=0,s=!1,o=function(t){var o=a.strip(r.substring(n,t));if(n=t+1,o.length>0){s&&(o=o.replace(/~/g," "));var c=r[t];return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:e.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c0&&(a.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}t.forEach((function(e){if(0!==i.length)if(i[0].skip)switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else y("Can't add symbols before the first line of music",t,0)},w=function(e){if(a.startsWith(e,"%%")){var t=i.addDirective(e.substring(2));t&&y(t,e,2)}else{var n=e.indexOf("%");if(n>=0&&(e=e.substring(0,n)),0!==(e=e.replace(/\s+$/,"")).length)if(d)x(r.getCurrentVoice(),e.substring(2));else if(u)k(r.getCurrentVoice(),e.substring(2));else if(e.length<2||":"!==e[1]||g.lineContinuation)g.parseMusic(e);else{var s=m.parseHeader(e);s.regular&&g.parseMusic(e),s.newline&&g.startNewLine(),s.words&&x(r.getCurrentVoice(),e.substring(2)),s.symbols&&k(r.getCurrentVoice(),e.substring(2))}}};function T(e,t){e.push({el_type:"hint"});for(var r=0;r1){for(var b=1;b0&&"\n"!==p[b][0];)p[b]=p[b].substr(1),p[b-1]+=" ";l=p.join(" ")}var T=(l=l.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,r){return t+""+(r?Array(r.length+1).join(" "):"")+"\n"}))).split("\n");0===a.last(T).length&&T.pop(),e=new o(T,v),m=new n(e,y,v,t,r),g=new s(e,y,v,t,r,m),h.print&&(t.media="print"),v.reset(),v.iChar=f,h.visualTranspose?(v.globalTranspose=parseInt(h.visualTranspose),0===v.globalTranspose?v.globalTranspose=void 0:r.setVisualTranspose(h.visualTranspose)):v.globalTranspose=void 0,h.lineBreaks&&(v.lineBreaks=h.lineBreaks),m.reset(e,y,v,t);try{h.format&&i.globalFormatting(h.format);for(var S=e.nextLine();S;){if(h.header_only&&!1===v.is_in_header)throw"normal_abort";if(h.stop_on_warning&&v.warnings)throw"normal_abort";var E=v.is_in_header;w(S),E&&!v.is_in_header&&(r.setRunningFont("annotationfont",v.annotationfont),r.setRunningFont("gchordfont",v.gchordfont),r.setRunningFont("tripletfont",v.tripletfont),r.setRunningFont("vocalfont",v.vocalfont)),S=e.nextLine()}d&&x(r.getCurrentVoice(),""),u&&k(r.getCurrentVoice(),""),v.openSlurs=r.cleanUp(v.barsperstaff,v.staffnonote,v.openSlurs)}catch(e){if("normal_abort"!==e)throw e}var M=792,N=612;switch(v.papersize){case"legal":M=1008,N=612;break;case"A4":M=842.4,N=597.6}if(v.landscape){var _=M;M=N,N=_}t.formatting.pagewidth||(t.formatting.pagewidth=N),t.formatting.pageheight||(t.formatting.pageheight=M),h.hint_measures&&function(){for(var e=0;e1&&!a.startsWith(o[0].abc,"X:")&&o.shift().abc.split("\n").forEach((function(e){a.startsWith(e,"%%")&&(t+=e+"\n")}));var c=t;return o.forEach((function(e){var r=e.abc.indexOf("\n\n");r>0&&(e.abc=e.abc.substring(0,r)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var i=e.pure.split("T:");i.length>1&&(i=i[1].split("\n"),e.title=a.strip(i[0]));var n=e.pure.substring(2,e.pure.indexOf("\n"));e.id=a.strip(n)})),{header:c,tunes:o}}},8360:function(e,t,r){var a=r(5008),i={};!function(){"use strict";var e,t,r,n,s;i.initialize=function(a,i,o,c,l){e=a,t=i,n=c,s=l,(r=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},r.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},r.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},r.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},r.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},r.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},r.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},r.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},n.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},n.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},n.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.formatting.tablabelfont={face:'"Trebuchet MS"',size:16,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabnumberfont={face:'"Arial"',size:11,weight:"normal",style:"normal",decoration:"none"},n.formatting.tabgracefont={face:'"Arial"',size:8,weight:"normal",style:"normal",decoration:"none"},n.formatting.annotationfont=r.annotationfont,n.formatting.gchordfont=r.gchordfont,n.formatting.historyfont=r.historyfont,n.formatting.infofont=r.infofont,n.formatting.measurefont=r.measurefont,n.formatting.partsfont=r.partsfont,n.formatting.repeatfont=r.repeatfont,n.formatting.textfont=r.textfont,n.formatting.tripletfont=r.tripletfont,n.formatting.vocalfont=r.vocalfont,n.formatting.wordsfont=r.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,r,a,i,n){function s(){var s=parseInt(e[0].token);return e.shift(),r?0===e.length?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[n]?{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",a,i),{face:r.face,weight:r.weight,style:r.style,decoration:r.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",a,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",a,i)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",d="normal",u="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",a,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?d="italic":"underline"===v?u="underline":"box"===v?(o[n]?f=!0:t('This font style doesn\'t support "box"',a,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",a,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",a,i):c=g.token:t("Expected font size in font definition.",a,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?d="italic":"underline"===v?u="underline":"box"===v?(o[n]?f=!0:t('This font style doesn\'t support "box"',a,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",a,i);break;case"finished":t('Extra characters found after "box" in font definition.',a,i)}}void 0===c?r?c=r.size:(t("Must specify the size of the font since there is no default value.",a,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(r?l=r.face:(t("Must specify the name of the font since there is no default value.",a,i),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=d,y.decoration=u,y.size=c,f&&(y.box=!0),y)},l=function(e,t,a){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(r[e]=c(t,r[e],a,0,e),r.is_in_header&&(n.formatting[e]=r[e]),null)},h=function(e,t){var r="";t.forEach((function(e){r+=e.token}));var a=parseFloat(r);if(isNaN(a)||0===a)return'Directive "'+e+'" requires a number as a parameter.';n.formatting.scale=a},d=["acoustic-bass-drum","bass-drum-1","side-stick","acoustic-snare","hand-clap","electric-snare","low-floor-tom","closed-hi-hat","high-floor-tom","pedal-hi-hat","low-tom","open-hi-hat","low-mid-tom","hi-mid-tom","crash-cymbal-1","high-tom","ride-cymbal-1","chinese-cymbal","ride-bell","tambourine","splash-cymbal","cowbell","crash-cymbal-2","vibraslap","ride-cymbal-2","hi-bongo","low-bongo","mute-hi-conga","open-hi-conga","low-conga","high-timbale","low-timbale","high-agogo","low-agogo","cabasa","maracas","short-whistle","long-whistle","short-guiro","long-guiro","claves","hi-wood-block","low-wood-block","mute-cuica","open-cuica","mute-triangle","open-triangle"],u=function(e,t,a,i,n){if(1!==a.length||"number"!==a[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=a[0].intt;return void 0!==i&&sn?'Directive "'+t+'" requires a number less than or equal to '+n+" as a parameter.":(r[e]=s,null)},f=function(e,t,a){if(1===a.length&&("true"===a[0].token||"false"===a[0].token))return r[e]="true"===a[0].token,null;var i=u(e,t,a,0,1);return null!==i?i:(r[e]=1===r[e],null)},p=function(e,t,a,i){if(1!==a.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var n=a[0].token,s=!1,o=0;!s&&o1&&r.setfont){var a=[];""!==t[0]&&a.push({text:t[0]});for(var i=1;i=0||e[0].floatt<=1)return{value:e[0].floatt}}else{if("false"===e[0].token)return{value:0};if("true"===e[0].token)return{value:1}}return{error:"Directive stretchlast requires zero or one parameter: false, true, or number between 0 and 1 (received "+e[0].token+")"}}i.addDirective=function(o){var N=e.tokenize(o,0,o.length);if(0===N.length||"alpha"!==N[0].type)return null;var _=o.substring(o.indexOf(N[0].token)+N[0].token.length);_=e.stripComment(_);var A,B=N.shift().token.toLowerCase(),P="";switch(B){case"bagpipes":n.formatting.bagpipes=!0;break;case"flatbeams":n.formatting.flatbeams=!0;break;case"jazzchords":n.formatting.jazzchords=!0;break;case"accentAbove":n.formatting.accentAbove=!0;break;case"germanAlphabet":n.formatting.germanAlphabet=!0;break;case"landscape":r.landscape=!0;break;case"papersize":r.papersize=_;break;case"graceslurs":if(1!==N.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===N[0].token||"false"===N[0].token)n.formatting.graceSlurs=!1;else{if("1"!==N[0].token&&"true"!==N[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+N[0].token+")";n.formatting.graceSlurs=!0}break;case"lineThickness":var L=M(N);if(void 0!==L.value&&(n.formatting.lineThickness=L.value),L.error)return L.error;break;case"stretchlast":var z=M(N);if(void 0!==z.value&&(n.formatting.stretchlast=z.value),z.error)return z.error;break;case"titlecaps":r.titlecaps=!0;break;case"titleleft":n.formatting.titleleft=!0;break;case"measurebox":n.formatting.measurebox=!0;break;case"vocal":return p("vocalPosition",B,N,E);case"dynamic":return p("dynamicPosition",B,N,E);case"gchord":return p("chordPosition",B,N,E);case"ornament":return p("ornamentPosition",B,N,E);case"volume":return p("volumePosition",B,N,E);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"stafftopmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,r){var a=e.getMeasurement(r);return 0===a.used||0!==r.length?'Directive "'+t+'" requires a measurement as a parameter.':(n.formatting[t]=a.value,null)}(B,N);case"voicescale":if(1!==N.length||"number"!==N[0].type)return"voicescale requires one float as a parameter";var O=N.shift();return r.currentVoice&&(r.currentVoice.scale=O.floatt,s.changeVoiceScale(r.currentVoice.scale)),null;case"voicecolor":if(1!==N.length)return"voicecolor requires one string as a parameter";var H=N.shift();return r.currentVoice&&(r.currentVoice.color=H.token,s.changeVoiceColor(r.currentVoice.color)),null;case"vskip":var D=Math.round(function(t,r){var a=e.getMeasurement(r);return 0===a.used||0!==r.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:a.value}(B,N));return D.error?D.error:(s.addSpacing(D),null);case"scale":h(B,N);break;case"sep":if(0===N.length)s.addSeparator(14,14,85,{startChar:r.iChar,endChar:r.iChar+5});else{var I=e.getMeasurement(N);if(0===I.used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var F=I.value;if(0===(I=e.getMeasurement(N)).used)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var V=I.value;if(0===(I=e.getMeasurement(N)).used||0!==N.length)return'Directive "'+B+'" requires 3 numbers: space above, space below, length of line';var Y=I.value;s.addSeparator(F,V,Y,{startChar:r.iChar,endChar:r.iChar+_.length})}break;case"barsperstaff":if(null!==(P=u("barsperstaff",B,N)))return P;break;case"staffnonote":if(1!==N.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===N[0].token)r.staffnonote=!0;else{if("1"!==N[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+N[0].token+")";r.staffnonote=!1}break;case"printtempo":if(null!==(P=f("printTempo",B,N)))return P;break;case"partsbox":if(null!==(P=f("partsBox",B,N)))return P;r.partsfont.box=r.partsBox;break;case"freegchord":if(null!==(P=f("freegchord",B,N)))return P;break;case"measurenb":case"barnumbers":if(null!==(P=u("barNumbers",B,N)))return P;break;case"setbarnb":if(1!==N.length||"number"!==N[0].type)return"Directive setbarnb requires a number as a parameter.";r.currBarNumber=s.setBarNumberImmediate(N[0].intt);break;case"begintext":var j="";for(A=e.nextLine();A&&0!==A.indexOf("%%endtext");)a.startsWith(A,"%%")?j+=A.substring(2)+"\n":j+=A+"\n",A=e.nextLine();s.addText(j,{startChar:r.iChar,endChar:r.iChar+j.length+7});break;case"continueall":r.continueall=!0;break;case"beginps":for(A=e.nextLine();A&&0!==A.indexOf("%%endps");)e.nextLine();t("Postscript ignored",o,0);break;case"deco":_.length>0&&r.ignoredDecorations.push(_.substring(0,_.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var G=e.translateString(_);s.addText(i.parseFontChangeLine(G),{startChar:r.iChar,endChar:r.iChar+_.length+7});break;case"center":var W=e.translateString(_);s.addCentered(i.parseFontChangeLine(W));break;case"font":break;case"setfont":var q=e.tokenize(_,0,_.length);if(q.length>=4&&"-"===q[0].token&&"number"===q[1].type){var X=parseInt(q[1].token);X>=1&&X<=9&&(r.setfont||(r.setfont=[]),q.shift(),q.shift(),r.setfont[X]=c(q,r.setfont[X],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(B,N,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n.formatting[e]=c(t,n.formatting[e],r,0,e),null)}(B,N,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",N,o);case"staves":case"score":r.score_is_present=!0;for(var R,U=function(e,t,i,n,s){(t||0===r.staves.length)&&r.staves.push({index:r.staves.length,numVoices:0});var o=a.last(r.staves);void 0!==i&&void 0===o.bracket&&(o.bracket=i),void 0!==n&&void 0===o.brace&&(o.brace=n),s&&(o.connectBarLines="end"),void 0===r.voices[e]&&(r.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},K=!1,$=!1,Q=!1,J=!1,Z=!1,ee=!1,te=!1,re=function(){if(te=!0,R){var e="start";R.staffNum>0&&("start"!==r.staves[R.staffNum-1].connectBarLines&&"continue"!==r.staves[R.staffNum-1].connectBarLines||(e="continue")),r.staves[R.staffNum].connectBarLines=e}};N.length;){var ae=N.shift();switch(ae.token){case"(":K?t("Can't nest parenthesis in %%score",o,ae.start):(K=!0,J=!0);break;case")":!K||J?t("Unexpected close parenthesis in %%score",o,ae.start):K=!1;break;case"[":$?t("Can't nest brackets in %%score",o,ae.start):($=!0,Z=!0);break;case"]":!$||Z?t("Unexpected close bracket in %%score",o,ae.start):($=!1,r.staves[R.staffNum].bracket="end");break;case"{":Q?t("Can't nest braces in %%score",o,ae.start):(Q=!0,ee=!0);break;case"}":!Q||ee?t("Unexpected close brace in %%score",o,ae.start):(Q=!1,r.staves[R.staffNum].brace="end");break;case"|":re();break;default:for(var ie="";("alpha"===ae.type||"number"===ae.type)&&(ie+=ae.token,ae.continueId);)ae=N.shift();U(ie,!K||J,Z?"start":$?"continue":void 0,ee?"start":Q?"continue":void 0,te),J=!1,Z=!1,ee=!1,te=!1,R=r.voices[ie],"staves"===B&&re()}}break;case"newpage":var ne=e.getInt(_);s.addNewPage(0===ne.digits?-1:ne.value);break;case"abc":var se=_.split(" ");switch(se[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var oe=se.shift();s.addMetaText(B+oe,se.join(" "),{startChar:r.iChar,endChar:r.iChar+_.length+5});break;default:return"Unknown directive: "+B+se[0]}break;case"header":case"footer":var ce=e.getMeat(_,0,_.length);'"'===(ce=_.substring(ce.start,ce.end))[0]&&'"'===ce[ce.length-1]&&(ce=ce.substring(1,ce.length-1));var le=ce.split("\t"),he={};he=1===le.length?{left:"",center:le[0],right:""}:2===le.length?{left:le[0],center:le[1],right:""}:{left:le[0],center:le[1],right:le[2]},le.length>3&&t("Too many tabs in "+B+": "+le.length+" found.",_,0),s.addMetaTextObj(B,he,{startChar:r.iChar,endChar:r.iChar+o.length});break;case"midi":var de=e.tokenize(_,0,_.length,!0);de.length>0&&"="===de[0].token&&de.shift(),0===de.length?t("Expected midi command",_,0):function(e,r,a){var i=e.shift().token,n=[];if(m.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,a,0);else if(g.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,a,0):n.push(e[0].token);else if(v.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,a,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,a,0):n.push(e[0].intt);else if(b.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,a,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,a,0):(n.push(e[0].intt),2===e.length&&n.push(e[1].intt));else if(y.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,a,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[1].intt));else if(w.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,a,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,a,0):(n.push(e[0].token),n.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token]=e[1].intt,n=r.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(r.formatting||(r.formatting={}),r.formatting.midi||(r.formatting.midi={}),r.formatting.midi.drummap||(r.formatting.midi.drummap={}),r.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,n=r.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,a,0);else if(T.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[2].intt));else if(x.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,a,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[1].intt),n.push(e[2].intt),n.push(e[3].intt));else if(k.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,a,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+i,a,0):(n.push(e[0].intt),n.push(e[1].intt),n.push(e[2].intt),n.push(e[3].intt),n.push(e[4].intt));else if(b.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,a,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,a,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,a,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,a,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,a,0)):(n.push(e[0].intt),4===e.length&&n.push(e[3].intt));else if(C.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,a,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,a,0);else{var o=e.shift();for(n.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,a,0),n.push(o.intt)}else if(S.indexOf(i)>=0)if(1!==e.length&&2!==e.length)t("Expected one or two parameters in MIDI "+i,a,0);else if("number"!==e[0].type)t("Expected integer parameter in MIDI "+i,a,0);else if(2===e.length&&"alpha"!==e[1].type)t("Expected alpha parameter in MIDI "+i,a,0);else if(n.push(e[0].intt),2===e.length){var c=e[1].token;-1!=c.indexOf("octave=")?(c=c.replace("octave=",""),c=parseInt(c),isNaN(c)?t("Expected octave value in MIDI"+i):(c<-1&&(t("Expected octave= in MIDI "+i+" to be >= -1 (recv:"+c+")"),c=-1),c>3&&(t("Expected octave= in MIDI "+i+" to be <= 3 (recv:"+c+")"),c=3),n.push(c))):t("Expected octave= in MIDI"+i)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:n}):(void 0===r.formatting.midi&&(r.formatting.midi={}),r.formatting.midi[i]=n)}(de,n,_);break;case"percmap":var ue=function(e){var t=e.split(/\s+/);if(2!==t.length&&3!==t.length)return{error:'Expected parameters "abc-note", "drum-sound", and optionally "note-head"'};var r=t[0],a=parseInt(t[1],10);if((isNaN(a)||a<35||a>81)&&t[1]&&(a=d.indexOf(t[1].toLowerCase())+35),isNaN(a)||a<35||a>81)return{error:'Expected drum name, received "'+t[1]+'"'};var i={sound:a};return 3===t.length&&(i.noteHead=t[2]),{key:r,value:i}}(_);ue.error?t(ue.error,o,8):(n.formatting.percmap||(n.formatting.percmap={}),n.formatting.percmap[ue.key]=ue.value);break;case"map":case"playtempo":case"auquality":case"continuous":case"nobarcheck":n.formatting[B]=_;break;default:return"Unknown directive: "+B}return null},i.globalFormatting=function(a){for(var i in a)if(a.hasOwnProperty(i)){var s,o=""+a[i],c=e.tokenize(o,0,o.length);switch(i){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":case"tablabelfont":case"tabnumberfont":case"tabgracefont":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=f("partsBox",i,c))&&t(s),r.partsfont.box=r.partsBox;break;case"freegchord":null!==(s=f("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),n.formatting.fontboxpadding=c[0].floatt;break;case"stafftopmargin":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),n.formatting.stafftopmargin=c[0].floatt;break;case"stretchlast":var d=M(c);if(void 0!==d.value&&(n.formatting.stretchlast=d.value),d.error)return d.error;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},9928:function(e,t,r){var a=r(5008),i=r(8360),n=r(9708);e.exports=function(e,t,r,s,o){this.reset=function(e,t,r,a){n.initialize(e,t,r,a,o),i.initialize(e,t,r,a,o)},this.reset(e,t,r,s),this.setTitle=function(e,t){r.hasMainTitle?o.addSubtitle(e,{startChar:r.iChar,endChar:r.iChar+t+2}):(o.addMetaText("title",e,{startChar:r.iChar,endChar:r.iChar+t+2}),r.hasMainTitle=!0)},this.setMeter=function(a){if("C"===(a=e.stripComment(a)))return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"common_time"};if("C|"===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"cut_time"};if("o"===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===a)return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===a.length||"none"===a.toLowerCase())return!0===r.havent_set_length&&(r.default_length=.125,r.havent_set_length=!1),null;var i=e.tokenize(a,0,a.length);try{var n=function(){var e=function(){var e={value:0,num:""},t=i.shift();for("("===t.token&&(t=i.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===i.length||"/"===i[0].token)return e;if(")"===(t=i.shift()).token){if(0===i.length||"/"===i[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===i.length)throw"Expected top number of meter";t=i.shift()}return e}();if(0===i.length)return e;var t=i.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=i.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===i.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=n();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===i.length)break}return!0===r.havent_set_length&&(r.default_length=o<.75?.0625:.125,r.havent_set_length=!1),s}catch(e){t(e,a,0)}return null},this.calcTempo=function(e){var t=1/4;r.meter&&"specified"===r.meter.type?t=1/parseInt(r.meter.value[0].den):r.origMeter&&"specified"===r.origMeter.type&&(t=1/parseInt(r.origMeter.value[0].den));for(var a=0;a0&&(r.default_length=n/s,r.havent_set_length=!1)}else 1===i.length&&"1"===i[0]&&(r.default_length=1,r.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(a,i,n,s){try{var o=e.tokenize(a,i,n);if(0===o.length)throw"Missing parameter in Q: field";var l={startChar:s+i-2,endChar:s+n},h=!0,d=o.shift();if("quote"===d.type&&(l.preString=d.token,d=o.shift(),0===o.length))return c[l.preString.toLowerCase()]&&(l.bpm=c[l.preString.toLowerCase()],l.suppressBpm=!0),{type:"immediate",tempo:l};if("alpha"===d.type&&"C"===d.token){if(0===o.length)throw"Missing tempo after C in Q: field";if("punct"===(d=o.shift()).type&&"="===d.token){if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(d=o.shift()).type)throw"Expected number after = in Q: field";l.duration=[1],l.bpm=parseInt(d.token)}else{if("number"!==d.type)throw"Expected number or equal after C in Q: field";if(l.duration=[parseInt(d.token)],0===o.length)throw"Missing = after duration in Q: field";if("punct"!==(d=o.shift()).type||"="!==d.token)throw"Expected = after duration in Q: field";if(0===o.length)throw"Missing tempo after = in Q: field";if("number"!==(d=o.shift()).type)throw"Expected number after = in Q: field";l.bpm=parseInt(d.token)}}else{if("number"!==d.type)throw"Unknown value in Q: field";var u=parseInt(d.token);if(0===o.length||"quote"===o[0].type)l.duration=[1],l.bpm=u;else{if(h=!1,"punct"!==(d=o.shift()).type&&"/"!==d.token)throw"Expected fraction in Q: field";if("number"!==(d=o.shift()).type)throw"Expected fraction in Q: field";var f=parseInt(d.token);for(l.duration=[u/f];o.length>0&&"="!==o[0].token&&"quote"!==o[0].type;){if("number"!==(d=o.shift()).type)throw"Expected fraction in Q: field";if(u=parseInt(d.token),"punct"!==(d=o.shift()).type&&"/"!==d.token)throw"Expected fraction in Q: field";if("number"!==(d=o.shift()).type)throw"Expected fraction in Q: field";f=parseInt(d.token),l.duration.push(u/f)}if("punct"!==(d=o.shift()).type&&"="!==d.token)throw"Expected = in Q: field";if("number"!==(d=o.shift()).type)throw"Expected tempo in Q: field";l.bpm=parseInt(d.token)}}if(0!==o.length&&("quote"===(d=o.shift()).type&&(l.postString=d.token,d=o.shift()),0!==o.length))throw"Unexpected string at end of Q: field";return!1===r.printTempo&&(l.suppress=!0),{type:h?"delaySet":"immediate",tempo:l}}catch(e){return t(e,a,i),{type:"none"}}},this.letter_to_inline_header=function(a,c,l){var h=!1,d=e.eatWhiteSpace(a,c);if(c+=d,a.length>=c+5&&"["===a[c]&&":"===a[c+2]){var u=a.indexOf("]",c),f=r.iChar+c,p=r.iChar+u+1;switch(a.substring(c,c+3)){case"[I:":var m=i.addDirective(a.substring(c+3,u));return m&&t(m,a,c),[u-c+1+d];case"[M:":var g=this.setMeter(a.substring(c+3,u));return o.hasBeginMusic()&&g?o.appendStartingElement("meter",f,p,g):r.meter=g,[u-c+1+d];case"[K:":var v=n.parseKey(a.substring(c+3,u),!0);return v.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",f,p,r.clef),v.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",f,p,n.fixKey(r.clef,r.key)),[u-c+1+d];case"[P:":var b=i.parseFontChangeLine(a.substring(c+3,u));return l||s.lines.length<=s.lineNum?r.partForNextLine={title:b,startChar:f,endChar:p}:o.appendElement("part",f,p,{title:b}),[u-c+1+d];case"[L:":return this.setDefaultLength(a,c+3,u),[u-c+1+d];case"[Q:":if(u>0){var y=this.setTempo(a,c+3,u,r.iChar);return"delaySet"===y.type?o.hasBeginMusic()?o.appendElement("tempo",f,p,this.calcTempo(y.tempo)):r.tempoForNextLine=["tempo",f,p,this.calcTempo(y.tempo)]:"immediate"===y.type&&(!l&&o.hasBeginMusic()?o.appendElement("tempo",f,p,y.tempo):r.tempoForNextLine=["tempo",f,p,y.tempo]),[u-c+1+d,a[c+1],a.substring(c+3,u)]}break;case"[V:":if(u>0)return h=n.parseVoice(a,c+3,u),[u-c+1+d,a[c+1],a.substring(c+3,u),h];break;case"[r:":return[u-c+1+d]}}return[0]},this.letter_to_body_header=function(e,s){var c=!1;if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var l=i.addDirective(e.substring(s+2));return l&&t(l,e,s),[e.length];case"M:":var h=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&h&&o.appendStartingElement("meter",r.iChar+s,r.iChar+e.length,h),[e.length];case"K:":var d=n.parseKey(e.substring(s+2),o.hasBeginMusic());return d.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",r.iChar+s,r.iChar+e.length,r.clef),d.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",r.iChar+s,r.iChar+e.length,n.fixKey(r.clef,r.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",r.iChar+s,r.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var u=e.indexOf("",s+2);-1===u&&(u=e.length);var f=this.setTempo(e,s+2,u,r.iChar);return"delaySet"===f.type?o.appendElement("tempo",r.iChar+s,r.iChar+e.length,this.calcTempo(f.tempo)):"immediate"===f.type&&o.appendElement("tempo",r.iChar+s,r.iChar+e.length,f.tempo),[u,e[s],a.strip(e.substring(s+2))];case"V:":return c=n.parseVoice(e,s+2,e.length),[e.length,e[s],a.strip(e.substring(s+2)),c]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(a){var c=l[a[0]],h=a.length-2,d=e.translateString(e.stripComment(a.substring(2)));if("unalignedWords"===c||"notes"===c)o.addMetaTextArray(c,i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length});else if(void 0!==c)o.addMetaText(c,i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length});else{var u=r.iChar,f=u+a.length;switch(a[0]){case"H":for(o.addMetaTextArray("history",i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length}),a=e.peekLine();a&&":"!==a[1];)e.nextLine(),o.addMetaTextArray("history",i.parseFontChangeLine(e.translateString(e.stripComment(a))),{startChar:r.iChar,endChar:r.iChar+a.length}),a=e.peekLine();break;case"K":this.resolveTempo();var p=n.parseKey(a.substring(2),!1);!r.is_in_header&&o.hasBeginMusic()&&(p.foundClef&&o.appendStartingElement("clef",u,f,r.clef),p.foundKey&&o.appendStartingElement("key",u,f,n.fixKey(r.clef,r.key))),r.is_in_header=!1;break;case"L":this.setDefaultLength(a,2,a.length);break;case"M":r.origMeter=r.meter=this.setMeter(a.substring(2));break;case"P":r.is_in_header?o.addMetaText("partOrder",i.parseFontChangeLine(d),{startChar:r.iChar,endChar:r.iChar+a.length}):r.partForNextLine={title:d,startChar:u,endChar:f};break;case"Q":var m=this.setTempo(a,2,a.length,r.iChar);"delaySet"===m.type?r.tempo=m.tempo:"immediate"===m.type&&(s.metaText.tempo?r.tempoForNextLine=["tempo",u,f,m.tempo]:s.metaText.tempo=m.tempo);break;case"T":r.titlecaps&&(d=d.toUpperCase()),this.setTitle(i.parseFontChangeLine(e.theReverser(d)),h);break;case"U":this.addUserDefinition(a,2,a.length);break;case"V":if(n.parseVoice(a,2,a.length),!r.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",a,0);break;default:return{regular:!0}}}return{}}}},9708:function(e,t,r){var a=r(8360),i=r(2821),n={};!function(){var e,t,r,s;n.initialize=function(a,i,n,o,c){e=a,t=i,r=n,s=c},n.standardKey=function(e,t,a,n){return i.keySignature(r,e,t,a,n)};var o={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},c=function(e,t){var r=o[e];return(r?r.mid:0)+t};n.fixClef=function(e){var t=o[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},n.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return e.accidentals.forEach((function(e){t.accidentals.push(Object.assign({},e))})),t};var l={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};n.addPosToKey=function(e,t){var r=e.verticalPos;t.accidentals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){var t=l[e.note];t-=r,e.verticalPos=t})),r<-10?(t.accidentals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):r<-4?(t.accidentals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos-=7,-8!==r||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):r>=7&&(t.accidentals.forEach((function(e){e.verticalPos+=7})),t.impliedNaturals&&t.impliedNaturals.forEach((function(e){e.verticalPos+=7})))},n.fixKey=function(e,t){var r=Object.assign({},t);return n.addPosToKey(e,r),r};var h=function(e){var t=0,r=e[t++];"^"!==r&&"_"!==r||(r=e[t++]);var a=l[r];for(void 0===a&&(a=6);t0){l.foundKey=!0;var d="",u="";o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift();var f=h.token;if(o.length>0){var p=e.getSharpFlat(o[0].token);if(p.len>0&&(o[0].token.length>1?o[0].token=o[0].token.substring(1):o.shift(),f+=p.token,d=p.token),o.length>0){var m=e.getMode(o[0].token);m.len>0&&(o.shift(),f+=m.token,u=m.token)}if(void 0===n.standardKey(f,h.token,d,0))return t("Unsupported key signature: "+f,i,0),l}var g,v=n.deepCopyKey(r.key),b=!s&&r.globalTranspose?-r.globalTranspose:0;if(s&&(g=r.globalTransposeOrigKeySig),r.key=n.deepCopyKey(n.standardKey(f,h.token,d,b)),s&&(r.globalTransposeOrigKeySig=g),r.key.mode=u,v){for(var y,x=0;x0;)switch(o[0].token){case"m":case"middle":if(o.shift(),0===o.length)return t("Expected = after middle",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after middle",i,k.start);break}if(0===o.length)return t("Expected parameter after middle=",i,0),l;var M=e.getPitchFromTokens(o);M.warn&&t(M.warn,i,0),M.position&&(r.clef.verticalPos=M.position-6);break;case"transpose":if(o.shift(),0===o.length)return t("Expected = after transpose",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after transpose",i,k.start);break}if(0===o.length)return t("Expected parameter after transpose=",i,0),l;if("number"!==o[0].type){t("Expected number after transpose",i,o[0].start);break}r.clef.transpose=o[0].intt,o.shift();break;case"stafflines":if(o.shift(),0===o.length)return t("Expected = after stafflines",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after stafflines",i,k.start);break}if(0===o.length)return t("Expected parameter after stafflines=",i,0),l;if("number"!==o[0].type){t("Expected number after stafflines",i,o[0].start);break}r.clef.stafflines=o[0].intt,o.shift();break;case"staffscale":if(o.shift(),0===o.length)return t("Expected = after staffscale",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after staffscale",i,k.start);break}if(0===o.length)return t("Expected parameter after staffscale=",i,0),l;if("number"!==o[0].type){t("Expected number after staffscale",i,o[0].start);break}r.clef.staffscale=o[0].floatt,o.shift();break;case"octave":if(o.shift(),0===o.length)return t("Expected = after octave",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after octave",i,k.start);break}if(0===o.length)return t("Expected parameter after octave=",i,0),l;if("number"!==o[0].type){t("Expected number after octave",i,o[0].start);break}r.octave=o[0].intt,o.shift();break;case"style":if(o.shift(),0===o.length)return t("Expected = after style",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after style",i,k.start);break}if(0===o.length)return t("Expected parameter after style=",i,0),l;switch(o[0].token){case"normal":case"harmonic":case"rhythm":case"x":case"triangle":r.style=o[0].token,o.shift();break;default:t("error parsing style element: "+o[0].token,i,o[0].start)}break;case"clef":if(o.shift(),0===o.length)return t("Expected = after clef",i,0),l;if("="!==(k=o.shift()).token){t("Expected = after clef",i,k.start);break}if(0===o.length)return t("Expected parameter after clef=",i,0),l;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var N=o.shift();switch(N.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":case"c":N.token="alto";break;case"F":case"f":N.token="bass";break;case"G":case"g":N.token="treble";break;default:t("Expected clef name. Found "+N.token,i,N.start)}o.length>0&&"number"===o[0].type&&(N.token+=o[0].token,o.shift()),o.length>1&&("-"===o[0].token||"+"===o[0].token||"^"===o[0].token||"_"===o[0].token)&&"8"===o[1].token&&(N.token+=o[0].token+o[1].token,o.shift(),o.shift()),r.clef={type:N.token,verticalPos:c(N.token,0)},r.currentVoice&&void 0!==r.currentVoice.transpose&&(r.clef.transpose=r.currentVoice.transpose),l.foundClef=!0;break;default:t("Unknown parameter: "+o[0].token,i,o[0].start),o.shift()}return l},n.parseVoice=function(a,i,n){var o=e.getMeat(a,i,n),l=o.start,d=o.end,u=e.getToken(a,l,d);if(0!==u.length){var f=!1;void 0===r.voices[u]&&(r.voices[u]={},f=!0,r.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",a,l)),l+=u.length,l+=e.eatWhiteSpace(a,l);for(var p={startStaff:f},m=function(r){var i=e.getVoiceToken(a,l,d);void 0!==i.warn?t("Expected value for "+r+" in voice: "+i.warn,a,l):void 0!==i.err?t("Expected value for "+r+" in voice: "+i.err,a,l):0===i.token.length&&'"'!==a[l]?t("Expected value for "+r+" in voice",a,l):p[r]=i.token,l+=i.len},g=function(i,n,s){var o=e.getVoiceToken(a,l,d);void 0!==o.warn?t("Expected value for "+n+" in voice: "+o.warn,a,l):void 0!==o.err?t("Expected value for "+n+" in voice: "+o.err,a,l):0===o.token.length&&'"'!==a[l]?t("Expected value for "+n+" in voice",a,l):("number"===s&&(o.token=parseFloat(o.token)),r.voices[i][n]=o.token),l+=o.len},v=function(r,i){var n=e.getVoiceToken(a,l,d);if(void 0!==n.warn)t("Expected value for "+r+" in voice: "+n.warn,a,l);else if(void 0!==n.err)t("Expected value for "+r+" in voice: "+n.err,a,l);else{if(0!==n.token.length||'"'===a[l])return"number"===i&&(n.token=parseFloat(n.token)),n.token;t("Expected value for "+r+" in voice",a,l)}l+=n.len},b=function(i,n){var s=e.getVoiceToken(a,l,d);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+n+" in voice: "+s.warn,a,l);else if(0===s.token.length&&'"'!==a[l])t("Expected one of (_B, _E, _b, _e) for "+n+" in voice",a,l);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?r.voices[i][n]=o:t("Expected one of (_B, _E, _b, _e) for "+n+" in voice",a,l)}l+=s.len};l0&&(t+=d[0],"V"===d[1]&&this.startNewLine());for(var u=0;t0)t+=p[0],"V"===p[1]&&(l=!0);else{var m;for((!o.hasBeginMusic()||l&&!this.lineContinuation)&&(this.startNewLine(),l=!1);;)if((m=a.eatWhiteSpace(e,t))>0&&(t+=m),t>0&&""===e[t-1]&&(m=c.letter_to_body_header(e,t))[0]>0&&("V"===m[1]&&this.startNewLine(),t=m[0],n.start_new_line=!1),(m=P(e,t))[0]>0&&(t+=m[0]),(m=M(e,t))[0]>0){S.chord||(S.chord=[]);var g=a.translateString(m[1]);g=g.replace(/;/g,"\n");for(var y=!1,x=0;x0&&(S.force_end_beam_last=!0),t+=k}else if((m=-1===v.indexOf(e[t])?B(e,t):[0])[0]>0)null===m[1]?t+10&&(0===m[1].indexOf("style=")?S.style=m[1].substr(6):(void 0===S.decoration&&(S.decoration=[]),"beambr1"===m[1]?S.beambr=1:"beambr2"===m[1]?S.beambr=2:S.decoration.push(m[1]))),t+=m[0];else{if(!((m=N(e,t))[0]>0))break;S.gracenotes=m[1],t+=m[0]}if((m=L(e,t))[0]>0){u=0,void 0!==S.gracenotes&&(S.rest={type:"spacer"},S.duration=.125,n.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+t,r+t+m[0],S),n.measureNotEmpty=!0,S={});var w={type:m[1]};0===w.type.length?i("Unknown bar type",e,t):(n.inEnding&&"bar_thin"!==w.type&&(w.endEnding=!0,n.inEnding=!1),m[2]&&(w.startEnding=m[2],n.inEnding&&(w.endEnding=!0),n.inEnding=!0,"bar_right_repeat"===m[1]?n.restoreStartEndingHoldOvers():n.duplicateStartEndingHoldOvers()),void 0!==S.decoration&&(w.decoration=S.decoration),void 0!==S.chord&&(w.chord=S.chord),w.startEnding&&void 0===n.barFirstEndingNum?n.barFirstEndingNum=n.currBarNumber:w.startEnding&&w.endEnding&&n.barFirstEndingNum?n.currBarNumber=n.barFirstEndingNum:w.endEnding&&(n.barFirstEndingNum=void 0),"bar_invisible"!==w.type&&n.measureNotEmpty&&(void 0===n.currentVoice||0===n.currentVoice.staffNum&&0===n.currentVoice.index)&&(n.currBarNumber++,n.barNumbers&&n.currBarNumber%n.barNumbers==0&&(w.barNumber=n.currBarNumber)),n.addFormattingOptions(S,s.formatting,"bar"),o.appendElement("bar",r+f,r+t+m[0],w),n.measureNotEmpty=!1,S={}),t+=m[0]}else if("&"===e[t])(m=_(e,t))[0]>0&&(o.appendElement("overlay",r,r+1,{}),t+=1,u++);else{if((m=z(e,t)).consumed>0&&(void 0!==m.startSlur&&(S.startSlur=m.startSlur),m.dottedSlur&&(S.dottedSlur=!0),void 0!==m.triplet&&(h>0?i("Can't nest triplets",e,t):(S.startTriplet=m.triplet,S.tripletMultiplier=m.tripletQ/m.triplet,S.tripletR=m.num_notes,h=void 0===m.num_notes?m.triplet:m.num_notes)),t+=m.consumed),"["===e[t]){t++;for(var T=null,I=!1,F=!1;!F;){var V=B(e,t);V[0]>0&&(t+=V[0]);var Y=H(e,t,{},!1);if(null!==Y&&void 0!==Y.pitch)V[0]>0&&0!==V[1].indexOf("style=")&&(void 0===S.decoration&&(S.decoration=[]),S.decoration.push(V[1])),Y.end_beam&&(S.end_beam=!0,delete Y.end_beam),void 0===S.pitches?(S.duration=Y.duration,S.pitches=[Y]):S.pitches.push(Y),delete Y.duration,V[0]>0&&0===V[1].indexOf("style=")&&(S.pitches[S.pitches.length-1].style=V[1].substr(6)),n.inTieChord[S.pitches.length]&&(Y.endTie=!0,n.inTieChord[S.pitches.length]=void 0),Y.startTie&&(n.inTieChord[S.pitches.length]=!0),t=Y.endChar,delete Y.endChar;else if(" "===e[t])i("Spaces are not allowed in chords",e,t),t++;else{if(t0&&(!S.rest||"spacer"!==S.rest.type)&&0==--h&&(S.endTriplet=!0);for(var j=!1;t":case"<":var G=D(e,t);t+=G[0]-1,n.next_note_duration=G[2],T?T*=G[1]:T=G[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var W=a.getFraction(e,t);T=W.value;var q=e[t=W.index];" "===q&&(I=!0),"-"===q||")"===q||" "===q||"<"===q||">"===q?t--:j=!0;break;case"0":T=0;break;default:j=!0}j||t++}}else i("Expected ']' to end the chords",e,t);void 0!==S.pitches&&(null!==T&&(S.duration=S.duration*T,I&&O(S)),n.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S),n.measureNotEmpty=!0,S={}),F=!0}}}else{var X={},R=H(e,t,X,!0);void 0!==X.endTie&&E(n,u,!0),null!==R&&(void 0!==R.pitch?(S.pitches=[{}],void 0!==R.accidental&&(S.pitches[0].accidental=R.accidental),S.pitches[0].pitch=R.pitch,S.pitches[0].name=R.name,(R.midipitch||0===R.midipitch)&&(S.pitches[0].midipitch=R.midipitch),void 0!==R.endSlur&&(S.pitches[0].endSlur=R.endSlur),void 0!==R.endTie&&(S.pitches[0].endTie=R.endTie),void 0!==R.startSlur&&(S.pitches[0].startSlur=R.startSlur),void 0!==S.startSlur&&(S.pitches[0].startSlur=S.startSlur),void 0!==S.dottedSlur&&(S.pitches[0].dottedSlur=!0),void 0!==R.startTie&&(S.pitches[0].startTie=R.startTie),void 0!==S.startTie&&(S.pitches[0].startTie=S.startTie)):(S.rest=R.rest,void 0!==R.endSlur&&(S.endSlur=R.endSlur),void 0!==R.endTie&&(S.rest.endTie=R.endTie),void 0!==R.startSlur&&(S.startSlur=R.startSlur),void 0!==R.startTie&&(S.rest.startTie=R.startTie),void 0!==S.startTie&&(S.rest.startTie=S.startTie)),void 0!==R.chord&&(S.chord=R.chord),void 0!==R.duration&&(S.duration=R.duration),void 0!==R.decoration&&(S.decoration=R.decoration),void 0!==R.graceNotes&&(S.graceNotes=R.graceNotes),delete S.startSlur,delete S.dottedSlur,C(n,u,S)&&(void 0!==S.pitches?S.pitches[0].endTie=!0:"spacer"!==S.rest.type&&(S.rest.endTie=!0),E(n,u,!1)),(R.startTie||S.startTie)&&E(n,u,!0),t=R.endChar,h>0&&(!R.rest||"spacer"!==R.rest.type)&&0==--h&&(S.endTriplet=!0),R.end_beam&&O(S),S.rest&&"rest"===S.rest.type&&1===S.duration&&A(n)<=1&&(S.rest.type="whole",S.duration=A(n)),S.duration<1&&-1===b.indexOf(S.duration)&&0!==S.duration&&(S.rest&&"spacer"===S.rest.type||i("Duration not representable: "+e.substring(f,t),e,t)),n.addFormattingOptions(S,s.formatting,"note"),o.appendElement("note",r+f,r+t,S)||(this.startNewLine(),o.appendElement("note",r+f,r+t,S)),n.measureNotEmpty=!0,S={})}t===f&&(" "!==e[t]&&"`"!==e[t]&&i("Unknown character ignored",e,t),t++)}}}this.lineContinuation=e.indexOf("")>=0||d[0]>0,this.lineContinuation||(S={})}};var E=function(e,t,r){var a=e.currentVoice?100*e.currentVoice.staffNum+e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][a]=r},M=function(e,t){if('"'===e[t]){var r=a.getBrackettedSubstring(e,t,5);if(r[2]||i("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1][0])r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1][0])r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1][0])r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1][0])r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1][0]){r[1]=r[1].substring(1);var s=a.getFloat(r[1]);if(0===s.digits)return i("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;if(r[1]=r[1].substring(s.digits),","!==r[1][0])return i("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(1);var o=a.getFloat(r[1]);if(0===o.digits)return i("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].replace("@",""),r[2]="above",r;r[1]=r[1].substring(o.digits);var c=a.skipWhiteSpace(r[1]);r[1]=r[1].substring(c),r[2]=null,r[3]={x:s.value,y:o.value}}else!0!==n.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=h.chordName(n,r[1]);return r}return[0,""]},N=function(e,t){if("{"===e[t]){var r=a.getBrackettedSubstring(e,t,1,"}");r[2]||i("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var s=[],o=0,c=!1;o0&&(s[s.length-1].endBeam=!0):i("Unknown character '"+r[1][o]+"' while parsing grace note",e,t),o++)}if(s.length)return[r[0],s]}return[0]};function _(e,t){if("&"===e[t]){for(var r=t;e[t]&&":"!==e[t]&&"|"!==e[t];)t++;return[t-r,e.substring(r+1,t)]}return[0]}function A(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var B=function(e,t){var r=n.macros[e[t]];if(void 0!==r)return"!"!==r[0]&&"+"!==r[0]||(r=r.substring(1)),"!"!==r[r.length-1]&&"+"!==r[r.length-1]||(r=r.substring(0,r.length-1)),u.includes(r)?[1,r]:f.includes(r)?("hidden"===n.volumePosition&&(r=""),[1,r]):p.includes(r)?("hidden"===n.dynamicPosition&&(r=""),[1,r]):(n.ignoredDecorations.includes(r)||i("Unknown macro: "+r,e,t),[1,""]);switch(e[t]){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var s=a.getBrackettedSubstring(e,t,5);if(s[1].length>1&&("^"===s[1][0]||"_"===s[1][0])&&(s[1]=s[1].substring(1)),u.includes(s[1]))return s;if(f.includes(s[1]))return"hidden"===n.volumePosition&&(s[1]=""),s;if(p.includes(s[1]))return"hidden"===n.dynamicPosition&&(s[1]=""),s;var o=m.findIndex((function(e){return s[1]===e[0]}));return o>=0?(s[1]=m[o][1],s):(o=g.findIndex((function(e){return s[1]===e[0]})))>=0?(s[1]=g[o][1],"hidden"===n.dynamicPosition&&(s[1]=""),s):"!"!==e[t]||1!==s[0]&&"!"===e[t+s[0]-1]?(i("Unknown decoration: "+s[1],e,t),s[1]="",s):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},P=function(e,t){for(var r=t;a.isWhiteSpace(e[t]);)t++;return[t-r]},L=function(e,t){var r=a.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return i(r.warn,e,t),[r.len,""];for(var n=0;n="2"&&e[t+1]<="9"?(void 0!==r.triplet?i("Can't nest triplets",e,t):(r.triplet=e[t+1]-"0",r.tripletQ=w[r.triplet],r.num_notes=r.triplet,t+2="1"&&e[t+4]<="9"?(r.num_notes=e[t+4]-"0",t+=3):i("expected number after the two colons after the triplet to mark the duration",e,t):t+3="1"&&e[t+3]<="9"?(r.tripletQ=e[t+3]-"0",t+4="1"&&e[t+5]<="9"&&(r.num_notes=e[t+5]-"0",t+=4):t+=2):i("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-n,r};T.prototype.startNewLine=function(){var e={startChar:-1,endChar:-1};n.partForNextLine.title&&(e.part=n.partForNextLine),e.clef=n.currentVoice&&void 0!==n.staves[n.currentVoice.staffNum].clef?Object.assign({},n.staves[n.currentVoice.staffNum].clef):Object.assign({},n.clef);var t=n.currentVoice?n.currentVoice.scoreTranspose:0;if(e.key=l.standardKey(n.key.root+n.key.acc+n.key.mode,n.key.root,n.key.acc,t),e.key.mode=n.key.mode,n.key.impliedNaturals&&(e.key.impliedNaturals=n.key.impliedNaturals),n.key.explicitAccidentals)for(var r=0;r=0?(r.duration=s.getBarLength(),r.rest.text=1,d="Zduration"):(i&&0!==n.next_note_duration?(r.duration=n.default_length*n.next_note_duration,n.next_note_duration=0,u=!0):r.duration=n.default_length,d="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===d||"duration"===d){var p=a.getFraction(e,t);for(r.duration=r.duration*p.value,r.endChar=p.index;p.index"!==e[t])return r;t--,d="broken_rhythm";break;case">":case"<":if(!l(d))return null;if(!i)return r.endChar=t,r;var g=D(e,t);t+=g[0]-1,n.next_note_duration=g[2],r.duration=g[1]*r.duration,d="end_slur";break;default:return l(d)?(r.endChar=t,r):null}if(++t===e.length)return l(d)?(r.endChar=t,r):null}return null},D=function(e,t){switch(e[t]){case">":return t"===e[t+1]&&">"===e[t+2]?[3,1.875,.125]:t"===e[t+1]?[2,1.75,.25]:[1,1.5,.5];case"<":return t","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],e.exports.accentDynamicPseudonyms=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],e.exports.nonDecorations="ABCDEFGabcdefgxyzZ[]|^_{",e.exports.durations=[.5,.75,.875,.9375,.96875,.984375,.25,.375,.4375,.46875,.484375,.4921875,.125,.1875,.21875,.234375,.2421875,.24609375,.0625,.09375,.109375,.1171875,.12109375,.123046875,.03125,.046875,.0546875,.05859375,.060546875,.0615234375,.015625,.0234375,.02734375,.029296875,.0302734375,.03076171875],e.exports.pitches={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},e.exports.rests={x:"invisible",X:"invisible-multimeasure",y:"spacer",z:"rest",Z:"multimeasure"},e.exports.accMap={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^",quarterflat:"_/",quartersharp:"^/"},e.exports.tripletQ={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2}},1881:function(e,t,r){var a=r(5008),i=function(e,t){this.lineIndex=0,this.lines=e,this.multilineVars=t,this.skipWhiteSpace=function(e){for(var t=0;t=e.length};this.eatWhiteSpace=function(e,t){for(var r=t;r="a"&&e[t]<="z"||e[t]>="A"&&e[t]<="Z");)t++;return t},a=this.skipWhiteSpace(e);if(r(e,a))return{len:0};var i=e.substring(a,a+3).toLowerCase();switch((i.length>1&&" "===i[1]||"^"===i[1]||"_"===i[1]||"="===i[1])&&(i=i[0]),i){case"mix":return{len:t(e,a),token:"Mix"};case"dor":return{len:t(e,a),token:"Dor"};case"phr":return{len:t(e,a),token:"Phr"};case"lyd":return{len:t(e,a),token:"Lyd"};case"loc":return{len:t(e,a),token:"Loc"};case"aeo":case"min":case"m":return{len:t(e,a),token:"m"};case"maj":case"ion":return{len:t(e,a),token:""}}return{len:0}},this.getClef=function(e,t){var i=e,n=this.skipWhiteSpace(e);if(r(e,n))return{len:0};var s=!1,o=e.substring(n);if(a.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),n+=5),0===o.length&&s)return{len:n+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(r(o,c))return{len:0};c>0&&(n+=c,o=o.substring(c));var l=null;if(a.startsWith(o,"treble"))l="treble";else if(a.startsWith(o,"bass3"))l="bass3";else if(a.startsWith(o,"bass"))l="bass";else if(a.startsWith(o,"tenor"))l="tenor";else if(a.startsWith(o,"alto2"))l="alto2";else if(a.startsWith(o,"alto1"))l="alto1";else if(a.startsWith(o,"alto"))l="alto";else if(!t&&s&&a.startsWith(o,"none"))l="none";else if(a.startsWith(o,"perc"))l="perc";else if(!t&&s&&a.startsWith(o,"C"))l="tenor";else if(!t&&s&&a.startsWith(o,"F"))l="bass";else{if(t||!s||!a.startsWith(o,"G"))return{len:n+5,warn:"Unknown clef specified: "+i};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:n+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e[t]){case"]":switch(e[++t]){case"|":return{len:2,token:"bar_thick_thin"};case"[":return e[++t]>="1"&&e[t]<="9"||'"'===e[t]?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(e[++t]){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(e[++t]){case"]":return"|"===e[++t]&&":"===e[++t]?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};case"|":return":"===e[++t]?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if("|"!==e[++t])return e[t]>="1"&&e[t]<="9"||'"'===e[t]?{len:1,token:"bar_invisible"}:{len:0};switch(e[++t]){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(e[++t]){case"]":return{len:2,token:"bar_thin_thick"};case"|":return":"===e[++t]?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var r=0;":"===e[t+r];)r++;return{len:1+r,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var r=0;r0;){var r;if("^"===e[0].token){if(r="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"^":r="dblsharp",e.shift();break;case"/":r="quartersharp",e.shift()}}else if("="===e[0].token)r="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(r="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token){case"_":r="dblflat",e.shift();break;case"/":r="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+r};switch(e[0].token[0]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:r,note:e[0].token[0]}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+r+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(e){var t={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},a=this.skipWhiteSpace(e);if(r(e,a))return{len:0};var i=null;switch(e[a]){case"^":case"_":case"=":i=e[a];break;default:return{len:0}}if(a++,r(e,a))return{len:1,warn:"Expected note name after accidental"};switch(e[a]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:a+1,token:{acc:t[i],note:e[a]}};case"^":case"_":case"/":if(i+=e[a],a++,r(e,a))return{len:2,warn:"Expected note name after accidental"};switch(e[a]){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:a+1,token:{acc:t[i],note:e[a]}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,r){var a=e.indexOf("%",t);for(a>=0&&a="A"&&e<="Z"||e>="a"&&e<="z"},n=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,t,r,a){var s=this.getMeat(e,t,r);t=s.start,r=s.end;for(var o,c=[];t=r?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(a+1,i))}}for(var n=a;n=0?a.strip(e.substring(0,t)):a.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var r=""+t;return{value:t,digits:e.indexOf(r)+r.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,r="";if("-"===e[0].token)e.shift(),r="-",t++;else if("number"!==e[0].type)return{used:0};if(r+=e.shift().token,0===e.length)return{used:1,value:parseInt(r)};var a=e.shift();if("."===a.token){if(t++,0===e.length)return{used:t,value:parseInt(r)};if("number"===e[0].type&&(r=r+"."+(a=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(r)};a=e.shift()}switch(a.token){case"pt":case"px":return{used:t+1,value:parseFloat(r)};case"cm":return{used:t+1,value:parseFloat(r)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(r)};default:return e.unshift(a),{used:t,value:parseFloat(r)}}};var d=function(e){return e=(e=e.replace(/\\n/g,"\n")).replace(/\\"/g,'"')};this.getBrackettedSubstring=function(e,t,r,a){for(var i=a||e[t],n=t+1,s=!1;ne.length-1&&(n=e.length-1),[n-t+1,d(e.substring(t+1,n)),!1])}};i.prototype.peekLine=function(){return this.lines[this.lineIndex]},i.prototype.nextLine=function(){if(this.lineIndex>0&&(this.multilineVars.iChar+=this.lines[this.lineIndex-1].length+1),this.lineIndex11&&(f%=12);var p="m"===t[0]?l[f]:c[f],m=p+t,g=n(m);g.length>0&&"flat"===g[0].acc&&(e.localTransposePreferFlats=!0);var v=m.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?v<0?v+=7:0===v&&("#"!==h[1]&&"b"!==m[1]||(v+=7)):e.localTranspose<0&&(v>0?v-=7:0===v&&("b"!==h[1]&&"#"!==m[1]||(v-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=v+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=v+7*Math.ceil(e.localTranspose/12),u?{accidentals:g,root:p[0],acc:p.length>1?p[1]:""}:{accidentals:[],root:r,acc:a}},s.chordName=function(e,t){return i(t,e.localTranspose,e.localTransposePreferFlats,e.freegchord)};var h=["c","d","e","f","g","a","b"],d={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},u={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"},f={"-2":"__","-1":"_",0:"=",1:"^",2:"^^"};s.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var r=t.pitch;if(e.localTransposeVerticalMovement&&(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.name)){var i=t.accidental?t.name.substring(1):t.name,n=t.accidental?t.name[0]:"",s=a.pitchIndex(i);t.name=n+a.noteName(s+e.localTransposeVerticalMovement)}if(t.accidental){var o=function(e,t,r,a,i){for(var n=h[(e+49)%7],s=0,o=0;o2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(r,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=o[0],t.accidental=u[o[1]],t.name&&(t.name=f[o[1]]+t.name.replace(/[_^=]/g,""))}}},e.exports=s},867:function(e){var t={},r=["C,,,","D,,,","E,,,","F,,,","G,,,","A,,,","B,,,","C,,","D,,","E,,","F,,","G,,","A,,","B,,","C,","D,","E,","F,","G,","A,","B,","C","D","E","F","G","A","B","c","d","e","f","g","a","b","c'","d'","e'","f'","g'","a'","b'","c''","d''","e''","f''","g''","a''","b''","c'''","d'''","e'''","f'''","g'''","a'''","b'''"];t.pitchIndex=function(e){return r.indexOf(e)},t.noteName=function(e){return r[e]},e.exports=t},4208:function(e){var t=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],r=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],i=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];e.exports=function(e,n,s,o){if(!n||n%12==0)return e;for(;n<0;)n+=12;n>11&&(n%=12);var c=e.match(/^([A-G][b#♭♯]?)([^\/]+)?\/?([A-G][b#♭♯]?)?(.+)?/);if(!c)return e;var l,h=c[1],d=c[2],u=c[3],f=c[4];return(l=t.indexOf(h))<0&&(l=r.indexOf(h)),l<0&&(l=a.indexOf(h)),l<0&&(l=i.indexOf(h)),l<0||(l+=n,l%=12,e=s?o?i[l]:r[l]:o?a[l]:t[l],d&&(e+=d),u&&((l=t.indexOf(u))<0&&(l=r.indexOf(u)),l<0&&(l=a.indexOf(u)),l<0&&(l=i.indexOf(u)),e+="/",l>=0?(l+=n,l%=12,e+=s?o?i[l]:r[l]:o?a[l]:t[l]):e+=u),f&&(e+=f)),e}},575:function(e,t,r){var a=r(9708);function n(e){if(!e)return!1;if("string"==typeof e)return!1;for(var t=0;t0&&o[l].voice.push({el_type:"note",duration:d,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),o[l].voice.push(g)),d=0):"note"===g.el_type?u?o[l].voice.push(g):(d+=g.duration,r[a]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type&&"color"!==g.el_type||o[l].voice.push(g);else{t=!0,u=!0,p=m,o[l].hasOverlay=!0,0===f&&(f=r[a]);for(var v=0;v=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:r[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}o[l].hasOverlay&&0===o[l].snip.length&&o[l].snip.push({start:p,len:h.length-p})}for(l=0;l=0;y--){var x=b.snip[y];s.voices[l].splice(x.start,x.len),s.voices[l].splice(x.start+1,0,{el_type:"stem",direction:"auto"});var k=c(s.voices[l],x.start);s.voices[l].splice(k,0,{el_type:"stem",direction:"up"})}for(y=0;y0&&"bar"!==e[r].el_type;r--);return r}function l(e,t,r,a){var i;a[t]||(a[t]=[]),a[t][r]||(a[t][r]=[]);for(var n=function(e,n,s){if(void 0===a[t][r][s]){for(i=0;i=t&&ot;){if(e[t].staff)return e[t];t++}return null}function u(e){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam}function f(e){for(var t=0;t0){if(void 0!==a.voices[0]){for(var i=!1,n=0;n0&&x[x.length-1].barNumber){var w=d(e.lines,b);w&&(w.staff[0].barNumber=x[x.length-1].barNumber),delete x[x.length-1].barNumber}}}return delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,i},this.addTieToLastNote=function(t){var r=function(e){if(!e.lines[e.lineNum])return null;if(!e.lines[e.lineNum].staff)return null;if(!e.lines[e.lineNum].staff[e.staffNum])return null;var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum];if(!t)return null;for(var r=t.length-1;r>=0;r--){var a=t[r];if("note"===a.el_type)return a}return null}(e);return!!(r&&r.pitches&&r.pitches.length>0)&&(r.pitches[0].startTie={},t&&(r.pitches[0].startTie.style="dotted"),!0)},this.appendElement=function(a,n,s,o){var c;return o.el_type=a,null!==n&&(o.startChar=n),null!==s&&(o.endChar=s),"note"===a?((c=o).duration?c.duration:0)>=.25||o.force_end_beam_last&&void 0!==e.potentialStartBeam?g(e):o.end_beam&&void 0!==e.potentialStartBeam?void 0===o.rest?function(e,t){t.potentialStartBeam.startBeam=!0,e.endBeam=!0,delete t.potentialStartBeam,delete t.potentialEndBeam}(o,e):g(e):void 0===o.rest&&(void 0===e.potentialStartBeam?o.end_beam||(e.potentialStartBeam=o,delete e.potentialEndBeam):e.potentialEndBeam=o):g(e),delete o.end_beam,delete o.force_end_beam_last,o.rest&&"invisible"===o.rest.type&&delete o.decoration,!(e.lines.length<=e.lineNum||e.lines[e.lineNum].staff.length<=e.staffNum||(function(e,t,r,a,i){var n=t.lines[t.lineNum].staff[t.staffNum];if(void 0!==r.pitches){var s=n.workingClef.verticalPos;r.pitches.forEach((function(e){e.verticalPos=e.pitch-s}))}if(void 0!==r.gracenotes){var o=n.workingClef.verticalPos;r.gracenotes.forEach((function(e){e.verticalPos=e.pitch-o}))}n.voices.length<=t.voiceNum&&(a[i]||(a[i]={}),y(e,t,a[i])),n.voices[t.voiceNum].push(r)}(t,e,o,r,i),0))},this.appendStartingElement=function(t,r,a,i){var n;u(e),"key"===t&&(n=i.impliedNaturals,delete i.impliedNaturals,delete i.explicitAccidentals);var s=Object.assign({},i);if(e.lines[e.lineNum]){var o=e.lines[e.lineNum].staff;if(o){o.length<=e.staffNum&&(o[e.staffNum]={},o[e.staffNum].clef=Object.assign({},o[0].clef),o[e.staffNum].key=Object.assign({},o[0].key),o[0].meter&&(o[e.staffNum].meter=Object.assign({},o[0].meter)),o[e.staffNum].workingClef=Object.assign({},o[0].workingClef),o[e.staffNum].voices=[[]]),"clef"===t&&(o[e.staffNum].workingClef=s);for(var c=o[e.staffNum].voices[e.voiceNum],l=0;l0){var r=t[t.length-1];if("bar"!==r.el_type)return e-1;void 0!==r.barNumber&&(r.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t=0;r--)if(void 0!==e.lines[r].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var r=t.staff[e.staffNum];return r&&void 0!==r.voices[e.voiceNum]?r.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,r,a){e.staffNum=t,e.voiceNum=r,i=a;for(var n=0;n0?(r.push(n-1),a.push(Math.round(i-s)),i=s):ns&&us?(l.push(u-1),c++,o=Math.max(o,s),s=Math.abs(a-t[c]),n.push(i-f),i=f):s=p}n.push(i)}function i(e,t,r,i){for(var n=Math.ceil(e.total/t),s=Math.floor(e.total/n),o=[],c=0;ct&&(s=!0),o%r==r-1&&(o!==e.length-1&&a.push(o),i.push(Math.round(n)),n=0);return{failed:s,totals:i,lineBreaks:a}}e.exports={wrapLines:function(e,t,r){if(t&&0!==e.lines.length){var a=e.deline({lineBreaks:!1}),i=function(e,t){for(var r=[],a=0,i=0,n=0,s=0;s0&&(a[c.line].staff[c.staff].barNumber=s);for(var h=Object.keys(l),d=0;d=0;p--)if("key"===f[p].el_type){i[c.staff]={root:f[p].root,acc:f[p].acc,mode:f[p].mode,accidentals:f[p].accidentals.filter((function(e){return"natural"!==e.acc}))};break}for(p=f.length-1;p>=0;p--)if("stem"===f[p].el_type){n[10*c.staff+c.voice]={direction:f[p].direction};break}if(void 0!==r&&0===c.staff&&0===c.voice)for(p=0;p0&&p.measureWidths.length<25&&(k=i(p,g,0,b),b.attempts.push({type:"Optimize",failed:k.failed,reason:k.reason,lineBreaks:k.lineBreaks,totals:k.totals}),k.failed||(y=k.lineBreaks))}d.push(y),u.push(b)}var w=function(e,t,r){var a={lineBreaks:e,staffwidth:t};for(var i in r)r.hasOwnProperty(i)&&"wrap"!==i&&"staffwidth"!==i&&(a[i]=r[i]);return{revisedParams:a}}(d,a.staffwidth,a);return w.explanation=u,w.reParse=!0,w}}},9716:function(e,t,r){var a,i=r(7207),n=r(5058);!function(){"use strict";var e,t,r,s,o,c,l,h,d,u,f,p,m,g,v,b,y,x,k=1,w={num:4,den:4},T=128,C=!0,S=105,E=95,M=85,N=.25,_=0,A={},B=0;function P(e){for(var t=d.length-1;t>=0;t--)if("program"===d[t].cmd)return void(d[t].channel=e)}function L(e){return e/1e6}function z(e){return Math.round(e*k*1e6)/1e6}function O(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return e.num%3==0?.375:.125;case 16:return.125}return.25}function H(e,t){var r=t.start,a=t.duration,i=z(1/32);switch(e){case"trill":for(var n=1;a>0;)d.push({cmd:"note",pitch:t.pitch+n,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),n=1===n?0:1,a-=i,r+=i;break;case"mordent":d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h});break;case"lowermordent":d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=i,r+=i,d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:a,gap:0,instrument:h});break;case"turn":i=t.duration/5,d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+i,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+2*i,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:r+3*i,duration:i,gap:0,instrument:h,style:"decoration"}),d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r+4*i,duration:i,gap:0,instrument:h});break;case"roll":for(;a>0;)d.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:r,duration:i,gap:0,instrument:h,style:"decoration"}),a-=2*i,r+=2*i}}function D(e,t){var r,a=function(e,t){if(t)return 0;var r;if(null!=g)r=g,g=void 0;else if(C)if(B>e)r=M;else{var a=(e-m)/O(w);r=0===a?S:parseInt(a,10)===a?E:M}else r=E;return v&&(r+=v,v=void 0),r<0&&(r=0),r>127&&(r=127),t?0:r}(L(e.time),t);if(p.processChord(e),e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(r=function(e,t){for(var r,a=0,i=[],s=0;s0?I.endType="tenuto":u&&(I.endType=u),I.endType){case"tenuto":I.gap=-.001;break;case"staccato":var V=.4*I.duration;I.gap=o/60*V;break;default:I.gap=0}d.push(I)}}}d.length}var j=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);f=Math.max(f,L(e.time)+z(j))}a=function(a,n,T,z){n||(n={}),z||(z={}),e=[],t=[0,0,0,0,0,0,0],s=[],o=n.qpm,c=void 0,k=1,l=void 0,h=void 0,d=void 0,u=void 0,f=0,x=T,w={num:4,den:4},C=!0,S=105,E=95,M=85,N=.25,g=void 0,v=void 0,_=0,b=[],A={},y=1,a.length>0&&a[0].length>0&&(B=a[0][0].pickupLength),void 0===n.bassprog||z.bassprog||(z.bassprog=[n.bassprog]),void 0===n.bassvol||z.bassvol||(z.bassvol=[n.bassvol]),void 0===n.chordprog||z.chordprog||(z.chordprog=[n.chordprog]),void 0===n.chordvol||z.chordvol||(z.chordvol=[n.chordvol]),void 0===n.gchord||z.gchord||(z.gchord=[n.gchord]),p=new i(a.length,n.chordsOff,z,w),function(e,t){for(var r=0;r=0)&&(F=!0);for(var Y=0;Y0&&"program"===d[d.length-1].cmd)d[d.length-1].instrument=j.program;else{var X;for(X=d.length-1;X>=0&&"program"!==d[X].cmd;X--);(X<0||d[X].instrument!==j.program)&&d.push({cmd:"program",channel:0,instrument:j.program})}break;case"channel":P(j.channel);break;case"drum":A=G(j.params),W();break;case"gchordOn":p.gChordOn(j);break;case"beat":S=j.beats[0],E=j.beats[1],M=j.beats[2];break;case"vol":g=j.volume;break;case"volinc":v=j.volume;break;case"beataccents":C=j.value;break;case"gchord":case"bassprog":case"chordprog":case"bassvol":case"chordvol":case"gchordbars":p.paramChange(j);break;default:console.log("MIDI creation. Unknown el_type: "+j.el_type+"\n")}}void 0===d[0].instrument&&(d[0].instrument=l||0),u&&d.unshift(u),s.push(d),p.finish(),b.length}return n.detuneOctave&&function(e,t){for(var r={},a=0;a1){var c=(o=o.sort((function(e,t){return e.pitch-t.pitch})))[o.length-1],l=c.pitch%12,h=!1;for(i=0;!h&&i0&&s.push(b),{tempo:o,instrument:l,tracks:s,totalDuration:f}};var I=[0,2,4,5,7,9,11];function F(a){if(void 0!==a.midipitch)return a.midipitch;var i=a.pitch;if(a.accidental)switch(a.accidental){case"sharp":e[i]=1;break;case"flat":e[i]=-1;break;case"natural":e[i]=0;break;case"dblsharp":e[i]=2;break;case"dblflat":e[i]=-2;break;case"quartersharp":e[i]=.25;break;case"quarterflat":e[i]=-.25}var n=12*function(e){return Math.floor(e/7)}(i)+I[j(i)]+60;return void 0!==e[i]?n+=e[i]:n+=t[j(i)],n+=r}function V(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var r=0;r=0?(e.pitch=Math.round(e.pitch),e.cents=-50):t.indexOf(".25")>=0&&(e.pitch=Math.round(e.pitch),e.cents=50),e}function j(e){return(e%=7)<0&&(e+=7),e}function G(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],r=[],a="",i=0,n=0;n=0)return a;return a}function n(e,t,r){for(var a=Math.min(e.length,t+3),i=t;i=0)return e[i].decoration[n];return null}function s(e){for(var t=0;t=0&&"bar"!==r[a].el_type;)r[a].noChordVoice=!0,a--}function o(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function c(e,t){var r=1/4;e.duration&&(r=e.duration[0]);var a=60;return e.bpm&&(a=e.bpm),r*a/t}function l(t){var r;switch(t.type){case"common_time":r={el_type:"meter",num:4,den:4};break;case"cut_time":r={el_type:"meter",num:2,den:2};break;case"specified":r={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:r={el_type:"meter"}}return e=r.num/r.den,r}function h(e){for(var t=[],r=0;r=0;r--)if(e[r].el_type===t.el_type)return void(JSON.stringify(e[r])!==JSON.stringify(t)&&e.push(t));e.push(t)}a=function(a,h){var p,m=(h=h||{}).program||0,g=h.midiTranspose||0;a.visualTranspose&&(g-=a.visualTranspose);var v=h.channel||0,b=!1,y=h.drum||"",x=h.drumBars||1,k=h.drumIntro||0,w=""!==y,T=!!h.drumOff,C=[];m=parseInt(m,10),g=parseInt(g,10),10===(v=parseInt(v,10))&&(m=t),y=y.split(" "),x=parseInt(x,10),k=parseInt(k,10);var S=a.formatting.bagpipes;S&&(m=71);var E=[];if(a.formatting.midi){var M=a.formatting.midi;M.program&&M.program.length>0&&(m=M.program[0],M.program.length>1&&(m=M.program[1],v=M.program[0]),b=!0),M.transpose&&(g=M.transpose[0]),M.channel&&(v=M.channel[0],b=!0),M.drum&&(y=M.drum),M.drumbars&&(x=M.drumbars[0]),M.drumon&&(w=!0),10===v&&(m=t),M.beat&&E.push({el_type:"beat",beats:M.beat}),M.nobeataccents&&E.push({el_type:"beataccents",value:!1})}p=h.qpm?parseInt(h.qpm,10):a.metaText.tempo?c(a.metaText.tempo,a.getBeatLength()):h.defaultQpm?h.defaultQpm:180;var N=[];S&&N.push({el_type:"bagpipes"}),N.push({el_type:"instrument",program:m}),v&&N.push({el_type:"channel",channel:v}),g&&N.push({el_type:"transpose",transpose:g}),N.push({el_type:"tempo",qpm:p});for(var _=0;_=0?t="pppp":e.decoration.indexOf("ppp")>=0?t="ppp":e.decoration.indexOf("pp")>=0?t="pp":e.decoration.indexOf("p")>=0?t="p":e.decoration.indexOf("mp")>=0?t="mp":e.decoration.indexOf("mf")>=0?t="mf":e.decoration.indexOf("f")>=0?t="f":e.decoration.indexOf("ff")>=0?t="ff":e.decoration.indexOf("fff")>=0?t="fff":e.decoration.indexOf("ffff")>=0&&(t="ffff"),t&&(A=a[t].slice(0),B[W].push({el_type:"beat",beats:A.slice(0)}),P[R]=!1,L[R]=!1),e.decoration.indexOf("crescendo(")>=0){var i=r(U,te,"crescendo)"),s=Math.min(127,A[0]+50),o=n(U,te+i+1,Object.keys(a));o&&(s=a[o][0]),P[R]=i>0&&Math.floor((s-A[0])/i),L[R]=!1}else if(e.decoration.indexOf("crescendo)")>=0)P[R]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=r(U,te,"diminuendo)"),l=Math.max(15,A[0]-50),h=n(U,te+c+1,Object.keys(a));h&&(l=a[h][0]),P[R]=!1,L[R]=c>0&&Math.floor((l-A[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(L[R]=!1)},G=Y.staff,W=0,q=0;q=0?B[W].push({el_type:"transpose",transpose:-12}):X.clef.type.indexOf("+8")>=0&&B[W].push({el_type:"transpose",transpose:12})),a.formatting.midi&&a.formatting.midi.drumoff&&(B[W].push({el_type:"bar"}),B[W].push({el_type:"drum",params:{pattern:"",on:!1}}));var Q=0,J=0,Z=0,ee=0;A=[105,95,85,1];for(var te=0;te=0?B[W].push({el_type:"transpose",transpose:-12}):re.type.indexOf("+8")>=0&&B[W].push({el_type:"transpose",transpose:12}));break;case"tempo":p=c(re,a.getBeatLength()),B[W].push({el_type:"tempo",qpm:p,timing:z[W]}),O[""+z[W]]={el_type:"tempo",qpm:p,timing:z[W]};break;case"bar":Q>0&&B[W].push({el_type:"bar"}),j(re),Q=0;var se="bar_right_repeat"===re.type||"bar_dbl_repeat"===re.type,oe="1"===re.startEnding,ce="bar_left_repeat"===re.type||"bar_dbl_repeat"===re.type||"bar_right_repeat"===re.type;if(se){var le=H[W];le||(le=0);var he=D[W];he||(he=B[W].length);for(var de=le;de=0&&n!==t[""+o.timing].qpm&&(n=t[""+o.timing].qpm,"tempo"===o.el_type?(o.qpm=t[""+o.timing].qpm,s++):(e[a].splice(s,0,{el_type:"tempo",qpm:t[""+o.timing].qpm,timing:o.timing}),s+=2))}}(B,O),k)for(var pe=a.getPickupLength(),me=0;mege;)ge++;if(B[me].length>ge){for(ne=0;ne0&&B[0].length>0&&(B[0][0].pickupLength=a.getPickupLength()),B}}(),e.exports=a},7207:function(e){var t=function(e,t,r,a){this.chordTrack=[],this.chordTrackFinished=!1,this.chordChannel=e,this.currentChords=[],this.lastChord,this.chordLastBar,this.chordsOff=!!t,this.gChordTacet=this.chordsOff,this.hasRhythmHead=!1,this.transpose=0,this.lastBarTime=0,this.meter=a,this.tempoChangeFactor=1,this.bassInstrument=r.bassprog&&r.bassprog.length>=1?r.bassprog[0]:0,this.chordInstrument=r.chordprog&&r.chordprog.length>=1?r.chordprog[0]:0,this.bassOctaveShift=r.bassprog&&2===r.bassprog.length?r.bassprog[1]:0,this.chordOctaveShift=r.chordprog&&2===r.chordprog.length?r.chordprog[1]:0,this.boomVolume=r.bassvol&&1===r.bassvol.length?r.bassvol[0]:64,this.chickVolume=r.chordvol&&1===r.chordvol.length?r.chordvol[0]:48,r.gchord&&r.gchord.length>0?this.overridePattern=i(r.gchord[0]):this.overridePattern=void 0};function r(e,t,r,i){var n=[];if(!e)return n;t.indexOf("boom")>=0?n.push(r?e.boom:e.boom2):i&&n.push(e.boom);var s=e.chick.length;if(t.indexOf("chick")>=0)for(var o=0;o0&&!this.chordTrackFinished&&(this.resolveChords(this.lastBarTime,n(e.time)),this.currentChords=[]),this.chordLastBar=this.lastChord},t.prototype.gChordOn=function(e){this.chordsOff||(this.gChordTacet=e.tacet)},t.prototype.paramChange=function(e){switch(e.el_type){case"gchord":e.param&&e.param.length>0?this.overridePattern=i(e.param):this.overridePattern=void 0;break;case"bassprog":this.bassInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.bassOctaveShift=e.octaveShift:this.bassOctaveShift=0;break;case"chordprog":this.chordInstrument=e.value,null!=e.octaveShift&&null!=e.octaveShift?this.chordOctaveShift=e.octaveShift:this.chordOctaveShift=0;break;case"bassvol":this.boomVolume=e.param;break;case"chordvol":this.chickVolume=e.param;break;default:console.log("unhandled midi param",e)}},t.prototype.finish=function(){this.chordTrackEmpty()||(this.chordTrackFinished=!0)},t.prototype.addTrack=function(e){this.chordTrackEmpty()||e.push(this.chordTrack)},t.prototype.findChord=function(e){if(this.gChordTacet)return"break";if(this.chordTrackFinished||!e.chord||0===e.chord.length)return null;for(var t=0;t=0)return"break"}return null},t.prototype.interpretChord=function(e){if(0!==e.length){if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var r=this.basses[t];if(r){for(var a=this.transpose;a<-8;)a+=12;for(;a>8;)a-=12;(r+=a)<33?r+=12:r>44&&(r-=12);var i,n=r,s=(r+=12*this.bassOctaveShift)-5;1===e.length&&(i=this.chordNotes(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(n--,r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(n++,r++,s++,o=o.substring(1));var l=o.split("/");if((i=this.chordNotes(n,l[0])).length>=3&&(s=s+(i[2]-i[0])-7),2===l.length&&this.basses[l[1].substring(0,1)]){var h={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=this.basses[l[1].substring(0,1)]+h+a,s=r+=12*this.bassOctaveShift}return{boom:r,boom2:s,chick:i}}}},t.prototype.chordNotes=function(e,t){var r=this.chordIntervals[t];r||(r="ma"===t.slice(0,2).toLowerCase()||"M"===t[0]?this.chordIntervals.M:"m"===t[0]||"-"===t[0]?this.chordIntervals.m:this.chordIntervals.M),e+=12,e+=12*this.chordOctaveShift;for(var a=[],i=0;i0&&c[d-1]&&c[d]&&c[d-1].boom!==c[d].boom&&(u=!0);var p=l[d],m=p.indexOf("boom")>=0,g=!m&&0!==d&&l[0].indexOf("boom")>=0&&(!c[d-1]||c[d-1].boom!==c[d].boom),v=r(c[d],p,u,g);m&&(u=!1);for(var b=0;b4)for(i=i.toLowerCase(),t-=5;t>0;)i+="'",t--;else for(;t<4;)i+=",",t++;return i}}},5058:function(e){var t={f0:"_C",n0:"=C",s0:"^C",x0:"C",f1:"_D",n1:"=D",s1:"^D",x1:"D",f2:"_E",n2:"=E",s2:"^E",x2:"E",f3:"_F",n3:"=F",s3:"^F",x3:"F",f4:"_G",n4:"=G",s4:"^G",x4:"G",f5:"_A",n5:"=A",s5:"^A",x5:"A",f6:"_B",n6:"=B",s6:"^B",x6:"B",f7:"_c",n7:"=c",s7:"^c",x7:"c",f8:"_d",n8:"=d",s8:"^d",x8:"d",f9:"_e",n9:"=e",s9:"^e",x9:"e",f10:"_f",n10:"=f",s10:"^f",x10:"f",f11:"_g",n11:"=g",s11:"^g",x11:"g",f12:"_a",n12:"=a",s12:"^a",x12:"a",f13:"_b",n13:"=b",s13:"^b",x13:"b",f14:"_c'",n14:"=c'",s14:"^c'",x14:"c'",f15:"_d'",n15:"=d'",s15:"^d'",x15:"d'",f16:"_e'",n16:"=e'",s16:"^e'",x16:"e'"};e.exports=function(e){var r=(e.accidental?e.accidental[0]:"x")+e.verticalPos;return t[r]}},2426:function(e,t,r){var a=r(6074),i={violin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},fiddle:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},mandolin:{name:"StringTab",defaultTuning:["G,","D","A","e"],isTabBig:!1,tabSymbolOffset:0},guitar:{name:"StringTab",defaultTuning:["E,","A,","D","G","B","e"],isTabBig:!0,tabSymbolOffset:0},fiveString:{name:"StringTab",defaultTuning:["C,","G,","D","A","e"],isTabBig:!1,tabSymbolOffset:-.95}},n={inited:!1,plugins:{},register:function(e){var t=e.name,r=e.tablature;this.plugins[t]=r},setError:function(e,t){e.warnings?e.warning.push(t):e.warnings=[t]},preparePlugins:function(e,t,r){this.inited||(this.register(new a),this.inited=!0);var n=null;if(r.tablature){var s=r.tablature;n=[];for(var o=0;o0)for(var i=r.length,n=0;n1&&r&&r.length>0)for(i=r.length,n=0;n=0;a--)if(t.pitch+t.pitchAltered>=e.stringPitches[a]){var i=t.pitch+t.pitchAltered-e.stringPitches[a];return"^"===t.quarter?i-=.5:"v"===t.quarter&&(i+=.5),{num:Math.round(i),str:e.stringPitches.length-1-a,note:t}}return{num:"?",str:e.stringPitches.length-1,note:t}}function l(e,t){var r={num:"?",str:0,note:t};e.push(r),e.error=t.emit()+": unexpected note for instrument"}function h(e){var t=e.tuning,r=e.capo,s=e.params.highestNote;this.linePitch=e.linePitch,this.highestNote="a'",s&&(this.highestNote=s),this.measureAccidentals={},this.capo=0,r&&(this.capo=parseInt(r,10)),this.transpose=e.transpose?e.transpose:0,this.tuning=t,this.stringPitches=[];for(var o=0;o0&&(this.capoTuning=function(e){var t=null,r=e.tuning;if(e.capo>0){t=[];for(var a=0;a0&&(r=e.capoTuning);for(var a=r.length-1,i=0;i1?(o=s(this,e)).error&&(n=o.error):e[0].endTie||((r=new i(e[0].name,this.clefTranspose)).checkKeyAccidentals(this.accidentals,this.measureAccidentals),(a=c(this,r))?o.push(a):(l(o,r),n=o.error))),n)return o;var h=null;if(t){h=[];for(var d=0;d0&&(r+=" capo:"+e.capo),t=t.replace("%T",r)),t}return""},h.prototype.suppress=function(e){return!!e.params.suppress},e.exports=h},8918:function(e){function t(e,t){this.numLines=e,this.lineSpace=t,this.verticalSize=this.numLines*this.lineSpace,this.bar={pitch:3,pitch2:t*e,height:5}}t.prototype.bypass=function(e){var t=e.staffGroup.voices;return!!(t.length>0&&t[0].isPercussion)},t.prototype.setRelative=function(e,t,r){switch(e.type){case"bar":t.pitch=this.bar.pitch,t.pitch2=this.bar.pitch2,t.height=this.height;break;case"symbol":var a=this.bar.pitch2/2;if("dots.dot"==e.name)return r?(t.pitch=a,!1):(t.pitch=a+this.lineSpace,!0)}return r},e.exports=t},6776:function(e,t,r){var a=r(2842),i=a.noteToMidi,n=a.midiToNote;function s(e,t){var r=i(e);t&&(r+=t);var a,s=n(r),o=!1,c=!1,l=null,h=null,d=!1,u=0;e.startsWith("_")?(o=!0,u=-1,"/"==e[1]?(o=!1,h="v",u=0):"_"==e[1]&&(d=!0,u-=1)):e.startsWith("^")?(c=!0,u=1,"/"==e[1]?(c=!1,h="^",u=0):"^"==e[1]&&(d=!0,u+=1)):e.startsWith("=")&&(l=!0,u=0),((a=o||c||null!=h)||l)&&(s=null!=h||d?e.slice(2):e.slice(1));var f=(s.match(/,/g)||[]).length,p=(s.match(/'/g)||[]).length;this.pitch=r,this.pitchAltered=0,this.name=s,this.acc=u,this.isSharp=c,this.isKeySharp=!1,this.isDouble=d,this.isAltered=a,this.isFlat=o,this.isKeyFlat=!1,this.natural=l,this.quarter=h,this.isLower=this.name==this.name.toLowerCase(),this.name=this.name[0].toUpperCase(),this.hasComma=f,this.isQuoted=p}s.prototype.sameNoteAs=function(e){return e.pitch===this.pitch},s.prototype.isLowerThan=function(e){return e.pitch>this.pitch},s.prototype.checkKeyAccidentals=function(e,t){if(!this.isAltered&&!this.natural)if(t[this.name.toUpperCase()])switch(t[this.name.toUpperCase()]){case"__":return this.acc=-2,void(this.pitchAltered=-2);case"_":return this.acc=-1,void(this.pitchAltered=-1);case"=":return this.acc=0,void(this.pitchAltered=0);case"^":return this.acc=1,void(this.pitchAltered=1);case"^^":return this.acc=2,void(this.pitchAltered=2)}else if(e)for(var r=this.name,a=0;a=0){if(r===t)return e.extra[a].x+e.extra[a].w/2;r++}return-1}function f(e){if(e.abcelem){var t=e.abcelem;if(t.rest)return t.gracenotes}return null}function p(e,t,r){var a=e.semantics.notesToNumber(t,r);if(a.error)return e.setError(a.error),a;if(a.graces&&a.notes){var i=a.notes.length-1;a.notes[i].graces=a.graces}return a}function m(e,t,r,a,i){for(var n=0;n=0&&(e.semantics.clefTranspose=-12),k.abcelem.type.indexOf("+8")>=0&&(e.semantics.clefTranspose=12)),k.type){case"staff-extra key-signature":this.accidentals=k.abcelem.accidentals,e.semantics.accidentals=this.accidentals;break;case"bar":e.semantics.measureAccidentals={};var C=!1;x===g.children.length-1&&(C=!0);var S=o(k,e);if(S.abcelem.barNumber){delete S.abcelem.barNumber;for(var E=0;E0&&(y.abselem=N,r.push(y),v.children.push(N))}}},e.exports=h},4785:function(e,t,r){var a=r(3197),i=r(4240),n=r(4331);function s(e,t,r){var a=e.semantics,i=t.controller.getTextSize,n=a.tabInfos(e),s=!0;if(a.suppress(e)&&(s=!1),s){var o=i.calc(n,"tablabelfont","text instrumentname");return r.tabNameInfos={textSize:{height:o.height,width:o.width},name:n},o.height}return 0}function o(e,t){return!(!t[e].isTabStaff||e!==t.length-1&&t[e+1].isTabStaff)}function c(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return r;return-1}function l(e,t){return"clef"===e[t].children[0].abcelem.el_type?null:0==t?"none":e[t-1].children[0]}e.exports=function(e,t,r,h){var d=new i,u={clef:{type:"TAB"}},f=e.linePitch*e.nbLines,p=r.staff;if(p){var m=p[0];if(m&&m.clef&&0==m.clef.stafflines)return void e.setError("No tablatures when stafflines=0");p.splice(p.length,0,u)}var g=r.staffGroup,v=g.voices,b=function(e){for(var t=0,r=0;rt&&(t=a.specialY.lyricHeightBelow)}return t}(v[0]),y=h,x=g.staffs[y],k=f+3-x.bottom-b;x.isTabStaff&&(k=x.top);var w={bottom:-1,isTabStaff:!0,specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0},lines:e.nbLines,linePitch:e.linePitch,dy:.15,top:k},T=function(e,t){for(var r=0,a=0,i=0;;){if(!t[r])return-1;if(t[r].isTabStaff||(i=t[r].voices.length),t[r].isTabStaff){if(a++,o(r,t)&&a=e){if(r+1==t.length)return r+1;if(!t[r+1].isTabStaff)return r+1}if(++r>t.length)return-1}}(h,g.staffs);if(-1!==T){w.parentIndex=T-1,g.staffs.splice(T,0,w),g.height+=f+3;var C=function(e,t){for(var r=t;r>=0;r--)if(!e[r].isTabStaff)return e[r];return null}(g.staffs,T),S=1;(function(e,t){return 1===function(e){for(var t=0,r=0;r1})(g.staffs,C)&&(S=C.voices.length),u.voices=[];for(var E=0;E0&&(M.duplicate=!0);var N=s(e,t,M)/n.STEP;N=Math.max(N,1),g.staffs[h].top+=1,g.height+=N,M.staff=w;var _=v.length;v.splice(v.length,0,M);var A=l(v,E+h);u.voices[E]=[],d.build(e,v,u.voices[E],E,h,A,_)}!function(e){for(var t=0;t0&&(n[0].invisible=!0);break;case"meter":n[0]=l(i,this.tuneNumber),this.startlimitelem=n[0],r.duplicate&&n.length>0&&(n[0].invisible=!0);break;case"clef":if(n[0]=s(i,this.tuneNumber),!n[0])return null;r.duplicate&&n.length>0&&(n[0].invisible=!0);break;case"key":var h=o(i,this.tuneNumber);h&&(n[0]=h,this.startlimitelem=n[0]),r.duplicate&&n.length>0&&(n[0].invisible=!0);break;case"stem":this.stemdir="auto"===i.direction?void 0:i.direction;break;case"part":var d=new a(i,0,0,"part",this.tuneNumber),u=this.getTextSize.calc(i.title,"partsfont","part");d.addFixedX(new f(i.title,0,0,void 0,{type:"part",height:u.height/p.STEP})),n[0]=d;break;case"tempo":var m=new a(i,0,0,"tempo",this.tuneNumber);m.addFixedX(new g(i,this.tuneNumber,c)),n[0]=m;break;case"style":"normal"===i.head?delete this.style:this.style=i.head;break;case"hint":C=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=i.size;break;case"color":this.voiceColor=i.color,r.color=this.voiceColor;break;default:var v=new a(i,0,0,"unsupported",this.tuneNumber);v.addFixed(new f("element type "+i.el_type,0,0,void 0,{type:"debug"})),n[0]=v}return n},E.prototype.createBeam=function(e,t,r){var a=[],n=new i(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);C&&n.setHint();for(var s=0;se.pitches[r+1].pitch){t=!1;var a=e.pitches[r];e.pitches[r]=e.pitches[r+1],e.pitches[r+1]=a}}while(!t)},A=function(e,t,r,a,i,n,s,o,c){for(var l=r;l>11;l--)l%2!=0||a||e.addFixed(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||a||e.addFixed(new f(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l1&&(p=new i(n,"grace",s),C&&p.setHint(),p.mainNote=r);var m=[];for(d=e.gracenotes.length-1;d>=0;d--)o+=10,m[d]=o,e.gracenotes[d].accidental&&(o+=7);for(d=0;d=6?"down":"up";for(a&&(E=a),(i=t.style?t.style:i)&&"normal"!==i||(i="note"),(m=n?S[i].nostem:S[i][-s])||console.log("noteSymbol:",i,s,n),g="down"===E?t.pitches.length-2:1;"down"===E?g>=0:g11||N.verticalPos<1)&&x.push(N.verticalPos-N.verticalPos%2),"down"===E?b=u.getSymbolWidth(m)+2:v=u.getSymbolWidth(m)+2)}var A=t.pitches.length;for(g=0;g0&&(h.bottom=h.bottom-1),e.addHead(h)),b+=H.accidentalshiftx,y=Math.max(y,H.dotshiftx)}if(O){var D=Math.round(70*this.voiceScale)/10,I="down"===E?t.minpitch-D:t.minpitch+1/3;I>6&&!a&&(I=6);var F="down"===E?t.maxpitch-1/3:t.maxpitch+D;F<6&&!a&&(F=6);var V="down"===E||0===e.heads.length?0:e.heads[0].w,Y="down"===E?1:-1;h&&"noteheads.slash.quarter"===h.c&&("down"===E?F-=1:I+=1),h&&"noteheads.triangle.quarter"===h.c&&("down"===E?F-=.7:I-=1.2),e.addRight(new f(null,V,0,I,{type:"stem",pitch2:F,linewidth:Y,bottom:I-1})),d=Math.min(I,F)}return{noteHead:h,roomTaken:b,roomTakenRight:y,min:d,additionalLedgers:x,dir:E,symbolWidth:C}},E.prototype.addLyric=function(e,t){var r="";t.lyric.forEach((function(e){var t=" "===e.divider?"":e.divider;r+=e.syllable+t+"\n"}));var a=this.getTextSize.calc(r,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new f(r,0,a.width,void 0,{type:"lyric",position:i,height:a.height/p.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},E.prototype.createNote=function(e,t,r,i){var n,s=null,o=0,l=0,h=0,d=[],p=T(e),m=!1;0===p&&(m=!0,p=.25,t=!0);for(var g=Math.floor(Math.log(p)/Math.log(2)),v=0,y=Math.pow(2,g),k=y/2;y1,this.stemdir,r,g,this.voiceScale);s=N.noteHead,o=N.roomTaken,l=N.roomTakenRight}else{var _=this.addNoteToAbcElement(M,e,v,this.stemdir,this.style,m,g,t,i);void 0!==_.min&&(this.minY=Math.min(_.min,this.minY)),s=_.noteHead,o=_.roomTaken,l=_.roomTakenRight,d=_.additionalLedgers,n=_.dir,h=_.symbolWidth}if(void 0!==e.lyric&&this.addLyric(M,e),void 0!==e.gracenotes&&(o+=this.addGraceNotes(e,i,M,s,this.stemHeight*this.voiceScale,this.isBagpipes,o)),e.decoration){var B=t&&"up"!==n?Math.min(-3,M.bottom-6):M.bottom;this.decoration.createDecoration(i,e.decoration,M.top,s?s.w:0,M,o,n,B,e.positioning,this.hasVocals,this.accentAbove)}if(e.barNumber&&M.addFixed(new f(e.barNumber,-10,0,0,{type:"barNumber"})),A(M,e.minpitch,e.maxpitch,e.rest,h,d,n,-2,1),void 0!==e.chord){var P=x(this.getTextSize,M,e,o,l,h,this.jazzchords,this.germanAlphabet);o=P.roomTaken,l=P.roomTakenRight}return e.startTriplet&&(this.triplet=new b(e.startTriplet,s,{flatBeams:this.flatBeams})),e.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(s),!this.triplet||e.startTriplet||e.endTriplet||e.rest&&"spacer"===e.rest.type||this.triplet.middleNote(s),M},E.prototype.addSlursAndTies=function(e,t,r,a,i,n){if(t.endTie&&this.ties.length>0){for(var s=!1,o=0;o10&&"treble"===t.abcelem.type?13:11;t.addFixed(new f(e,a,r.width,i+r.height/p.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},E.prototype.createBarLine=function(e,t,r){var i=new a(t,0,10,"bar",this.tuneNumber),n=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,i);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,u="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||u){for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].setEndX(i);this.startlimitelem=i}if(o&&(i.addRight(new f("dots.dot",s,1,7)),i.addRight(new f("dots.dot",s,1,5)),s+=6),c&&(n=new f(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(n)),"bar_invisible"===t.type&&(n=new f(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),i.addRight(n)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,i,0,"down",2,t.positioning,this.hasVocals,this.accentAbove),l&&(n=new f(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),i.addRight(n),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=n,this.partstartelem=null),h&&(n=new f(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),i.addRight(n)),u&&(s+=3,i.addRight(new f("dots.dot",s,1,7)),i.addRight(new f("dots.dot",s,1,5))),t.startEnding&&r){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;i.minspacing+=m+10,this.partstartelem=new d(t.startEnding,n,null),e.addOther(this.partstartelem)}return i.extraw-=5,void 0!==t.chord&&x(this.getTextSize,i,t,0,0,0,!1,this.germanAlphabet),i},e.exports=E},2652:function(e,t,r){var a=r(6658),i=r(4331),n=r(5810);function s(e,t,r,s,o,c,l,h,d,u,f,p,m,g,v){for(var b=e.split("\n"),y=b.length-1;y>=0;y--){var x,k=b[y],w=0;s||(k=n(k,g,v));var T=h.calc(k,o,c),C=T.width,S=T.height/i.STEP;switch(t){case"left":w=-(f+=C+7),x=u.averagepitch,d.addExtra(new a(k,w,C+4,x,{type:"text",height:S,dim:l,position:"left"}));break;case"right":w=p+=4,x=u.averagepitch,d.addRight(new a(k,w,C+4,x,{type:"text",height:S,dim:l,position:"right"}));break;case"below":d.addRight(new a(k,0,0,void 0,{type:"text",position:"below",height:S,dim:l,realWidth:C}));break;case"above":d.addRight(new a(k,0,0,void 0,{type:"text",position:"above",height:S,dim:l,realWidth:C}));break;default:if(r){var E=r.y+3*i.STEP;d.addRight(new a(k,w+r.x,0,u.minpitch+E/i.STEP,{position:"relative",type:"text",height:S,dim:l}))}else{var M="above";u.positioning&&u.positioning.chordPosition&&(M=u.positioning.chordPosition),"hidden"!==M&&d.addCentered(new a(k,m/2,C,void 0,{type:"chord",position:M,height:S,dim:l,realWidth:C}))}}}return{roomTaken:f,roomTakenRight:p}}e.exports=function(e,t,r,a,i,n,o,c){for(var l=0;l0?o.top+3:o.bottom-1,f=s>0?o.top+3:o.bottom-3,p=f-2;"bass-8"===e.type&&(u=3,d=0),o.addRight(new n("8",5+d,i.getSymbolWidth("8")*h,u,{scalex:h,scaley:h,top:f,bottom:p}))}}return o}},3923:function(e,t,r){var a=r(1409),i=r(6020),n=r(6658);e.exports=function(e,t){if(e.el_type="keySignature",!e.accidentals||0===e.accidentals.length)return null;var r=new a(e,0,10,"staff-extra key-signature",t);r.isKeySig=!0;var s=0;return e.accidentals.forEach((function(e){var t,a=0;switch(e.acc){case"sharp":t="accidentals.sharp",a=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",a=-1.2;break;case"quartersharp":t="accidentals.halfsharp",a=-2.5;break;case"quarterflat":t="accidentals.halfflat",a=-1.2;break;default:t="accidentals.flat"}r.addRight(new n(t,s,i.getSymbolWidth(t),e.verticalPos,{thickness:i.symbolHeightInPitches(t),top:e.verticalPos+i.symbolHeightInPitches(t)+a,bottom:e.verticalPos+a})),s+=i.getSymbolWidth(t)+2}),this),r}},2143:function(e,t,r){var a=r(6020),i=r(6658);e.exports=function(e,t,r,n){n||(n={});var s,o=void 0!==n.dir?n.dir:null,c=void 0!==n.headx?n.headx:0,l=void 0!==n.extrax?n.extrax:0,h=void 0!==n.flag?n.flag:null,d=void 0!==n.dot?n.dot:0,u=void 0!==n.dotshiftx?n.dotshiftx:0,f=void 0!==n.scale?n.scale:1,p=void 0!==n.accidentalSlot?n.accidentalSlot:[],m=void 0!==n.shouldExtendStem&&n.shouldExtendStem,g=void 0===n.printAccidentals||n.printAccidentals,v=r.verticalPos,b=0,y=0,x=0;if(void 0===t)e.addFixed(new i("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)s=new i(null,0,0,v);else{var k=c;if(r.printer_shift){var w="same"===r.printer_shift?1:0;k="down"===o?-a.getSymbolWidth(t)*f+w:a.getSymbolWidth(t)*f-w}var T={scalex:f,scaley:f,thickness:a.symbolHeightInPitches(t)*f,name:r.name};if((s=new i(t,k,a.getSymbolWidth(t)*f,v,T)).stemDir=o,h){var C=v+("down"===o?-7:7)*f;m&&("down"===o&&C>6&&(C=6),"up"===o&&C<6&&(C=6));var S="down"===o?c:c+s.w-.6;e.addRight(new i(h,S,a.getSymbolWidth(h)*f,C,{scalex:f,scaley:f}))}for(y=s.w+u-2+5*d;d>0;d--){var E=1-Math.abs(v)%2;e.addRight(new i("dots.dot",s.w+u-2+5*d,a.getSymbolWidth("dots.dot"),v+E))}}if(s&&(s.highestVert=r.highestVert),g&&r.accidental){var M;switch(r.accidental){case"quartersharp":M="accidentals.halfsharp";break;case"dblsharp":M="accidentals.dblsharp";break;case"sharp":M="accidentals.sharp";break;case"quarterflat":M="accidentals.halfflat";break;case"flat":M="accidentals.flat";break;case"dblflat":M="accidentals.dblflat";break;case"natural":M="accidentals.nat"}for(var N=!1,_=l,A=0;A=6){p[A][0]=v,_=p[A][1],N=!0;break}!1===N&&(_-=a.getSymbolWidth(M)*f+2,p.push([v,_]),b=a.getSymbolWidth(M)*f+2);var B=a.symbolHeightInPitches(M);e.addExtra(new i(M,_,a.getSymbolWidth(M),v,{scalex:f,scaley:f,top:v+B/2,bottom:v-B/2})),x=a.getSymbolWidth(M)/2}return{notehead:s,accidentalshiftx:b,dotshiftx:y,extraLeft:x}}},2525:function(e,t,r){var a=r(1409),i=r(6020),n=r(6658);e.exports=function(e,t){e.el_type="timeSignature";var r=new a(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var s=0,o=0;o",a)),o&&e.addOther(new i(o.start,o.stop,"<",a)),c&&e.addOther(new n(c.start,c.stop))},l.prototype.createDecoration=function(e,t,r,i,n,l,d,u,f,p,m){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,r,i){for(var n=0;n9&&u++;var m=a/2;"center"!==s.getSymbolAlign(p)&&(m-=s.getSymbolWidth(p)/2),i.addFixedX(new o(p,m,s.getSymbolWidth(p),u))}if("slide"===t[f]&&i.heads[0]){var g=i.heads[0].pitch,v=new o("",-n-15,0,(g-=2)-1),b=new o("",-n-5,0,g+1);i.addFixedX(v),i.addFixedX(b),e.addOther(new c({anchor1:v,anchor2:b,fixedY:!0}))}}return void 0===u&&(u=r),{above:u,below:i.bottom}}(e,t,r,i,n,l,d,u,m);g.above=Math.max(g.above,this.minTop),g.below=Math.min(g.below,u),function(e,t,r,a,i,n,c,l){function h(e,t){"above"===e?a.above+=t:a.below-=t}function d(e){var t;return"above"===e?(t=a.above)c&&(t=c),t}function u(e,a,i){var n=d(a);r.addFixedX(new o(e,t/2,0,n+2,{type:"decoration",klass:"ornament",thickness:3,anchor:i})),h(a,5)}function f(e,a){var i=t/2;"center"!==s.getSymbolAlign(e)&&(i-=s.getSymbolWidth(e)/2);var n=s.symbolHeightInPitches(e)+1,c=d(a);c="above"===a?c+n/2:c-n/2,r.addFixedX(new o(e,i,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e),position:a})),h(a,n)}for(var p={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},m=0;mthis.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},n.prototype.addFixed=function(e){this._addChild(e)},n.prototype.addFixedX=function(e){this._addChild(e)},n.prototype.addCentered=function(e){var t=e.w/2;-tthis.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},n.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},n.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},n.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},n.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},n.prototype.setX=function(e){this.x=e;for(var t=0;tthis.max)&&(this.max=e.abcelem.maxpitch))},t.prototype.addBeam=function(e){this.beams.push(e)},t.prototype.setStemDirection=function(){this.average=r(this.total,this.count),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6,delete this.count,this.total=0},t.prototype.calcDir=function(){this.average=r(this.total,this.elems.length),this.forceup?this.stemsUp=!0:this.forcedown?this.stemsUp=!1:this.stemsUp=this.average<6;for(var e=this.stemsUp?"up":"down",t=0;t0&&this.unalignedWords(e.unalignedWords,a,i,n,s),this.extraText(e,a,i,n,s),e.footer&&r&&this.footer(e.footer,t,a,s)}function s(e,t,r,a,n,s,o){r&&(t&&(r="string"==typeof r?t+r:[{text:t}].concat(r)),i(e,r,"historyfont",n=s?"abcjs-extra-text "+n:"","description",a,{absElemType:"extraText",anchor:"start"},o))}function o(e,t,r,n,s,o,c,l,h,d,u,f){if(r){l=u?"abcjs-extra-text "+l:"";var p=f.calc("A",s,l);if("string"==typeof r)t&&(r=t+"\n"+r),a(e,{marginLeft:n,text:r,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle",klass:l},f);else{e.push({startGroup:c,klass:l,name:h}),e.push({move:d.info}),t&&(a(e,{marginLeft:n,text:t,font:s,absElemType:"extraText",name:h,"dominant-baseline":"middle"},f),e.push({move:3*p.height/4}));for(var m=0;m0&&this.startVoice.staff.voices[0]===e)},e.exports=t},6891:function(e){e.exports=function(e,t,r,a){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=r,"above"===a?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},3185:function(e){e.exports=function(e,t,r){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===r?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},8256:function(e){e.exports=function(e,t,r){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=r,this.endingHeightAbove=5,this.pitch=void 0}},3736:function(e){e.exports=function(e,t,r,a,i,n){var s,o=e.text;this.rows=[],t&&this.rows.push({move:t});var c=r.calc("textfont","defined-text");if(""===o)this.rows.push({move:2*c.attr["font-size"]});else if("string"==typeof o)this.rows.push({move:c.attr["font-size"]/2}),this.rows.push({left:a,text:o,font:"textfont",klass:"defined-text",anchor:"start",startChar:e.startChar,endChar:e.endChar,absElemType:"freeText",name:"free-text"}),s=n.calc(o,"textfont","defined-text"),this.rows.push({move:s.height});else if(o){for(var l=0,h=a,d="textfont",u=0;uthis.top&&(this.top=this.pitch2),this.bottom=a,void 0!==this.pitch2&&this.pitch20?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.name?this.name=i.name:this.c?this.name=this.c:this.name=this.type,i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};t.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e="chord"===this.type?this.realWidth/2:0,t=this.x-e-0;return{left:t,right:t+this.realWidth+0}},t.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},t.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},t.prototype.getLane=function(){return void 0===this.lane?0:this.lane},t.prototype.setX=function(e){this.x=e+this.dx},e.exports=t},6994:function(e,t,r){var a=r(1716);e.exports=function(e,t,r,i,n,s,o,c){var l=c.calc("i",r,i);if(""===t)e.push({move:l.height});else{if("string"==typeof t)return void a(e,{marginLeft:s,text:t,font:r,klass:i,marginTop:o.marginTop,anchor:o.anchor,absElemType:o.absElemType,info:o.info,name:n},c);o.marginTop&&e.push({move:o.marginTop});var h=0,d={left:s,anchor:o.anchor,phrases:[]};i&&(d.klass=i),e.push(d);for(var u=0;u0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},t.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;te&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},t.prototype.getYBounds=function(){var e,t;return this.isTie?(this.calcTieDirection(),this.calcX(10,1e3),this.calcTieY()):(this.calcSlurDirection(),this.calcX(10,1e3),this.calcSlurY()),this.above?e=(t=Math.min(this.startY,this.endY))+3:t=(e=Math.min(this.startY,this.endY))-3,[e,t]},e.exports=t},1134:function(e,t,r){var a=r(1716),i=r(6994);e.exports=function(e,t,r,n,s,o,c,l,h,d){if(this.rows=[],e.header&&o){var u=d.calc("X","headerfont","abcjs-header abcjs-meta-top").height;a(this.rows,{marginLeft:c,text:e.header.left,font:"headerfont",klass:"header meta-top",marginTop:-u,info:t.header,name:"header"},d),a(this.rows,{marginLeft:c+s/2,text:e.header.center,font:"headerfont",klass:"header meta-top",marginTop:-u,anchor:"middle",info:t.header,name:"header"},d),a(this.rows,{marginLeft:c+s,text:e.header.right,font:"headerfont",klass:"header meta-top",marginTop:-u,anchor:"end",info:t.header,name:"header"},d)}o&&this.rows.push({move:l.top});var f=r.titleleft?"start":"middle",p=r.titleleft?c:c+s/2;if(e.title){var m=h?"abcjs-title":"";i(this.rows,e.title,"titlefont",m,"title",p,{marginTop:l.title,anchor:f,absElemType:"title",info:t.title},d)}if(n.length)for(var g=0;g0){var v=!(!e.composer&&!e.origin);m=h?"abcjs-rhythm":"",a(this.rows,{marginLeft:c,text:e.rhythm,font:"infofont",klass:m,absElemType:"rhythm",noMove:v,info:t.rhythm,name:"rhythm"},d)}e.composer&&e.composer,e.origin&&e.origin;var b=e.composer?e.composer:"";e.origin&&("string"==typeof b&&"string"==typeof e.origin?b+=" ("+e.origin+")":"string"==typeof b&&"string"!=typeof e.origin?((b=[{text:b}]).push({text:" ("}),(b=b.concat(e.origin)).push({text:")"})):(b.push({text:" ("}),(b=b.concat(e.origin)).push({text:")"}))),b&&(m=h?"abcjs-composer":"",i(this.rows,b,"composerfont",m,"composer",c+s,{anchor:"end",absElemType:"composer",info:t.composer,ingroup:!0},d))}e.author&&e.author.length>0&&(m=h?"abcjs-author":"",i(this.rows,e.author,"composerfont",m,"author",c+s,{anchor:"end",absElemType:"author",info:t.author},d)),e.partOrder&&e.partOrder.length>0&&(m=h?"abcjs-part-order":"",i(this.rows,e.partOrder,"partsfont",m,"part-order",c,{absElemType:"partOrder",info:t.partOrder,anchor:"start"},d))}},2096:function(e){var t=function(e,t,r){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=r.flatBeams};t.prototype.isClosed=function(){return!!this.anchor2},t.prototype.middleNote=function(e){this.middleElems.push(e)},t.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&"up"!==this.anchor1.stemDir||(this.endingHeightAbove=4)},e.exports=t},3197:function(e){var t=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};t.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,r=0;t&&r0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var d=0;d=0&&f.setAttribute("class","abcjs-notehead")}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m0?g.classList[0]+" ":"";g.setAttribute("class",v+t.overrideClasses)}if(h)t.startChar=t.abcelem.startChar,t.endChar=t.abcelem.endChar,c.add(t,g,!1,l);else{t.elemset.push(g);var b=!1;"note"!==t.type&&"tabNumber"!==t.type||(b=!0),c.add(t,g,b,l)}}else t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l);if(t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t,t.heads&&t.heads.length>0){t.notePositions=[];for(var y=0;y=1&&l(e,e.spacing.staffSeparation,v[v.length-1],y.staffGroup);var x=c(e,y.staffGroup,m,b);x.line=p+b,v.push(x),e.paper.closeGroup()}else y.nonMusic&&(t.shouldAddClasses&&(g.klass="abcjs-non-music"),e.paper.openGroup(g),n(e,y.nonMusic,m),e.paper.closeGroup())}return t.reset(),r.bottomText&&r.bottomText.rows&&r.bottomText.rows.length>0&&(t.shouldAddClasses&&(g.klass="abcjs-meta-bottom"),e.paper.openGroup(g),e.moveY(24),n(e,r.bottomText,m),e.paper.closeGroup()),i(e,s,d,h),{staffgroups:v,selectables:m.getElements()}}},9879:function(e,t,r){var a=r(4777);e.exports=function(e,t,r){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=a(e,t.anchor.x,t.pitch,t.dec,{scalex:1,scaley:1,klass:e.controller.classes.generate("decoration dynamics"),fill:e.foregroundColor,stroke:"none",name:"dynamics"});return r.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}},5947:function(e,t,r){var a=r(6764),i=r(5759),n=r(6454),s=r(7199);e.exports=function(e,t,r,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(r=s(t.anchor1.x+t.anchor1.w),h+=a("M %f %f L %f %f ",r,l,r,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=a("M %f %f L %f %f ",o,l,o,s(l+20))),h+=a("M %f %f L %f %f ",r,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending"),"data-name":"ending"}),n(e,{path:h,stroke:e.foregroundColor,fill:e.foregroundColor,"data-name":"line"}),t.anchor1&&i(e,{x:s(r+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0,name:t.text});var d=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},d),[d]}},9045:function(e,t,r){var a=r(6764),i=r(6454),n=r(7199);function s(e,t,r){return n(e+r*t)}var o=[[3.5,-4.8]],c=[[1.5,-1],[.3,-.3],[-3.5,3.8]],l=[[-1.5,2]],h=[[3,4],[3,-4]],d=[[-3,4],[-3,-4]];function u(e,t){for(var r="",a=0;a1&&s.indexOf(".")<0){var p=n.isInGroup()?"":o.klass;e.paper.openGroup({"data-name":o.name,klass:p});for(var m=0,g=0;g0?t.linewidth+e.lineThickness:t.linewidth-e.lineThickness;t.graphelem=i(e,t.x,d,o,e.calcY(t.pitch2),"abcjs-stem","stem");break;case"ledger":t.graphelem=n(e,t.x,t.x+t.w,t.pitch,"abcjs-ledger","ledger",.35+e.lineThickness)}return 1!==t.scalex&&t.graphelem&&function(e,t,r,a,i,n){e.setAttributeOnElement(t,{style:"transform:scale("+r+","+a+");transform-origin:"+i+"px "+n+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,o),t.graphelem}},7199:function(e){e.exports=function(e){return parseFloat(e.toFixed(2))}},3524:function(e,t,r){var a=r(5741),i=r(5829);function n(e,t,r){this.elements=[],this.paper=e,this.tuneNumber=r,this.selectTypes=t}n.prototype.getElements=function(){return this.elements},n.prototype.add=function(e,t,r,a){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var n={absEl:e,svgEl:t,isDraggable:r};void 0!==a&&(n.staffPos=a),this.elements.push(n)}},n.prototype.canSelect=function(e){return!(!1===this.selectTypes||!e||!e.abcelem||!0!==this.selectTypes&&!(void 0===this.selectTypes?"note"===e.abcelem.el_type||"tabNumber"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0))},n.prototype.wrapSvgEl=function(e,t){var r={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:a,unhighlight:i};this.add(r,t,!1)},e.exports=n},4169:function(e){e.exports=function(e,t){var r=Math.round(e.y),a=(e.controller.width-t)/2,i=a+t,n="M "+a+" "+r+" L "+i+" "+r+" L "+i+" "+(r+1)+" L "+a+" "+(r+1)+" L "+a+" "+r+" z";e.paper.pathToBack({path:n,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},7611:function(e){e.exports=function(e,t,r,a){var i=(t+e.padding.left+e.padding.right)*r,n=(e.y+e.padding.bottom)*r;if(e.isPrint&&(n=Math.max(n,1056)),""!==e.ariaLabel){var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s);var o=e.ariaLabel?e.ariaLabel:s;e.paper.setAttribute("aria-label",o)}e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var c={overflow:"hidden"};"resize"===a?e.paper.setResponsiveWidth(i,n):(c.width="",c.height=n+"px",r<1?(c.width=i+"px",e.paper.setSize(i/r,n/r)):e.paper.setSize(i,n)),e.paper.setScale(r),e.paper.setParentStyles(c)}},6764:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}e.exports=function(){for(var e,r,a,i,n,s=0,o=arguments[s++],c=[];o;){if(r=/^[^\x25]+/.exec(o))c.push(r[0]);else if(r=/^\x25{2}/.exec(o))c.push("%");else{if(!(r=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[r[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(r[7])&&"number"!=typeof e)throw"Expecting number but found "+t(e);switch(r[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=r[6]?e.toExponential(r[6]):e.toExponential();break;case"f":e=r[6]?parseFloat(e).toFixed(r[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&r[6]?e.substring(0,r[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(r[7])&&r[2]&&e>0?"+"+e:e,i=r[3]?"0"==r[3]?"0":r[3][1]:" ",n=r[5]-String(e).length,a=r[5]?str_repeat(i,n):"",c.push(r[4]?e+a:a+e)}o=o.substring(r[0].length)}return c.join("")}},5537:function(e,t,r){var a=r(4331),i=r(129),n=r(3145),s=r(7641),o=r(1547),c=r(3624),l=r(5668);function h(e,t,r,n,s){if(r)for(var o=0;o=0&&v.voices&&d(e,t.voices,v.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:m,y2:m,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(v.originalTop),width:e.controller.width,height:e.calcY(v.originalBottom)-e.calcY(v.originalTop),fill:e.foregroundColor,stroke:e.foregroundColor,"fill-opacity":.1,"stroke-opacity":.1}),u=0,M(v,"chordHeightAbove"),M(v,"chordHeightBelow"),M(v,"dynamicHeightAbove"),M(v,"dynamicHeightBelow"),M(v,"endingHeightAbove"),M(v,"lyricHeightAbove"),M(v,"lyricHeightBelow"),M(v,"partHeightAbove"),M(v,"tempoHeightAbove"),M(v,"volumeHeightAbove"),M(v,"volumeHeightBelow"))),e.moveY(a.STEP,-v.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var b=2,y=0,x=0;x6&&(u=0)}}E>1&&(f=t.staffs[0].topLine,p=t.staffs[E-1].bottomLine,c(e,t.startx,.6,f,p,null)),e.y=m}},7865:function(e,t,r){var a=r(6637);e.exports=function(e,t,r,i,n,s,o){var c=e.calcY(i);return a(e,t,r,c,n,s,o)}},7641:function(e,t,r){var a=r(7865);e.exports=function(e,t,r,i,n,s){var o="abcjs-top-line",c=2;n&&(c=n),e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")});var l=0,h=0;if(1===i)a(e,t,r,6,o,null,s+e.lineThickness),l=e.calcY(10),h=e.calcY(2);else for(var d=i-1;d>=0;d--){var u=(d+1)*c;h=e.calcY(u),0===l&&(l=h),a(e,t,r,u,o,null,s+e.lineThickness),o=void 0}return e.paper.closeGroup(),[l,h]}},3987:function(e,t,r){var a=r(2435),i=r(5759);e.exports=function(e,t){var r=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo";var n,s=e.calcY(t.pitch)+2;if(t.tempo.preString){n=i(e,{x:r,y:s,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,name:"pre"},!0);var o=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",n).width;r+=o+o/t.tempo.preString.length}if(t.note){t.note.setX(r);for(var c=0;c.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new n(e),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),t.jazzchords&&(this.jazzchords=t.jazzchords),t.accentAbove&&(this.accentAbove=t.accentAbove),t.germanAlphabet&&(this.germanAlphabet=t.germanAlphabet),t.lineThickness&&(this.lineThickness=t.lineThickness),this.renderer.controller=this,this.renderer.foregroundColor=t.foregroundColor?t.foregroundColor:"currentColor",void 0!==t.ariaLabel&&(this.renderer.ariaLabel=t.ariaLabel),this.renderer.minPadding=t.minPadding?t.minPadding:0,this.reset()};function x(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=0;r0)for(var o=s.staffGroup.voices[0],c=!1,l=0,h=0;hthis.width+1&&(e.topText=new l(e.metaText,e.metaTextInfo,e.formatting,e.lines,n,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.classes.shouldAddClasses,this.getTextSize),e.lines&&e.lines.length>0))for(var s=e.lines.length,o=0;o0)for(var h=c.nonMusic.rows.length,f=0;f0&&c.text[0].center)&&(p.left=n/2+this.renderer.padding.left)}}e.tablatures&&v.layoutTablatures(this.renderer,e);var m=g(this.renderer,this.classes,e,this.width,n,this.responsive,i,this.selectTypes,t,r);if(this.staffgroups=m.staffgroups,this.selectables=m.selectables,this.oneSvgPerLine){var b=this.renderer.paper.svg.parentNode;this.svgs=function(e,t,r,a,i){r||(r="Untitled");var n=t.querySelector("svg");"resize"===a&&(t.style.paddingBottom="");for(var s=n.querySelector("style"),o="resize"===a?n.viewBox.baseVal.width:n.getAttribute("width"),c=t.querySelectorAll("svg > g"),l=0,h=[],d=0;d0&&t.push(e),"abcjs-tab-number"===e)return t.join(" ");if("text instrument-name"===e)return"abcjs-text abcjs-instrument-name";if(null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var r=0;r0&&(t[r]="abcjs-"+t[r])}return t.join(" ")},e.exports=t},1328:function(e){var t=function(e,t){this.formatting=e,this.classes=t};t.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t){var r;r="string"==typeof e?(r=this.formatting[e])?{face:r.face,size:Math.round(4*r.size/3),decoration:r.decoration,style:r.style,weight:r.weight,box:r.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var a=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return r.padding=r.size*a,{font:r,attr:{"font-size":r.size,"font-style":r.style,"font-family":this.getFamily(r.face),"font-weight":r.weight,"text-decoration":r.decoration,class:this.classes.generate(t)}}},e.exports=t},9799:function(e){var t=function(e,t){this.getFontAndAttr=e,this.svg=t};t.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},t.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},t.prototype.getFamily=function(e){return'"'===e[0]&&'"'===e[e.length-1]?e.substring(1,e.length-1):e},t.prototype.calc=function(e,t,r,a){var i;i="string"==typeof t?this.attr(t,r):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":this.getFamily(t.face),"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(r)}};var n=this.svg.getTextSize(e,i.attr,a);return i.font.box?{height:n.height+4*i.font.padding,width:n.width+4*i.font.padding}:n},t.prototype.baselineToCenter=function(e,t,r,a,i){return.5*this.calc(e,t,r).height+(i-a-2)*this.attr(t,r).font.size},e.exports=t},2187:function(e){e.exports=function(e,t,r,a){if(e)for(var i=0;i0&&(o.length>0&&" "!==o[o.length-1]&&(o+=" "),o+=t),n.setAttribute("class",o)}}},4331:function(e){var t={FONTEM:360,FONTSIZE:30};t.STEP=93*t.FONTSIZE/720,t.SPACE=10,t.TOPNOTE=15,t.STAVEHEIGHT=100,t.INDENT=50,e.exports=t},8123:function(e){function t(e,t,r,a){if(0===e.indexOf(t)){var i=e.replace(t,""),n=parseInt(i,10);""+n===i&&(r[a]=n)}}e.exports=function(e,r){var a=[];if(e.absEl.elemset){for(var i={},n=0;n=0&&r=0?(i=function(e,t,r){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY||Math.abs(t.layerY/r-t.offsetY)<3?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[n].svgEl.getBBox(),t,e.scale),r=i[0],a=i[1]):(i=function(e){var t,r,a=1,i=1,n=e.target.closest("svg"),s=0;return n&&n.viewBox&&n.viewBox.baseVal&&(0!==n.viewBox.baseVal.width&&(a=n.viewBox.baseVal.width/n.clientWidth),0!==n.viewBox.baseVal.height&&(i=n.viewBox.baseVal.height/n.clientHeight),s=n.viewBox.baseVal.y),e.target&&"svg"===e.target.tagName?(t=e.offsetX,r=e.offsetY):(t=e.layerX,r=e.layerY),[t*=a,(r*=i)+s]}(t),n=function(e,t,r){for(var a=9999999,i=-1,n=0;n0;n++){var s=e.selectables[n];if(e.getDim(s),s.dim.leftt&&s.dim.topr)i=n,a=0;else if(s.dim.topr){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));ot){var c=Math.min(Math.abs(s.dim.top-r),Math.abs(s.dim.bottom-r));cMath.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(r-s.dim.top)>Math.abs(r-s.dim.bottom)?Math.abs(r-s.dim.bottom):Math.abs(r-s.dim.top),d=Math.sqrt(l*l+h*h);d=0&&a<=12?i:-1}(e,r=i[0],a=i[1])),{x:r,y:a,clickedOn:n}}function l(e){if(e&&e.target&&e.touches&&!(e.touches.length<1)){var t=e.target.getBoundingClientRect(),r=e.touches[0].pageX-t.left,a=e.touches[0].pageY-t.top;e.touches[0].offsetX=r,e.touches[0].offsetY=a,e.touches[0].layerX=e.touches[0].pageX,e.touches[0].layerY=e.touches[0].pageY}}function h(e){var t=e;"touchstart"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0]));var r=c(this,t);r.clickedOn>=0&&("touchstart"===e.type||0===e.button)&&this.selectables[r.clickedOn]&&(this.dragTarget=this.selectables[r.clickedOn],this.dragIndex=r.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:r.x,y:r.y},this.dragging&&this.dragTarget.isDraggable&&(function(e,t){if(e){var r=v(e.svg);r[t]=!0,b(e.svg,r)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function d(e){var t=e;if("touchmove"===e.type&&(l(e),e.touches.length>0&&(t=e.touches[0])),this.lastTouchMove=e,this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism&&this.dragMouseStart){var r=c(this,t),i=Math.round((r.y-this.dragMouseStart.y)/a.STEP);i!==this.dragYStep&&(this.dragYStep=i,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+i*a.STEP+")"))}}function u(e){var t=e;"touchend"===e.type&&this.lastTouchMove&&(l(this.lastTouchMove),this.lastTouchMove&&this.lastTouchMove.touches&&this.lastTouchMove.touches.length>0&&(t=this.lastTouchMove.touches[0])),this.dragTarget&&(m.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),p.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,t),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var r=v(e.svg);delete r[t],b(e.svg,r)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function f(e){e>=0&&eo&&en&&(i=n),i<-n&&(i=-n),i}(x,k,v,w),A=N+Math.floor(_/2),B=N+Math.floor(-_/2),S||(y&&N<6||!y&&N>6)&&(A=6,B=6),[A,B]),f=c(e.stemsUp,r,l);e.addBeam({startX:f[0],endX:f[1],startY:u[0],endY:u[1],dy:t});for(var p=function(e,t,r,a,i){for(var o=[],l=[],h=0;h0&&d.abcelem.beambr&&d.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],d);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=d.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var x=l.length-1;x>=0;x--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-x-4){var k=f,w=p+m*(x+1);l[x].single&&(k=0===h?f+5:f-5,w=n(r.startX,r.startY,r.endX,r.endY,k)+m*(x+1));var T={startX:l[x].x,endX:k,startY:l[x].y,endY:w,dy:i};if(void 0!==l[x].split){var C=l[x].split;T.endX<=C[C.length-1]&&(C[C.length-1]-=d.w),C.push(T.endX),T.split=l[x].split}o.push(T),l=l.slice(0,x)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m0?((i=(r-(a-n*i))/n)*s>50&&(i=50/s),i):null}e.exports=function(e,t,r,n,s,l){var h,d,u=r;for(h=0;hMath.round(u)&&(u=f,s&&(h=-1)))}for(h=0;h=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),n(c,l,"lyricHeightAbove"),n(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+i,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+i,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(n(c,l,"dynamicHeightAbove"),n(c,l,"volumeHeightAbove")),n(c,l,"partHeightAbove"),n(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/a.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+i),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+i}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+i):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+i):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+i),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var d=0;d0&&(c.top+=f)}c.top+=e.spacing.staffTopMargin/a.STEP,r=2-c.bottom}}},735:function(e,t,r){var a=r(937);function i(e){for(var t=0;t0?0:5e-7)}e.exports=function(e,t,r,s,o){var c,l=0,h=1e3,d=o;s.startx=d;var u,f,p=0;for(r&&console.log("init layout",e),c=0;c1e-7?v.push(s.voices[c]):g.push(s.voices[c]);m=0;var b=0;for(c=0;cd&&(d=a.getNextX(g[c]),m=a.getSpacingUnits(g[c]),b=g[c].spacingduration);l+=m,h=Math.min(h,m),r&&console.log("currentduration: ",p,l,h);var y=void 0;for(c=0;c0){d=w;for(var C=0;Cd&&(d=a.getNextX(s.voices[c]),m=a.getSpacingUnits(s.voices[c]));return function(e){for(var t=0,r=0;r0){var i=a.children.length-1,n=a.children[i];if("bar"===n.abcelem.el_type){var s=n.children[0].x;s>t?t=s:n.children[0].x=t}}}}(s.voices),l+=m,s.setWidth(d),{spacingUnits:l,minSpace:h}}},3294:function(e,t,r){var a=r(3721);function i(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var r=i(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,r){if(0===r.beams.length)return 0;r=r.beams[0];var i=e+(t-e)/2;return a(r.startX,r.startY,r.endX,r.endY,i)}(r,e.anchor2.x,t),e.yTextPos+=i(t)?3:-2,e.xTextPos=(o=r,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,i(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var n=0,s=0;se.startNote||n>e.endNote)&&(e.startNote=n,e.endNote=n),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},937:function(e){var t=function(){};t.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},t.layoutEnded=function(e){return e.i>=e.children.length},t.getNextX=function(e){return Math.max(e.minx,e.nextx)},t.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},t.layoutOneItem=function(e,t,r,a,i){var n=r.children[r.i];if(!n)return 0;var s=e-r.minx,o=r.durationindex+n.duration>0?a:0;if("note"===n.abcelem.el_type&&!n.abcelem.rest&&0!==r.voicenumber&&i){var c=i.children[i.i],l=c&&(n.abcelem.maxpitch<=c.abcelem.maxpitch+1&&n.abcelem.maxpitch>=c.abcelem.minpitch-1||n.abcelem.minpitch<=c.abcelem.maxpitch+1&&n.abcelem.minpitch>=c.abcelem.minpitch-1);if(l&&n.abcelem.minpitch===c.abcelem.minpitch&&n.abcelem.maxpitch===c.abcelem.maxpitch&&c.heads&&c.heads.length>0&&n.heads&&n.heads.length>0&&c.heads[0].c===n.heads[0].c&&(l=!1),l){var h=c.heads&&c.heads.length>0?c.heads[0].realWidth:c.fixed.w;n.adjustedWidth||(n.adjustedWidth=h+n.w),n.w=n.adjustedWidth;for(var d=0;d0&&t.putChordInLane(a),void(e[a]=r.right);e.push(r.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,r=0;r=0;r--)(a=e[t].children[r]).chordHeightBelow&&o(n,a)}return(i.length>1||n.length>1)&&function(e,t,r){for(var a=0;a=0};n.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.lineThickness=0,this.initVerticalSpace()},n.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},n.prototype.setLineThickness=function(e){this.lineThickness=e},n.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},n.prototype.setPadding=function(e){function t(t,r,a,i,n){void 0!==e.formatting[a]?t.padding[r]=e.formatting[a]:void 0!==t.paddingOverride[r]?t.padding[r]=t.paddingOverride[r]:t.isPrint?t.padding[r]=i:t.padding[r]=n}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},n.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},n.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,staffTopMargin:0,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},n.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.stafftopmargin&&(this.spacing.staffTopMargin=4*e.stafftopmargin/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},n.prototype.calcY=function(e){return this.y-e*a.STEP},n.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},n.prototype.absolutemoveY=function(e){this.y=e},e.exports=n},4101:function(e){var t="http://www.w3.org/2000/svg";function r(e){this.svg=s(),this.currentGroup=[],e.appendChild(this.svg)}function a(e,t,r){var a=r-e;return"M "+e+" "+t+" l "+a+" 0 l 0 1 l "+-a+" 0 z "}function i(e,t,r){var a=r-t;return"M "+e+" "+t+" l 0 "+a+" l 1 0 l 0 "+-a+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=s(),this.currentGroup=[],e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),r=document.createTextNode(e);t.appendChild(r),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var r=this.svg.parentNode.getAttribute("class");r?r.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",r+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var a=t/e*100;this.svg.parentNode.style["padding-bottom"]=a+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setAttribute=function(e,t){this.svg.setAttribute(e,t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var r=document.createElementNS(t,"style");r.textContent=e,this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],r=e.x,n=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(a(r,n,s)),t.push(a(r,o,s)),t.push(i(s,n,o)),t.push(i(r,o,n)),this.path({path:t.join(" "),stroke:"none","data-name":e["data-name"]})},r.prototype.dottedLine=function(e){var r=document.createElementNS(t,"line");r.setAttribute("x1",e.x1),r.setAttribute("x2",e.x2),r.setAttribute("y1",e.y1),r.setAttribute("y2",e.y2),r.setAttribute("stroke",e.stroke),r.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var r=document.createElementNS(t,"rect");r.setAttribute("x",e.x),r.setAttribute("width",e.width),r.setAttribute("y",e.y),r.setAttribute("height",e.height),e.stroke&&r.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&r.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&r.setAttribute("fill",e.fill),e["fill-opacity"]&&r.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(r,this.svg.firstChild)},r.prototype.text=function(e,r,a){var i=document.createElementNS(t,"text");for(var n in i.setAttribute("stroke","none"),r)r.hasOwnProperty(n)&&i.setAttribute(n,r[n]);for(var s=(""+e).split("\n"),o=0;o0?this.currentGroup[0].removeChild(r):this.svg.removeChild(r)),a&&(n[a]=i),i},r.prototype.openGroup=function(e){e=e||{};var r=document.createElementNS(t,"g");return e.klass&&r.setAttribute("class",e.klass),e.fill&&r.setAttribute("fill",e.fill),e.stroke&&r.setAttribute("stroke",e.stroke),e["data-name"]&&r.setAttribute("data-name",e["data-name"]),e.prepend?this.prepend(r):this.append(r),this.currentGroup.unshift(r),r},r.prototype.closeGroup=function(){var e=this.currentGroup.shift();return e&&0===e.children.length?(e.parentElement.removeChild(e),null):e},r.prototype.path=function(e){var r=document.createElementNS(t,"path");for(var a in e)e.hasOwnProperty(a)&&("path"===a?r.setAttributeNS(null,"d",e.path):"klass"===a?r.setAttributeNS(null,"class",e[a]):void 0!==e[a]&&r.setAttributeNS(null,a,e[a]));return this.append(r),r},r.prototype.pathToBack=function(e){var r=document.createElementNS(t,"path");for(var a in e)e.hasOwnProperty(a)&&("path"===a?r.setAttributeNS(null,"d",e.path):"klass"===a?r.setAttributeNS(null,"class",e[a]):r.setAttributeNS(null,a,e[a]));return this.prepend(r),r},r.prototype.lineToBack=function(e){for(var r=document.createElementNS(t,"line"),a=Object.keys(e),i=0;i0?this.currentGroup[0].appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup.length>0?this.currentGroup[0].appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setAttributeNS(null,r,t[r])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r}},t={},r=function r(a){var i=t[a];if(void 0!==i)return i.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,r),n.exports}(7001),r;var e,t,r})); \ No newline at end of file diff --git a/dist/abcjs-plugin-min.js.LICENSE b/dist/abcjs-plugin-min.js.LICENSE index ce22b18f..6da816a5 100644 --- a/dist/abcjs-plugin-min.js.LICENSE +++ b/dist/abcjs-plugin-min.js.LICENSE @@ -1,5 +1,5 @@ /**! -Copyright (c) 2009-2023 Paul Rosen and Gregory Dyke +Copyright (c) 2009-2024 Paul Rosen and Gregory Dyke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 4972a493f70fc128186f325f16d8c8bc22b465eb Mon Sep 17 00:00:00 2001 From: paulrosen Date: Sat, 14 Sep 2024 10:27:23 -0400 Subject: [PATCH 10/10] Add accompaniment example --- examples/accompaniment.html | 237 +++++++++++++++++++++++ examples/toc.html | 368 ++++++++++++++++++------------------ 2 files changed, 426 insertions(+), 179 deletions(-) create mode 100644 examples/accompaniment.html diff --git a/examples/accompaniment.html b/examples/accompaniment.html new file mode 100644 index 00000000..477108af --- /dev/null +++ b/examples/accompaniment.html @@ -0,0 +1,237 @@ + + + + + + + + + + + abcjs: Accompaniment Demo + + + + + + + + + +
+ abcjs logo +

Accompaniment

+
+
+

This shows different options for tweaking the sound of the accompaniment.

+
+

Pattern:

+ + + + +
+
+

Stress:

+ + + +
+
+

Duration:

+ + + + +
+
+

Melody:

+ + +
+
+
+

Add this to your code:

+

+		
+
+ + + \ No newline at end of file diff --git a/examples/toc.html b/examples/toc.html index 4979e449..4912a351 100644 --- a/examples/toc.html +++ b/examples/toc.html @@ -1,192 +1,202 @@ + - - - - + + + + - - + + - abcjs: Table of Contents + abcjs: Table of Contents - - + + + -
abcjs logo
+
abcjs logo
-
-

Table of Contents

-

- Click on any of the demos below to get an idea of the types of things you can do with abcjs. - If this is your first time using abcjs, the demos in the first section are suggested as they are - the easiest to set up. After loading each demo, right-click the webpage and choose "view page source" - to see how the demo works. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+

Table of Contents

+

+ Click on any of the demos below to get an idea of the types of things you can do with abcjs. + If this is your first time using abcjs, the demos in the first section are suggested as they are + the easiest to set up. After loading each demo, right-click the webpage and choose "view page source" + to see how the demo works. +

+
Start Here
BasicA demo of the most bare-boned way to display sheet music.
EditorA demo of the simplest way to present the user with an editor so they can change music on the fly.
Basic SynthA demo of the most basic way to incorporate audio playback using abcjs.
AnalysisA demo of the information that is available about an ABC tune book.
Visual Demos
AnimationA demo of animated cursor effects that can be added using abcjs.
AnnotatingA demo showing how to annotate your sheet music using abcjs.
BasicA demo of the most bare-boned way to display sheet music.
Change GlyphsA demo showing how to substitute the music symbols with your own.
Line WrappingA demo of the line wrapping capabilities.
PluginA demo showing how to use the plugin version of abcjs. (Useful for sites with a CMS where a user might enter ABC code)
PrintableA demo showing how to format the music for printing.
ResponsiveA demo showing the music filling up whatever available horizontal space is on the page.
Zoom To FitA demo showing the music filling up whatever available space is on the page.
TransposeA demo showing how to transpose.
Output Transposed ABCA demo showing how to transpose and output the result of the transposition.
TablatureA demo showing how to create tablature.
Tune BookA demo showing how to pick tunes from a tune book.
Automatically Add Note NamesA demo of modifying the SVG output after drawing to add note names.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Start Here
BasicA demo of the most bare-boned way to display sheet music.
EditorA demo of the simplest way to present the user with an editor so they can change music on the + fly.
Basic SynthA demo of the most basic way to incorporate audio playback using abcjs.
AnalysisA demo of the information that is available about an ABC tune book.
Visual Demos
AnimationA demo of animated cursor effects that can be added using abcjs.
AnnotatingA demo showing how to annotate your sheet music using abcjs.
BasicA demo of the most bare-boned way to display sheet music.
Change GlyphsA demo showing how to substitute the music symbols with your own.
Line WrappingA demo of the line wrapping capabilities.
PluginA demo showing how to use the plugin version of abcjs. (Useful for sites with a CMS where a user + might enter ABC code)
PrintableA demo showing how to format the music for printing.
ResponsiveA demo showing the music filling up whatever available horizontal space is on the page.
Zoom To FitA demo showing the music filling up whatever available space is on the page.
TransposeA demo showing how to transpose.
Output Transposed ABCA demo showing how to transpose and output the result of the transposition.
TablatureA demo showing how to create tablature.
Tune BookA demo showing how to pick tunes from a tune book.
Automatically Add Note NamesA demo of modifying the SVG output after drawing to add note names.
Interactive Demos
DraggingA demo showing how to implement a visual interface that supports dragging.
EditorA demo of the simplest way to present the user with an editor so they can change music on the fly.
Editor With SynthA demo of the editor with synth capabilities
Editor With TransposeA demo of the editor and transposing
Interactive Demos
DraggingA demo showing how to implement a visual interface that supports dragging.
EditorA demo of the simplest way to present the user with an editor so they can change music on the + fly.
Editor With SynthA demo of the editor with synth capabilities
Editor With TransposeA demo of the editor and transposing
Audio Demos
Basic SynthA demo of the most basic way to incorporate audio playback using abcjs.
KaraokeA demo of allowing the user to turn off voices.
MicrotonesA demo of creating non-western music that relies on a different scale.
Modify Synth InputA demo showing how to tweak the synth after the music has been processed.
Play On RepeatA demo showing how to loop a section of the music.
Synth OnlyA demo showing how to create sound without any visual representation.
Synth OptionsA full-featured demo with many synth options.
Synth PlayerA demo showing how to use abcjs' synth player.
Tempo ChangingShowing how to control the tempo.
Tune/Instrument SwitcherShowing how to render and switch multiple tunes and change instruments.
Swing FeelShowing how to add a swing feel to the synth.
Analysis
AnalysisA demo of the information that is available about an ABC tune book.
ParsingA demo of getting lyrics out of an abc string.
-
+ + Audio Demos + + + Basic Synth + A demo of the most basic way to incorporate audio playback using abcjs. + + + Karaoke + A demo of allowing the user to turn off voices. + + + Microtones + A demo of creating non-western music that relies on a different scale. + + + Modify Synth Input + A demo showing how to tweak the synth after the music has been processed. + + + Play On Repeat + A demo showing how to loop a section of the music. + + + Synth Only + A demo showing how to create sound without any visual representation. + + + Synth Options + A full-featured demo with many synth options. + + + Synth Player + A demo showing how to use abcjs' synth player. + + + Tempo Changing + Showing how to control the tempo. + + + Tune/Instrument Switcher + Showing how to render and switch multiple tunes and change instruments. + + + Swing Feel + Showing how to add a swing feel to the synth. + + + Accompaniment + Showing how to vary the sound of the generated accompaniment. + + + Analysis + + + Analysis + A demo of the information that is available about an ABC tune book. + + + Parsing + A demo of getting lyrics out of an abc string. + + + + - + + \ No newline at end of file